@esri/solutions-components 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -1
  2. package/dist/cjs/solution-configuration.cjs.entry.js +1086 -2
  3. package/dist/cjs/solution-configuration.cjs.entry.js.map +1 -1
  4. package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
  5. package/dist/cjs/{solution-store-f0547fe7.js → solution-store-e2fc11ac.js} +6 -1
  6. package/dist/cjs/solution-store-e2fc11ac.js.map +1 -0
  7. package/dist/collection/components/solution-configuration/solution-configuration.js +5 -9
  8. package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
  9. package/dist/components/solution-configuration.js +1086 -2
  10. package/dist/components/solution-configuration.js.map +1 -1
  11. package/dist/components/solution-store.js +1 -1
  12. package/dist/components/solution-store.js.map +1 -1
  13. package/dist/esm/calcite-shell-panel_14.entry.js +1 -1
  14. package/dist/esm/solution-configuration.entry.js +1086 -2
  15. package/dist/esm/solution-configuration.entry.js.map +1 -1
  16. package/dist/esm/solution-contents_3.entry.js +1 -1
  17. package/dist/esm/{solution-store-c1f6173a.js → solution-store-b3c65467.js} +2 -2
  18. package/dist/esm/solution-store-b3c65467.js.map +1 -0
  19. package/dist/solutions-components/{p-0e7a0839.entry.js → p-542189bc.entry.js} +2 -2
  20. package/dist/solutions-components/{p-0e7a0839.entry.js.map → p-542189bc.entry.js.map} +0 -0
  21. package/dist/solutions-components/{p-ee9be0ef.entry.js → p-638738f2.entry.js} +2 -2
  22. package/dist/solutions-components/{p-ee9be0ef.entry.js.map → p-638738f2.entry.js.map} +0 -0
  23. package/dist/solutions-components/p-7e8985f2.entry.js +1979 -0
  24. package/dist/solutions-components/p-7e8985f2.entry.js.map +1 -0
  25. package/dist/solutions-components/{p-065830b8.js → p-b25f6ebe.js} +2 -2
  26. package/dist/solutions-components/p-b25f6ebe.js.map +1 -0
  27. package/dist/solutions-components/solutions-components.esm.js +1 -1
  28. package/dist/solutions-components_commit.txt +5 -6
  29. package/package.json +1 -1
  30. package/dist/cjs/solution-store-f0547fe7.js.map +0 -1
  31. package/dist/esm/solution-store-c1f6173a.js.map +0 -1
  32. package/dist/solutions-components/p-065830b8.js.map +0 -1
  33. package/dist/solutions-components/p-401541a5.entry.js +0 -895
  34. package/dist/solutions-components/p-401541a5.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"file":"solution-configuration.entry.esm.js","mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAkCA;AACA;AACA;AACA;AACA;AAEA;;;;;;;SAOgB,iBAAiB,CAC/B,SAA0B;EAE1B,MAAM,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;EAC9C,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG;IACrC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,IAAI,CAAC;GACb,EAAE,EAAE,CAAC,CAAC;EACP,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG;IAChC,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;MAChC,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC;MACpE,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;KACjF;IACD,OAAO,IAAI,CAAC;GACb,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED;;;;;;;SAOgB,gBAAgB,CAC9B,SAA0B;EAE1B,MAAM,SAAS,GAAG,EAAE,CAAC;;EAGrB,SAAS,qBAAqB,CAAC,SAAS,EAAE,EAAE;IAC1C,MAAM,SAAS,GAAG,S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utils.getInventoryItems"],"sources":["./src/utils/templates.ts","./src/components/solution-configuration/solution-configuration.scss?tag=solution-configuration","./src/components/solution-configuration/solution-configuration.tsx"],"sourcesContent":["/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/*\r\n | Helper functions to get required values from solutions templates\r\n*/\r\nimport {\r\n //EUpdateType,\r\n IInventoryItem,\r\n //IItemDetails,\r\n //IItemShare,\r\n IOrganizationVariableItem,\r\n //IResourcePath,\r\n //SolutionModels,\r\n //ISolutionSpatialReferenceInfo,\r\n IVariableItem\r\n} from '../utils/interfaces';\r\nimport {\r\n IItemTemplate\r\n} from '@esri/solution-common';\r\n\r\n//--------------------------------------------------------------------------\r\n//\r\n// Public Functions\r\n//\r\n//--------------------------------------------------------------------------\r\n\r\n/**\r\n * Sort the solution items\r\n *\r\n * @param templates a list of item templates from the solution\r\n *\r\n * @returns a sorted list of solution items\r\n */\r\nexport function getInventoryItems(\r\n templates: IItemTemplate[]\r\n): IInventoryItem[] {\r\n const hierarchy = getItemHierarchy(templates);\r\n const ids = hierarchy.reduce((prev, cur) => {\r\n prev.push(cur.id);\r\n return prev;\r\n }, []);\r\n return templates.reduce((prev, cur) => {\r\n if (ids.indexOf(cur.itemId) > -1) {\r\n const hierarchyItems = hierarchy.filter(hi => hi.id === cur.itemId);\r\n prev.push(_getItemFromTemplate(cur, templates, hierarchyItems[0].dependencies));\r\n }\r\n return prev;\r\n }, []);\r\n}\r\n\r\n/**\r\n * Create item hierarchy that will avoid issues from cylical dependencies\r\n *\r\n * @param templates a list of item templates from the solution\r\n *\r\n * @returns a hierarchy for item and item dependency display\r\n */\r\nexport function getItemHierarchy(\r\n templates: IItemTemplate[]\r\n): any[] {\r\n const hierarchy = [];\r\n\r\n // Get the template specified by id out of a list of templates\r\n function getTemplateInSolution(templates, id): any {\r\n const iTemplate = templates.findIndex((template) => id === template.itemId);\r\n return iTemplate >= 0 ? templates[iTemplate] : null;\r\n }\r\n\r\n // Hierarchically list the dependencies of specified node\r\n function traceItemId(id, accumulatedHierarchy, alreadyVisitedIds = []): void {\r\n // Get the dependencies of the node\r\n const template = getTemplateInSolution(templates, id);\r\n /* istanbul ignore else */\r\n if (template) {\r\n const templateEntry = {\r\n id,\r\n dependencies: []\r\n };\r\n\r\n // Visit each dependency, but only if this template is not in the alreadyVisitedIds list to avoid infinite loops\r\n /* istanbul ignore else */\r\n if (alreadyVisitedIds.indexOf(id) < 0) {\r\n // Add dependency to alreadyVisitedIds list\r\n alreadyVisitedIds.push(id);\r\n\r\n template.dependencies.forEach((dependencyId) => {\r\n // Remove dependency from list of templates to visit in the top-level loop\r\n const iDependencyTemplate = templateItemIds.indexOf(dependencyId);\r\n /* istanbul ignore else */\r\n if (iDependencyTemplate >= 0) {\r\n templateItemIds.splice(iDependencyTemplate, 1);\r\n }\r\n\r\n traceItemId(dependencyId, templateEntry.dependencies, alreadyVisitedIds);\r\n });\r\n }\r\n accumulatedHierarchy.push(templateEntry);\r\n }\r\n }\r\n\r\n // Start with top-level nodes and add in the rest of the nodes to catch cycles without top-level nodes\r\n let templateItemIds: string[] = _getTopLevelItemIds(templates);\r\n\r\n const otherItems = templates\r\n .filter((template) => templateItemIds.indexOf(template.itemId) < 0) // only keep non-top-level nodes\r\n .sort((a, b) => b.dependencies.length - a.dependencies.length); // sort so that nodes with more dependencies come first--reduces stubs\r\n\r\n templateItemIds = templateItemIds.concat(otherItems.map((template) => template.itemId));\r\n\r\n // Step through the list of nodes; we'll also remove nodes as we visit them\r\n let itemId = templateItemIds.shift();\r\n while (typeof itemId !== \"undefined\") {\r\n traceItemId(itemId, hierarchy);\r\n itemId = templateItemIds.shift();\r\n }\r\n\r\n return hierarchy;\r\n}\r\n\r\n/**\r\n * Explore the solution item templates for variables we will allow users to insert at runtime\r\n *\r\n * @param templates a list of item templates from the solution\r\n * @param translations nls translation object\r\n *\r\n * @returns a list of variables from the solution item templates\r\n */\r\nexport function getSolutionVariables(\r\n templates: any[],\r\n translations: any\r\n): IVariableItem[] {\r\n const vars: IVariableItem[] = [];\r\n templates.forEach(t => {\r\n const item = {\r\n id: t.itemId,\r\n title: t.item.title || t.item.name,\r\n type: t.type,\r\n value: undefined,\r\n dependencies: [{\r\n id: t.itemId,\r\n title: translations.itemId,\r\n value: `{{${t.itemId}.itemId}}`,\r\n }]\r\n };\r\n if (t.item.url) {\r\n item.dependencies.push({\r\n id: t.itemId,\r\n title: translations.url,\r\n value: `{{${t.itemId}.url}}`,\r\n });\r\n }\r\n if (t.type === \"Feature Service\") {\r\n // TODO need to set source service name var...\r\n // TODO need to set soure service shape field name \"{{d05b3cf1ffcb4a4fa677627dfb18609e.name}}.Shape\"\r\n item.dependencies.push({\r\n id: t.itemId,\r\n title: translations.solutionExtent,\r\n value: `{{${t.itemId}.solutionExtent}}`,\r\n })\r\n _addLayersOrTables(t.properties.layers || [], item, t, translations);\r\n _addLayersOrTables(t.properties.tables || [], item, t, translations);\r\n }\r\n vars.push(item);\r\n })\r\n\r\n return vars;\r\n}\r\n\r\n/**\r\n * Set key organization variables we will allow users to insert at runtime\r\n *\r\n * @param translations nls translation object\r\n *\r\n * @returns a list of variables for the organization\r\n */\r\nexport function getOrganizationVariables(\r\n translations: any\r\n): IOrganizationVariableItem[] {\r\n const orgVars: IOrganizationVariableItem[] = [{\r\n id: \"\",\r\n title: translations.geocodeUrl,\r\n value: \"{{organization.helperServices.geocode:getDefaultLocatorURL}}\"\r\n }, {\r\n id: \"\",\r\n title: translations.geometryUrl,\r\n value: \"{{organization.helperServices.geometry.url}}\"\r\n }, {\r\n id: \"\",\r\n title: translations.portalBaseUrl,\r\n value: \"{{portalBaseUrl}}\"\r\n }, {\r\n id: \"\",\r\n title: translations.routeUrl,\r\n value: \"{{organization.helperServices.route.url}}\"\r\n }, {\r\n id: \"\",\r\n title: translations.solutionItemExtent,\r\n value: \"{{solutionItemExtent}}\"\r\n }];\r\n return orgVars;\r\n}\r\n\r\n//--------------------------------------------------------------------------\r\n//\r\n// Private Functions\r\n//\r\n//--------------------------------------------------------------------------\r\n\r\n/**\r\n * Explore a solution item template for variables we will allow users to insert at runtime.\r\n * This function will update the item argument that is passed in with the var details.\r\n *\r\n * @param children a list of layers or tables from a template\r\n * @param item an object that store key details for a given variable\r\n * @param template one of the templates from the current solution\r\n * @param translations nls translations object\r\n *\r\n */\r\nfunction _addLayersOrTables(\r\n children: any[],\r\n item: any,\r\n template: any,\r\n translations: any\r\n): void {\r\n children.forEach(l => {\r\n const name = l.name && l.name.indexOf(\"||\") > -1 ? l.name.split(\"||\")[1].replace(\"}}\", \"\").trim() : l.name;\r\n\r\n item.dependencies.push({\r\n id: template.itemId,\r\n title: `${name} (${translations.id})`,\r\n value: `{{${template.itemId}.layer${l.id}.id}}`,\r\n });\r\n item.dependencies.push({\r\n id: template.itemId,\r\n title: `${name} (${translations.name})`,\r\n value: `{{${template.itemId}.layer${l.id}.name||${name}}}`,\r\n });\r\n });\r\n}\r\n\r\n/**\r\n * Capture key details from the solution item template\r\n *\r\n * @param template one of the templates from the current solution\r\n * @param templates full list of templates\r\n * @param dependencies list of hierarchical dependencies\r\n *\r\n * @returns an IInventoryItem that is used by other components to work with this template\r\n */\r\nfunction _getItemFromTemplate(\r\n template: any,\r\n templates: any[],\r\n dependencies: any[]\r\n): IInventoryItem {\r\n return {\r\n id: template.itemId || \"\",\r\n title: template.item.title || \"\",\r\n dependencies: _getDependencies(dependencies, templates),\r\n type: template.item.type || \"\",\r\n typeKeywords: template.item.typeKeywords || []/*,\r\n solutionItem: {\r\n itemId: template.itemId,\r\n itemDetails: _getItemDetails(template.item, template.type === \"Group\"),\r\n isResource: _getIsResource(template),\r\n data: template.data,\r\n properties: template.properties,\r\n type: template.type,\r\n groupDetails: _getGroupDetails(template, templates)\r\n }*/\r\n };\r\n}\r\n\r\n/**\r\n * Capture key details from the solution item template\r\n *\r\n * @param dependencies list of dependencies from a template\r\n * @param templates full list of templates\r\n *\r\n * @returns a list of IInventoryItem that are used by other components to work with the templates\r\n */\r\nfunction _getDependencies(\r\n dependencies: any[],\r\n templates: any[]\r\n): IInventoryItem[] {\r\n const dependencyItems = [];\r\n const depIds = dependencies.reduce((prev, cur) => {\r\n prev.push(cur.id)\r\n dependencyItems.push(cur)\r\n return prev;\r\n }, []);\r\n return templates.reduce((prev, curr) => {\r\n const i = depIds.indexOf(curr.itemId);\r\n if (i > -1) {\r\n prev.push(_getItemFromTemplate(curr, templates, dependencyItems[i].dependencies));\r\n }\r\n return prev;\r\n }, []);\r\n}\r\n\r\n/**\r\n * Capture the key item details for a given template\r\n *\r\n * @param item the templates item\r\n * @param isGroup boolean to indicate if the item is a group\r\n * @param itemId the item id of the template\r\n *\r\n * @returns a IItemDetails object for the current item\r\n */\r\n/*\r\nfunction _getItemDetails(\r\n item: any,\r\n isGroup: boolean\r\n): IItemDetails {\r\n return {\r\n title: item.title || \"\",\r\n snippet: item.snippet || \"\",\r\n description: item.description || \"\",\r\n tags: item.tags || [],\r\n accessInformation: !isGroup ? item.accessInformation || \"\" : \"\",\r\n licenseInfo: !isGroup ? item.licenseInfo || \"\" : \"\"\r\n };\r\n}\r\n*/\r\n\r\n/**\r\n * Capture the key item details for a given group template\r\n *\r\n * @param template one of the templates from the current solution\r\n * @param templates full list of templates\r\n *\r\n * @returns a list of IItemShare objects\r\n */\r\n/*\r\nfunction _getGroupDetails(\r\n template: any,\r\n templates: any[]\r\n): IItemShare[] {\r\n return template.type === \"Group\" ? templates.reduce((prev, cur) => {\r\n if (cur.itemId !== template.itemId && cur.type !== \"Group\") {\r\n prev.push({\r\n id: cur.itemId,\r\n title: cur.item.name || cur.item.title,\r\n isShared: (cur.groups || []).indexOf(template.itemId) > -1,\r\n shareItem: (cur.groups || []).indexOf(template.itemId) > -1,\r\n type: cur.type,\r\n typeKeywords: cur.item.typeKeywords\r\n });\r\n }\r\n return prev;\r\n }, []) : [];\r\n}\r\n*/\r\n\r\n/**\r\n * Used to understand if we are dealing with a binary object that will support upload/download\r\n *\r\n * @param template one of the templates from the current solution\r\n *\r\n * @returns true if this item supports upload/download\r\n */\r\n/*\r\nfunction _getIsResource(\r\n template: any\r\n): boolean {\r\n return template.type !== \"Group\" && template.resources.some(r => r.indexOf(\"_info_thumbnail\") < 0) &&\r\n (template.data === null || JSON.stringify(template.data) === \"{}\");\r\n}\r\n*/\r\n\r\n/**\r\n * Sort the template ids based on their dependencies\r\n *\r\n * @param templates full list of templates\r\n *\r\n * @returns a list of Itop level item ids\r\n */\r\nfunction _getTopLevelItemIds(templates: IItemTemplate[]): string[] {\r\n // Find the top-level nodes. Start with all nodes, then remove those that other nodes depend on\r\n const topLevelItemCandidateIds = templates.map((template) => template.itemId);\r\n templates.forEach((template) => {\r\n (template.dependencies || []).forEach((dependencyId) => {\r\n const iNode = topLevelItemCandidateIds.indexOf(dependencyId);\r\n if (iNode >= 0) {\r\n // Node is somebody's dependency, so remove the node from the list of top-level nodes\r\n // If iNode == -1, then it's a shared dependency and it has already been removed\r\n topLevelItemCandidateIds.splice(iNode, 1);\r\n }\r\n });\r\n });\r\n return topLevelItemCandidateIds;\r\n}\r\n","/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n.configuration-container {\r\n @apply w-full\r\n h-full\r\n relative;\r\n}\r\n\r\n.configuration {\r\n @apply absolute\r\n top-0\r\n right-0\r\n bottom-0\r\n left-0\r\n flex\r\n p-2\r\n border-lightgray;\r\n}\r\n\r\n.config-tabs {\r\n @apply w-full;\r\n}\r\n\r\n.config-tab {\r\n @apply w-full;\r\n}\r\n\r\n.config-solution {\r\n @apply\r\n absolute\r\n top-14\r\n -right-px\r\n -bottom-px\r\n -left-px\r\n flex\r\n p-2;\r\n}\r\n\r\n.config-inventory {\r\n @apply inline\r\n flex-grow-0\r\n overflow-y-auto\r\n max-w-min;\r\n}\r\n\r\n.config-inventory-hide {\r\n @apply flex-grow-0\r\n overflow-y-auto\r\n max-w-min\r\n hidden;\r\n}\r\n\r\n.config-item {\r\n @apply inline\r\n flex-grow\r\n overflow-y-auto\r\n relative\r\n m-inline-start-2;\r\n}\r\n\r\nsolution-contents {\r\n @apply relative\r\n h-full;\r\n}\r\n\r\nsolution-item {\r\n @apply relative\r\n h-full;\r\n}\r\n\r\nsolution-spatial-ref {\r\n @apply w-full\r\n h-full\r\n relative\r\n overflow-y-auto;\r\n}\r\n","/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\nimport { Component, Element, h, Host, Listen, Method, Prop, State, VNode, Watch } from \"@stencil/core\";\r\nimport { IInventoryItem, IItemTemplateEdit, ISolutionSpatialReferenceInfo } from \"../../utils/interfaces\";\r\nimport * as utils from \"../../utils/templates\";\r\nimport state from \"../../utils/solution-store\";\r\nimport { getProp, UserSession } from \"@esri/solution-common\";\r\nimport \"@esri/calcite-components\";\r\nimport SolutionConfiguration_T9n from \"../../assets/t9n/solution-configuration/resources.json\";\r\nimport { getLocaleComponentStrings } from \"../../utils/locale\";\r\n\r\n@Component({\r\n tag: \"solution-configuration\",\r\n styleUrl: \"solution-configuration.scss\",\r\n shadow: false\r\n})\r\nexport class SolutionConfiguration {\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Host element access\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n @Element() el: HTMLSolutionConfigurationElement;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Properties (public)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Credentials for requests\r\n */\r\n @Prop({ mutable: true }) authentication: UserSession;\r\n\r\n /**\r\n * Contains the current solution item id\r\n */\r\n @Prop({ mutable: true, reflect: true }) solutionItemId = \"\";\r\n\r\n @Watch(\"solutionItemId\") async valueWatchHandler(): Promise<void> {\r\n await this._loadSolution(this.solutionItemId);\r\n }\r\n\r\n /**\r\n * Used to show/hide loading indicator\r\n */\r\n @Prop({ mutable: true, reflect: true }) showLoading = false;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Lifecycle\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n constructor() {\r\n void this._loadSolution(this.solutionItemId);\r\n\r\n window.addEventListener(\"solutionStoreHasChanges\",\r\n (evt) => {\r\n this._updateSaveability(\r\n this._solutionStoreHasChanges = (evt as any).detail, this._solutionEditorHasChanges, this._solutionEditorHasErrors);\r\n }\r\n );\r\n window.addEventListener(\"solutionEditorHasChanges\",\r\n (evt) => {\r\n this._updateSaveability(\r\n this._solutionStoreHasChanges, this._solutionEditorHasChanges = (evt as any).detail, this._solutionEditorHasErrors);\r\n }\r\n );\r\n window.addEventListener(\"solutionEditorHasErrors\",\r\n (evt) => {\r\n this._updateSaveability(\r\n this._solutionStoreHasChanges, this._solutionEditorHasChanges, this._solutionEditorHasErrors = (evt as any).detail);\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * StencilJS: Called once just after the component is first connected to the DOM.\r\n *\r\n * @returns Promise when complete\r\n */\r\n async componentWillLoad(): Promise<void> {\r\n return this._getTranslations();\r\n }\r\n\r\n /**\r\n * Renders the component.\r\n */\r\n render(): VNode {\r\n const wkid = getProp(state.getStoreInfo(\"spatialReferenceInfo\"), \"spatialReference\");\r\n const hasServices: boolean = state.getStoreInfo(\"featureServices\").length > 0;\r\n return (\r\n <Host>\r\n {\r\n !this._solutionIsLoaded\r\n ? <calcite-loader active label='' />\r\n : null\r\n }\r\n <div class=\"configuration-container\">\r\n <div class=\"configuration\">\r\n <calcite-tabs class=\"config-tabs\">\r\n <calcite-tab-nav slot=\"tab-nav\">\r\n <calcite-tab-title>{this._translations.definitionTab}</calcite-tab-title>\r\n {hasServices ?\r\n <calcite-tab-title>{this._translations.spatialReferenceTab}</calcite-tab-title> :\r\n null\r\n }\r\n </calcite-tab-nav>\r\n <calcite-tab active class=\"config-tab\">\r\n <div class=\"config-solution\">\r\n <div class={this._treeOpen ? \"config-inventory\" : \"config-inventory-hide\"}>\r\n <solution-contents\r\n id=\"configInventory\"\r\n key={`${this.solutionItemId}-contents`}\r\n ref={(el) => (this._solutionContentsComponent = el)}\r\n />\r\n </div>\r\n <calcite-button\r\n appearance=\"transparent\"\r\n class=\"collapse-btn\"\r\n icon-start={this._treeOpen ? \"chevrons-left\" : \"chevrons-right\"}\r\n id=\"collapse-vars\"\r\n onClick={() => this._toggleTree()}\r\n scale=\"s\"\r\n title={this._treeOpen ? this._translations.collapse : this._translations.expand}\r\n />\r\n <div class=\"config-item\">\r\n <solution-item\r\n authentication={this.authentication}\r\n item-id={this._currentEditItemId}\r\n key={`${this.solutionItemId}-item`}\r\n organization-variables={this._organizationVariables}\r\n solution-item-id={this.solutionItemId}\r\n solution-variables={this._solutionVariables}\r\n />\r\n </div>\r\n </div>\r\n </calcite-tab>\r\n {\r\n hasServices\r\n ? <calcite-tab class=\"config-tab\">\r\n <div class=\"config-solution\">\r\n <solution-spatial-ref\r\n defaultWkid={wkid}\r\n id=\"configure-solution-spatial-ref\"\r\n key={`${this.solutionItemId}-spatial-ref`}\r\n locked={!wkid}\r\n services={state.getStoreInfo(\"featureServices\").map(fs => fs.name)}\r\n />\r\n </div>\r\n </calcite-tab>\r\n : null\r\n }\r\n </calcite-tabs>\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Properties (protected)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Contains the current item we are working with\r\n */\r\n @State() protected _currentEditItemId = \"\";\r\n\r\n @State() protected _organizationVariables = \"\";\r\n\r\n @State() protected _solutionContentsComponent: HTMLSolutionContentsElement;\r\n\r\n @State() protected _solutionIsLoaded = false;\r\n\r\n @State() protected _solutionVariables = \"\";\r\n\r\n /**\r\n * Contains the hierarchy of template items for the current solution.\r\n */\r\n @State() protected _templateHierarchy: IInventoryItem[] = [];\r\n\r\n /**\r\n * Contains the _translations for this component.\r\n * All UI strings should be defined here.\r\n */\r\n @State() protected _translations: typeof SolutionConfiguration_T9n;\r\n\r\n /**\r\n * Used to show/hide the content tree\r\n */\r\n @State() protected _treeOpen = true;\r\n\r\n protected _solutionStoreHasChanges = false;\r\n\r\n protected _solutionEditorHasChanges = false;\r\n\r\n protected _solutionEditorHasErrors = false;\r\n\r\n protected _canSave = false;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Event Listeners\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n @Listen(\"solutionItemSelected\", { target: \"window\" })\r\n _solutionItemSelected(event: CustomEvent): void {\r\n this._currentEditItemId = event.detail;\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Events\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Public Methods (async)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /*\r\n @Method()\r\n async getEditModels(): Promise<ISolutionItems> {\r\n return Promise.resolve(state.items);\r\n }\r\n */\r\n\r\n @Method()\r\n async getSpatialReferenceInfo(): Promise<ISolutionSpatialReferenceInfo> {\r\n return Promise.resolve(state.getStoreInfo(\"spatialReferenceInfo\"));\r\n }\r\n\r\n /*\r\n @Method()\r\n async getSourceTemplates(): Promise<any> {\r\n return Promise.resolve(this._templates);\r\n }\r\n */\r\n\r\n @Method()\r\n async saveSolution(): Promise<void> {\r\n this._solutionIsLoaded = false;\r\n await state.saveSolution();\r\n this._solutionIsLoaded = true;\r\n this.solutionItemId = null;\r\n }\r\n\r\n @Method()\r\n async unloadSolution(): Promise<void> {\r\n this.solutionItemId = null;\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Private Methods\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Update the store with the initial values\r\n *\r\n * @param templates the solution items templates\r\n * @param isReset (defaults to false) indicates if we are resetting the controls after save\r\n */\r\n /*\r\n protected _initState(\r\n templates: any[],\r\n isReset = false\r\n ): Promise<any> {\r\n return new Promise((resolve, reject) => {\r\n if (isReset) {\r\n // clear models and state so we can refresh after save\r\n this.modelsSet = false;\r\n state.reset();\r\n }\r\n getModels(templates, this.authentication, this.solutionItemId).then(models => {\r\n state.models = models;\r\n\r\n state.featureServices = getFeatureServices(templates);\r\n state.getStoreInfo(\"spatialReferenceInfo\") = getSpatialReferenceInfo(state.featureServices, this._sourceItemData);\r\n\r\n if (isReset) {\r\n // reset for undo/redo stack and diff editor tracking\r\n const jsonEditors = Array.from(this.el.getElementsByTagName(\"json-editor\"));\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n jsonEditors.forEach(e => void e.reset());\r\n }\r\n\r\n this.modelsSet = true;\r\n resolve(true);\r\n }, () => reject);\r\n });\r\n }\r\n */\r\n\r\n /**\r\n * Set Props with the initial values\r\n *\r\n * @protected\r\n */\r\n protected _initProps(): void {\r\n const solutionData = state.getStoreInfo(\"solutionData\");\r\n\r\n this._solutionVariables = JSON.stringify(utils.getSolutionVariables(solutionData.templates, this._translations));\r\n this._organizationVariables = JSON.stringify(utils.getOrganizationVariables(this._translations));\r\n\r\n this._templateHierarchy = [...utils.getInventoryItems(solutionData.templates)];\r\n\r\n if (this._solutionContentsComponent) {\r\n this._solutionContentsComponent.templateHierarchy = this._templateHierarchy;\r\n }\r\n\r\n let firstItem: IItemTemplateEdit;\r\n if (this._templateHierarchy.length > 0) {\r\n // Start with the first item in the contents\r\n firstItem = state.getItemInfo(this._templateHierarchy[0].id);\r\n }\r\n this._currentEditItemId = firstItem ? firstItem.itemId : \"\";\r\n }\r\n\r\n /**\r\n * Loads a solution.\r\n *\r\n * @param solutionItemId AGO id of solution to load\r\n *\r\n * @returns Resolved promise when task is done\r\n *\r\n * @protected\r\n */\r\n protected async _loadSolution(solutionItemId: string): Promise<void> {\r\n if (solutionItemId) {\r\n this._solutionIsLoaded = false;\r\n await state.loadSolution(solutionItemId, this.authentication);\r\n this._initProps();\r\n this._solutionIsLoaded = true;\r\n } else {\r\n this._reset();\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Resets internal variables.\r\n *\r\n * @protected\r\n */\r\n protected _reset(): void {\r\n this._currentEditItemId = \"\";\r\n this._organizationVariables = \"\";\r\n this._solutionVariables = \"\";\r\n this._templateHierarchy = [];\r\n }\r\n\r\n /**\r\n * Toggle _treeOpen prop to show/hide content tree.\r\n *\r\n * @protected\r\n */\r\n protected _toggleTree(): void {\r\n this._treeOpen = !this._treeOpen;\r\n }\r\n\r\n /**\r\n * Dispatches an event indicating if the configuration is saveable or not. It's not saveable if there are no\r\n * changes or if there's an error in the JSON editor.\r\n *\r\n * @param solutionStoreHasChanges Are there changes in the configuration editor's internal store?\r\n * @param solutionEditorHasChanges Are there changes in the configuration editor's JSON editor?\r\n * @param solutionEditorHasErrors Are there errors in the configuration editor's JSON editor?\r\n *\r\n * @protected\r\n */\r\n protected _updateSaveability(\r\n solutionStoreHasChanges: boolean,\r\n solutionEditorHasChanges: boolean,\r\n solutionEditorHasErrors: boolean\r\n ): void {\r\n const updateSaveability = (solutionStoreHasChanges || solutionEditorHasChanges) && !solutionEditorHasErrors;\r\n\r\n if (this._canSave !== updateSaveability) {\r\n window.dispatchEvent(new CustomEvent(\"solutionCanSave\", {\r\n detail: updateSaveability,\r\n bubbles: true,\r\n cancelable: false,\r\n composed: true\r\n }));\r\n }\r\n\r\n this._canSave = updateSaveability;\r\n }\r\n\r\n /**\r\n * Save all edits from the current configuration\r\n *\r\n * @returns a response that will indicate success or failure and any associated messages\r\n */\r\n /*\r\n protected async _save() {\r\n const templateUpdates = await this._updateTemplates();\r\n const data = this._setSrInfo(templateUpdates.templates);\r\n return templateUpdates.errors.length === 0 ? save(\r\n this.solutionItemId,\r\n data,\r\n state.models,\r\n this.authentication,\r\n this._translations\r\n ).then(saveResult => {\r\n // need to trigger re-render...and re-fetch\r\n this._fetchData = true;\r\n this.modelsSet = false;\r\n return Promise.resolve(saveResult)\r\n }).catch(e => Promise.reject(e)) : Promise.reject({\r\n success: false,\r\n message: `The following templates have errors: ${templateUpdates.errors.join(\", \")}`\r\n } as IResponse);\r\n }\r\n */\r\n\r\n /**\r\n * Update the solutions templates based on the stored changes\r\n *\r\n * @returns an object that contains the updated templates as well as any errors that were found\r\n */\r\n /*\r\n protected async _updateTemplates(): Promise<IUpdateTemplateResponse> {\r\n const errors = [];\r\n const models = await this.getEditModels();\r\n let templates = this._updateGroupDependencies(models, this._templates);\r\n Object.keys(models).forEach(k => {\r\n const m = models[k];\r\n templates = templates.map(t => {\r\n if (t.itemId === m.itemId) {\r\n this._setItem(t, m);\r\n const hasDataError = this._setData(t, m);\r\n const hasPropError = this._setProps(t, m);\r\n if (hasDataError || hasPropError) {\r\n errors.push(m.itemId);\r\n }\r\n }\r\n return t;\r\n });\r\n });\r\n errors.concat(window.monaco.editor.getModelMarkers({}));\r\n return Promise.resolve({\r\n templates,\r\n errors\r\n });\r\n }\r\n */\r\n\r\n /**\r\n * Review all models and store itemIds that should be added or removed from group dependencies\r\n *\r\n * @param models the corresponding models for the current templates\r\n *\r\n * @returns group info (an object with keys of groupIds and\r\n * arrays of itemIds that should be added or removed from group dependencies)\r\n */\r\n /*\r\n protected _getGroupInfo(\r\n models: any\r\n ): any {\r\n const groupInfo = {}\r\n Object.keys(models).forEach(k => {\r\n const m = models[k];\r\n if (m.shareInfo) {\r\n const groupId = m.shareInfo.groupId;\r\n const type = m.shareInfo.shared ? \"share\" : \"unshare\";\r\n if (groupInfo[groupId]) {\r\n groupInfo[groupId][type].push(m.itemId);\r\n } else {\r\n groupInfo[groupId] = {};\r\n groupInfo[groupId][type] = [m.itemId];\r\n if (m.shareInfo.shared) {\r\n groupInfo[groupId][\"unshare\"] = [];\r\n } else {\r\n groupInfo[groupId][\"share\"] = [];\r\n }\r\n }\r\n }\r\n });\r\n return groupInfo;\r\n }\r\n */\r\n\r\n /**\r\n * Updates group dependency arrays by adding or removing itemIds\r\n *\r\n * @param templates the current templates to update\r\n * @param models the corresponding models for the current templates\r\n *\r\n * @returns updated templates array\r\n */\r\n /*\r\n protected _updateGroupDependencies(\r\n models: any,\r\n templates: any[]\r\n ): any[] {\r\n const groupInfo = this._getGroupInfo(models);\r\n Object.keys(groupInfo).forEach(k => {\r\n templates.some(t => {\r\n if (t.itemId === k) {\r\n // add share items as deps\r\n groupInfo[k].share.forEach(s => {\r\n if (t.dependencies.indexOf(s) < 0) {\r\n t.dependencies.push(s);\r\n }\r\n });\r\n\r\n // remove unshare items from deps\r\n groupInfo[k].unshare.forEach(s => {\r\n const index = t.dependencies.indexOf(s);\r\n if (index > -1) {\r\n t.dependencies.splice(index, 1);\r\n }\r\n });\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n })\r\n })\r\n return templates;\r\n }\r\n */\r\n\r\n /**\r\n * Add group IDs to items that should be shared\r\n * This function will update the provided template when shareInfo is available\r\n *\r\n * @param template the current template to update\r\n * @param shareInfo the corresponding shareInfo from the model for the current template\r\n *\r\n */\r\n /*\r\n protected _updateItemGroups(\r\n template: any,\r\n shareInfo: any\r\n ): void {\r\n if (shareInfo) {\r\n const groupIndex = template.groups.indexOf(shareInfo.groupId);\r\n if (groupIndex < 0 && shareInfo.shared) {\r\n template.groups.push(shareInfo.groupId);\r\n }\r\n if (groupIndex > -1 && !shareInfo.shared) {\r\n template.groups.splice(groupIndex, 1);\r\n }\r\n }\r\n }\r\n */\r\n\r\n /**\r\n * Set a templates data property with changes from the models\r\n *\r\n * @param template the current template to update\r\n * @param model the corresponding model for the current template (stores any user changes)\r\n *\r\n * @returns a boolean that indicates if any errors were detected\r\n */\r\n /*\r\n protected _setData(\r\n template: any,\r\n model: any\r\n ): boolean {\r\n return this._setTemplateProp(\r\n template,\r\n model.dataOriginalValue,\r\n model.dataCurrentValue,\r\n \"data\"\r\n );\r\n }\r\n */\r\n\r\n /**\r\n * Set a templates properties property with changes from the models\r\n *\r\n * @param template the current template to update\r\n * @param model the corresponding model for the current template (stores any user changes)\r\n *\r\n * @returns a boolean that indicates if any errors were detected\r\n */\r\n /*\r\n protected _setProps(\r\n template: any,\r\n model: any\r\n ): boolean {\r\n return this._setTemplateProp(\r\n template,\r\n model.propsOriginalValue,\r\n model.propsCurrentValue,\r\n \"properties\"\r\n );\r\n }\r\n */\r\n\r\n /**\r\n * Generic function used to set properties or data property on a given template\r\n *\r\n * @param template the current template to update\r\n * @param originValue the original value from the solution template\r\n * @param modelValue the current value from the model (will contain any edits that have been made)\r\n * @param path the path to the property we should update if any changes are found\r\n *\r\n * @returns a boolean that indicates if any errors were detected\r\n */\r\n /*\r\n protected _setTemplateProp(\r\n template: any,\r\n originValue: any,\r\n modelValue: any,\r\n path: string\r\n ): boolean {\r\n let hasError = false;\r\n try {\r\n const _originValue = JSON.parse(originValue);\r\n const _modelValue = JSON.parse(modelValue);\r\n\r\n if (_originValue && _modelValue && (JSON.stringify(_originValue) !== JSON.stringify(_modelValue))) {\r\n setProp(template, path, _modelValue);\r\n }\r\n } catch (e) {\r\n console.error(e);\r\n hasError = true;\r\n }\r\n return hasError;\r\n }\r\n */\r\n\r\n /**\r\n * Set a templates item property with changes from the models\r\n *\r\n * @param template the current template to update\r\n * @param model the corresponding model for the current template (stores any user changes)\r\n *\r\n * This function will update the template argument when edits are found\r\n */\r\n /*\r\n protected _setItem(\r\n template: any,\r\n model: any\r\n ): void {\r\n this._updateItemGroups(template, model.shareInfo);\r\n if (model.updateItemValues && Object.keys(model.updateItemValues).length > 0) {\r\n Object.keys(model.updateItemValues).forEach(k => {\r\n template.item[k] = model.updateItemValues[k];\r\n });\r\n }\r\n }\r\n */\r\n\r\n /**\r\n * Set spatial reference info in the solutions data\r\n *\r\n * @param templates a list of item templates from the solution\r\n *\r\n * @returns a cloned copy of the solutions data that has been updated with spatial reference info\r\n *\r\n */\r\n /*\r\n protected _setSrInfo(\r\n templates: any[]\r\n ): any {\r\n const srInfo: any = state.getStoreInfo(\"spatialReferenceInfo\");\r\n\r\n const serviceEnabled = typeof srInfo?.services === \"undefined\" ?\r\n false : Object.keys(srInfo.services).some(k => srInfo.services[k]);\r\n\r\n const data = cloneObject(this._sourceItemData);\r\n data.templates = templates;\r\n if (srInfo && srInfo.enabled && serviceEnabled) {\r\n const wkid = srInfo.spatialReference.wkid.toString();\r\n\r\n const wkidParam = {\r\n \"label\": \"Spatial Reference\",\r\n \"default\": wkid,\r\n \"valueType\": \"spatialReference\",\r\n \"attributes\": {\r\n \"required\": \"true\"\r\n }\r\n };\r\n\r\n const params = getProp(data, \"params\");\r\n const hasWkid = params && params.wkid;\r\n setCreateProp(\r\n data,\r\n hasWkid ? \"params.wkid.default\" : \"params.wkid\",\r\n hasWkid ? wkid : params ? wkidParam : wkid\r\n );\r\n } else if (!srInfo.enabled) {\r\n if (getProp(data, \"params.wkid\")) {\r\n delete (data.params.wkid);\r\n }\r\n }\r\n return data;\r\n }\r\n */\r\n\r\n /**\r\n * Fetches the component's translations\r\n *\r\n * @protected\r\n */\r\n protected async _getTranslations(): Promise<void> {\r\n const translations = await getLocaleComponentStrings(this.el);\r\n this._translations = translations[0] as typeof SolutionConfiguration_T9n;\r\n }\r\n}\r\n"],"version":3}