{"version":3,"file":"itemsWithPreAndPostHtml.js","sources":["../../../Framework/Controls/itemsWithPreAndPostHtml.ts"],"sourcesContent":["// \r\n// Copyright by the Spark Development Network\r\n//\r\n// Licensed under the Rock Community License (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.rockrms.com/license\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 { defineComponent, PropType } from \"vue\";\r\n\r\nexport type ItemWithPreAndPostHtml = {\r\n slotName: string;\r\n preHtml: string;\r\n postHtml: string;\r\n};\r\n\r\nexport default defineComponent({\r\n name: \"ItemsWithPreAndPostHtml\",\r\n props: {\r\n items: {\r\n type: Array as PropType,\r\n required: true\r\n }\r\n },\r\n methods: {\r\n onDismiss: function () {\r\n this.$emit(\"dismiss\");\r\n }\r\n },\r\n computed: {\r\n augmentedItems(): Record[] {\r\n return this.items.map(i => ({\r\n ...i,\r\n innerSlotName: `inner-${i.slotName}`\r\n } as Record));\r\n },\r\n innerTemplate(): string {\r\n if (!this.items.length) {\r\n return \"\";\r\n }\r\n\r\n const templateParts = this.items.map(i => `${i.preHtml}${i.postHtml}`);\r\n return templateParts.join(\"\");\r\n },\r\n innerComponent(): Record {\r\n return {\r\n name: \"InnerItemsWithPreAndPostHtml\",\r\n template: this.innerTemplate\r\n };\r\n }\r\n },\r\n template: `\r\n\r\n \r\n`\r\n});\r\n"],"names":["defineComponent","name","props","items","type","Array","required","methods","onDismiss","$emit","computed","augmentedItems","map","i","_objectSpread","innerSlotName","concat","slotName","innerTemplate","length","templateParts","preHtml","postHtml","join","innerComponent","template"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,uDAAeA,eAA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