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6B,OAAO,IAET7B,EAAA,aAAkB,EAElB,IAEgCgY,EAF5BuvD,GAE4BvvD,EAFO,EAAQ,QAEMA,EAAI9W,WAAa8W,EAAM,CAAE+H,QAAS/H,GAWvFhY,EAAA,QATA,SAAiB8pE,GACf,KAAK,EAAIvC,EAAUxnD,SAAS+pD,GAC1B,MAAM3wD,UAAU,gBAGlB,OAAO5D,SAASu0D,EAAK3qD,MAAM,GAAI,IAAK,GACtC,k+BCjBAlf,EAAOD,QAAUM,wBCAjBL,EAAOD,QAAUO,uz5DCCbkf,EAA2B,CAAC,EAGhC,SAASutD,EAAoBttD,GAE5B,IAAIutD,EAAextD,EAAyBC,GAC5C,QAAqB3e,IAAjBksE,EACH,OAAOA,EAAajtE,QAGrB,IAAIC,EAASwf,EAAyBC,GAAY,CAGjD1f,QAAS,CAAC,GAOX,OAHA+V,EAAoB2J,GAAU9d,KAAK3B,EAAOD,QAASC,EAAQA,EAAOD,QAASgtE,GAGpE/sE,EAAOD,OACf,CCnB0BgtE,CAAoB,YDF1CvtD","sources":["webpack://ACDesigner/webpack/universalModuleDefinition","webpack://ACDesigner/../adaptivecards-controls/lib/adaptivecards-controls.js","webpack://ACDesigner/../adaptivecards-controls/lib/calendar.js","webpack://ACDesigner/../adaptivecards-controls/lib/checkbox.js","webpack://ACDesigner/../adaptivecards-controls/lib/collection.js","webpack://ACDesigner/../adaptivecards-controls/lib/constants.js","webpack://ACDesigner/../adaptivecards-controls/lib/datepicker.js","webpack://ACDesigner/../adaptivecards-controls/lib/dropdown.js","webpack://ACDesigner/../adaptivecards-controls/lib/enums.js","webpack://ACDesigner/../adaptivecards-controls/lib/inputcontrol.js","webpack://ACDesigner/../adaptivecards-controls/lib/inputwithpopup.js","webpack://ACDesigner/../adaptivecards-controls/lib/popupmenu.js","webpack://ACDesigner/../adaptivecards-controls/lib/radiobutton.js","webpack://ACDesigner/../adaptivecards-controls/lib/textbox.js","webpack://ACDesigner/../adaptivecards-controls/lib/utils.js","webpack://ACDesigner/./node_modules/clipboard/dist/clipboard.js","webpack://ACDesigner/./src/adaptive-card-schema.ts","webpack://ACDesigner/./src/adaptivecards-designer-standalone.ts","webpack://ACDesigner/./src/adaptivecards-designer.ts","webpack://ACDesigner/./src/base-tree-item.ts","webpack://ACDesigner/./src/card-designer-surface.ts","webpack://ACDesigner/./src/card-designer.ts","webpack://ACDesigner/./src/catalogue.ts","webpack://ACDesigner/./src/constants.ts","webpack://ACDesigner/./src/containers/bf-image/bf-image-container.ts","webpack://ACDesigner/./src/containers/cortana-classic/cortana-classic-container.ts","webpack://ACDesigner/./src/containers/cortana/cortana-container.ts","webpack://ACDesigner/./src/containers/default/default-container.ts","webpack://ACDesigner/./src/containers/federated-search/federated-search-container.ts","webpack://ACDesigner/./src/containers/host-container.ts","webpack://ACDesigner/./src/containers/index.ts","webpack://ACDesigner/./src/containers/multi-theme-host-container.ts","webpack://ACDesigner/./src/containers/notifications/toast-container.ts","webpack://ACDesigner/./src/containers/outlook/outlook-container.ts","webpack://ACDesigner/./src/containers/single-theme-host-container.ts","webpack://ACDesigner/./src/containers/skype/skype-container.ts","webpack://ACDesigner/./src/containers/teams/teams-container.ts","webpack://ACDesigner/./src/containers/timeline/timeline-container.ts","webpack://ACDesigner/./src/containers/viva-connections/viva-connections-container.ts","webpack://ACDesigner/./src/containers/webchat/webchat-container.ts","webpack://ACDesigner/./src/containers/widget/widget-container.ts","webpack://ACDesigner/./src/data-treeitem.ts","webpack://ACDesigner/./src/data.ts","webpack://ACDesigner/./src/designer-peer-treeitem.ts","webpack://ACDesigner/./src/designer-peers.ts","webpack://ACDesigner/./src/dialog.ts","webpack://ACDesigner/./src/downloader.ts","webpack://ACDesigner/./src/draggable-element.ts","webpack://ACDesigner/./src/field-picker.ts","webpack://ACDesigner/./src/fullscreen-handler.ts","webpack://ACDesigner/./src/help-dialog.ts","webpack://ACDesigner/./src/miscellaneous.ts","webpack://ACDesigner/./src/open-image-dialog.ts","webpack://ACDesigner/./src/open-json-schema-dialog.ts","webpack://ACDesigner/./src/open-sample-dialog.ts","webpack://ACDesigner/./src/peer-command.ts","webpack://ACDesigner/./src/pic2card.ts","webpack://ACDesigner/./src/settings-manager.ts","webpack://ACDesigner/./src/shared.ts","webpack://ACDesigner/./src/side-panel.ts","webpack://ACDesigner/./src/splitter.ts","webpack://ACDesigner/./src/strings.ts","webpack://ACDesigner/./src/tool-box.ts","webpack://ACDesigner/./src/tool-palette.ts","webpack://ACDesigner/./src/toolbar.ts","webpack://ACDesigner/./src/tree-view.ts","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/index.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/md5.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/native.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/nil.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/parse.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/regex.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/rng.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/sha1.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/stringify.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/v1.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/v3.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/v35.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/v4.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/v5.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/validate.js","webpack://ACDesigner/../node_modules/uuid/dist/commonjs-browser/version.js","webpack://ACDesigner/external umd {\"commonjs2\":\"adaptivecards\",\"commonjs\":\"adaptivecards\",\"root\":\"AdaptiveCards\"}","webpack://ACDesigner/external umd {\"commonjs2\":\"adaptivecards-templating\",\"commonjs\":\"adaptivecards-templating\",\"root\":\"ACData\"}","webpack://ACDesigner/webpack/bootstrap","webpack://ACDesigner/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"adaptivecards\"), require(\"adaptivecards-templating\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([, ], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ACDesigner\"] = factory(require(\"adaptivecards\"), require(\"adaptivecards-templating\"));\n\telse\n\t\troot[\"ACDesigner\"] = factory(root[\"AdaptiveCards\"], root[\"ACData\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE__407__, __WEBPACK_EXTERNAL_MODULE__952__) => {\nreturn ","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n__exportStar(require(\"./constants\"), exports);\n__exportStar(require(\"./enums\"), exports);\n__exportStar(require(\"./utils\"), exports);\n__exportStar(require(\"./collection\"), exports);\n__exportStar(require(\"./inputcontrol\"), exports);\n__exportStar(require(\"./inputwithpopup\"), exports);\n__exportStar(require(\"./calendar\"), exports);\n__exportStar(require(\"./dropdown\"), exports);\n__exportStar(require(\"./datepicker\"), exports);\n__exportStar(require(\"./checkbox\"), exports);\n__exportStar(require(\"./radiobutton\"), exports);\n__exportStar(require(\"./textbox\"), exports);\n__exportStar(require(\"./popupmenu\"), exports);\n//# sourceMappingURL=adaptivecards-controls.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Calendar = exports.DayCell = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst Utils = require(\"./utils\");\nconst constants_1 = require(\"./constants\");\nconst inputcontrol_1 = require(\"./inputcontrol\");\nclass DayCell {\n selected() {\n if (this.onSelected) {\n this.onSelected(this);\n }\n }\n constructor(date) {\n this._isSubdued = false;\n this._isSelected = false;\n this.date = date;\n }\n render() {\n this._element = document.createElement(\"div\");\n this._element.className = \"ms-ctrl ms-ctrl-calendarDay\";\n this._element.innerText = this.date.getDate().toString();\n this._element.tabIndex = 0;\n this._element.onclick = (e) => { this.selected(); };\n this._element.onkeydown = (e) => {\n if (e.key == constants_1.Constants.keys.enter) {\n this.selected();\n return false;\n }\n };\n return this._element;\n }\n focus() {\n this._element.focus();\n }\n get isSubdued() {\n return this._isSubdued;\n }\n set isSubdued(value) {\n this._isSubdued = value;\n if (this._isSubdued) {\n this._element.classList.add(\"subdued\");\n }\n else {\n this._element.classList.remove(\"subdued\");\n }\n }\n get isSelected() {\n return this._isSelected;\n }\n set isSelected(value) {\n this._isSelected = value;\n if (this._isSelected) {\n this._element.classList.add(\"selected\");\n }\n else {\n this._element.classList.remove(\"selected\");\n }\n }\n}\nexports.DayCell = DayCell;\nclass Calendar extends inputcontrol_1.InputControl {\n generateDayCells(baseDate) {\n this._days = [];\n var inputMonth = baseDate.getMonth();\n var inputYear = baseDate.getFullYear();\n var start = new Date(inputYear, inputMonth, 1);\n var end = new Date(inputYear, inputMonth, Utils.daysInMonth(inputYear, inputMonth));\n var startDateDayOfWeek = start.getDay();\n if ((startDateDayOfWeek - Utils.CalendarSettings.firstDayOfWeek) > 0) {\n start = Utils.addDays(start, Utils.CalendarSettings.firstDayOfWeek - startDateDayOfWeek);\n }\n var endDateDayOfWeek = end.getDay();\n var lastDayOfWeek = Utils.CalendarSettings.firstDayOfWeek + 6;\n if ((lastDayOfWeek - endDateDayOfWeek) > 0) {\n end = Utils.addDays(end, lastDayOfWeek - endDateDayOfWeek);\n }\n var endDate = end.getDate();\n var endMonth = end.getMonth();\n var endYear = end.getFullYear();\n do {\n var dayCell = new DayCell(start);\n dayCell.onSelected = (clickedCell) => {\n this.selectedDayCell = clickedCell;\n if (this.onDateChanged) {\n this.onDateChanged(this);\n }\n };\n this._days.push(dayCell);\n var done = start.getDate() == endDate && start.getMonth() == endMonth && start.getFullYear() == endYear;\n start = Utils.addDays(start, 1);\n } while (!done);\n }\n get selectedDayCell() {\n return this._selectedDay;\n }\n set selectedDayCell(value) {\n if (this._selectedDay) {\n this._selectedDay.isSelected = false;\n }\n this._selectedDay = value;\n if (this._selectedDay) {\n this._selectedDay.isSelected = true;\n this._date = this._selectedDay.date;\n }\n }\n initializeSelection() {\n if (this._date) {\n for (let i = 0; i < this._days.length; i++) {\n if (Utils.areDatesEqual(this._days[i].date, this.date)) {\n this.selectedDayCell = this._days[i];\n break;\n }\n }\n }\n }\n rebuildMiniCalendar(newDate, oldDate) {\n this.generateDayCells(newDate);\n var month = newDate.getMonth();\n Utils.clearElement(this._miniCalendarElement);\n this._miniCalendarElement.classList.remove(\"ms-ctrl-slide\", \"ms-ctrl-slideLeftToRight\", \"ms-ctrl-slideRightToLeft\");\n var row = document.createElement(\"tr\");\n var dayIndex = Utils.CalendarSettings.firstDayOfWeek;\n for (let i = 0; i < Utils.CalendarSettings.daysInWeek; i++) {\n var cell = document.createElement(\"td\");\n cell.className = \"ms-ctrl ms-ctrl-calendarDayHeader\";\n cell.innerText = Utils.CalendarSettings.getInitialDayName(dayIndex);\n row.appendChild(cell);\n dayIndex++;\n if (dayIndex >= Utils.CalendarSettings.daysInWeek) {\n dayIndex = 0;\n }\n }\n this._miniCalendarElement.appendChild(row);\n for (let i = 0; i < this._days.length; i++) {\n if (i % 7 == 0) {\n row = document.createElement(\"tr\");\n this._miniCalendarElement.appendChild(row);\n }\n var tableCell = document.createElement(\"td\");\n tableCell.appendChild(this._days[i].render());\n if (this._days[i].date.getMonth() != month) {\n this._days[i].isSubdued = true;\n }\n row.appendChild(tableCell);\n }\n if (oldDate) {\n var timeDelta = newDate.getTime() - oldDate.getTime();\n if (timeDelta > 0) {\n this._miniCalendarElement.classList.add(\"ms-ctrl-slide\", \"ms-ctrl-slideRightToLeft\");\n }\n else if (timeDelta < 0) {\n this._miniCalendarElement.classList.add(\"ms-ctrl-slide\", \"ms-ctrl-slideLeftToRight\");\n }\n }\n }\n constructor() {\n super();\n this._selectedDay = null;\n this._miniCalendarElement = document.createElement(\"table\");\n this._miniCalendarElement.className = \"ms-ctrl ms-ctrl-slide\";\n this._miniCalendarElement.cellPadding = \"0px\";\n this._miniCalendarElement.cellSpacing = \"0px\";\n var miniCalendarHeader = document.createElement(\"div\");\n miniCalendarHeader.className = \"ms-ctrl ms-ctrl-calendarHeader\";\n miniCalendarHeader.style.display = \"flex\";\n this._monthYearLabelElement = document.createElement(\"div\");\n this._monthYearLabelElement.style.flex = \"1 1 100%\";\n miniCalendarHeader.appendChild(this._monthYearLabelElement);\n var navButtons = document.createElement(\"div\");\n navButtons.style.flex = \"0 0 auto\";\n var button = document.createElement(\"i\");\n button.className = \"ms-icon ms-ctrl-calendarNavButton ms-icon-chevronLeft\";\n button.tabIndex = 0;\n button.onclick = (e) => {\n this.date = Utils.addMonths(this.date, -1);\n };\n button.onkeydown = (e) => {\n if (e.key == constants_1.Constants.keys.enter) {\n this.date = Utils.addMonths(this.date, -1);\n return false;\n }\n };\n navButtons.appendChild(button);\n button = document.createElement(\"i\");\n button.className = \"ms-icon ms-ctrl-calendarNavButton ms-icon-chevronRight\";\n button.tabIndex = 0;\n button.onclick = (e) => {\n this.date = Utils.addMonths(this.date, 1);\n };\n button.onkeydown = (e) => {\n if (e.key == constants_1.Constants.keys.enter) {\n this.date = Utils.addMonths(this.date, 1);\n return false;\n }\n };\n navButtons.appendChild(button);\n miniCalendarHeader.appendChild(navButtons);\n this._rootContainerElement = document.createElement(\"div\");\n this._rootContainerElement.className = \"ms-ctrl ms-ctrl-calendar\";\n this._rootContainerElement.appendChild(miniCalendarHeader);\n this._rootContainerElement.appendChild(this._miniCalendarElement);\n this.date = new Date();\n }\n attach(rootElement) {\n super.attach(rootElement);\n Utils.clearElement(rootElement);\n rootElement.appendChild(this._rootContainerElement);\n }\n focus() {\n if (this._selectedDay) {\n this._selectedDay.focus();\n }\n }\n get date() {\n return this._date;\n }\n set date(value) {\n var rebuildNeeded = true;\n var timeDelta = 0;\n var newDate = value ? value : new Date();\n if (this._date) {\n rebuildNeeded = !this._days || newDate.getFullYear() != this._date.getFullYear() || newDate.getMonth() != this._date.getMonth();\n }\n if (rebuildNeeded) {\n this.rebuildMiniCalendar(newDate, this._date);\n }\n this._date = newDate;\n this.initializeSelection();\n this._monthYearLabelElement.innerText = Utils.CalendarSettings.getLongMonthName(this._date.getMonth()) + \" \" + this._date.getFullYear();\n }\n}\nexports.Calendar = Calendar;\n//# sourceMappingURL=calendar.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CheckBox = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst constants_1 = require(\"./constants\");\nconst inputcontrol_1 = require(\"./inputcontrol\");\nconst utils_1 = require(\"./utils\");\nclass CheckBox extends inputcontrol_1.InputControl {\n constructor() {\n super(...arguments);\n this._label = \"\";\n this._checkboxElement = null;\n this._spanElement = null;\n }\n static createId() {\n var result = CheckBox.creationIndex;\n CheckBox.creationIndex++;\n return result;\n }\n changed() {\n if (this.onChange) {\n this.onChange(this);\n }\n }\n keyDown(e) {\n switch (e.key) {\n case constants_1.Constants.keys.enter:\n this.isChecked = !this.isChecked;\n break;\n }\n }\n attach(rootElement) {\n super.attach(rootElement);\n rootElement.className = \"ms-ctrl ms-ctrl-checkbox\";\n rootElement.tabIndex = 0;\n var labelAttribute = rootElement.attributes[\"label\"];\n if (labelAttribute) {\n this._label = labelAttribute.value;\n }\n var isCheckedAttribute = rootElement.attributes[\"ischecked\"];\n if (isCheckedAttribute) {\n this._isChecked = isCheckedAttribute.value === \"true\";\n }\n this._checkboxElement = document.createElement(\"input\");\n this._checkboxElement.id = \"ms-ctrl-checkbox-\" + CheckBox.createId();\n this._checkboxElement.type = \"checkbox\";\n this._checkboxElement.style.position = \"absolute\";\n this._checkboxElement.checked = this.isChecked;\n this._checkboxElement.onchange = (e) => { this.changed(); };\n var labelElement = document.createElement(\"label\");\n labelElement.htmlFor = this._checkboxElement.id;\n this._spanElement = document.createElement(\"span\");\n this._spanElement.innerText = this._label;\n labelElement.appendChild(this._spanElement);\n (0, utils_1.clearElement)(rootElement);\n rootElement.appendChild(this._checkboxElement);\n rootElement.appendChild(labelElement);\n }\n get label() {\n return this._label;\n }\n set label(value) {\n this._label = value;\n if (this._spanElement) {\n this._spanElement.innerText = this._label;\n }\n }\n get isChecked() {\n return this._isChecked;\n }\n set isChecked(value) {\n if (this._isChecked != value) {\n this._isChecked = value;\n if (this._checkboxElement) {\n this._checkboxElement.checked = this._isChecked;\n }\n this.changed();\n }\n }\n}\nexports.CheckBox = CheckBox;\n// Used to generate unique Ids\nCheckBox.creationIndex = 0;\n//# sourceMappingURL=checkbox.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Collection = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nclass Collection {\n constructor() {\n this._items = [];\n this.onItemAdded = null;\n this.onItemRemoved = null;\n }\n get(index) {\n return this._items[index];\n }\n add(item) {\n this._items.push(item);\n if (this.onItemAdded) {\n this.onItemAdded(item);\n }\n }\n remove(item) {\n var i = this._items.indexOf(item);\n if (i >= 0) {\n this._items = this._items.splice(i, 1);\n if (this.onItemRemoved) {\n this.onItemRemoved(item);\n }\n }\n }\n indexOf(item) {\n return this._items.indexOf(item);\n }\n get length() {\n return this._items.length;\n }\n}\nexports.Collection = Collection;\n//# sourceMappingURL=collection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Constants = exports.KEY_DELETE = exports.KEY_DOWN = exports.KEY_UP = exports.KEY_SPACE = exports.KEY_ESCAPE = exports.KEY_ENTER = exports.KEY_TAB = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n/**\n * @deprecated Use Constants.keys.tab instead.\n */\nexports.KEY_TAB = 9;\n/**\n * @deprecated Use Constants.keys.enter instead.\n */\nexports.KEY_ENTER = 13;\n/**\n * @deprecated Use Constants.keys.escape instead.\n */\nexports.KEY_ESCAPE = 27;\n/**\n * @deprecated Use Constants.keys.space instead.\n */\nexports.KEY_SPACE = 32;\n/**\n * @deprecated Use Constants.keys.up instead.\n */\nexports.KEY_UP = 38;\n/**\n * @deprecated Use Constants.keys.down instead.\n */\nexports.KEY_DOWN = 40;\n/**\n * @deprecated Use Constants.keys.delete instead.\n */\nexports.KEY_DELETE = 46;\nclass Constants {\n}\nexports.Constants = Constants;\nConstants.keys = {\n tab: \"Tab\",\n enter: \"Enter\",\n escape: \"Escape\",\n space: \" \",\n up: \"ArrowUp\",\n down: \"ArrowDown\",\n delete: \"Delete\",\n backspace: \"Backspace\",\n left: \"ArrowLeft\",\n right: \"ArrowRight\"\n};\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DatePicker = exports.CalendarPopupControl = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst inputwithpopup_1 = require(\"./inputwithpopup\");\nconst calendar_1 = require(\"./calendar\");\nclass CalendarPopupControl extends inputwithpopup_1.PopupControl {\n constructor(owner) {\n super();\n this._owner = owner;\n }\n renderContent() {\n var element = document.createElement(\"div\");\n element.className = \"ms-ctrl ms-calendarPopup\";\n this._calendar = new calendar_1.Calendar();\n this._calendar.date = this._owner.value;\n this._calendar.onDateChanged = (c) => {\n this._owner.value = c.date;\n this.closePopup(false);\n };\n this._calendar.attach(element);\n return element;\n }\n focus() {\n if (this._calendar) {\n this._calendar.focus();\n }\n }\n}\nexports.CalendarPopupControl = CalendarPopupControl;\nclass DatePicker extends inputwithpopup_1.InputWithPopup {\n validateRootElement(rootElement) {\n if (!(rootElement instanceof HTMLDivElement)) {\n throw new Error(\"DatePicker requires a DIV element as its root.\");\n }\n }\n createPopupControl() {\n return new CalendarPopupControl(this);\n }\n getValueAsString() {\n return this.value.toLocaleDateString();\n }\n getCssClassName() {\n return \"ms-ctrl ms-ctrl-datePicker\";\n }\n getButtonIconCssClassName() {\n return \"ms-icon-calendar\";\n }\n popup() {\n super.popup();\n if (this.isOpen) {\n this.popupControl.focus();\n }\n }\n}\nexports.DatePicker = DatePicker;\n//# sourceMappingURL=datepicker.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DropDown = exports.DropDownPopupControl = exports.DropDownItem = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst constants_1 = require(\"./constants\");\nconst collection_1 = require(\"./collection\");\nconst inputwithpopup_1 = require(\"./inputwithpopup\");\nclass DropDownItem {\n click() {\n if (this.onClick) {\n this.onClick(this);\n }\n }\n constructor(key, value) {\n this.key = key;\n this._value = value;\n }\n toString() {\n return this.value;\n }\n render() {\n if (!this._element) {\n this._element = document.createElement(\"span\");\n this._element.className = \"ms-ctrl ms-ctrl-dropdown-item\";\n this._element.innerText = this.value;\n this._element.setAttribute(\"role\", \"option\");\n this._element.onmouseup = (e) => { this.click(); };\n this._element.onkeydown = (e) => {\n if (e.key === constants_1.Constants.keys.enter) {\n this.click();\n e.cancelBubble = true;\n }\n };\n }\n return this._element;\n }\n get value() {\n return this._value;\n }\n set value(newValue) {\n this._value = newValue;\n if (this._element) {\n this._element.innerText = newValue;\n }\n }\n}\nexports.DropDownItem = DropDownItem;\nclass DropDownPopupControl extends inputwithpopup_1.PopupControl {\n constructor(owner) {\n super();\n this._renderedItems = [];\n this._selectedIndex = -1;\n this._owner = owner;\n }\n renderContent() {\n var element = document.createElement(\"div\");\n element.className = \"ms-ctrl ms-popup\";\n element.setAttribute(\"role\", \"listbox\");\n var selectedIndex = this._owner.selectedIndex;\n for (let i = 0; i < this._owner.items.length; i++) {\n var renderedItem = this._owner.items.get(i).render();\n renderedItem.tabIndex = 0;\n element.appendChild(renderedItem);\n if (i == selectedIndex) {\n renderedItem.focus();\n renderedItem.setAttribute(\"aria-selected\", \"true\");\n }\n else {\n renderedItem.setAttribute(\"aria-selected\", \"false\");\n }\n this._renderedItems.push(renderedItem);\n }\n return element;\n }\n keyDown(e) {\n super.keyDown(e); // handles ESC\n var selectedItemIndex = this._selectedIndex;\n switch (e.key) {\n case constants_1.Constants.keys.tab:\n this.closePopup(true);\n break;\n case constants_1.Constants.keys.enter:\n if (this.selectedIndex >= 0) {\n this._owner.selectedIndex = this.selectedIndex;\n this.closePopup(false);\n }\n break;\n case constants_1.Constants.keys.up:\n if (selectedItemIndex <= 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n else {\n selectedItemIndex--;\n if (selectedItemIndex < 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n case constants_1.Constants.keys.down:\n if (selectedItemIndex < 0) {\n selectedItemIndex = 0;\n }\n else {\n selectedItemIndex++;\n if (selectedItemIndex >= this._renderedItems.length) {\n selectedItemIndex = 0;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n }\n }\n render(rootElementBounds) {\n var renderedElement = super.render(rootElementBounds);\n renderedElement.style.minWidth = (rootElementBounds.width / 2) + \"px\";\n return renderedElement;\n }\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(index) {\n if (index >= 0 && index < this._renderedItems.length) {\n // select new item\n this._renderedItems[index].focus();\n this._selectedIndex = index;\n }\n }\n}\nexports.DropDownPopupControl = DropDownPopupControl;\nclass DropDown extends inputwithpopup_1.InputWithPopup {\n itemClicked(item) {\n this.selectedItem = item;\n this.closePopup(false);\n this.rootElement.focus();\n }\n validateRootElement(rootElement) {\n if (!(rootElement instanceof HTMLDivElement)) {\n throw new Error(\"DropDown requires a DIV element as its root.\");\n }\n }\n createPopupControl() {\n return new DropDownPopupControl(this);\n }\n getCssClassName() {\n return \"ms-ctrl ms-ctrl-dropdown\";\n }\n constructor() {\n super();\n this._items = new collection_1.Collection();\n this._items.onItemAdded = (item) => { item.onClick = (clickedItem) => { this.itemClicked(clickedItem); }; };\n this._items.onItemRemoved = (item) => { item.onClick = null; };\n }\n attach(rootElement) {\n super.attach(rootElement);\n for (let i = 0; i < this.rootElement.children.length; i++) {\n var childElement = this.rootElement.children[i];\n if (childElement.tagName.toLowerCase() == \"ms-dropdown-item\") {\n var item = new DropDownItem(childElement.attributes.getNamedItem(\"key\").value, childElement.attributes.getNamedItem(\"value\").value);\n this._items.add(item);\n }\n }\n // add aria-labelledby tag with all pertinent label ids\n let ariaLabelledByIds = [];\n if (this.parentLabelId) {\n ariaLabelledByIds.push(this.parentLabelId);\n }\n if (this.labelId) {\n ariaLabelledByIds.push(this.labelId);\n }\n if (ariaLabelledByIds.length > 0) {\n this.rootElement.setAttribute(\"aria-labelledby\", ariaLabelledByIds.join(\" \"));\n }\n this.rootElement.setAttribute(\"role\", \"combobox\");\n this.rootElement.setAttribute(\"aria-haspopup\", \"listbox\");\n this.rootElement.setAttribute(\"aria-expanded\", \"false\");\n }\n popup() {\n super.popup();\n this.popupControl.selectedIndex = this.selectedIndex;\n }\n get items() {\n return this._items;\n }\n get selectedItem() {\n return this.value;\n }\n set selectedItem(newValue) {\n this.value = newValue;\n }\n get selectedIndex() {\n return this.items.indexOf(this.value);\n }\n set selectedIndex(index) {\n if (index >= 0 && this.items.length > index) {\n this.selectedItem = this.items.get(index);\n }\n }\n get parentLabelId() {\n return this._parentLabelId;\n }\n set parentLabelId(value) {\n this._parentLabelId = value;\n }\n}\nexports.DropDown = DropDown;\n//# sourceMappingURL=dropdown.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DayOfWeek = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nvar DayOfWeek;\n(function (DayOfWeek) {\n DayOfWeek[DayOfWeek[\"Sunday\"] = 0] = \"Sunday\";\n DayOfWeek[DayOfWeek[\"Monday\"] = 1] = \"Monday\";\n DayOfWeek[DayOfWeek[\"Tuesday\"] = 2] = \"Tuesday\";\n DayOfWeek[DayOfWeek[\"Wednesday\"] = 3] = \"Wednesday\";\n DayOfWeek[DayOfWeek[\"Thursday\"] = 4] = \"Thursday\";\n DayOfWeek[DayOfWeek[\"Friday\"] = 5] = \"Friday\";\n DayOfWeek[DayOfWeek[\"Saturday\"] = 6] = \"Saturday\";\n})(DayOfWeek || (exports.DayOfWeek = DayOfWeek = {}));\n//# sourceMappingURL=enums.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InputControl = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nclass InputControl {\n validateRootElement(rootElement) {\n // Do nothing - all root element types are valid.\n }\n keyDown(e) {\n // Do nothing in base implementation\n }\n get rootElement() {\n return this._rootElement;\n }\n attach(rootElement) {\n this.validateRootElement(rootElement);\n this._rootElement = rootElement;\n this._rootElement.onkeydown = (e) => { this.keyDown(e); };\n }\n}\nexports.InputControl = InputControl;\n//# sourceMappingURL=inputcontrol.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InputWithPopup = exports.PopupControl = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst constants_1 = require(\"./constants\");\nconst Utils = require(\"./utils\");\nconst inputcontrol_1 = require(\"./inputcontrol\");\nconst uuid_1 = require(\"uuid\");\nclass PopupControl {\n constructor() {\n this._isOpen = false;\n }\n keyDown(e) {\n switch (e.key) {\n case constants_1.Constants.keys.escape:\n this.closePopup(true);\n break;\n }\n }\n render(rootElementBounds) {\n let element = document.createElement(\"div\");\n element.tabIndex = 0;\n element.className = \"ms-ctrl ms-ctrl-popup-container\";\n element.setAttribute(\"role\", \"dialog\");\n element.setAttribute(\"aria-modal\", \"true\");\n element.onkeydown = (e) => {\n this.keyDown(e);\n return !e.cancelBubble;\n };\n element.appendChild(this.renderContent());\n return element;\n }\n focus() {\n if (this._popupElement) {\n this._popupElement.firstElementChild.focus();\n }\n }\n popup(rootElement) {\n if (!this._isOpen) {\n this._overlayElement = document.createElement(\"div\");\n this._overlayElement.className = \"ms-ctrl-overlay\";\n this._overlayElement.tabIndex = 0;\n this._overlayElement.style.width = document.documentElement.scrollWidth + \"px\";\n this._overlayElement.style.height = document.documentElement.scrollHeight + \"px\";\n this._overlayElement.onfocus = (e) => { this.closePopup(true); };\n document.body.appendChild(this._overlayElement);\n var rootElementBounds = rootElement.getBoundingClientRect();\n this._popupElement = this.render(rootElementBounds);\n this._popupElement.classList.remove(\"ms-ctrl-slide\", \"ms-ctrl-slideLeftToRight\", \"ms-ctrl-slideRightToLeft\", \"ms-ctrl-slideTopToBottom\", \"ms-ctrl-slideRightToLeft\");\n window.addEventListener(\"resize\", (e) => { this.closePopup(true); });\n const rootElementLabel = rootElement.getAttribute(\"aria-label\");\n if (rootElementLabel) {\n this._popupElement.setAttribute(\"aria-label\", rootElementLabel);\n }\n this._overlayElement.appendChild(this._popupElement);\n var popupElementBounds = this._popupElement.getBoundingClientRect();\n var availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;\n var availableSpaceAbove = rootElementBounds.top;\n var availableSpaceRight = window.innerWidth - rootElementBounds.left;\n var availableSpaceRight = window.innerWidth - rootElementBounds.right;\n var availableSpaceLeft = rootElementBounds.left;\n var left = rootElementBounds.left + Utils.getScrollX();\n var top;\n if (availableSpaceAbove < popupElementBounds.height && availableSpaceBelow < popupElementBounds.height) {\n // Not enough space above or below root element\n var actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);\n this._popupElement.style.maxHeight = actualPopupHeight + \"px\";\n if (actualPopupHeight < popupElementBounds.height) {\n top = Utils.getScrollY();\n }\n else {\n top = Utils.getScrollY() + rootElementBounds.top + (rootElementBounds.height - actualPopupHeight) / 2;\n }\n if (availableSpaceLeft < popupElementBounds.width && availableSpaceRight < popupElementBounds.width) {\n // Not enough space left or right of root element\n var actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);\n this._popupElement.style.maxWidth = actualPopupWidth + \"px\";\n if (actualPopupWidth < popupElementBounds.width) {\n left = Utils.getScrollX();\n }\n else {\n left = Utils.getScrollX() + rootElementBounds.left + (rootElementBounds.width - actualPopupWidth) / 2;\n }\n }\n else {\n // Enough space on the left or right of the root element\n if (availableSpaceRight >= popupElementBounds.width) {\n left = Utils.getScrollX() + rootElementBounds.right;\n this._popupElement.classList.add(\"ms-ctrl-slide\", \"ms-ctrl-slideLeftToRight\");\n }\n else {\n left = Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;\n this._popupElement.classList.add(\"ms-ctrl-slide\", \"ms-ctrl-slideRightToLeft\");\n }\n }\n }\n else {\n // Enough space above or below root element\n if (availableSpaceBelow >= popupElementBounds.height) {\n top = Utils.getScrollY() + rootElementBounds.bottom;\n this._popupElement.classList.add(\"ms-ctrl-slide\", \"ms-ctrl-slideTopToBottom\");\n }\n else {\n top = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;\n this._popupElement.classList.add(\"ms-ctrl-slide\", \"ms-ctrl-slideBottomToTop\");\n }\n if (availableSpaceRight < popupElementBounds.width) {\n left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;\n }\n }\n this._popupElement.style.left = left + \"px\";\n this._popupElement.style.top = top + \"px\";\n this.focus();\n this._isOpen = true;\n }\n }\n closePopup(wasCancelled) {\n if (this._isOpen) {\n document.body.removeChild(this._overlayElement);\n this._isOpen = false;\n if (this.onClose) {\n this.onClose(this, wasCancelled);\n }\n }\n }\n get isOpen() {\n return this._isOpen;\n }\n}\nexports.PopupControl = PopupControl;\nclass InputWithPopup extends inputcontrol_1.InputControl {\n constructor() {\n super(...arguments);\n this._isEnabled = true;\n }\n keyDown(e) {\n switch (e.key) {\n case constants_1.Constants.keys.enter:\n if (this._isEnabled) {\n this.popup();\n }\n break;\n }\n }\n updateLabel() {\n if (this._labelElement) {\n if (this._value) {\n this._labelElement.innerText = this.getValueAsString();\n this._labelElement.classList.remove(\"placeholder\");\n }\n else {\n this._labelElement.innerText = this._placeholderText ? this._placeholderText : \"\";\n this._labelElement.classList.add(\"placeholder\");\n }\n }\n }\n updateLayout() {\n if (!this._isEnabled) {\n this.rootElement.classList.add(\"disabled\");\n this.rootElement.setAttribute(\"aria-disabled\", \"true\");\n this.rootElement.tabIndex = -1;\n }\n else {\n this.rootElement.classList.remove(\"disabled\");\n this.rootElement.removeAttribute(\"aria-disabled\");\n this.rootElement.tabIndex = 0;\n }\n }\n get popupControl() {\n return this._popupControl;\n }\n getButtonIconCssClassName() {\n return \"ms-icon-chevronDown\";\n }\n getValueAsString() {\n return this._value.toString();\n }\n valueChanged() {\n if (this.onValueChanged) {\n this.onValueChanged(this);\n }\n }\n attach(rootElement) {\n super.attach(rootElement);\n rootElement.tabIndex = 0;\n rootElement.className = this.getCssClassName();\n window.addEventListener(\"resize\", (e) => { this.closePopup(true); });\n this.rootElement.onclick = (e) => {\n if (this._isEnabled) {\n if (this.isOpen) {\n this.closePopup(true);\n }\n else {\n this.popup();\n }\n }\n };\n let placeHolderDomItem = this.rootElement.attributes.getNamedItem(\"placeholder\");\n if (placeHolderDomItem) {\n this._placeholderText = placeHolderDomItem.value;\n }\n this._labelElement = document.createElement(\"span\");\n this._labelElement.className = \"ms-ctrl ms-dropdown-label\";\n this._labelElement.id = (0, uuid_1.v4)(); // generate unique id for our label element\n this._dropDownButtonElement = document.createElement(\"i\");\n this._dropDownButtonElement.className = \"ms-icon ms-ctrl-dropdown-button \" + this.getButtonIconCssClassName();\n this.rootElement.appendChild(this._labelElement);\n this.rootElement.appendChild(this._dropDownButtonElement);\n this.updateLabel();\n }\n popup() {\n this._popupControl = this.createPopupControl();\n this._popupControl.onClose = (sender, wasCancelled) => {\n this.closePopup(wasCancelled);\n this.rootElement.focus();\n };\n this._popupControl.popup(this.rootElement);\n this.rootElement.setAttribute(\"aria-expanded\", \"true\");\n }\n closePopup(wasCancelled) {\n if (this.popupControl) {\n this.popupControl.closePopup(wasCancelled);\n this.rootElement.setAttribute(\"aria-expanded\", \"false\");\n }\n }\n get labelId() {\n if (this._labelElement) {\n return this._labelElement.id;\n }\n return undefined;\n }\n get isOpen() {\n return this._popupControl ? this._popupControl.isOpen : false;\n }\n get placeholderText() {\n return this._placeholderText;\n }\n set placeholderText(value) {\n this._placeholderText = value;\n }\n get value() {\n return this._value;\n }\n set value(newValue) {\n if (this._value != newValue) {\n this._value = newValue;\n this.updateLabel();\n this.valueChanged();\n }\n }\n set isEnabled(value) {\n if (this._isEnabled !== value) {\n this._isEnabled = value;\n this.updateLayout();\n }\n }\n}\nexports.InputWithPopup = InputWithPopup;\n//# sourceMappingURL=inputwithpopup.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PopupMenu = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst constants_1 = require(\"./constants\");\nconst collection_1 = require(\"./collection\");\nconst inputwithpopup_1 = require(\"./inputwithpopup\");\nclass PopupMenu extends inputwithpopup_1.PopupControl {\n constructor() {\n super();\n this._items = new collection_1.Collection();\n this._renderedItems = [];\n this._selectedIndex = -1;\n }\n focus() {\n if (this._renderedItems.length >= 1) {\n this._renderedItems[0].focus();\n }\n }\n renderContent() {\n var element = document.createElement(\"div\");\n element.className = \"ms-ctrl ms-popup\";\n element.setAttribute(\"role\", \"listbox\");\n for (let i = 0; i < this._items.length; i++) {\n var renderedItem = this._items.get(i).render();\n renderedItem.tabIndex = 0;\n element.appendChild(renderedItem);\n if (i == this.selectedIndex) {\n renderedItem.focus();\n }\n this._renderedItems.push(renderedItem);\n }\n return element;\n }\n keyDown(e) {\n super.keyDown(e);\n var selectedItemIndex = this._selectedIndex;\n switch (e.key) {\n case constants_1.Constants.keys.tab:\n this.closePopup(true);\n break;\n /*\n case Constants.keys.enter:\n if (this.selectedIndex >= 0) {\n this.selectedIndex = this.selectedIndex;\n\n this.close();\n }\n\n break;\n */\n case constants_1.Constants.keys.up:\n if (selectedItemIndex <= 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n else {\n selectedItemIndex--;\n if (selectedItemIndex < 0) {\n selectedItemIndex = this._renderedItems.length - 1;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n case constants_1.Constants.keys.down:\n if (selectedItemIndex < 0) {\n selectedItemIndex = 0;\n }\n else {\n selectedItemIndex++;\n if (selectedItemIndex >= this._renderedItems.length) {\n selectedItemIndex = 0;\n }\n }\n this.selectedIndex = selectedItemIndex;\n e.cancelBubble = true;\n break;\n }\n }\n get items() {\n return this._items;\n }\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(index) {\n if (index >= 0 && index < this._renderedItems.length) {\n this._renderedItems[index].focus();\n this._selectedIndex = index;\n }\n }\n}\nexports.PopupMenu = PopupMenu;\n//# sourceMappingURL=popupmenu.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RadioButton = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst constants_1 = require(\"./constants\");\nconst inputcontrol_1 = require(\"./inputcontrol\");\nconst utils_1 = require(\"./utils\");\nclass RadioButton extends inputcontrol_1.InputControl {\n constructor() {\n super(...arguments);\n this._label = \"\";\n this._checkboxElement = null;\n this._spanElement = null;\n }\n static createId() {\n var result = RadioButton.creationIndex;\n RadioButton.creationIndex++;\n return result;\n }\n changed() {\n if (this.onChange) {\n this.onChange(this);\n }\n }\n keyDown(e) {\n switch (e.key) {\n case constants_1.Constants.keys.enter:\n this.isChecked = !this.isChecked;\n break;\n }\n }\n attach(rootElement) {\n super.attach(rootElement);\n rootElement.className = \"ms-ctrl ms-ctrl-radiobutton\";\n rootElement.tabIndex = 0;\n var labelAttribute = rootElement.attributes[\"label\"];\n if (labelAttribute) {\n this._label = labelAttribute.value;\n }\n var isCheckedAttribute = rootElement.attributes[\"ischecked\"];\n if (isCheckedAttribute) {\n this._isChecked = isCheckedAttribute.value === \"true\";\n }\n this._checkboxElement = document.createElement(\"input\");\n this._checkboxElement.id = \"ms-ctrl-radio-\" + RadioButton.createId();\n this._checkboxElement.type = \"radio\";\n this._checkboxElement.style.position = \"absolute\";\n this._checkboxElement.checked = this.isChecked;\n this._checkboxElement.onchange = (e) => { this.changed(); };\n var groupNameAttribute = rootElement.attributes[\"groupname\"];\n if (groupNameAttribute) {\n this._checkboxElement.name = groupNameAttribute.value;\n }\n var labelElement = document.createElement(\"label\");\n labelElement.htmlFor = this._checkboxElement.id;\n this._spanElement = document.createElement(\"span\");\n this._spanElement.innerText = this._label;\n labelElement.appendChild(this._spanElement);\n (0, utils_1.clearElement)(rootElement);\n rootElement.appendChild(this._checkboxElement);\n rootElement.appendChild(labelElement);\n }\n get label() {\n return this._label;\n }\n set label(value) {\n this._label = value;\n if (this._spanElement) {\n this._spanElement.innerText = this._label;\n }\n }\n get isChecked() {\n return this._isChecked;\n }\n set isChecked(value) {\n if (this._isChecked != value) {\n this._isChecked = value;\n if (this._checkboxElement) {\n this._checkboxElement.checked = this._isChecked;\n }\n this.changed();\n }\n }\n}\nexports.RadioButton = RadioButton;\n// Used to generate unique Ids\nRadioButton.creationIndex = 0;\n//# sourceMappingURL=radiobutton.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextBox = void 0;\nconst Utils = require(\"./utils\");\nconst inputcontrol_1 = require(\"./inputcontrol\");\nclass EditBox {\n changed() {\n if (this.onChange) {\n this.onChange();\n }\n }\n}\nclass SingleLineEditBox extends EditBox {\n constructor() {\n super();\n this._inputElement = document.createElement(\"input\");\n this._inputElement.className = \"ms-ctrl ms-ctrl-textbox\";\n this._inputElement.type = \"text\";\n this._inputElement.oninput = (e) => {\n this.changed();\n };\n }\n get element() {\n return this._inputElement;\n }\n set placeholder(value) {\n this._inputElement.placeholder = value;\n }\n set lineCount(value) {\n // lineCount can't be set on a SingleLineEditBox\n }\n set maxLength(value) {\n if (this._inputElement.maxLength != value) {\n this._inputElement.maxLength = value;\n this.value = this.value.substr(0, value);\n }\n }\n get value() {\n return this._inputElement.value;\n }\n set value(newValue) {\n this._inputElement.value = newValue;\n }\n}\nclass MultilineEditBox extends EditBox {\n constructor() {\n super();\n this._textareaElement = document.createElement(\"textarea\");\n this._textareaElement.className = \"ms-ctrl ms-ctrl-textbox ms-ctrl-textbox-multiline\";\n this._textareaElement.oninput = (e) => {\n this.changed();\n };\n }\n get element() {\n return this._textareaElement;\n }\n set placeholder(value) {\n this._textareaElement.placeholder = value;\n }\n set lineCount(value) {\n this._textareaElement.rows = value;\n }\n set maxLength(value) {\n if (this._textareaElement.maxLength != value) {\n this._textareaElement.maxLength = value;\n this.value = this.value.substr(0, value);\n }\n }\n get value() {\n return this._textareaElement.value;\n }\n set value(newValue) {\n this._textareaElement.value = newValue;\n }\n}\nclass TextBox extends inputcontrol_1.InputControl {\n constructor() {\n super(...arguments);\n this._isMultiline = false;\n this._lineCount = 3;\n }\n editBoxChanged() {\n if (this.onChange) {\n this.onChange(this);\n }\n }\n recreateEditBox() {\n var currentValue = null;\n if (this._editBox) {\n currentValue = this._editBox.value;\n }\n else {\n currentValue = this.rootElement.innerText;\n }\n if (this._isMultiline) {\n this._editBox = new MultilineEditBox();\n }\n else {\n this._editBox = new SingleLineEditBox();\n }\n if (currentValue) {\n this._editBox.value = currentValue;\n }\n this._editBox.lineCount = this._lineCount;\n this._editBox.maxLength = this._maxLength;\n this._editBox.placeholder = this._placeholder;\n this._editBox.onChange = () => { this.editBoxChanged(); };\n Utils.clearElement(this.rootElement);\n this.rootElement.appendChild(this._editBox.element);\n }\n get editBox() {\n if (!this._editBox) {\n this.recreateEditBox();\n }\n return this._editBox;\n }\n attach(rootElement) {\n super.attach(rootElement);\n this._isMultiline = Utils.getAttributeValueAsBool(rootElement, \"ismultiline\", false);\n this._lineCount = Utils.getAttributeValueAsInt(rootElement, \"lines\", 3);\n this._maxLength = Utils.getAttributeValueAsInt(rootElement, \"maxlength\", 50000);\n this._placeholder = Utils.getAttributeValueAsString(rootElement, \"placeholder\", null);\n this.recreateEditBox();\n }\n get value() {\n return this.editBox.value;\n }\n set value(newValue) {\n this.editBox.value = newValue;\n }\n get placeholder() {\n return this._placeholder;\n }\n set placeholder(value) {\n this._placeholder = value;\n this.editBox.placeholder = value;\n }\n get isMultiline() {\n return this._isMultiline;\n }\n set isMultiline(value) {\n if (this._isMultiline != value) {\n this._isMultiline = value;\n this.recreateEditBox();\n }\n }\n get lineCount() {\n return this._lineCount;\n }\n set lineCount(value) {\n if (value > 0) {\n this._lineCount = value;\n this.editBox.lineCount = value;\n }\n }\n get maxLength() {\n return this._maxLength;\n }\n set maxLength(value) {\n if (value > 0) {\n this._maxLength = value;\n this.editBox.maxLength = value;\n }\n }\n}\nexports.TextBox = TextBox;\n//# sourceMappingURL=textbox.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearElement = exports.getAttributeValueAsInt = exports.getAttributeValueAsString = exports.getAttributeValueAsBool = exports.getScrollY = exports.getScrollX = exports.areDatesEqual = exports.addMonths = exports.addDays = exports.daysInMonth = exports.CalendarSettings = void 0;\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nconst Enums = require(\"./enums\");\nclass CalendarSettings {\n static getLongDayName(dayIndex) {\n if (dayIndex >= 0 && dayIndex < CalendarSettings.longDayNames.length) {\n return CalendarSettings.longDayNames[dayIndex];\n }\n throw new Error(\"Day index out of range: \" + dayIndex);\n }\n static getShortDayName(dayIndex) {\n if (dayIndex >= 0 && dayIndex < CalendarSettings.shortDayNames.length) {\n return CalendarSettings.shortDayNames[dayIndex];\n }\n throw new Error(\"Day index out of range: \" + dayIndex);\n }\n static getInitialDayName(dayIndex) {\n if (dayIndex >= 0 && dayIndex < CalendarSettings.minimalDayNames.length) {\n return CalendarSettings.minimalDayNames[dayIndex];\n }\n throw new Error(\"Day index out of range: \" + dayIndex);\n }\n static getLongMonthName(monthIndex) {\n if (monthIndex >= 0 && monthIndex < CalendarSettings.longMonthNames.length) {\n return CalendarSettings.longMonthNames[monthIndex];\n }\n throw new Error(\"Month index out of range: \" + monthIndex);\n }\n static getShortMonthName(monthIndex) {\n if (monthIndex >= 0 && monthIndex < CalendarSettings.shortMonthNames.length) {\n return CalendarSettings.shortMonthNames[monthIndex];\n }\n throw new Error(\"Month index out of range: \" + monthIndex);\n }\n}\nexports.CalendarSettings = CalendarSettings;\nCalendarSettings.monthsInYear = 12;\nCalendarSettings.daysInWeek = 7;\nCalendarSettings.firstDayOfWeek = Enums.DayOfWeek.Sunday;\nCalendarSettings.longDayNames = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\nCalendarSettings.shortDayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nCalendarSettings.minimalDayNames = [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"];\nCalendarSettings.longMonthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\nCalendarSettings.shortMonthNames = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nfunction daysInMonth(year, month) {\n switch (month) {\n case 1:\n return (year % 4 == 0 && year % 100) || year % 400 == 0 ? 29 : 28;\n case 3:\n case 5:\n case 8:\n case 10:\n return 30;\n default:\n return 31;\n }\n}\nexports.daysInMonth = daysInMonth;\nfunction addDays(date, days) {\n var result = new Date(date.getTime());\n result.setDate(result.getDate() + days);\n return result;\n}\nexports.addDays = addDays;\nfunction addMonths(date, months) {\n var result = new Date(date.getTime());\n var newMonth = result.getMonth() + months;\n result.setMonth(newMonth);\n // We want to maintain the same day-of-month, but that may not be possible if the new month doesn't have enough days.\n // Loop until we back up to a day the new month has.\n // (Weird modulo math is due to Javascript's treatment of negative numbers in modulo)\n if (result.getMonth() !== ((newMonth % CalendarSettings.monthsInYear) + CalendarSettings.monthsInYear) % CalendarSettings.monthsInYear) {\n result = addDays(result, -result.getDate());\n }\n return result;\n}\nexports.addMonths = addMonths;\nfunction areDatesEqual(date1, date2) {\n return date1.getFullYear() == date2.getFullYear() &&\n date1.getMonth() == date2.getMonth() &&\n date1.getDate() == date2.getDate();\n}\nexports.areDatesEqual = areDatesEqual;\nfunction getScrollX() {\n return window.pageXOffset;\n}\nexports.getScrollX = getScrollX;\nfunction getScrollY() {\n return window.pageYOffset;\n}\nexports.getScrollY = getScrollY;\nfunction getAttributeValueAsBool(element, attributeName, defaultValue) {\n var attribute = element.attributes[attributeName];\n if (attribute) {\n return attribute.value === \"true\";\n }\n return defaultValue;\n}\nexports.getAttributeValueAsBool = getAttributeValueAsBool;\nfunction getAttributeValueAsString(element, attributeName, defaultValue) {\n var attribute = element.attributes[attributeName];\n if (attribute) {\n return attribute.value;\n }\n return defaultValue;\n}\nexports.getAttributeValueAsString = getAttributeValueAsString;\nfunction getAttributeValueAsInt(element, attributeName, defaultValue) {\n var attribute = element.attributes[attributeName];\n if (attribute) {\n var n = parseInt(attribute.value);\n if (!isNaN(n)) {\n return n;\n }\n }\n return defaultValue;\n}\nexports.getAttributeValueAsInt = getAttributeValueAsInt;\nfunction clearElement(element) {\n var _a, _b;\n const trustedHtml = (typeof window === 'undefined') ? \"\" : ((_b = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.emptyHTML) !== null && _b !== void 0 ? _b : \"\");\n element.innerHTML = trustedHtml;\n}\nexports.clearElement = clearElement;\n//# sourceMappingURL=utils.js.map","/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT © Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ clipboard; }\n});\n\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(279);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(370);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(817);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n;// CONCATENATED MODULE: ./src/common/command.js\n/**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\nfunction command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n}\n;// CONCATENATED MODULE: ./src/actions/cut.js\n\n\n/**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\nvar ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n};\n\n/* harmony default export */ var actions_cut = (ClipboardActionCut);\n;// CONCATENATED MODULE: ./src/common/create-fake-element.js\n/**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\nfunction createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n}\n;// CONCATENATED MODULE: ./src/actions/copy.js\n\n\n\n/**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\nvar fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n};\n/**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n\nvar ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n\n return selectedText;\n};\n\n/* harmony default export */ var actions_copy = (ClipboardActionCopy);\n;// CONCATENATED MODULE: ./src/actions/default.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n/**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\nvar ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n};\n\n/* harmony default export */ var actions_default = (ClipboardActionDefault);\n;// CONCATENATED MODULE: ./src/clipboard.js\nfunction clipboard_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return clipboard_typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\nfunction getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\nvar Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n\n _classCallCheck(this, Clipboard);\n\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n\n return Clipboard;\n}((tiny_emitter_default()));\n\n/* harmony default export */ var clipboard = (Clipboard);\n\n/***/ }),\n\n/***/ 828:\n/***/ (function(module) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n\n/***/ 438:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar closest = __webpack_require__(828);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n\n/***/ 879:\n/***/ (function(__unused_webpack_module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n\n/***/ 370:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar is = __webpack_require__(879);\nvar delegate = __webpack_require__(438);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(module) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n\n/***/ 279:\n/***/ (function(module) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(686);\n/******/ })()\n.default;\n});","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport const adaptiveCardSchema =\r\n{\r\n \"$schema\": \"http://json-schema.org/draft-06/schema#\",\r\n \"id\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"type\": \"object\",\r\n \"title\": \"Microsoft Adaptive Card Schema\",\r\n \"additionalProperties\": true,\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/AdaptiveCard\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"version\": {\r\n \"type\": \"string\",\r\n \"description\": \"version of schema that this card was authored \"\r\n },\r\n \"minVersion\": {\r\n \"type\": \"string\",\r\n \"description\": \"if a client doesn't support the minVersion the card should be rejected and return the fallbackText. If it does, then the elements that are not supported are safe to ignore\"\r\n },\r\n \"fallbackText\": {\r\n \"type\": \"string\",\r\n \"description\": \"if a client is not able to show the card, show fallbackText to the user. This can be in markdown format. \"\r\n },\r\n \"speak\": {\r\n \"type\": \"string\",\r\n \"description\": \"Specifies what should be spoken for this entire Item. This is simple text or SSML fragment\"\r\n }\r\n },\r\n \"required\": [\r\n \"version\"\r\n ],\r\n \"definitions\": {\r\n \"Action\": {\r\n \"anyOf\": [\r\n {\r\n \"$ref\": \"#/definitions/Action.Submit\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Action.ShowCard\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Action.OpenUrl\"\r\n }\r\n ]\r\n },\r\n \"Action.OpenUrl\": {\r\n \"additionalProperties\": true,\r\n \"description\": \"When Action.OpenUrl is invoked it will show the given url, either by launching it to an external web browser or showing in-situ with embedded web browser.\",\r\n \"properties\": {\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"description\": \"Label for button or link that represents this action\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be Action.OpenUrl\",\r\n \"enum\": [\r\n \"Action.OpenUrl\"\r\n ]\r\n },\r\n \"url\": {\r\n \"type\": \"string\",\r\n \"description\": \"The URL to open\"\r\n }\r\n },\r\n \"required\": [\r\n \"type\",\r\n \"url\"\r\n ],\r\n \"type\": \"object\"\r\n },\r\n \"Action.ShowCard\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": true,\r\n \"description\": \"Action.ShowCard defines an inline AdaptiveCard which is shown to the user when it is clicked.\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be Action.ShowCard\",\r\n \"enum\": [\r\n \"Action.ShowCard\"\r\n ]\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"description\": \"Label for button or link that represents this action\"\r\n },\r\n \"card\": {\r\n \"$ref\": \"#/definitions/AdaptiveCard\"\r\n }\r\n },\r\n \"required\": [\r\n \"type\",\r\n \"card\"\r\n ]\r\n },\r\n \"Action.Submit\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": true,\r\n \"description\": \"Submit action gathers up input fields, merges with optional data field and generates event to client asking for data to be submitted. It is up to the client to determine how that data is processed. For example: With BotFramework bots the client would send an activity through the messaging medium to the bot.\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be Action.Submit\",\r\n \"enum\": [\r\n \"Action.Submit\"\r\n ]\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"description\": \"Label for button or link that represents this action\"\r\n },\r\n \"data\": {\r\n \"type\": [ \"string\", \"object\" ],\r\n \"description\": \"initial data that input fields will be combined with. This is essentially 'hidden' properties\"\r\n }\r\n },\r\n \"required\": [\r\n \"type\"\r\n ]\r\n },\r\n \"Actions\": {\r\n \"additionalItems\": true,\r\n \"items\": {\r\n \"$ref\": \"#/definitions/Action\"\r\n },\r\n \"type\": \"array\"\r\n },\r\n \"AdaptiveCard\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Card schema for an adaptive card\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be AdaptiveCard\",\r\n \"enum\": [\r\n \"AdaptiveCard\"\r\n ]\r\n },\r\n \"actions\": {\r\n \"description\": \"The Actions to show in the card's action bar\",\r\n \"$ref\": \"#/definitions/Actions\"\r\n },\r\n \"body\": {\r\n \"type\": [\"object\", \"array\"],\r\n \"description\": \"The Card Elements to show in the primary card region\",\r\n \"$ref\": \"#/definitions/CardElements\"\r\n }\r\n },\r\n \"required\": [\r\n \"type\",\r\n \"version\"\r\n ]\r\n },\r\n \"CardElement\": {\r\n \"additionalProperties\": true,\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"A unique Id associated with the element\"\r\n },\r\n \"spacing\": {\r\n \"$ref\": \"#/definitions/SpacingStyle\"\r\n },\r\n \"separator\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"The Separator object type describes the look and feel of a separation line between two elements.\",\r\n \"default\": false\r\n }\r\n },\r\n \"required\": [\r\n \"type\"\r\n ]\r\n },\r\n \"CardElements\": {\r\n \"type\": \"array\",\r\n \"additionalItems\": true,\r\n \"items\": [\r\n {\r\n \"anyOf\": [\r\n {\r\n \"$ref\": \"#/definitions/TextBlock\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Image\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Container\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/ColumnSet\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/FactSet\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/ImageSet\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Input.Text\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Input.Number\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Input.Date\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Input.Time\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Input.Toggle\"\r\n },\r\n {\r\n \"$ref\": \"#/definitions/Input.ChoiceSet\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"Input.Choice\": {\r\n \"type\": \"object\",\r\n \"description\": \"Describes a Choice input. The value should be a simple string without a \\\",\\\"\",\r\n \"additionalProperties\": true,\r\n \"properties\": {\r\n \"type\":{\r\n \"type\":\"string\",\r\n \"enum\": [\r\n \"Input.Choice\"\r\n ]\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"description\": \"The text for a choice\"\r\n },\r\n \"value\": {\r\n \"type\": \"string\",\r\n \"description\": \"The raw value for the choice. NOTE: do not use a \\\",\\\" in the value, since MultiSelect ChoiceSet returns a comma-delimited string of choice values\"\r\n }\r\n },\r\n \"required\": [\r\n \"title\",\r\n \"value\"\r\n ]\r\n },\r\n \"ChoiceInputStyle\": {\r\n \"type\": \"string\",\r\n \"description\": \"Style hint for Input.ChoiceSet\",\r\n \"enum\": [\r\n \"compact\",\r\n \"expanded\"\r\n ]\r\n },\r\n \"Column\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Defines a container that is part of a ColumnSet\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"items\": {\r\n \"description\": \"The Card Elements to include in the Column\",\r\n \"$ref\": \"#/definitions/CardElements\"\r\n },\r\n \"selectAction\": {\r\n \"description\": \"An Action that will be invoked when the Column is tapped or selected\",\r\n \"$ref\": \"#/definitions/Action\"\r\n },\r\n \"width\": {\r\n \"type\": [\r\n \"string\",\r\n \"number\"\r\n ],\r\n \"description\": \"\\\"auto\\\", \\\"stretch\\\", or a number representing relative width of the column in the column group\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be Column\",\r\n \"enum\": [\r\n \"Column\"\r\n ]\r\n }\r\n },\r\n \"required\": [\r\n \"items\"\r\n ]\r\n },\r\n \"ColumnSet\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"ColumnSet divides a region into Column's allowing elements to sit side-by-side\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"columns\": {\r\n \"type\": \"array\",\r\n \"description\": \"The array of Columns to divide the region into\",\r\n \"items\": {\r\n \"$ref\": \"#/definitions/Column\"\r\n }\r\n },\r\n \"selectAction\": {\r\n \"$ref\": \"#/definitions/Action\",\r\n \"description\": \"The Action that is executed when the ColumnSet is clicked/tapped\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be ColumnSet\",\r\n \"enum\": [\r\n \"ColumnSet\"\r\n ]\r\n }\r\n }\r\n },\r\n \"Container\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Containers group items together\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"items\": {\r\n \"description\": \"The Card Elements to render inside the Container\",\r\n \"$ref\": \"#/definitions/CardElements\"\r\n },\r\n \"selectAction\": {\r\n \"description\": \"An Action that will be invoked when the Image is tapped or selected\",\r\n \"$ref\": \"#/definitions/Action\"\r\n },\r\n \"style\": {\r\n \"type\": \"string\",\r\n \"description\": \"Style hint for Container\",\r\n \"enum\": [\r\n \"default\",\r\n \"emphasis\"\r\n ]\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be Container\",\r\n \"enum\": [\r\n \"Container\"\r\n ]\r\n }\r\n },\r\n \"required\": [\r\n \"items\"\r\n ]\r\n },\r\n \"Fact\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Describes a Fact in a FactSet as a key/value pair\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"enum\": [\r\n \"Fact\"\r\n ]\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"description\": \"The title of the fact\"\r\n\r\n },\r\n \"value\": {\r\n \"type\": \"string\",\r\n \"description\": \"The value of the fact\"\r\n }\r\n },\r\n \"required\": [\r\n \"title\",\r\n \"value\"\r\n ]\r\n },\r\n \"FactSet\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"The FactSet Item makes it simple to display a series of facts (e.g. name/value pairs) in a tabular form.\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"facts\": {\r\n \"type\": \"array\",\r\n \"description\": \"The array of Facts\",\r\n \"items\": {\r\n \"$ref\": \"#/definitions/Fact\"\r\n }\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be FactSet\",\r\n \"enum\": [\r\n \"FactSet\"\r\n ]\r\n }\r\n },\r\n \"required\": [\r\n \"facts\"\r\n ]\r\n },\r\n \"HorizontalAlignment\": {\r\n \"type\": \"string\",\r\n \"description\": \"Controls how Items are horizontally positioned within their container.\",\r\n \"enum\": [\r\n \"left\",\r\n \"center\",\r\n \"right\"\r\n ]\r\n },\r\n \"Image\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"The Image Item allows for the inclusion of images in an Adaptive Card.\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"altText\": {\r\n \"type\": \"string\",\r\n \"description\": \"Alternate text for the image for accessibility\"\r\n },\r\n \"horizontalAlignment\": {\r\n \"$ref\": \"#/definitions/HorizontalAlignment\"\r\n },\r\n \"selectAction\": {\r\n \"description\": \"An Action that will be invoked when the Image is tapped or selected\",\r\n \"$ref\": \"#/definitions/Action\"\r\n },\r\n \"size\": {\r\n \"type\": \"object\",\r\n \"$ref\": \"#/definitions/ImageSize\"\r\n },\r\n \"style\": {\r\n \"$ref\": \"#/definitions/ImageStyle\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be Image\",\r\n \"enum\": [\r\n \"Image\"\r\n ]\r\n },\r\n \"url\": {\r\n \"type\": \"string\",\r\n \"description\": \"The URL to the image.\"\r\n }\r\n },\r\n \"required\": [\r\n \"url\"\r\n ]\r\n },\r\n \"ImageSet\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"The ImageSet allows for the inclusion of a collection images like a photogallery.\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"images\": {\r\n \"type\": \"array\",\r\n \"description\": \"The array of Image elements to show\",\r\n \"items\": {\r\n \"$ref\": \"#/definitions/Image\"\r\n }\r\n },\r\n \"imageSize\": {\r\n \"$ref\": \"#/definitions/ImageSize\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be ImageSet\",\r\n \"enum\": [\r\n \"ImageSet\"\r\n ]\r\n }\r\n },\r\n \"required\": [\r\n \"images\"\r\n ]\r\n },\r\n \"ImageSize\": {\r\n \"type\": \"string\",\r\n \"description\": \"Controls the approximate size of the image. The physical dimensions will vary per host. Specify \\\"auto\\\" for true image dimension or \\\"stretch\\\" to force it to fill the container\",\r\n \"default\": \"auto\",\r\n \"enum\": [\r\n \"auto\",\r\n \"stretch\",\r\n \"small\",\r\n \"medium\",\r\n \"large\"\r\n ]\r\n },\r\n \"ImageStyle\": {\r\n \"type\": \"string\",\r\n \"description\": \"Controls the way Images are displayed\",\r\n \"enum\": [\r\n \"default\",\r\n \"person\"\r\n ]\r\n },\r\n \"Input.ChoiceSet\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Shows an array of Choice objects\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"choices\": {\r\n \"type\": \"array\",\r\n \"description\": \"the choice options\",\r\n \"items\": {\r\n \"$ref\": \"#/definitions/Input.Choice\"\r\n }\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id for the value (will be used to identify collected input when SUBMIT is clicked)\"\r\n },\r\n \"isMultiSelect\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"allow multiple choices to be selected\",\r\n \"default\": false\r\n },\r\n \"style\": {\r\n \"$ref\": \"#/definitions/ChoiceInputStyle\"\r\n },\r\n \"type\": {\r\n \"description\": \"Must be Input.ChoiceInput\",\r\n \"enum\": [\r\n \"Input.ChoiceSet\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"value\": {\r\n \"type\": \"string\",\r\n \"description\": \"The initial choice (or set of choices) that should be selected. For multi-select, specifcy a comma-separated string of values\"\r\n }\r\n },\r\n \"required\": [\r\n \"id\",\r\n \"choices\"\r\n ]\r\n },\r\n \"Input.Date\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Input.Date collects Date from the user,\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id for the value (will be used to identify collected input when SUBMIT is clicked)\"\r\n },\r\n \"max\": {\r\n \"type\": \"string\",\r\n \"description\": \"hint of maximum value expressed in ISO-8601 format (may be ignored by some clients)\"\r\n },\r\n \"min\": {\r\n \"type\": \"string\",\r\n \"description\": \"hint of minimum value expressed in ISO-8601 format (may be ignored by some clients)\"\r\n },\r\n \"placeholder\": {\r\n \"type\": \"string\",\r\n \"description\": \"Title Description of the input desired\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type must be Input.Date\",\r\n \"enum\": [\r\n \"Input.Date\"\r\n ]\r\n },\r\n \"value\": {\r\n \"type\": \"string\",\r\n \"description\": \"The initial value for a field expressed in ISO-8601 format\"\r\n }\r\n },\r\n \"required\": [\r\n \"id\"\r\n ]\r\n },\r\n \"Input.Number\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Input.Number collects number from the user,\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id for the value (will be used to identify collected input when SUBMIT is clicked)\"\r\n },\r\n \"max\": {\r\n \"type\": \"number\",\r\n \"description\": \"hint of maximum value (may be ignored by some clients)\"\r\n },\r\n \"min\": {\r\n \"type\": \"number\",\r\n \"description\": \"hint of minimum value (may be ignored by some clients)\"\r\n },\r\n \"placeholder\": {\r\n \"type\": \"string\",\r\n \"description\": \"Title Description of the input desired\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type must be Input.Number\",\r\n \"enum\": [\r\n \"Input.Number\"\r\n ]\r\n },\r\n \"value\": {\r\n \"type\": \"number\",\r\n \"description\": \"The initial value for a field\"\r\n }\r\n },\r\n \"required\": [\r\n \"id\"\r\n ]\r\n },\r\n \"Input.Text\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Input.Text collects text from the user,\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id for the value (will be used to identify collected input when SUBMIT is clicked)\"\r\n },\r\n \"isMultiline\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Do you want to allow multiple lines of input\"\r\n },\r\n \"maxLength\": {\r\n \"type\": \"number\",\r\n \"description\": \"hint of maximum length characters to collect (may be ignored by some clients)\"\r\n },\r\n \"placeholder\": {\r\n \"type\": \"string\",\r\n \"description\": \"Title Description of the input desired\"\r\n },\r\n \"style\": {\r\n \"$ref\": \"#/definitions/TextInputStyle\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Input.Text\",\r\n \"enum\": [\r\n \"Input.Text\"\r\n ]\r\n },\r\n \"value\": {\r\n \"type\": \"string\",\r\n \"description\": \"The initial value for a field\"\r\n }\r\n },\r\n \"required\": [\r\n \"id\"\r\n ]\r\n },\r\n \"Input.Time\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Input.Time collects Time from the user,\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id for the value (will be used to identify collected input when SUBMIT is clicked)\"\r\n },\r\n \"max\": {\r\n \"type\": \"string\",\r\n \"description\": \"hint of maximum value (may be ignored by some clients)\"\r\n },\r\n \"min\": {\r\n \"type\": \"string\",\r\n \"description\": \"hint of minimum value (may be ignored by some clients)\"\r\n },\r\n \"placeholder\": {\r\n \"type\": \"string\",\r\n \"description\": \"Title Description of the input desired\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type must be Input.Time\",\r\n \"enum\": [\r\n \"Input.Time\"\r\n ]\r\n },\r\n \"value\": {\r\n \"type\": \"string\",\r\n \"description\": \"The initial value for a field expressed in ISO-8601 format\"\r\n }\r\n },\r\n \"required\": [\r\n \"id\"\r\n ]\r\n },\r\n \"Input.Toggle\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"Input.Toggle collects a true/false response from the user\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id for the value (will be used to identify collected input when SUBMIT is clicked)\"\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"description\": \"Title for the toggle\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Input.Toggle\",\r\n \"enum\": [\r\n \"Input.Toggle\"\r\n ]\r\n },\r\n \"value\": {\r\n \"type\": \"string\",\r\n \"description\": \"The current selected value (default:false)\"\r\n },\r\n \"valueOff\": {\r\n \"type\": \"string\",\r\n \"description\": \"The value when toggle is off (default:false)\"\r\n },\r\n \"valueOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"The value when toggle is on (default:true)\"\r\n }\r\n },\r\n \"required\": [\r\n \"id\",\r\n \"title\"\r\n ]\r\n },\r\n \"TextBlock\": {\r\n \"additionalProperties\": true,\r\n \"type\": \"object\",\r\n \"description\": \"The TextBlock Item allows for the inclusion of text, with various font sizes, weight and color, in Adaptive Cards.\",\r\n \"allOf\": [\r\n {\r\n \"$ref\": \"#/definitions/CardElement\"\r\n }\r\n ],\r\n \"properties\": {\r\n \"color\": {\r\n \"type\": \"string\",\r\n \"description\": \"Controls the color of TextBlock Items.\",\r\n \"enum\": [\r\n \"default\",\r\n \"dark\",\r\n \"light\",\r\n \"accent\",\r\n \"good\",\r\n \"warning\",\r\n \"attention\"\r\n ]\r\n },\r\n \"horizontalAlignment\": {\r\n \"$ref\": \"#/definitions/HorizontalAlignment\"\r\n },\r\n \"isSubtle\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates whether the color of the text should be slightly toned down to appear less prominent\"\r\n },\r\n \"maxLines\": {\r\n \"type\": \"number\",\r\n \"description\": \"When Wrap is true, you can specify the maximum number of lines to allow the textBlock to use.\"\r\n },\r\n \"size\": {\r\n \"type\": \"string\",\r\n \"description\": \"controls size of the text.\",\r\n \"enum\": [\r\n \"small\",\r\n \"default\",\r\n \"medium\",\r\n \"large\",\r\n \"extraLarge\"\r\n ]\r\n },\r\n \"text\": {\r\n \"type\": \"string\",\r\n \"description\": \"The actual text to display\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Must be TextBlock\",\r\n \"enum\": [\r\n \"TextBlock\"\r\n ]\r\n },\r\n \"weight\": {\r\n \"type\": \"string\",\r\n \"description\": \"Controls the weight of TextBlock Items\",\r\n \"enum\": [\r\n \"lighter\",\r\n \"default\",\r\n \"bolder\"\r\n ]\r\n },\r\n \"wrap\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"True if be is allowed to wrap\"\r\n }\r\n },\r\n \"required\": [\r\n \"text\"\r\n ]\r\n },\r\n \"SeparatorStyle\": {\r\n \"type\": \"object\",\r\n \"description\": \"Indicates whether there should be a visible separator (e.g. a line) between the element and the one before it. If this property is not specified, no separator is displayed. If it is, a separator line is displayed. A separator will only appear if there was a preceding element.\",\r\n \"properties\": {\r\n \"thickness\": {\r\n \"type\": \"string\",\r\n \"description\": \"Specifies the thickness of the separation line.\",\r\n \"enum\": [\r\n \"default\",\r\n \"thick\"\r\n ]\r\n },\r\n \"color\": {\r\n \"type\": \"string\",\r\n \"description\": \"Specifies the color of the separation line.\",\r\n \"enum\": [\r\n \"default\",\r\n \"accent\"\r\n ]\r\n }\r\n }\r\n },\r\n \"SpacingStyle\": {\r\n \"type\": \"string\",\r\n \"description\": \"Controls the amount of spacing between this element and the previous element.\",\r\n \"enum\": [\r\n \"none\",\r\n \"small\",\r\n \"default\",\r\n \"medium\",\r\n \"large\",\r\n \"extraLarge\",\r\n \"padding\"\r\n ]\r\n },\r\n \"TextInputStyle\": {\r\n \"type\": \"string\",\r\n \"description\": \"Style hint for Input.Text.\",\r\n \"enum\": [\r\n \"text\",\r\n \"tel\",\r\n \"url\",\r\n \"email\"\r\n ]\r\n }\r\n }\r\n};\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport * from \"./strings\";\r\nexport * from \"./shared\";\r\nexport * from \"./containers/host-container\";\r\nexport * from \"./containers/default/default-container\";\r\nexport * from \"./field-picker\";\r\nexport * from \"./card-designer-surface\";\r\nexport * from \"./card-designer\";\r\nexport * from \"./constants\";\r\nexport * from \"./draggable-element\";\r\nexport * from \"./designer-peers\";\r\nexport * from \"./peer-command\";\r\nexport * from \"./miscellaneous\";\r\nexport * from \"./settings-manager\";\r\nexport * from \"./side-panel\";\r\nexport * from \"./tool-box\";\r\nexport * from \"./toolbar\";\r\nexport * from \"./tool-palette\";\r\nexport * from \"./splitter\";\r\nexport * from \"./tree-view\";\r\nexport * from \"./base-tree-item\";\r\nexport * from \"./designer-peer-treeitem\";\r\nexport * from \"./data\";\r\nexport * from \"./catalogue\";\r\nexport * from \"./containers/host-container\";\r\nexport * from \"./containers/default/default-container\";\r\nexport * from \"./pic2card\";\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as containers from \"./containers\";\r\nimport { DeviceEmulation } from \"./device-emulation\";\r\n\r\nexport * from \"./adaptivecards-designer-standalone\";\r\nexport * from \"./containers/index\";\r\n\r\nexport const defaultMicrosoftHosts: containers.HostContainer[] = [\r\n new containers.WebChatContainer(\"Bot Framework WebChat\", \"containers/webchat-container.css\"),\r\n new containers.OutlookContainer(\"Outlook Actionable Messages\", \"containers/outlook-container.css\"),\r\n new containers.TeamsContainer(),\r\n new containers.VivaConnectionsContainer(),\r\n new containers.CortanaContainer(),\r\n new containers.BotFrameworkContainer(\"Bot Framework Other Channels (Image render)\", \"containers/bf-image-container.css\"),\r\n new containers.CortanaClassicContainer(\"Cortana Skills (Classic)\", \"containers/cortana-classic-container.css\"),\r\n new containers.FederatedSearchContainer(\"Federated Search\",\"containers/federated-search-container.css\"),\r\n new containers.WidgetContainer(containers.ContainerSize.Small),\r\n];\r\n\r\nexport const defaultMicrosoftDeviceEmulations: DeviceEmulation[] = [\r\n { name: \"Desktop (unconstrained)\", maxWidth: undefined },\r\n { name: \"Small mobile (320px)\", maxWidth: \"320px\" },\r\n { name: \"Large mobile (414px)\", maxWidth: \"414px\" },\r\n { name: \"Small tablet (768px)\", maxWidth: \"768px\" },\r\n { name: \"Large tablet (1024px)\", maxWidth: \"1024px\" },\r\n];\r\n","import { DraggableElement } from \"./draggable-element\";\r\nimport { Constants } from \"adaptivecards-controls\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nexport abstract class BaseTreeItem extends DraggableElement {\r\n private static collapsedIconClass = \"acd-icon-chevronRight\";\r\n private static expandedIconClass = \"acd-icon-chevronDown\";\r\n\r\n private _isExpanded: boolean = true;\r\n private _isSelected: boolean = false;\r\n private _rootElement: HTMLElement;\r\n private _treeItemElement: HTMLElement;\r\n private _expandCollapseElement: HTMLElement;\r\n private _childContainerElement: HTMLElement;\r\n\r\n private needsToBeScrolled() {\r\n // detect the case where the treeViewHost's parent isn't currently\r\n // overflowed. if it *is* overflowed (has scrollbar), then scrolling is\r\n // appropriate. otherwise, we might be in a small-screen situation\r\n // (single column rendering) where scrolling is undesireable\r\n const treeViewHostParent = this._rootElement.closest(\".acd-treeView-host\").parentElement;\r\n return (treeViewHostParent && treeViewHostParent.scrollHeight > treeViewHostParent.clientHeight);\r\n }\r\n\r\n private setIsSelected(value: boolean, scrollIntoView: boolean) {\r\n if (this._isSelected !== value) {\r\n this._isSelected = value;\r\n\r\n if (this._isSelected) {\r\n this._treeItemElement.classList.add(\"selected\");\r\n }\r\n else {\r\n this._treeItemElement.classList.remove(\"selected\");\r\n }\r\n\r\n this._rootElement.setAttribute(\"aria-current\", this._isSelected.toString());\r\n\r\n this.selectedChanged(scrollIntoView);\r\n }\r\n }\r\n\r\n protected abstract getLabelText(): string;\r\n\r\n protected click(e: MouseEvent) {\r\n super.click(e);\r\n\r\n this.setIsSelected(true, false);\r\n }\r\n\r\n protected getIconClass(): string {\r\n return null;\r\n }\r\n\r\n protected getAdditionalText(): string {\r\n return null;\r\n }\r\n\r\n protected getAdditionalTextClass(): string {\r\n return \"acd-tree-item-additionalText\";\r\n }\r\n\r\n protected getIndentationLevelIncrement(): number {\r\n return 8;\r\n }\r\n\r\n protected getDragSourceElement(): HTMLElement {\r\n return this._treeItemElement;\r\n }\r\n\r\n protected selectedChanged(scrollIntoView: boolean) {\r\n if (this.isSelected && scrollIntoView && this.needsToBeScrolled()) {\r\n this._rootElement.scrollIntoView();\r\n }\r\n\r\n if (this.onSelectedChange) {\r\n this.onSelectedChange(this);\r\n }\r\n }\r\n\r\n protected itemInvoked() {\r\n if (this.onItemInvoked) {\r\n this.onItemInvoked(this);\r\n }\r\n }\r\n\r\n private getExpandCollapseAriaText() : string {\r\n return (this._isExpanded ? \"collapse\" : \"expand\") + \" \" + this.getLabelText() + \" element\";\r\n }\r\n\r\n // collapse node or navigate to parent, if present\r\n private handleKeyboardLeftNav(): void {\r\n if (this._isExpanded && this.getChildCount() > 0) {\r\n // if we're an expanded node that has children, collapse the node.\r\n this._isExpanded = false;\r\n this.updateLayout();\r\n this._rootElement.tabIndex = 0;\r\n this._rootElement.focus();\r\n }\r\n else {\r\n // otherwise, we need to find the nearest ancestor treeitem or the root of the tree\r\n const nearestTreeItem = this._rootElement.parentElement.closest(\"[role='treeitem'], [role='tree']\");\r\n const roleAttr = nearestTreeItem?.getAttribute(\"role\");\r\n if (roleAttr === \"treeitem\") {\r\n nearestTreeItem.tabIndex = 0;\r\n nearestTreeItem.focus();\r\n this._rootElement.tabIndex = -1;\r\n }\r\n else if (roleAttr == \"tree\")\r\n {\r\n // only element higher up is the root DOM element of the tree, meaning `this`\r\n // represents the root node of the tree. set tabIndex so keyboard users can\r\n // tab back in.\r\n this._rootElement.tabIndex = 0;\r\n this._rootElement.focus();\r\n }\r\n }\r\n }\r\n\r\n // expand child nodes or navigate to first child, if present\r\n private handleKeyboardRightNav(): void {\r\n if (this.getChildCount() > 0) {\r\n if (this._isExpanded) {\r\n const childToFocus = this._childContainerElement.firstElementChild;\r\n childToFocus.tabIndex = 0;\r\n childToFocus.focus();\r\n this._rootElement.tabIndex = -1;\r\n }\r\n else {\r\n this._isExpanded = true;\r\n this.updateLayout();\r\n }\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const hasChildren = (this.getChildCount() > 0);\r\n\r\n const labelId = uuidv4();\r\n\r\n this._rootElement = document.createElement(\"li\");\r\n this._rootElement.style.paddingLeft = \"0\";\r\n this._rootElement.style.listStyleType = \"none\";\r\n this._rootElement.setAttribute(\"aria-labelledby\", labelId);\r\n this._rootElement.setAttribute(\"aria-level\", this._level.toString());\r\n this._rootElement.setAttribute(\"aria-current\", this._isSelected.toString());\r\n this._rootElement.tabIndex = -1;\r\n\r\n if (hasChildren) {\r\n this._rootElement.setAttribute(\"aria-expanded\", this._isExpanded.toString());\r\n }\r\n\r\n this._rootElement.setAttribute(\"role\", \"treeitem\");\r\n this._rootElement.onclick = () => { this.click; };\r\n this._rootElement.onfocus = () => { this.setIsSelected(true, false); };\r\n this._rootElement.onkeydown = (e: KeyboardEvent) => {\r\n let handled = true;\r\n switch (e.key) {\r\n case Constants.keys.enter: {\r\n this.itemInvoked();\r\n break;\r\n }\r\n\r\n case Constants.keys.left: {\r\n this.handleKeyboardLeftNav();\r\n break;\r\n }\r\n\r\n case Constants.keys.right: {\r\n this.handleKeyboardRightNav();\r\n break;\r\n }\r\n\r\n default: {\r\n handled = false;\r\n }\r\n }\r\n\r\n if (handled) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n }\r\n };\r\n\r\n this._treeItemElement = document.createElement(\"div\");\r\n this._treeItemElement.classList.add(\"acd-tree-item\");\r\n this._treeItemElement.style.display = \"flex\";\r\n this._treeItemElement.style.alignItems = \"center\";\r\n this._treeItemElement.style.paddingLeft = this.getIndentationLevelIncrement() * (1 + this.level) + \"px\";\r\n this._treeItemElement.classList.toggle(\"selected\", this._isSelected);\r\n\r\n this._treeItemElement.setAttribute(\"aria-labelledby\", labelId);\r\n\r\n this._expandCollapseElement = document.createElement(\"div\");\r\n this._expandCollapseElement.classList.add(\"acd-tree-item-expandCollapseButton\");\r\n this._expandCollapseElement.style.flex = \"0 0 auto\";\r\n this._expandCollapseElement.style.visibility = hasChildren ? \"visible\" : \"hidden\";\r\n this._expandCollapseElement.setAttribute(\"role\", \"button\");\r\n this._expandCollapseElement.setAttribute(\"aria-label\", this.getExpandCollapseAriaText());\r\n\r\n this._expandCollapseElement.onclick = (e: MouseEvent) => {\r\n this._isExpanded = !this._isExpanded;\r\n\r\n this.updateLayout();\r\n\r\n e.cancelBubble = true;\r\n e.preventDefault();\r\n }\r\n\r\n this._treeItemElement.appendChild(this._expandCollapseElement);\r\n\r\n let textElement = document.createElement(\"div\");\r\n textElement.classList.add(\"acd-tree-item-text\");\r\n textElement.style.flex = \"1 1 auto\";\r\n textElement.style.display = \"flex\";\r\n textElement.style.alignItems = \"center\";\r\n textElement.style.whiteSpace = \"nowrap\";\r\n textElement.style.textOverflow = \"ellipsis\";\r\n textElement.style.overflow = \"hidden\";\r\n textElement.style.marginRight = \"8px\";\r\n\r\n if (this.getIconClass()) {\r\n let iconElement = document.createElement(\"div\");\r\n iconElement.classList.add(\"acd-icon\", \"acd-treeView-icon\", this.getIconClass());\r\n\r\n textElement.appendChild(iconElement);\r\n }\r\n\r\n let labelSpan = document.createElement(\"span\");\r\n labelSpan.classList.add(\"acd-tree-item-typeName\");\r\n labelSpan.innerText = this.getLabelText();\r\n labelSpan.id = labelId;\r\n\r\n textElement.appendChild(labelSpan);\r\n\r\n let text = this.getAdditionalText();\r\n\r\n if (text && text != \"\") {\r\n let additionalTextSpan = document.createElement(\"span\");\r\n additionalTextSpan.classList.add(this.getAdditionalTextClass());\r\n additionalTextSpan.innerText = \" [\" + text + \"]\";\r\n\r\n textElement.appendChild(additionalTextSpan);\r\n }\r\n\r\n this._treeItemElement.appendChild(textElement);\r\n\r\n this._rootElement.appendChild(this._treeItemElement);\r\n\r\n if (hasChildren) {\r\n this._childContainerElement = document.createElement(\"ul\");\r\n this._childContainerElement.style.paddingLeft = \"0\";\r\n this._childContainerElement.style.listStyleType = \"none\";\r\n this._childContainerElement.setAttribute(\"role\", \"group\");\r\n\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n let renderedChildItem = this.getChildAt(i).render();\r\n\r\n renderedChildItem.setAttribute(\"aria-posinset\", (i+1).toString());\r\n renderedChildItem.setAttribute(\"aria-setsize\", this.getChildCount().toString());\r\n\r\n this._childContainerElement.appendChild(renderedChildItem);\r\n }\r\n\r\n this._rootElement.appendChild(this._childContainerElement);\r\n }\r\n\r\n this.updateLayout();\r\n\r\n return this._rootElement;\r\n }\r\n\r\n protected _level: number = 0;\r\n\r\n onSelectedChange: (sender: BaseTreeItem) => void;\r\n\r\n onItemInvoked: (sender: BaseTreeItem) => void;\r\n\r\n constructor(isExpanded: boolean = true) {\r\n super();\r\n\r\n this._isExpanded = isExpanded;\r\n }\r\n\r\n abstract getChildCount(): number;\r\n abstract getChildAt(index: number): BaseTreeItem;\r\n\r\n updateLayout() {\r\n if (this.getChildCount() > 0) {\r\n this._rootElement.setAttribute(\"aria-expanded\", this._isExpanded.toString());\r\n this._expandCollapseElement.setAttribute(\"aria-label\", this.getExpandCollapseAriaText());\r\n this._expandCollapseElement.classList.toggle(BaseTreeItem.expandedIconClass, this._isExpanded);\r\n this._expandCollapseElement.classList.toggle(BaseTreeItem.collapsedIconClass, !this._isExpanded);\r\n this._childContainerElement?.classList.toggle(\"acd-hidden\", !this._isExpanded);\r\n }\r\n }\r\n\r\n expand() {\r\n if (!this._isExpanded) {\r\n this._isExpanded = true;\r\n\r\n this.updateLayout();\r\n }\r\n }\r\n\r\n collpase() {\r\n if (this._isExpanded) {\r\n this._isExpanded = false;\r\n\r\n this.updateLayout();\r\n }\r\n }\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n\r\n get level(): number {\r\n return this._level;\r\n }\r\n\r\n get isSelected(): boolean {\r\n return this._isSelected;\r\n }\r\n\r\n set isSelected(value: boolean) {\r\n this.setIsSelected(value, true);\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { AdaptiveCard, CardElement, Carousel} from \"adaptivecards\";\r\nimport { Constants } from \"adaptivecards-controls\";\r\nimport { DraggableElement } from \"./draggable-element\";\r\nimport { IPoint, Utils } from \"./miscellaneous\";\r\nimport * as DesignerPeers from \"./designer-peers\";\r\nimport * as ACData from \"adaptivecards-templating\";\r\nimport * as Shared from \"./shared\";\r\nimport { HostContainer } from \"./containers\";\r\nimport { FieldDefinition } from \"./data\";\r\nimport { Strings } from \"./strings\";\r\n\r\nexport enum BindingPreviewMode {\r\n NoPreview,\r\n GeneratedData,\r\n SampleData\r\n}\r\n\r\nexport type CardElementType = { new(): Adaptive.CardElement };\r\nexport type ActionType = { new(): Adaptive.Action };\r\nexport type CardElementPeerType = {\r\n new(\r\n parent: DesignerPeers.DesignerPeer,\r\n designerSurface: CardDesignerSurface,\r\n registration: DesignerPeers.DesignerPeerRegistrationBase,\r\n cardElement: Adaptive.CardElement,\r\n initializeCardElement?: boolean\r\n ): DesignerPeers.CardElementPeer\r\n};\r\nexport type ActionPeerType = {\r\n new(\r\n parent: DesignerPeers.DesignerPeer,\r\n designerSurface: CardDesignerSurface,\r\n registration: DesignerPeers.DesignerPeerRegistrationBase,\r\n action: Adaptive.Action\r\n ): DesignerPeers.ActionPeer\r\n};\r\n\r\nclass DesignerPeerCategory {\r\n static Unknown = \"Unknown\";\r\n static Containers = \"Containers\";\r\n static Elements = \"Elements\";\r\n static Inputs = \"Inputs\";\r\n static Actions = \"Actions\";\r\n}\r\n\r\nexport abstract class DesignerPeerRegistry {\r\n protected _items: Array> = [];\r\n\r\n readonly defaultRegistration = new DesignerPeers.DesignerPeerRegistrationBase(DesignerPeerCategory.Unknown, \"acd-icon-unknownPeer\");\r\n\r\n constructor() {\r\n this.reset();\r\n }\r\n\r\n abstract reset();\r\n\r\n clear() {\r\n this._items = [];\r\n }\r\n\r\n findTypeRegistration(sourceType: TSource): DesignerPeers.DesignerPeerRegistration {\r\n for (let i = 0; i < this._items.length; i++) {\r\n if (this._items[i].sourceType === sourceType) {\r\n return this._items[i];\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n registerPeer(sourceType: TSource, peerType: TPeer, category: string, iconClass: string = null) {\r\n var registrationInfo = this.findTypeRegistration(sourceType);\r\n\r\n if (registrationInfo != null) {\r\n registrationInfo.peerType = peerType;\r\n }\r\n else {\r\n registrationInfo = new DesignerPeers.DesignerPeerRegistration (\r\n sourceType,\r\n peerType,\r\n category,\r\n iconClass);\r\n\r\n this._items.push(registrationInfo);\r\n }\r\n }\r\n\r\n unregisterPeer(sourceType: TSource) {\r\n for (let i = 0; i < this._items.length; i++) {\r\n if (this._items[i].sourceType === sourceType) {\r\n this._items.splice(i, 1);\r\n\r\n return;\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport class CardElementPeerRegistry extends DesignerPeerRegistry {\r\n reset() {\r\n this.clear();\r\n\r\n this.registerPeer(Adaptive.AdaptiveCard, DesignerPeers.AdaptiveCardPeer, DesignerPeerCategory.Containers, \"acd-icon-adaptiveCard\");\r\n this.registerPeer(Adaptive.Container, DesignerPeers.ContainerPeer, DesignerPeerCategory.Containers, \"acd-icon-container\");\r\n this.registerPeer(Adaptive.ColumnSet, DesignerPeers.ColumnSetPeer, DesignerPeerCategory.Containers, \"acd-icon-columnSet\");\r\n this.registerPeer(Adaptive.Column, DesignerPeers.ColumnPeer, DesignerPeerCategory.Containers, \"acd-icon-column\");\r\n this.registerPeer(Adaptive.ImageSet, DesignerPeers.ImageSetPeer, DesignerPeerCategory.Containers, \"acd-icon-imageSet\");\r\n this.registerPeer(Adaptive.FactSet, DesignerPeers.FactSetPeer, DesignerPeerCategory.Containers, \"acd-icon-factSet\");\r\n this.registerPeer(Adaptive.Table, DesignerPeers.TablePeer, DesignerPeerCategory.Containers, \"acd-icon-table\");\r\n this.registerPeer(Adaptive.TableRow, DesignerPeers.TableRowPeer, DesignerPeerCategory.Containers, \"acd-icon-tableRow\");\r\n this.registerPeer(Adaptive.TableCell, DesignerPeers.TableCellPeer, DesignerPeerCategory.Containers, \"acd-icon-tableCell\");\r\n this.registerPeer(Adaptive.Carousel, DesignerPeers.CarouselPeer, DesignerPeerCategory.Containers, \"acd-icon-carousel\");\r\n this.registerPeer(Adaptive.CarouselPage, DesignerPeers.CarouselPagePeer, DesignerPeerCategory.Containers, \"acd-icon-carouselPage\");\r\n\r\n this.registerPeer(Adaptive.TextBlock, DesignerPeers.TextBlockPeer, DesignerPeerCategory.Elements, \"acd-icon-textBlock\");\r\n this.registerPeer(Adaptive.RichTextBlock, DesignerPeers.RichTextBlockPeer, DesignerPeerCategory.Elements, \"acd-icon-richTextBlock\");\r\n this.registerPeer(Adaptive.Image, DesignerPeers.ImagePeer, DesignerPeerCategory.Elements, \"acd-icon-image\");\r\n this.registerPeer(Adaptive.Media, DesignerPeers.MediaPeer, DesignerPeerCategory.Elements, \"acd-icon-media\");\r\n this.registerPeer(Adaptive.ActionSet, DesignerPeers.ActionSetPeer, DesignerPeerCategory.Elements, \"acd-icon-actionSet\");\r\n\r\n this.registerPeer(Adaptive.TextInput, DesignerPeers.TextInputPeer, DesignerPeerCategory.Inputs, \"acd-icon-inputText\");\r\n this.registerPeer(Adaptive.DateInput, DesignerPeers.DateInputPeer, DesignerPeerCategory.Inputs, \"acd-icon-inputDate\");\r\n this.registerPeer(Adaptive.TimeInput, DesignerPeers.TimeInputPeer, DesignerPeerCategory.Inputs, \"acd-icon-inputTime\");\r\n this.registerPeer(Adaptive.ToggleInput, DesignerPeers.ToggleInputPeer, DesignerPeerCategory.Inputs, \"acd-icon-inputToggle\");\r\n this.registerPeer(Adaptive.NumberInput, DesignerPeers.NumberInputPeer, DesignerPeerCategory.Inputs, \"acd-icon-inputNumber\");\r\n this.registerPeer(Adaptive.ChoiceSetInput, DesignerPeers.ChoiceSetInputPeer, DesignerPeerCategory.Inputs, \"acd-icon-inputChoiceSet\");\r\n }\r\n\r\n createPeerInstance(designerSurface: CardDesignerSurface, parent: DesignerPeers.DesignerPeer, cardElement: Adaptive.CardElement, initializeCardElement?: boolean): DesignerPeers.CardElementPeer {\r\n var registrationInfo = this.findTypeRegistration((cardElement).constructor);\r\n\r\n var peer = registrationInfo ?\r\n new registrationInfo.peerType(parent, designerSurface, registrationInfo, cardElement, initializeCardElement) :\r\n new DesignerPeers.CardElementPeer(parent, designerSurface, this.defaultRegistration, cardElement, initializeCardElement);\r\n\r\n return peer;\r\n }\r\n}\r\n\r\nexport class ActionPeerRegistry extends DesignerPeerRegistry {\r\n reset() {\r\n this.clear();\r\n\r\n this.registerPeer(Adaptive.HttpAction, DesignerPeers.HttpActionPeer, DesignerPeerCategory.Actions, \"acd-icon-actionHttp\");\r\n this.registerPeer(Adaptive.SubmitAction, DesignerPeers.SubmitActionPeer, DesignerPeerCategory.Actions, \"acd-icon-actionSubmit\");\r\n this.registerPeer(Adaptive.ExecuteAction, DesignerPeers.ExecuteActionPeer, DesignerPeerCategory.Actions, \"acd-icon-actionSubmit\");\r\n this.registerPeer(Adaptive.OpenUrlAction, DesignerPeers.OpenUrlActionPeer, DesignerPeerCategory.Actions, \"acd-icon-actionOpenUrl\");\r\n this.registerPeer(Adaptive.ShowCardAction, DesignerPeers.ShowCardActionPeer, DesignerPeerCategory.Actions, \"acd-icon-actionShowCard\");\r\n this.registerPeer(Adaptive.ToggleVisibilityAction, DesignerPeers.ToggleVisibilityActionPeer, DesignerPeerCategory.Actions, \"acd-icon-actionToggleVisibility\");\r\n }\r\n\r\n createPeerInstance(designerSurface: CardDesignerSurface, parent: DesignerPeers.DesignerPeer, action: Adaptive.Action): DesignerPeers.ActionPeer {\r\n var registrationInfo = this.findTypeRegistration((action).constructor);\r\n\r\n var peer = registrationInfo ? new registrationInfo.peerType(parent, designerSurface, registrationInfo, action) : new DesignerPeers.ActionPeer(parent, designerSurface, this.defaultRegistration, action);\r\n\r\n return peer;\r\n }\r\n}\r\n\r\nclass DragHandle extends DraggableElement {\r\n protected internalRender(): HTMLElement {\r\n let element = document.createElement(\"div\");\r\n element.classList.add(\"acd-peerButton\", \"acd-peerButton-icon\", \"fixedWidth\", \"circular\", \"acd-icon-drag\");\r\n element.title = \"Drag to move this element\";\r\n element.setAttribute(\"aria-label\", \"Drag to move this element\");\r\n element.setAttribute(\"role\", \"button\");\r\n element.style.visibility = \"hidden\";\r\n element.style.position = \"absolute\";\r\n element.style.zIndex = \"500\";\r\n element.tabIndex = 0;\r\n\r\n return element;\r\n }\r\n}\r\n\r\nexport abstract class DesignContext {\r\n abstract get hostContainer(): HostContainer;\r\n abstract get targetVersion(): Adaptive.Version;\r\n abstract get dataStructure(): FieldDefinition;\r\n abstract get hostDataStructure(): FieldDefinition;\r\n abstract get bindingPreviewMode(): BindingPreviewMode;\r\n abstract get sampleData(): any;\r\n abstract get sampleHostData(): any;\r\n}\r\n\r\nexport class CardDesignerSurface {\r\n static readonly cardElementPeerRegistry: CardElementPeerRegistry = new CardElementPeerRegistry();\r\n static readonly actionPeerRegistry: ActionPeerRegistry = new ActionPeerRegistry();\r\n\r\n private _updateCount: number = 0;\r\n\r\n private _card: Adaptive.AdaptiveCard;\r\n private _allPeers: Array = [];\r\n private _rootPeer: DesignerPeers.DesignerPeer;\r\n private _cardHost: HTMLElement;\r\n private _designerSurface: HTMLDivElement;\r\n private _selectedPeer: DesignerPeers.DesignerPeer;\r\n private _draggedPeer: DesignerPeers.DesignerPeer;\r\n private _dropTarget: DesignerPeers.DesignerPeer;\r\n private _dragHandle: DragHandle;\r\n private _removeCommandElement: HTMLElement;\r\n private _peerCommandsHostElement: HTMLElement;\r\n private _serializationContext: Adaptive.SerializationContext;\r\n private _isPreviewMode: boolean = false;\r\n private _dragVisual?: HTMLElement;\r\n private _shouldPersistSelectedElement = false;\r\n private _persistentSelectedPeer: DesignerPeers.DesignerPeer;\r\n private _persistentSelectedCardElement: CardElement;\r\n\r\n private updatePeerCommandsLayout() {\r\n if (this._selectedPeer) {\r\n let peerRect = this._selectedPeer.getBoundingRect();\r\n let dragHandleRect = this._dragHandle.renderedElement.getBoundingClientRect();\r\n let removeButtonRect = this._removeCommandElement.getBoundingClientRect();\r\n\r\n this._dragHandle.renderedElement.style.left = (peerRect.left - dragHandleRect.width) + \"px\";\r\n this._dragHandle.renderedElement.style.top = (peerRect.top - dragHandleRect.height) + \"px\";\r\n\r\n this._removeCommandElement.style.left = peerRect.right + \"px\";\r\n this._removeCommandElement.style.top = (peerRect.top - removeButtonRect.height) + \"px\";\r\n\r\n this._peerCommandsHostElement.style.left = peerRect.left + \"px\";\r\n this._peerCommandsHostElement.style.top = (peerRect.bottom + 2) + \"px\";\r\n this._peerCommandsHostElement.style.width = peerRect.width + \"px\";\r\n\r\n this._dragHandle.renderedElement.style.visibility = this._selectedPeer.isDraggable() ? \"visible\" : \"hidden\";\r\n this._removeCommandElement.style.visibility = this._selectedPeer.canBeRemoved() ? \"visible\" : \"hidden\";\r\n this._peerCommandsHostElement.style.visibility = this._peerCommandsHostElement.childElementCount > 0 ? \"visible\" : \"hidden\";\r\n\r\n // Remove from tree\r\n if (this._designerSurface.contains(this._dragHandle.renderedElement)) {\r\n this._designerSurface.removeChild(this._dragHandle.renderedElement);\r\n }\r\n\r\n if (this._designerSurface.contains(this._removeCommandElement)) {\r\n this._designerSurface.removeChild(this._removeCommandElement);\r\n }\r\n\r\n if (this._designerSurface.contains(this._peerCommandsHostElement)) {\r\n this._designerSurface.removeChild(this._peerCommandsHostElement);\r\n }\r\n\r\n // Insert to the correct location\r\n this._selectedPeer.renderedElement.after(this._dragHandle.renderedElement);\r\n this._dragHandle.renderedElement.after(this._removeCommandElement);\r\n this._removeCommandElement.after(this._peerCommandsHostElement);\r\n }\r\n else {\r\n this._dragHandle.renderedElement.style.visibility = \"hidden\";\r\n this._removeCommandElement.style.visibility = \"hidden\";\r\n this._peerCommandsHostElement.style.visibility = \"hidden\";\r\n }\r\n }\r\n\r\n private setSelectedPeer(value: DesignerPeers.DesignerPeer) {\r\n if (this._selectedPeer != value) {\r\n if (this._selectedPeer) {\r\n this._selectedPeer.isSelected = false;\r\n }\r\n\r\n this._selectedPeer = value;\r\n\r\n this._peerCommandsHostElement.innerHTML = \"\";\r\n\r\n if (this._selectedPeer) {\r\n this._selectedPeer.isSelected = true;\r\n\r\n let commands = this._selectedPeer.getCommands(this.context);\r\n\r\n for (let command of commands) {\r\n this._peerCommandsHostElement.appendChild(command.render());\r\n }\r\n }\r\n\r\n this.updatePeerCommandsLayout();\r\n\r\n if (this.onSelectedPeerChanged) {\r\n this.onSelectedPeerChanged(this._selectedPeer);\r\n }\r\n }\r\n }\r\n\r\n private peerChanged(peer: DesignerPeers.DesignerPeer, updatePropertySheet: boolean) {\r\n this.renderCard();\r\n this.updateLayout();\r\n\r\n if (updatePropertySheet && this.onSelectedPeerChanged) {\r\n this.onSelectedPeerChanged(this._selectedPeer);\r\n }\r\n }\r\n\r\n private peerRemoved(peer: DesignerPeers.DesignerPeer) {\r\n this._allPeers.splice(this._allPeers.indexOf(peer), 1);\r\n\r\n if (peer == this._selectedPeer) {\r\n this.setSelectedPeer(null);\r\n }\r\n\r\n if (this._updateCount == 0) {\r\n this.renderCard();\r\n this.updateLayout();\r\n }\r\n }\r\n\r\n private generateCardToRender(asPreview: boolean): Adaptive.AdaptiveCard {\r\n let cardToRender: Adaptive.AdaptiveCard = this.card;\r\n\r\n if (asPreview) {\r\n let inputPayload = this.card.toJSON(this._serializationContext);\r\n\r\n cardToRender = new Adaptive.AdaptiveCard();\r\n cardToRender.hostConfig = this.card.hostConfig;\r\n\r\n let outputPayload = inputPayload;\r\n\r\n if (Shared.GlobalSettings.enableDataBindingSupport) {\r\n try {\r\n let template = new ACData.Template(inputPayload);\r\n\r\n let evaluationContext: ACData.IEvaluationContext;\r\n\r\n if (this.context.bindingPreviewMode === BindingPreviewMode.SampleData) {\r\n evaluationContext = { $root: this.context.sampleData, \r\n $host: this.context.sampleHostData \r\n };\r\n }\r\n else {\r\n evaluationContext = { $root: this.context.dataStructure.dataType.generateSampleData(),\r\n $host: this.context.hostDataStructure.dataType.generateSampleData()\r\n };\r\n }\r\n\r\n outputPayload = template.expand(evaluationContext);\r\n }\r\n catch (e) {\r\n console.log(\"Template expansion error: \" + e.message);\r\n }\r\n }\r\n\r\n cardToRender.parse(outputPayload, this._serializationContext);\r\n }\r\n\r\n return cardToRender;\r\n }\r\n\r\n private renderCard() {\r\n this._cardHost.innerHTML = \"\";\r\n\r\n if (this.onCardValidated) {\r\n let allValidationEvents: Adaptive.IValidationEvent[] = [];\r\n\r\n for (let i = 0; i < this._serializationContext.eventCount; i++) {\r\n allValidationEvents.push(this._serializationContext.getEventAt(i));\r\n }\r\n\r\n allValidationEvents.push(...this.card.validateProperties().validationEvents);\r\n\r\n this.onCardValidated(allValidationEvents);\r\n }\r\n\r\n let cardToRender = this.generateCardToRender(this.isPreviewMode);\r\n\r\n if (this.isPreviewMode) {\r\n cardToRender.onExecuteAction = (action: Adaptive.Action) => {\r\n const actionType = action.getJsonTypeName();\r\n let message = `Action executed: \"${actionType}\" title: \"${action.title}\"`;\r\n\r\n const verb = (action).verb;\r\n if (verb) {\r\n message += ` verb: \"${verb}\"`;\r\n }\r\n\r\n let carouselPageId: string | undefined = undefined;\r\n\r\n const root = action.getRootObject() as AdaptiveCard;\r\n\r\n if (root) {\r\n for (let i = 0; i < root.getItemCount(); i++) {\r\n let element = root.getItemAt(i);\r\n\r\n if (element instanceof Carousel) {\r\n carouselPageId = element.currentPageId;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (carouselPageId) {\r\n message += `\\ncarousel page id: \"${carouselPageId}\"`;\r\n }\r\n\r\n const url = (action).url;\r\n if (url) {\r\n message += `\\nurl: \"${url}\"`;\r\n }\r\n\r\n const data = (action).data;\r\n if (data) {\r\n message += `\\nSubmitted data: ${JSON.stringify(data, undefined, 4)}`;\r\n }\r\n\r\n alert(message);\r\n };\r\n }\r\n\r\n let renderedCard = cardToRender.render();\r\n\r\n if (this._cardHost.innerHTML === \"\") {\r\n this._cardHost.appendChild(renderedCard);\r\n }\r\n \r\n if (this.fixedHeightCard) {\r\n // truncate the content if the host container is fixed height\r\n if (this.isPreviewMode) {\r\n if (this.context.hostContainer?.requiresOverflowStyling()) {\r\n this.appendErrorMessage(Strings.widgetOverflowWarning);\r\n } else {\r\n renderedCard.style.overflow = \"hidden\";\r\n }\r\n }\r\n this.context.hostContainer?.adjustStyleForBackground();\r\n renderedCard.style.height = \"100%\"; \r\n }\r\n }\r\n\r\n private appendErrorMessage(message: string) {\r\n let errorElement = document.createElement(\"div\");\r\n errorElement.className = \"acd-error-pane-message\";\r\n\r\n errorElement.innerText = message;\r\n errorElement.style.whiteSpace = \"normal\";\r\n\r\n const errorPane = document.getElementById(\"errorPane\");\r\n errorPane.appendChild(errorElement);\r\n }\r\n\r\n private addPeer(peer: DesignerPeers.DesignerPeer, insertAfterNeighbor: boolean = false) {\r\n if (this._allPeers.indexOf(peer) < 0) {\r\n this._allPeers.push(peer);\r\n\r\n peer.render();\r\n\r\n if (peer instanceof DesignerPeers.CardElementPeer) {\r\n peer.renderedElement.style.display = peer.isVisible() ? \"initial\" : \"none\";\r\n\r\n // If we have a card element that we want to be selected after rendering, save the corresponding peer\r\n if (this._persistentSelectedCardElement && this._persistentSelectedCardElement === peer.cardElement) {\r\n this._persistentSelectedPeer = peer;\r\n this._persistentSelectedCardElement = null;\r\n }\r\n }\r\n\r\n peer.onSelectedChanged = (peer: DesignerPeers.DesignerPeer) => {\r\n if (peer.isSelected) {\r\n this.setSelectedPeer(peer);\r\n }\r\n else {\r\n if (this._selectedPeer == peer) {\r\n this.setSelectedPeer(null);\r\n }\r\n }\r\n };\r\n peer.onChanged = (sender: DesignerPeers.DesignerPeer, updatePropertySheet: boolean) => { this.peerChanged(sender, updatePropertySheet); };\r\n peer.onPeerRemoved = (sender: DesignerPeers.DesignerPeer) => { this.peerRemoved(sender); };\r\n peer.onPeerAdded = (sender: DesignerPeers.DesignerPeer, newPeer: DesignerPeers.DesignerPeer) => {\r\n this.addPeer(newPeer, newPeer.insertAfterNeighbor);\r\n\r\n newPeer.insertAfterNeighbor = false;\r\n \r\n this.updateLayout();\r\n };\r\n peer.onStartDrag = (sender: DesignerPeers.DesignerPeer) => { this.startDrag(sender); }\r\n peer.onEndDrag = (sender: DesignerPeers.DesignerPeer) => { this.endDrag(false); }\r\n\r\n if (insertAfterNeighbor) {\r\n peer.addElementsToDesignerSurface(this._designerSurface, this.getPeerDOMNeighbor(peer));\r\n } else {\r\n peer.addElementsToDesignerSurface(this._designerSurface);\r\n }\r\n\r\n for (let i = 0; i < peer.getChildCount(); i++) {\r\n this.addPeer(peer.getChildAt(i), insertAfterNeighbor);\r\n }\r\n }\r\n }\r\n\r\n private internalFindDropTarget(pointerPosition: IPoint, currentPeer: DesignerPeers.DesignerPeer, forPeer: DesignerPeers.DesignerPeer): DesignerPeers.DesignerPeer {\r\n if (currentPeer == forPeer) {\r\n return null;\r\n }\r\n\r\n var result: DesignerPeers.DesignerPeer = null;\r\n var lookDeeper = currentPeer instanceof DesignerPeers.ActionPeer;\r\n\r\n if (!lookDeeper && (currentPeer as DesignerPeers.CardElementPeer)?.isVisible()) {\r\n var boundingRect = currentPeer.getBoundingRect();\r\n\r\n lookDeeper = boundingRect.isInside(pointerPosition);\r\n }\r\n\r\n if (lookDeeper) {\r\n let canDrop = currentPeer.canDrop(forPeer);\r\n\r\n if (canDrop) {\r\n result = currentPeer;\r\n }\r\n\r\n for (let i = 0; i < currentPeer.getChildCount(); i++) {\r\n var deeperResult = this.internalFindDropTarget(pointerPosition, currentPeer.getChildAt(i), forPeer);\r\n\r\n if (deeperResult) {\r\n result = deeperResult;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private findCardElementPeer(cardElement: Adaptive.CardElement): DesignerPeers.CardElementPeer {\r\n for (let i = 0; i < this._allPeers.length; i++) {\r\n var peer = this._allPeers[i];\r\n\r\n if (peer instanceof DesignerPeers.CardElementPeer && peer.cardElement == cardElement) {\r\n return peer;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private findActionPeer(action: Adaptive.Action): DesignerPeers.ActionPeer {\r\n for (let i = 0; i < this._allPeers.length; i++) {\r\n var peer = this._allPeers[i];\r\n\r\n if (peer instanceof DesignerPeers.ActionPeer && peer.action == action) {\r\n return peer;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private inlineCardExpanded(action: Adaptive.ShowCardAction, isExpanded: boolean) {\r\n let peer = this.findCardElementPeer(action.card);\r\n\r\n if (isExpanded) {\r\n if (!peer) {\r\n let registration = CardDesignerSurface.cardElementPeerRegistry.findTypeRegistration(Adaptive.AdaptiveCard);\r\n\r\n peer = new registration.peerType(peer, this, registration, action.card);\r\n peer.insertAfterNeighbor = true;\r\n\r\n let parentPeer = this.findActionPeer(action);\r\n\r\n if (parentPeer) {\r\n parentPeer.insertChild(peer);\r\n }\r\n else {\r\n this._rootPeer.insertChild(peer);\r\n }\r\n }\r\n else {\r\n peer.addElementsToDesignerSurface(this._designerSurface, this.getPeerDOMNeighbor(peer));\r\n }\r\n }\r\n else {\r\n if (peer) {\r\n peer.removeElementsFromDesignerSurface(true);\r\n }\r\n }\r\n\r\n this.updateLayout();\r\n }\r\n\r\n private get card(): Adaptive.AdaptiveCard {\r\n return this._card;\r\n }\r\n\r\n private setDraggedPeer(value: DesignerPeers.DesignerPeer) {\r\n if (this._draggedPeer != value) {\r\n if (this._draggedPeer) {\r\n this._draggedPeer.dragging = false;\r\n }\r\n\r\n this._draggedPeer = value;\r\n\r\n if (this._draggedPeer) {\r\n this._draggedPeer.dragging = true;\r\n }\r\n }\r\n }\r\n\r\n constructor(readonly context: DesignContext) {\r\n this._serializationContext = this.context.hostContainer.createSerializationContext(this.context.targetVersion);\r\n\r\n var rootElement = document.createElement(\"div\");\r\n rootElement.style.position = \"relative\";\r\n rootElement.style.width = \"100%\";\r\n rootElement.style.height = \"100%\";\r\n\r\n this._cardHost = document.createElement(\"div\");\r\n this._cardHost.style.height = \"100%\";\r\n\r\n rootElement.appendChild(this._cardHost);\r\n\r\n this._designerSurface = document.createElement(\"div\");\r\n this._designerSurface.classList.add(\"acd-designersurface\");\r\n this._designerSurface.tabIndex = -1;\r\n this._designerSurface.style.position = \"absolute\";\r\n this._designerSurface.style.left = \"0\";\r\n this._designerSurface.style.top = \"0\";\r\n this._designerSurface.style.width = \"100%\";\r\n this._designerSurface.style.height = \"100%\";\r\n\r\n this._designerSurface.onkeyup = (e: KeyboardEvent) => {\r\n if (this._selectedPeer) {\r\n switch (e.key) {\r\n case Constants.keys.escape:\r\n if (this.draggedPeer) {\r\n this.endDrag(true);\r\n }\r\n else {\r\n this.setSelectedPeer(this._selectedPeer.parent);\r\n }\r\n\r\n break;\r\n case Constants.keys.backspace:\t\r\n case Constants.keys.delete:\r\n if (!this.draggedPeer) {\r\n this.removeSelected();\r\n }\r\n break;\r\n\r\n case Constants.keys.enter:\r\n if (this._selectedPeer instanceof DesignerPeers.ActionPeer) {\r\n this._selectedPeer.action.renderedElement.click();\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return !e.cancelBubble;\r\n }\r\n\r\n this._designerSurface.onpointermove = (e: PointerEvent) => {\r\n let clientRect = this._designerSurface.getBoundingClientRect();\r\n\r\n if (this.draggedPeer) {\r\n if (this._designerSurface.hasPointerCapture && !this._designerSurface.hasPointerCapture(e.pointerId)) {\r\n this._designerSurface.setPointerCapture(e.pointerId);\r\n }\r\n\r\n if (!this._dragVisual) {\r\n this._dragVisual = document.createElement(\"div\");\r\n this._dragVisual.style.pointerEvents = \"none\";\r\n this._dragVisual.style.backgroundColor = \"white\";\r\n this._dragVisual.style.padding = \"6px\";\r\n this._dragVisual.style.opacity = \"0.6\";\r\n this._dragVisual.style.boxShadow = \"0 0 15px -5px rgba(0, 0, 0, 0.4)\";\r\n this._dragVisual.style.position = \"absolute\";\r\n this._dragVisual.style.boxSizing = \"content-box\";\r\n\r\n this._dragVisual.appendChild(this.draggedPeer.getCardObject().renderedElement.cloneNode(true));\r\n\r\n document.body.appendChild(this._dragVisual);\r\n }\r\n\r\n const adjustedPoint = Utils.adjustPointForScroll(e);\r\n this._dragVisual.style.left = (adjustedPoint.x - 6) + \"px\";\r\n this._dragVisual.style.top = (adjustedPoint.y - 6) + \"px\";\r\n\r\n let renderedCardObjectRect = this.draggedPeer.getCardObject().renderedElement.getBoundingClientRect();\r\n\r\n this._dragVisual.style.width = renderedCardObjectRect.width + \"px\";\r\n this._dragVisual.style.height = renderedCardObjectRect.height + \"px\";\r\n\r\n // When dragging on a new element, we set the zIndex higher so that it is always visible\r\n this._dragVisual.style.zIndex = \"500\";\r\n\r\n this.tryDrop({ x: e.x - clientRect.left, y: e.y - clientRect.top }, this.draggedPeer);\r\n }\r\n }\r\n\r\n this._designerSurface.onpointerup = (e: PointerEvent) => {\r\n this._designerSurface.releasePointerCapture(e.pointerId);\r\n\r\n if (this.draggedPeer) {\r\n this.endDrag(false);\r\n }\r\n }\r\n\r\n rootElement.appendChild(this._designerSurface);\r\n\r\n this.context.hostContainer.cardHost.innerHTML = \"\";\r\n this.context.hostContainer.cardHost.appendChild(rootElement);\r\n\r\n this._card = new Adaptive.AdaptiveCard();\r\n this._card.onInlineCardExpanded = (action: Adaptive.ShowCardAction, isExpanded: boolean) => { this.inlineCardExpanded(action, isExpanded); };\r\n this._card.onPreProcessPropertyValue = (sender: Adaptive.CardObject, property: Adaptive.PropertyDefinition, value: any) => {\r\n if (Shared.GlobalSettings.enableDataBindingSupport && typeof value === \"string\" && this.context.sampleData && this.context.bindingPreviewMode !== BindingPreviewMode.NoPreview) {\r\n let expression = ACData.Template.parseInterpolatedString(value);\r\n\r\n if (typeof expression === \"string\") {\r\n return expression;\r\n }\r\n else {\r\n let evaluationContext: ACData.IEvaluationContext;\r\n\r\n if (this.context.bindingPreviewMode === BindingPreviewMode.SampleData) {\r\n evaluationContext = { $root: this.context.sampleData, \r\n $host: this.context.sampleHostData \r\n };\r\n }\r\n else {\r\n evaluationContext = { $root: this.context.dataStructure.dataType.generateSampleData(),\r\n $host: this.context.hostDataStructure.dataType.generateSampleData()\r\n };\r\n }\r\n\r\n let evaluationResult = ACData.Template.tryEvaluateExpression(expression, evaluationContext, true);\r\n\r\n return typeof evaluationResult.value === \"string\" ? evaluationResult.value : value;\r\n }\r\n }\r\n\r\n return value;\r\n };\r\n this._card.version = this.context.targetVersion;\r\n this._card.hostConfig = this.context.hostContainer.getHostConfig();\r\n this._card.designMode = true;\r\n\r\n Adaptive.AdaptiveCard.onCarouselEvent = (e: Adaptive.CarouselEvent) => {\r\n if (!this._isPreviewMode) {\r\n this.render();\r\n }\r\n }\r\n\r\n this.render();\r\n }\r\n\r\n onCardValidated: (logEntries: Adaptive.IValidationEvent[]) => void;\r\n onSelectedPeerChanged: (peer: DesignerPeers.DesignerPeer) => void;\r\n onLayoutUpdated: (isFullRefresh: boolean) => void;\r\n\r\n fixedHeightCard: boolean = false;\r\n\r\n getDesignerSurfaceOffset(): IPoint {\r\n let clientRect = this._designerSurface.getBoundingClientRect();\r\n\r\n return { x: clientRect.left, y: clientRect.top };\r\n }\r\n\r\n findDropTarget(pointerPosition: IPoint, peer: DesignerPeers.DesignerPeer): DesignerPeers.DesignerPeer {\r\n return this.internalFindDropTarget(pointerPosition, this._rootPeer, peer);\r\n }\r\n\r\n findPeer(cardObject: Adaptive.CardObject) {\r\n for (let peer of this._allPeers) {\r\n if (peer.getCardObject() === cardObject) {\r\n return peer;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n beginUpdate() {\r\n this._updateCount++;\r\n }\r\n\r\n endUpdate(renderCard: boolean) {\r\n if (this._updateCount > 0) {\r\n this._updateCount--;\r\n\r\n if (this._updateCount == 0) {\r\n if (renderCard) {\r\n this.renderCard();\r\n }\r\n\r\n this.updateLayout();\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n this._designerSurface.innerHTML = \"\";\r\n this._allPeers = [];\r\n\r\n // If we want to have the same peer selected after rendering the card,\r\n // store the current selected peer's card element before the peers recreated\r\n if (this._shouldPersistSelectedElement && this._selectedPeer && this._selectedPeer instanceof DesignerPeers.CardElementPeer) {\r\n this._persistentSelectedCardElement = this._selectedPeer.cardElement;\r\n this._shouldPersistSelectedElement = false;\r\n }\r\n\r\n this.setSelectedPeer(null);\r\n\r\n this.renderCard();\r\n\r\n this._rootPeer = CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(this, null, this.card);\r\n\r\n this.addPeer(this._rootPeer);\r\n\r\n this._removeCommandElement = document.createElement(\"div\");\r\n this._removeCommandElement.classList.add(\"acd-peerButton\", \"acd-peerButton-icon\", \"fixedWidth\", \"circular\", \"acd-icon-remove\");\r\n this._removeCommandElement.title = \"Remove\";\r\n this._removeCommandElement.setAttribute(\"aria-label\", \"Remove\");\r\n this._removeCommandElement.setAttribute(\"role\", \"button\");\r\n this._removeCommandElement.style.visibility = \"hidden\";\r\n this._removeCommandElement.style.position = \"absolute\";\r\n this._removeCommandElement.style.zIndex = \"500\";\r\n this._removeCommandElement.tabIndex = 0;\r\n this._removeCommandElement.onclick = (e) => {\r\n this.removeSelected();\r\n }\r\n this._removeCommandElement.onkeyup = (e: KeyboardEvent) => {\r\n if (e.key === Constants.keys.enter) {\r\n this.removeSelected();\r\n }\r\n };\r\n\r\n this._dragHandle = new DragHandle();\r\n this._dragHandle.onStartDrag = (sender) => {\r\n this._dragHandle.endDrag();\r\n this.startDrag(this._selectedPeer);\r\n }\r\n this._dragHandle.render();\r\n\r\n this._peerCommandsHostElement = document.createElement(\"div\");\r\n this._peerCommandsHostElement.style.visibility = \"hidden\";\r\n this._peerCommandsHostElement.style.position = \"absolute\";\r\n this._peerCommandsHostElement.style.display = \"flex\";\r\n this._peerCommandsHostElement.style.justifyContent = \"flex-end\";\r\n this._peerCommandsHostElement.style.zIndex = \"500\";\r\n this._peerCommandsHostElement.style.pointerEvents = \"none\";\r\n\r\n this.updateLayout();\r\n\r\n // If we have a persistent selected peer, select the peer\r\n // We should only reach this point is _shouldPersistSelectedElement = true prior to rendering the card\r\n if (this._persistentSelectedPeer) {\r\n this.setSelectedPeer(this._persistentSelectedPeer);\r\n this._persistentSelectedPeer = null;\r\n }\r\n }\r\n\r\n getCardPayloadAsObject(): object {\r\n return this.card.toJSON(this._serializationContext);\r\n }\r\n\r\n setCardPayloadAsObject(payload: object) {\r\n this._serializationContext.clearEvents();\r\n\r\n this.card.parse(payload, this._serializationContext);\r\n\r\n this.render();\r\n }\r\n\r\n setCardPayloadAsString(payload: string) {\r\n try {\r\n this.setCardPayloadAsObject(JSON.parse(payload));\r\n }\r\n catch (e) {\r\n console.warn(\"Invalid JSON string. \" + e);\r\n }\r\n }\r\n\r\n getBoundCardPayloadAsObject(): object {\r\n return this.generateCardToRender(true).toJSON(this._serializationContext);\r\n }\r\n\r\n updateLayout(isFullRefresh: boolean = true) {\r\n if (!this.isPreviewMode) {\r\n for (let i = 0; i < this._allPeers.length; i++) {\r\n this._allPeers[i].updateLayout();\r\n }\r\n\r\n this.updatePeerCommandsLayout();\r\n\r\n if (this.onLayoutUpdated) {\r\n this.onLayoutUpdated(isFullRefresh);\r\n }\r\n }\r\n }\r\n\r\n removeSelected() {\r\n if (this.selectedPeer) {\r\n this.beginUpdate();\r\n\r\n try {\r\n let parent = this.selectedPeer.parent;\r\n\r\n if (this.selectedPeer.remove(false, true)) {\r\n this.setSelectedPeer(parent);\r\n parent.focus();\r\n }\r\n }\r\n finally {\r\n this.endUpdate(true);\r\n\r\n // If we've removed a Carousel page, we need render the designer surface again\r\n if (this.selectedPeer instanceof DesignerPeers.CarouselPeer) {\r\n (this.selectedPeer.cardElement as Carousel).currentIndex = 0;\r\n this.render();\r\n }\r\n }\r\n }\r\n }\r\n\r\n onStartDrag: (sender: CardDesignerSurface) => void;\r\n onEndDrag: (sender: CardDesignerSurface, wasCancelled: boolean) => void;\r\n\r\n startDrag(peer: DesignerPeers.DesignerPeer) {\r\n if (!this.draggedPeer) {\r\n this._designerSurface.classList.add(\"dragging\");\r\n\r\n this.setDraggedPeer(peer);\r\n this.setSelectedPeer(this.draggedPeer);\r\n\r\n if (this.onStartDrag) {\r\n this.onStartDrag(this);\r\n }\r\n }\r\n }\r\n\r\n endDrag(wasCancelled: boolean) {\r\n if (this.draggedPeer) {\r\n // Ensure that the dragged peer's elements are at the top in Z order\r\n this.draggedPeer.removeElementsFromDesignerSurface(true);\r\n\r\n this.draggedPeer.addElementsToDesignerSurface(this._designerSurface, this.getPeerDOMNeighbor(this._draggedPeer));\r\n\r\n this._dropTarget.renderedElement.classList.remove(\"dragover\");\r\n\r\n this._dragVisual?.parentNode.removeChild(this._dragVisual);\r\n this._dragVisual = undefined;\r\n\r\n this.setDraggedPeer(null);\r\n\r\n if (this.onEndDrag) {\r\n this.onEndDrag(this, wasCancelled);\r\n }\r\n\r\n this._designerSurface.classList.remove(\"dragging\");\r\n }\r\n }\r\n\r\n // Find the element directly above the dragged element\r\n getPeerDOMNeighbor(peer: DesignerPeers.DesignerPeer): HTMLElement {\r\n if (peer.parent) {\r\n let neighboringPeer = peer.parent;\r\n if (neighboringPeer instanceof DesignerPeers.ActionSetPeer) {\r\n // A new action is being added to an ActionSet, so we can add the ActionPeer as the last child element\r\n const childCount = neighboringPeer.getChildCount();\r\n if (childCount > 1) {\r\n // Subtract 2 because the child count already includes the action being currently added\r\n neighboringPeer = neighboringPeer.getChildAt(childCount - 2);\r\n }\r\n\r\n } else if (neighboringPeer instanceof DesignerPeers.ActionPeer) {\r\n // neighboringPeer should be the parent so we can get the last element in the actionSet\r\n neighboringPeer = neighboringPeer.parent;\r\n neighboringPeer = neighboringPeer.getChildAt(neighboringPeer.getChildCount() - 1);\r\n\r\n } else if (peer instanceof DesignerPeers.CardElementPeer) {\r\n\r\n // Get the index of the peer within its container\r\n const peerIndex = peer.cardElement.index;\r\n \r\n // If it is not the first element, find the neighbor\r\n if (peerIndex > 0) {\r\n neighboringPeer = neighboringPeer.getChildAt(peerIndex - 1);\r\n \r\n // If the neighbor has children (i.e. has elements below it in the html tree), find its last child\r\n if (neighboringPeer.getChildCount() > 0) {\r\n neighboringPeer = this.getLastPeerInContainer(neighboringPeer);\r\n }\r\n }\r\n \r\n }\r\n\r\n return neighboringPeer.renderedElement;\r\n }\r\n // Return undefined if there is no parent\r\n return undefined;\r\n }\r\n\r\n // Recursive method to find a containers last element\r\n getLastPeerInContainer(parentContainer: DesignerPeers.DesignerPeer): DesignerPeers.DesignerPeer {\r\n let lastChildPeer = parentContainer.getChildAt(parentContainer.getChildCount() - 1);\r\n if (lastChildPeer.getChildCount() > 0) {\r\n lastChildPeer = this.getLastPeerInContainer(lastChildPeer);\r\n }\r\n return lastChildPeer;\r\n }\r\n\r\n tryDrop(pointerPosition: IPoint, peer: DesignerPeers.DesignerPeer): boolean {\r\n if (peer) {\r\n if (this._dropTarget) {\r\n this._dropTarget.renderedElement.classList.remove(\"dragover\");\r\n }\r\n\r\n var newDropTarget = this.findDropTarget(pointerPosition, peer);\r\n\r\n if (newDropTarget) {\r\n this._dropTarget = newDropTarget;\r\n this._dropTarget.renderedElement.classList.add(\"dragover\");\r\n\r\n return this._dropTarget.tryDrop(peer, pointerPosition);\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isPointerOver(x: number, y: number) {\r\n let clientRect = this._designerSurface.getBoundingClientRect();\r\n\r\n return (x >= clientRect.left) && (x <= clientRect.right) && (y >= clientRect.top) && (y <= clientRect.bottom);\r\n }\r\n\r\n pageToClientCoordinates(x: number, y: number): IPoint {\r\n let clientRect = this._designerSurface.getBoundingClientRect();\r\n\r\n return {\r\n x: x - clientRect.left,\r\n y: y - clientRect.top\r\n }\r\n }\r\n\r\n get rootPeer(): DesignerPeers.DesignerPeer {\r\n return this._rootPeer;\r\n }\r\n\r\n get selectedPeer(): DesignerPeers.DesignerPeer {\r\n return this._selectedPeer;\r\n }\r\n\r\n get draggedPeer(): DesignerPeers.DesignerPeer {\r\n return this._draggedPeer;\r\n }\r\n\r\n get isPreviewMode(): boolean {\r\n return this._isPreviewMode;\r\n }\r\n\r\n set isPreviewMode(value: boolean) {\r\n if (this._isPreviewMode != value) {\r\n this._isPreviewMode = value;\r\n\r\n if (this._isPreviewMode) {\r\n this._designerSurface.classList.add(\"acd-hidden\");\r\n this._dragHandle.renderedElement.classList.add(\"acd-hidden\");\r\n this._removeCommandElement.classList.add(\"acd-hidden\");\r\n this._peerCommandsHostElement.classList.add(\"acd-hidden\");\r\n }\r\n else {\r\n this._designerSurface.classList.remove(\"acd-hidden\");\r\n this._dragHandle.renderedElement.classList.remove(\"acd-hidden\");\r\n this._removeCommandElement.classList.remove(\"acd-hidden\");\r\n this._peerCommandsHostElement.classList.remove(\"acd-hidden\");\r\n }\r\n\r\n this.card.designMode = !this._isPreviewMode;\r\n\r\n this.renderCard();\r\n this.updateLayout(false);\r\n }\r\n }\r\n\r\n set shouldPersistSelectedElement(shouldPersistSelectedElement: boolean) {\r\n this._shouldPersistSelectedElement = shouldPersistSelectedElement;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Clipboard from \"clipboard\";\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport * as monaco from \"monaco-editor\";\r\nimport * as Constants from \"./constants\";\r\nimport * as Designer from \"./card-designer-surface\";\r\nimport * as DesignerPeers from \"./designer-peers\";\r\nimport { Pic2Card } from \"./pic2card\";\r\nimport { OpenSampleDialog } from \"./open-sample-dialog\";\r\nimport { OpenJsonSchemaDialog } from \"./open-json-schema-dialog\";\r\nimport { ColorTheme, HostContainer } from \"./containers/host-container\";\r\nimport { adaptiveCardSchema } from \"./adaptive-card-schema\";\r\nimport { OpenImageDialog } from \"./open-image-dialog\";\r\nimport { FullScreenHandler } from \"./fullscreen-handler\";\r\nimport { Toolbar, ToolbarButton, ToolbarChoicePicker, ToolbarElementAlignment } from \"./toolbar\";\r\nimport { IPoint, Utils, defaultHostConfig } from \"./miscellaneous\";\r\nimport { BasePaletteItem, ElementPaletteItem, DataPaletteItem, CustomPaletteItem } from \"./tool-palette\";\r\nimport { DefaultContainer } from \"./containers/default/default-container\";\r\nimport { SidePanel, SidePanelAlignment } from \"./side-panel\";\r\nimport { Toolbox, IToolboxCommand } from \"./tool-box\";\r\nimport { FieldDefinition } from \"./data\";\r\nimport { DataTreeItem } from \"./data-treeitem\";\r\nimport { Strings } from \"./strings\";\r\nimport * as Shared from \"./shared\";\r\nimport { TreeView } from \"./tree-view\";\r\nimport { SampleCatalogue } from \"./catalogue\";\r\nimport { HelpDialog } from \"./help-dialog\";\r\nimport { DeviceEmulation } from \"./device-emulation\";\r\nimport { WidgetContainer, ContainerSize } from \"./containers\";\r\n\r\nexport class CardDesigner extends Designer.DesignContext {\r\n private static internalProcessMarkdown(text: string, result: Adaptive.IMarkdownProcessingResult) {\r\n if (CardDesigner.onProcessMarkdown) {\r\n CardDesigner.onProcessMarkdown(text, result);\r\n } else {\r\n // Check for markdownit\r\n if (window[\"markdownit\"]) {\r\n result.outputHtml = window[\"markdownit\"]().render(text);\r\n result.didProcess = true;\r\n }\r\n }\r\n }\r\n\r\n static onProcessMarkdown: (text: string, result: Adaptive.IMarkdownProcessingResult) => void = null;\r\n\r\n private static MAX_UNDO_STACK_SIZE = 50;\r\n\r\n private _isAttached: boolean = false;\r\n private _cardEditor: monaco.editor.IStandaloneCodeEditor;\r\n private _sampleDataEditor: monaco.editor.IStandaloneCodeEditor;\r\n private _sampleHostDataEditor: monaco.editor.IStandaloneCodeEditor;\r\n private _hostContainers: Array;\r\n private _deviceEmulations: Array;\r\n private _isMonacoEditorLoaded: boolean = false;\r\n private _designerSurface: Designer.CardDesignerSurface;\r\n private _designerHostElement: HTMLElement;\r\n private _draggedPaletteItem: BasePaletteItem;\r\n private _draggedElement: HTMLElement;\r\n private _currentMousePosition: IPoint;\r\n private _hostContainer: HostContainer;\r\n private _deviceEmulation: DeviceEmulation;\r\n private _undoStack: Array = [];\r\n private _undoStackIndex: number = -1;\r\n private _startDragPayload: object;\r\n private _toolPaletteToolbox: Toolbox;\r\n private _propertySheetToolbox: Toolbox;\r\n private _propertySheetCard: Adaptive.AdaptiveCard;\r\n private _treeViewToolbox: Toolbox;\r\n private _jsonEditorsPanel: SidePanel;\r\n private _cardEditorToolbox: Toolbox;\r\n private _sampleDataEditorToolbox: Toolbox;\r\n private _sampleHostDataEditorToolbox: Toolbox;\r\n private _dataToolbox: Toolbox;\r\n private _assetPath: string;\r\n private _dataStructure: FieldDefinition;\r\n private _hostDataStructure: FieldDefinition;\r\n private _sampleData: any;\r\n private _sampleHostData: any;\r\n private _bindingPreviewMode: Designer.BindingPreviewMode = Designer.BindingPreviewMode.NoPreview;\r\n private _customPeletteItems: CustomPaletteItem[];\r\n private _sampleCatalogue: SampleCatalogue = new SampleCatalogue();\r\n\r\n private togglePreview() {\r\n this._designerSurface.isPreviewMode = !this._designerSurface.isPreviewMode;\r\n\r\n if (this._designerSurface.isPreviewMode) {\r\n this._togglePreviewButton.toolTip = \"Return to Design mode\";\r\n this._designerSurface.setCardPayloadAsString(this.getCurrentCardEditorPayload());\r\n }\r\n else {\r\n this._togglePreviewButton.toolTip = \"Switch to Preview mode\";\r\n this.updateCardFromJson(false);\r\n }\r\n\r\n this.buildTreeView();\r\n }\r\n\r\n private buildTreeView() {\r\n if (this._treeViewToolbox.content) {\r\n this._treeViewToolbox.content.innerHTML = \"\";\r\n\r\n if (this.designerSurface.isPreviewMode) {\r\n this.treeViewToolbox.content.innerHTML =\r\n '
' +\r\n '
The Card Structure isn\\'t available in Preview mode.
' +\r\n '
';\r\n }\r\n else {\r\n let treeView = new TreeView(this.designerSurface.rootPeer.treeItem);\r\n treeView.onItemInvoked = () => {\r\n const propertySheetHosts = document.getElementsByClassName(\"acd-propertySheet-host\");\r\n if (propertySheetHosts.length === 1) {\r\n const propertySheetHost = propertySheetHosts[0];\r\n\r\n // get focusable children\r\n const focusableElements = propertySheetHost.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex=\"0\"]');\r\n if (focusableElements.length > 0) {\r\n (focusableElements[0]).focus();\r\n }\r\n }\r\n };\r\n\r\n this._treeViewToolbox.content.appendChild(treeView.render());\r\n }\r\n }\r\n }\r\n\r\n private buildDataExplorer() {\r\n if (this._dataToolbox && this._dataToolbox.content) {\r\n this._dataToolbox.content.innerHTML = \"\";\r\n\r\n if (this.dataStructure) {\r\n let treeItem = new DataTreeItem(this.dataStructure);\r\n let treeView = new TreeView(treeItem);\r\n\r\n this._dataToolbox.content.appendChild(treeView.render());\r\n }\r\n }\r\n }\r\n\r\n private buildPropertySheet(peer: DesignerPeers.DesignerPeer) {\r\n if (this._propertySheetToolbox.content) {\r\n // if focus is already on _propertySheetCard, remember the focused object's id\r\n const restoreFocusId = this._propertySheetCard?.findDOMNodeOwner(document.activeElement)?.id;\r\n this._propertySheetToolbox.content.innerHTML = \"\";\r\n\r\n if (peer) {\r\n this._propertySheetCard = peer.buildPropertySheetCard(this);\r\n }\r\n else {\r\n this._propertySheetCard = new Adaptive.AdaptiveCard();\r\n this._propertySheetCard.parse(\r\n {\r\n type: \"AdaptiveCard\",\r\n version: \"1.0\",\r\n body: [\r\n {\r\n type: \"TextBlock\",\r\n wrap: true,\r\n text: \"**Nothing is selected**\"\r\n },\r\n {\r\n type: \"TextBlock\",\r\n wrap: true,\r\n text: \"Select an element in the card to modify its properties.\"\r\n }\r\n ]\r\n },\r\n new Adaptive.SerializationContext(this.targetVersion)\r\n );\r\n this._propertySheetCard.padding = new Adaptive.PaddingDefinition(\r\n Adaptive.Spacing.Small,\r\n Adaptive.Spacing.Small,\r\n Adaptive.Spacing.Small,\r\n Adaptive.Spacing.Small\r\n );\r\n }\r\n\r\n this._propertySheetCard.hostConfig = defaultHostConfig;\r\n\r\n this._propertySheetToolbox.content.appendChild(this._propertySheetCard.render());\r\n\r\n if (restoreFocusId) {\r\n // attempt to restore focus if new card has object with same id\r\n const focusTarget = this._propertySheetCard.getElementById(restoreFocusId) ?? this._propertySheetCard.getActionById(restoreFocusId);\r\n focusTarget?.renderedElement?.focus();\r\n }\r\n }\r\n }\r\n\r\n private addPaletteItem(paletteItem: BasePaletteItem, hostElement: HTMLElement) {\r\n paletteItem.render();\r\n paletteItem.onStartDrag = (sender: BasePaletteItem) => {\r\n this._draggedPaletteItem = sender;\r\n\r\n this._draggedElement = sender.renderDragVisual();\r\n this._draggedElement.style.position = \"absolute\";\r\n const adjustedPosition = Utils.adjustPointForScroll(this._currentMousePosition);\r\n this._draggedElement.style.left = adjustedPosition.x + \"px\";\r\n this._draggedElement.style.top = adjustedPosition.y + \"px\";\r\n\r\n document.body.appendChild(this._draggedElement);\r\n }\r\n\r\n hostElement.appendChild(paletteItem.renderedElement);\r\n }\r\n\r\n private buildPalette() {\r\n if (!this._isAttached) {\r\n return;\r\n }\r\n\r\n this._toolPaletteToolbox.content.innerHTML = \"\";\r\n\r\n let categorizedTypes: object = {};\r\n\r\n for (let i = 0; i < this.hostContainer.elementsRegistry.getItemCount(); i++) {\r\n let registration = this.hostContainer.elementsRegistry.getItemAt(i);\r\n\r\n if (registration.schemaVersion.compareTo(this.targetVersion) <= 0) {\r\n let peerRegistration = Designer.CardDesignerSurface.cardElementPeerRegistry.findTypeRegistration(registration.objectType);\r\n\r\n if (peerRegistration) {\r\n if (!categorizedTypes.hasOwnProperty(peerRegistration.category)) {\r\n categorizedTypes[peerRegistration.category] = [];\r\n }\r\n\r\n let paletteItem = new ElementPaletteItem(\r\n registration,\r\n peerRegistration\r\n )\r\n\r\n paletteItem.onDoubleClick = (sender) => {\r\n const peer = paletteItem.createPeer(this, this.designerSurface);\r\n\r\n if (this.designerSurface.rootPeer.tryAdd(peer)) {\r\n peer.isSelected = true;\r\n };\r\n }\r\n\r\n categorizedTypes[peerRegistration.category].push(paletteItem);\r\n }\r\n }\r\n }\r\n\r\n if (this.customPaletteItems) {\r\n for (let item of this.customPaletteItems) {\r\n if (!categorizedTypes.hasOwnProperty(item.category)) {\r\n categorizedTypes[item.category] = [];\r\n }\r\n\r\n categorizedTypes[item.category].push(item);\r\n }\r\n }\r\n\r\n for (let category in categorizedTypes) {\r\n\r\n let categoryList = document.createElement('div');\r\n categoryList.setAttribute(\"aria-label\", category)\r\n\r\n let node = document.createElement('div');\r\n categoryList.appendChild(node);\r\n node.innerText = category;\r\n node.className = \"acd-palette-category\";\r\n\r\n this._toolPaletteToolbox.content.appendChild(categoryList);\r\n\r\n let paletteItemContainer = document.createElement('div');\r\n paletteItemContainer.className = \"acd-palette-item-container\";\r\n\r\n for (let i = 0; i < categorizedTypes[category].length; i++) {\r\n this.addPaletteItem(categorizedTypes[category][i], paletteItemContainer);\r\n }\r\n\r\n categoryList.appendChild(paletteItemContainer);\r\n }\r\n }\r\n\r\n private endDrag() {\r\n if (this._draggedPaletteItem) {\r\n this._draggedPaletteItem.endDrag();\r\n this._draggedElement.parentNode.removeChild(this._draggedElement);\r\n\r\n this._draggedPaletteItem = null;\r\n this._draggedElement = null;\r\n }\r\n }\r\n\r\n private renderErrorPaneElement(message: string, source?: Adaptive.SerializableObject): HTMLElement {\r\n let errorElement = document.createElement(\"div\");\r\n errorElement.className = \"acd-error-pane-message\";\r\n\r\n if (source && source instanceof Adaptive.CardObject) {\r\n errorElement.classList.add(\"selectable\");\r\n errorElement.title = \"Click to select this element\";\r\n errorElement.onclick = (e) => {\r\n let peer = this.designerSurface.findPeer(source);\r\n\r\n if (peer) {\r\n peer.isSelected = true;\r\n peer.scrollIntoView();\r\n }\r\n }\r\n }\r\n\r\n errorElement.innerText = message;\r\n\r\n return errorElement;\r\n }\r\n\r\n private recreateDesignerSurface() {\r\n let styleSheetLinkElement = document.getElementById(\"adaptiveCardStylesheet\");\r\n\r\n if (styleSheetLinkElement == null) {\r\n styleSheetLinkElement = document.createElement(\"link\");\r\n styleSheetLinkElement.id = \"adaptiveCardStylesheet\";\r\n\r\n document.getElementsByTagName(\"head\")[0].appendChild(styleSheetLinkElement);\r\n }\r\n\r\n styleSheetLinkElement.rel = \"stylesheet\";\r\n styleSheetLinkElement.type = \"text/css\";\r\n\r\n if (Utils.isAbsoluteUrl(this.hostContainer.getCurrentStyleSheet()))\r\n {\r\n styleSheetLinkElement.href = this.hostContainer.getCurrentStyleSheet();\r\n }\r\n else\r\n {\r\n styleSheetLinkElement.href = Utils.joinPaths(this._assetPath, this.hostContainer.getCurrentStyleSheet());\r\n }\r\n\r\n let cardArea = document.getElementById(\"cardArea\");\r\n\r\n if (cardArea) {\r\n cardArea.style.backgroundColor = this.hostContainer.getBackgroundColor();\r\n }\r\n\r\n this.hostContainer.initialize();\r\n\r\n this._designerHostElement.innerHTML = \"\";\r\n this.hostContainer.renderTo(this._designerHostElement);\r\n\r\n let wasInPreviewMode = this._designerSurface ? this._designerSurface.isPreviewMode : false;\r\n\r\n this._designerSurface = new Designer.CardDesignerSurface(this);\r\n this._designerSurface.fixedHeightCard = this.hostContainer.isFixedHeight;\r\n this._designerSurface.onSelectedPeerChanged = (peer: DesignerPeers.DesignerPeer) => {\r\n this.buildPropertySheet(peer);\r\n };\r\n this._designerSurface.onLayoutUpdated = (isFullRefresh: boolean) => {\r\n if (isFullRefresh) {\r\n this.scheduleUpdateJsonFromCard();\r\n this.buildTreeView();\r\n }\r\n };\r\n this._designerSurface.onCardValidated = (logEntries: Adaptive.IValidationEvent[]) => {\r\n if (this.onCardValidated) {\r\n this.onCardValidated(this, logEntries);\r\n }\r\n\r\n let errorPane = document.getElementById(\"errorPane\");\r\n errorPane.innerHTML = \"\";\r\n\r\n if(this.targetVersion.toString() == \"1.4\" && (this.hostContainer.name == \"Microsoft Teams - Dark\" || this.hostContainer.name == \"Microsoft Teams - Light\")){\r\n errorPane.appendChild(this.renderErrorPaneElement(\"[Warning] The selected Target Version (\" + this.targetVersion.toString() + \") is only supported by bot sent card. For user sent cards please use version 1.3\"));\r\n }\r\n\r\n if (this.targetVersion.compareTo(this.hostContainer.targetVersion) > 0 && Shared.GlobalSettings.showTargetVersionMismatchWarning) {\r\n errorPane.appendChild(this.renderErrorPaneElement(\"[Warning] The selected Target Version (\" + this.targetVersion.toString() + \") is greater than the version supported by \" + this.hostContainer.name + \" (\" + this.hostContainer.targetVersion.toString() + \")\"));\r\n }\r\n\r\n if (logEntries.length > 0) {\r\n let dedupedEntries: Adaptive.IValidationEvent[] = [];\r\n\r\n for (let entry of logEntries) {\r\n if (dedupedEntries.indexOf(entry) < 0) {\r\n dedupedEntries.push(entry);\r\n }\r\n }\r\n\r\n for (let entry of dedupedEntries) {\r\n let s: string = \"\";\r\n\r\n switch (entry.phase) {\r\n case Adaptive.ValidationPhase.Parse:\r\n s = \"[Parse]\";\r\n break;\r\n case Adaptive.ValidationPhase.ToJSON:\r\n s = \"[Serialize]\";\r\n break;\r\n default:\r\n s = \"[Validation]\";\r\n break;\r\n }\r\n\r\n errorPane.appendChild(this.renderErrorPaneElement(s + \" \" + entry.message, entry.source));\r\n }\r\n }\r\n\r\n if (errorPane.childElementCount > 0) {\r\n errorPane.classList.remove(\"acd-hidden\");\r\n }\r\n else {\r\n errorPane.classList.add(\"acd-hidden\");\r\n }\r\n };\r\n this._designerSurface.onStartDrag = (sender: Designer.CardDesignerSurface) => {\r\n this._startDragPayload = JSON.parse(this.getCurrentCardEditorPayload());\r\n };\r\n this._designerSurface.onEndDrag = (sender: Designer.CardDesignerSurface, wasCancelled: boolean) => {\r\n if (wasCancelled) {\r\n this.setCardPayload(this._startDragPayload, false);\r\n }\r\n else {\r\n this.addToUndoStack(this._designerSurface.getCardPayloadAsObject());\r\n }\r\n };\r\n\r\n this.buildPalette();\r\n this.buildPropertySheet(null);\r\n\r\n this.updateCardFromJson(false);\r\n this.updateSampleData();\r\n \r\n this._sampleHostDataEditorToolbox.isVisible = (this._hostContainer instanceof WidgetContainer) && Shared.GlobalSettings.enableDataBindingSupport && Shared.GlobalSettings.showSampleHostDataEditorToolbox;\r\n\r\n this._designerSurface.isPreviewMode = wasInPreviewMode;\r\n\r\n this.updateFullLayout();\r\n }\r\n\r\n private activeHostContainerChanged() {\r\n this.recreateDesignerSurface();\r\n\r\n if (this._deviceEmulationChoicePicker) {\r\n this._deviceEmulationChoicePicker.isHidden = !(!!this.hostContainer.enableDeviceEmulation);\r\n this.activeDeviceEmulationChanged();\r\n }\r\n\r\n if (this._containerSizeChoicePicker) {\r\n this._containerSizeChoicePicker.isHidden = !(!!this.hostContainer.supportsMultipleSizes);\r\n\r\n // Update the host parameter data with the value of the choice picker\r\n if ((this._hostContainer instanceof WidgetContainer) && this._containerSizeChoicePicker.isEnabled && this._sampleHostData) {\r\n this.updateHostDataSizeProperty();\r\n\r\n // If the container properties do not align with the choice picker, update the property and recreate the designer surface\r\n if (this._containerSizeChoicePicker.value !== (this._hostContainer as WidgetContainer).containerSize) {\r\n (this._hostContainer as WidgetContainer).containerSize = this._containerSizeChoicePicker.value as ContainerSize;\r\n this.recreateDesignerSurface();\r\n }\r\n }\r\n }\r\n\r\n if (this._containerThemeChoicePicker) {\r\n this._containerThemeChoicePicker.isEnabled = !!this.hostContainer.supportsMultipleThemes;\r\n\r\n // Update the host parameter data with the value of the choice picker\r\n if (this._containerThemeChoicePicker.isEnabled && this._sampleHostData) {\r\n this.updateHostDataThemeProperty();\r\n\r\n // If the container properties do not align with the choice picker, update the property and recreate the designer surface\r\n if (this._containerThemeChoicePicker.value !== this._hostContainer.colorTheme) {\r\n this._hostContainer.colorTheme = this._containerThemeChoicePicker.value as ColorTheme;\r\n this.recreateDesignerSurface();\r\n }\r\n }\r\n }\r\n\r\n if (this.onActiveHostContainerChanged) {\r\n this.onActiveHostContainerChanged(this);\r\n }\r\n }\r\n\r\n private activeDeviceEmulationChanged() {\r\n if (this.deviceEmulation?.maxWidth && this._hostContainer.enableDeviceEmulation) {\r\n this._designerHostElement.style.setProperty('max-width', this.deviceEmulation.maxWidth);\r\n } else {\r\n this._designerHostElement.style.removeProperty('max-width');\r\n }\r\n }\r\n\r\n private targetVersionChanged() {\r\n let cardPayload = this.designerSurface.getCardPayloadAsObject();\r\n\r\n if (typeof cardPayload === \"object\") {\r\n cardPayload[\"version\"] = this.targetVersion.toString();\r\n\r\n this.setCardPayload(cardPayload, false);\r\n }\r\n\r\n this.recreateDesignerSurface();\r\n\r\n if (this.onTargetVersionChanged) {\r\n this.onTargetVersionChanged(this);\r\n }\r\n }\r\n\r\n private updateToolboxLayout(toolbox: Toolbox, hostPanelRect: ClientRect | DOMRect) {\r\n if (toolbox) {\r\n let jsonEditorHeaderRect = toolbox.getHeaderBoundingRect();\r\n\r\n toolbox.content.style.height = (hostPanelRect.height - jsonEditorHeaderRect.height) + \"px\";\r\n }\r\n }\r\n\r\n private updateJsonEditorsLayout() {\r\n if (this._isMonacoEditorLoaded) {\r\n let jsonEditorsPaneRect = this._jsonEditorsPanel.contentHost.getBoundingClientRect();\r\n\r\n this.updateToolboxLayout(this._cardEditorToolbox, jsonEditorsPaneRect);\r\n this._cardEditor.layout();\r\n\r\n if (this._sampleDataEditorToolbox) {\r\n this.updateToolboxLayout(this._sampleDataEditorToolbox, jsonEditorsPaneRect);\r\n this._sampleDataEditor.layout();\r\n }\r\n\r\n if (this._sampleHostDataEditorToolbox) {\r\n this.updateToolboxLayout(this._sampleHostDataEditorToolbox, jsonEditorsPaneRect);\r\n this._sampleHostDataEditor.layout();\r\n }\r\n }\r\n }\r\n\r\n private updateFullLayout() {\r\n this.scheduleLayoutUpdate();\r\n this.updateJsonEditorsLayout();\r\n }\r\n\r\n private _jsonUpdateTimer: any;\r\n private _cardUpdateTimer: any;\r\n private _updateLayoutTimer: any;\r\n private _cardPreventUpdate: boolean = false;\r\n private _jsonPreventUpdate: boolean = false;\r\n\r\n private cardPayloadChanged() {\r\n if (this.onCardPayloadChanged) {\r\n this.onCardPayloadChanged(this);\r\n }\r\n }\r\n\r\n private _cardEditorUpdateCounter = 0;\r\n\r\n private beginCardEditorUpdate() {\r\n this._cardEditorUpdateCounter++;\r\n }\r\n\r\n private endCardEditorUpdate() {\r\n if (this._cardEditorUpdateCounter > 0) {\r\n this._cardEditorUpdateCounter--;\r\n }\r\n }\r\n\r\n private setCardPayload(payload: object, addToUndoStack: boolean) {\r\n if (this._isMonacoEditorLoaded) {\r\n this.beginCardEditorUpdate();\r\n\r\n try {\r\n if (payload.hasOwnProperty(\"version\")) {\r\n payload[\"version\"] = this.targetVersion.toString();\r\n }\r\n\r\n this._cardEditor.setValue(JSON.stringify(payload, null, 4));\r\n this.updateCardFromJson(addToUndoStack);\r\n }\r\n finally {\r\n this.endCardEditorUpdate();\r\n }\r\n }\r\n\r\n this.cardPayloadChanged();\r\n }\r\n\r\n private setSampleDataPayload(payload: any) {\r\n if (this._isMonacoEditorLoaded && this._sampleDataEditor) {\r\n this._sampleDataEditor.setValue(JSON.stringify(payload, null, 4));\r\n }\r\n }\r\n\r\n private setSampleHostDataPayload(payload: any) {\r\n if (this._isMonacoEditorLoaded && this._sampleHostDataEditor) {\r\n this._sampleHostDataEditor.setValue(JSON.stringify(payload, null, 4));\r\n }\r\n }\r\n\r\n private updateJsonFromCard(addToUndoStack: boolean = true) {\r\n try {\r\n this._cardPreventUpdate = true;\r\n\r\n if (!this._jsonPreventUpdate && this._isMonacoEditorLoaded) {\r\n let cardPayload = this._designerSurface.getCardPayloadAsObject();\r\n\r\n this.setCardPayload(cardPayload, addToUndoStack);\r\n }\r\n }\r\n finally {\r\n this._cardPreventUpdate = false;\r\n }\r\n }\r\n\r\n private scheduleUpdateJsonFromCard() {\r\n clearTimeout(this._jsonUpdateTimer);\r\n\r\n if (!this._jsonPreventUpdate) {\r\n this._jsonUpdateTimer = setTimeout(() => { this.updateJsonFromCard(); }, 100);\r\n }\r\n }\r\n\r\n private getCurrentCardEditorPayload(): string {\r\n return this._isMonacoEditorLoaded ? this._cardEditor.getValue() : Constants.defaultPayload;\r\n }\r\n\r\n private getCurrentSampleDataEditorPayload(): string {\r\n return this._isMonacoEditorLoaded && this._sampleDataEditor ? this._sampleDataEditor.getValue() : \"\";\r\n }\r\n\r\n private getCurrentSampleHostDataEditorPayload(): string {\r\n return this._isMonacoEditorLoaded && this._sampleHostDataEditor ? this._sampleHostDataEditor.getValue() : \"\";\r\n }\r\n\r\n private updateCardFromJson(addToUndoStack: boolean) {\r\n try {\r\n this._jsonPreventUpdate = true;\r\n\r\n let currentEditorPayload = this.getCurrentCardEditorPayload();\r\n\r\n if (addToUndoStack) {\r\n try {\r\n this.addToUndoStack(JSON.parse(currentEditorPayload));\r\n }\r\n catch {\r\n // Swallow the parse error\r\n }\r\n }\r\n\r\n if (!this._cardPreventUpdate) {\r\n this.designerSurface.setCardPayloadAsString(currentEditorPayload);\r\n\r\n this.cardPayloadChanged();\r\n }\r\n } finally {\r\n this._jsonPreventUpdate = false;\r\n }\r\n }\r\n\r\n private scheduleUpdateCardFromJson() {\r\n clearTimeout(this._cardUpdateTimer);\r\n\r\n if (!this._cardPreventUpdate) {\r\n this._cardUpdateTimer = setTimeout(() => { this.updateCardFromJson(true); }, 300);\r\n }\r\n }\r\n\r\n private _isEdgeHTML?: boolean = undefined;\r\n\r\n private isEdgeHTML(): boolean {\r\n if (this._isEdgeHTML === undefined) {\r\n this._isEdgeHTML = window.navigator.userAgent.toLowerCase().indexOf(\"edge\") > -1;\r\n }\r\n\r\n return this._isEdgeHTML;\r\n }\r\n\r\n private scheduleLayoutUpdate() {\r\n if (this.designerSurface) {\r\n if (!this.isEdgeHTML()) {\r\n this.designerSurface.updateLayout(false);\r\n }\r\n else {\r\n // In \"old\" Edge, updateLayout() is *super* slow (because it uses getBoundingClientRect\r\n // heavily which is itself super slow) and we have to call it only on idle\r\n clearTimeout(this._updateLayoutTimer);\r\n\r\n this._updateLayoutTimer = setTimeout(\r\n () => {\r\n if (this.designerSurface) {\r\n this.designerSurface.updateLayout(false);\r\n }\r\n },\r\n 5);\r\n }\r\n }\r\n }\r\n\r\n private _targetVersion: Adaptive.Version = Adaptive.Versions.latest;\r\n private _fullScreenHandler = new FullScreenHandler();\r\n private _fullScreenButton: ToolbarButton;\r\n private _hostContainerChoicePicker: ToolbarChoicePicker;\r\n private _deviceEmulationChoicePicker: ToolbarChoicePicker;\r\n private _versionChoicePicker: ToolbarChoicePicker;\r\n private _undoButton: ToolbarButton;\r\n private _redoButton: ToolbarButton;\r\n private _newCardButton: ToolbarButton;\r\n private _copyJSONButton: ToolbarButton;\r\n private _togglePreviewButton: ToolbarButton;\r\n private _helpButton: ToolbarButton;\r\n private _preventRecursiveSetTargetVersion = false;\r\n private _containerSizeChoicePicker: ToolbarChoicePicker;\r\n private _containerThemeChoicePicker: ToolbarChoicePicker;\r\n\r\n private prepareToolbar() {\r\n if (Shared.GlobalSettings.showVersionPicker) {\r\n this._versionChoicePicker = new ToolbarChoicePicker(CardDesigner.ToolbarCommands.VersionPicker);\r\n this._versionChoicePicker.label = \"Target version:\"\r\n this._versionChoicePicker.alignment = ToolbarElementAlignment.Right;\r\n this._versionChoicePicker.separator = true;\r\n\r\n for (let i = 0; i < Shared.GlobalSettings.supportedTargetVersions.length; i++) {\r\n this._versionChoicePicker.choices.push(\r\n {\r\n name: Shared.GlobalSettings.supportedTargetVersions[i].label,\r\n value: i.toString()\r\n });\r\n }\r\n\r\n this.toolbar.addElement(this._versionChoicePicker);\r\n }\r\n\r\n this._newCardButton = new ToolbarButton(\r\n CardDesigner.ToolbarCommands.NewCard,\r\n \"New card\",\r\n \"acd-icon-newCard\",\r\n (sender: ToolbarButton) => {\r\n let dialog = new OpenSampleDialog({\r\n catalogue: this._sampleCatalogue,\r\n handlers: [\r\n {\r\n label: \"From JSON Schema\",\r\n onClick: () => {\r\n dialog.close()\r\n this.launchJsonSchemaPopup()\r\n },\r\n onKeyEnterEvent: (e: KeyboardEvent) => {\r\n dialog.close();\r\n this.launchJsonSchemaPopup();\r\n },\r\n cardData: {\r\n thumbnail: () => {\r\n const thumbnail = document.createElement(\"div\");\r\n thumbnail.className = \"acd-image-container\";\r\n thumbnail.innerHTML = `
\r\n \"json\r\n
\r\n
From JSON Schema
\r\n
\r\n
`;\r\n return thumbnail;\r\n },\r\n },\r\n },\r\n Pic2Card.pic2cardService ?\r\n {\r\n label: \"Pic2Card\",\r\n onClick: () => {\r\n dialog.close()\r\n this.launchImagePopup()\r\n },\r\n onKeyEnterEvent: (e: KeyboardEvent) => {\r\n dialog.close();\r\n this.launchImagePopup();\r\n },\r\n cardData: {\r\n thumbnail: () => {\r\n const thumbnail = document.createElement(\"div\");\r\n thumbnail.className = \"acd-image-container\";\r\n thumbnail.innerHTML = `
\r\n \"pic2card\r\n
\r\n
NEW PREVIEW
\r\n
Create from Image
\r\n
Upload your own image and convert it magically to an Adaptive card
\r\n \r\n
\r\n
`;\r\n return thumbnail;\r\n },\r\n },\r\n } : null,\r\n ]\r\n });\r\n dialog.title = \"Create\";\r\n dialog.closeButton.caption = \"Cancel\";\r\n dialog.width = \"80%\";\r\n dialog.height = \"80%\";\r\n dialog.onClose = (d) => {\r\n const newCardButton = this._newCardButton.renderedElement;\r\n if (dialog.output) {\r\n try {\r\n let cardPayload = JSON.parse(dialog.output.cardPayload);\r\n\r\n this.setCardPayload(cardPayload, true);\r\n } catch {\r\n alert(\"The card template could not be loaded.\");\r\n return\r\n }\r\n\r\n if (dialog.output.sampleData) {\r\n try {\r\n let sampleDataPayload = JSON.parse(dialog.output.sampleData);\r\n\r\n this.setSampleDataPayload(sampleDataPayload);\r\n this.dataStructure = FieldDefinition.deriveFrom(sampleDataPayload);\r\n } catch {\r\n alert(\"The card data could not be loaded.\")\r\n }\r\n } else {\r\n this.setSampleDataPayload({});\r\n }\r\n\r\n if (dialog.output.sampleHostData) {\r\n try {\r\n let sampleHostDataPayload = JSON.parse(dialog.output.sampleHostData);\r\n\r\n this.setSampleHostDataPayload(sampleHostDataPayload);\r\n this.hostDataStructure = FieldDefinition.deriveFrom(sampleHostDataPayload);\r\n\r\n // If the new data has size, update the choice picker value; otherwise, update the data based on the choice picker\r\n if (this._sampleHostData.widgetSize) {\r\n this.updateContainerSizeChoicePicker();\r\n } else {\r\n this.updateHostDataSizeProperty();\r\n }\r\n\r\n // If the new data has theme, update the choice picker value; otherwise, update the data based on the choice picker\r\n if (this._sampleHostData.hostTheme) {\r\n this.updateContainerThemeChoicePicker();\r\n } else {\r\n this.updateHostDataThemeProperty();\r\n }\r\n\r\n } catch {\r\n alert(\"The card host data could not be loaded.\")\r\n }\r\n } else {\r\n this.setSampleHostDataPayload({});\r\n\r\n // Update the size and theme properties based on the current state of the choice pickers\r\n this.updateHostDataSizeProperty();\r\n this.updateHostDataThemeProperty();\r\n }\r\n }\r\n if (newCardButton) {\r\n newCardButton.focus();\r\n }\r\n };\r\n dialog.open();\r\n });\r\n this._newCardButton.separator = true;\r\n\r\n this.toolbar.addElement(this._newCardButton);\r\n\r\n if (this._hostContainers && this._hostContainers.length > 0) {\r\n this._hostContainerChoicePicker = new ToolbarChoicePicker(CardDesigner.ToolbarCommands.HostAppPicker);\r\n this._hostContainerChoicePicker.separator = true;\r\n this._hostContainerChoicePicker.label = \"Select host app:\"\r\n\r\n for (let i = 0; i < this._hostContainers.length; i++) {\r\n this._hostContainerChoicePicker.choices.push(\r\n {\r\n name: this._hostContainers[i].name,\r\n value: i.toString(),\r\n }\r\n );\r\n }\r\n\r\n this._hostContainerChoicePicker.onChanged = (sender) => {\r\n this.hostContainer = this._hostContainers[parseInt(this._hostContainerChoicePicker.value)];\r\n };\r\n\r\n this.toolbar.addElement(this._hostContainerChoicePicker);\r\n }\r\n\r\n const supportsTheme = this._hostContainers.some((x) => { return x.supportsMultipleThemes; });\r\n const supportsSize = this._hostContainers.some((x) => { return x.supportsMultipleSizes; });\r\n\r\n if (supportsTheme) {\r\n this._containerThemeChoicePicker = new ToolbarChoicePicker(CardDesigner.ToolbarCommands.ContainerThemePicker);\r\n this._containerThemeChoicePicker.separator = false;\r\n this._containerThemeChoicePicker.label = \"Theme:\"\r\n\r\n const themes = HostContainer.supportedContainerThemes;\r\n\r\n for (let i = 0; i < themes.length; i++) {\r\n this._containerThemeChoicePicker.choices.push(\r\n {\r\n name: themes[i],\r\n value: themes[i],\r\n }\r\n );\r\n }\r\n\r\n this._containerThemeChoicePicker.onChanged = (sender) => {\r\n // Update the container theme and rerender the designer surface\r\n this.hostContainer.colorTheme = this._containerThemeChoicePicker.value as ColorTheme;\r\n this.recreateDesignerSurface();\r\n\r\n if (this._sampleHostData) {\r\n this.updateHostDataThemeProperty();\r\n }\r\n };\r\n\r\n this.toolbar.addElement(this._containerThemeChoicePicker);\r\n }\r\n\r\n if (supportsSize) {\r\n this._containerSizeChoicePicker = new ToolbarChoicePicker(CardDesigner.ToolbarCommands.ContainerSizePicker);\r\n this._containerSizeChoicePicker.separator = false;\r\n this._containerSizeChoicePicker.label = \"Container size:\"\r\n\r\n const sizes = WidgetContainer.supportedContainerSizes;\r\n\r\n for (let i = 0; i < sizes.length; i++) {\r\n this._containerSizeChoicePicker.choices.push(\r\n {\r\n name: sizes[i],\r\n value: sizes[i],\r\n }\r\n );\r\n }\r\n\r\n this._containerSizeChoicePicker.onChanged = (sender) => {\r\n if (this.hostContainer instanceof WidgetContainer) {\r\n // Update container size and rerender the designer surface\r\n this.hostContainer.containerSize = this._containerSizeChoicePicker.value as ContainerSize;\r\n this.recreateDesignerSurface();\r\n\r\n if (this._sampleHostData) {\r\n this.updateHostDataSizeProperty();\r\n }\r\n }\r\n };\r\n\r\n this.toolbar.addElement(this._containerSizeChoicePicker);\r\n }\r\n\r\n if (this._deviceEmulations && this._deviceEmulations.length > 0) {\r\n this._deviceEmulationChoicePicker = new ToolbarChoicePicker(CardDesigner.ToolbarCommands.DeviceEmulationPicker);\r\n this._deviceEmulationChoicePicker.separator = true;\r\n this._deviceEmulationChoicePicker.label = \"Emulate device:\"\r\n\r\n for (let i = 0; i < this._deviceEmulations.length; i++) {\r\n this._deviceEmulationChoicePicker.choices.push(\r\n {\r\n name: this._deviceEmulations[i].name,\r\n value: i.toString(),\r\n }\r\n );\r\n }\r\n\r\n this._deviceEmulationChoicePicker.onChanged = (sender) => {\r\n this.deviceEmulation = this._deviceEmulations[parseInt(this._deviceEmulationChoicePicker.value)];\r\n };\r\n\r\n this.toolbar.addElement(this._deviceEmulationChoicePicker);\r\n }\r\n\r\n this._undoButton = new ToolbarButton(\r\n CardDesigner.ToolbarCommands.Undo,\r\n \"Undo\",\r\n \"acd-icon-undo\",\r\n (sender: ToolbarButton) => { this.undo(); });\r\n this._undoButton.separator = true;\r\n this._undoButton.toolTip = \"Undo your last change\";\r\n this._undoButton.isEnabled = false;\r\n\r\n this.toolbar.addElement(this._undoButton);\r\n\r\n this._redoButton = new ToolbarButton(\r\n CardDesigner.ToolbarCommands.Redo,\r\n \"Redo\",\r\n \"acd-icon-redo\",\r\n (sender: ToolbarButton) => { this.redo(); });\r\n this._redoButton.toolTip = \"Redo your last changes\";\r\n this._redoButton.isEnabled = false;\r\n\r\n this.toolbar.addElement(this._redoButton);\r\n\r\n this._copyJSONButton = new ToolbarButton(\r\n CardDesigner.ToolbarCommands.CopyJSON,\r\n \"Copy card payload\",\r\n \"acd-icon-copy\");\r\n this._copyJSONButton.toolTip = \"Copy the generated JSON payload of the card (template bound with data) to the clipboard. To copy only the template payload, use the Card Payload Editor.\";\r\n this.toolbar.addElement(this._copyJSONButton);\r\n\r\n this._togglePreviewButton = new ToolbarButton(\r\n CardDesigner.ToolbarCommands.TogglePreview,\r\n \"Preview mode\",\r\n \"acd-icon-preview\",\r\n (sender: ToolbarButton) => { this.togglePreview(); });\r\n this._togglePreviewButton.separator = true;\r\n this._togglePreviewButton.allowToggle = true;\r\n this._togglePreviewButton.isVisible = Shared.GlobalSettings.enableDataBindingSupport;\r\n // On initialization, the preview button is not pressed so set the tooltip to \"Switch to Preview mode\"\r\n this._togglePreviewButton.toolTip = \"Switch to Preview mode\";\r\n\r\n this.toolbar.addElement(this._togglePreviewButton);\r\n\r\n this._helpButton = new ToolbarButton(\r\n CardDesigner.ToolbarCommands.Help,\r\n \"Help\",\r\n \"acd-icon-help\",\r\n (sender: ToolbarButton) => { this.showHelp(); });\r\n this._helpButton.toolTip = \"Display help.\";\r\n this._helpButton.separator = true;\r\n this._helpButton.alignment = ToolbarElementAlignment.Right;\r\n this.toolbar.addElement(this._helpButton);\r\n\r\n this._fullScreenHandler = new FullScreenHandler();\r\n this._fullScreenHandler.onFullScreenChanged = (isFullScreen: boolean) => {\r\n this._fullScreenButton.toolTip = isFullScreen ? \"Exit full screen\" : \"Enter full screen\";\r\n\r\n this.updateFullLayout();\r\n }\r\n }\r\n\r\n private launchJsonSchemaPopup() {\r\n let dialog = new OpenJsonSchemaDialog();\r\n dialog.title = \"Create from JSON Schema\";\r\n dialog.closeButton.caption = \"Cancel\";\r\n dialog.preventLightDismissal = true;\r\n dialog.width = \"80%\";\r\n dialog.height = \"80%\";\r\n dialog.open();\r\n\r\n dialog.submitButton.onClick = () => {\r\n dialog.close();\r\n if (dialog.output) {\r\n try {\r\n let cardPayload = JSON.parse(dialog.output.cardPayload);\r\n\r\n this.setCardPayload(cardPayload, true);\r\n } catch {\r\n alert(\"The card template could not be loaded.\");\r\n return\r\n }\r\n\r\n if (dialog.output.sampleData) {\r\n try {\r\n let sampleDataPayload = JSON.parse(dialog.output.sampleData);\r\n\r\n this.setSampleDataPayload(sampleDataPayload);\r\n this.dataStructure = FieldDefinition.deriveFrom(sampleDataPayload);\r\n } catch {\r\n alert(\"The card data could not be loaded.\")\r\n }\r\n } else {\r\n this.setSampleDataPayload({});\r\n }\r\n\r\n if (dialog.output.sampleHostData) {\r\n try {\r\n let sampleHostDataPayload = JSON.parse(dialog.output.sampleData);\r\n\r\n this.setSampleHostDataPayload(sampleHostDataPayload);\r\n this.hostDataStructure = FieldDefinition.deriveFrom(sampleHostDataPayload);\r\n\r\n // If the new data has size, update the choice picker value; otherwise, update the data based on the choice picker\r\n if (this._sampleHostData.widgetSize) {\r\n this.updateContainerSizeChoicePicker();\r\n } else {\r\n this.updateHostDataSizeProperty();\r\n }\r\n\r\n // If the new data has theme, update the choice picker value; otherwise, update the data based on the choice picker\r\n if (this._sampleHostData.hostTheme) {\r\n this.updateContainerThemeChoicePicker();\r\n } else {\r\n this.updateHostDataThemeProperty();\r\n }\r\n\r\n } catch {\r\n alert(\"The card host data could not be loaded.\")\r\n }\r\n } else {\r\n this.setSampleHostDataPayload({});\r\n\r\n // Update the size and theme properties based on the current state of the choice pickers\r\n this.updateHostDataSizeProperty();\r\n this.updateHostDataThemeProperty();\r\n }\r\n }\r\n\r\n const newCardButton = this._newCardButton.renderedElement;\r\n\r\n if (newCardButton) {\r\n newCardButton.focus();\r\n }\r\n }\r\n\r\n dialog.onClose = (d) => {\r\n const newCardButton = this._newCardButton.renderedElement;\r\n\r\n if (newCardButton) {\r\n newCardButton.focus();\r\n }\r\n };\r\n }\r\n\r\n\r\n private launchImagePopup() {\r\n let dialog = new OpenImageDialog();\r\n dialog.title = \"Pic2card Dialog for Image Upload\";\r\n dialog.closeButton.caption = \"Cancel\";\r\n dialog.preventLightDismissal = true;\r\n dialog.width = \"80%\";\r\n dialog.height = \"80%\";\r\n dialog.open();\r\n dialog.onClose = (d) => {\r\n const newCardButton = this._newCardButton.renderedElement;\r\n\r\n if (dialog.predictedCardJSON) {\r\n const { card, data } = dialog.predictedCardJSON;\r\n const addToUndoStack = true;\r\n\r\n this.setCardPayload(card, addToUndoStack);\r\n this.setSampleDataPayload(data);\r\n\r\n let loadNotification = document.createElement(\"span\");\r\n loadNotification.id = \"pic2cardLoadNotification\";\r\n loadNotification.setAttribute(\"role\", \"status\");\r\n loadNotification.setAttribute(\"aria-label\", \"Pic2Card generated Adaptive Card loaded\");\r\n\r\n // It's a bit odd to jump up to the parent element here, but we need a place to park this empty element\r\n // so that it's seen by accessibility tools. If we put it on the button itself, the status message gets\r\n // read twice (once on DOM entry and again on focus).\r\n newCardButton.parentElement.appendChild(loadNotification);\r\n\r\n // element needs to enter the DOM, but shouldn't stay forever, lest it be read again...\r\n setTimeout(() => {\r\n newCardButton.parentElement.removeChild(loadNotification);\r\n }, 500);\r\n }\r\n\r\n if (newCardButton) {\r\n newCardButton.focus();\r\n }\r\n };\r\n }\r\n\r\n private onResize() {\r\n this._cardEditor.layout();\r\n\r\n if (this._sampleDataEditor) {\r\n this._sampleDataEditor.layout();\r\n }\r\n\r\n if (this._sampleHostDataEditor) {\r\n this._sampleHostDataEditor.layout();\r\n }\r\n }\r\n\r\n private updateSampleData() {\r\n try {\r\n this._sampleData = JSON.parse(this.getCurrentSampleDataEditorPayload());\r\n\r\n this.scheduleUpdateCardFromJson();\r\n }\r\n catch {\r\n // Swallow expression, the payload isn't a valid JSON document\r\n }\r\n }\r\n\r\n private updateSampleHostData() {\r\n try {\r\n this._sampleHostData = JSON.parse(this.getCurrentSampleHostDataEditorPayload());\r\n\r\n // Since we have new host data, we should update the container property choice pickers\r\n this.updateContainerSizeChoicePicker();\r\n this.updateContainerThemeChoicePicker();\r\n\r\n this.scheduleUpdateCardFromJson();\r\n }\r\n catch {\r\n // Swallow expression, the payload isn't a valid JSON document\r\n }\r\n }\r\n\r\n // Update the size property within the sample host data payload\r\n private updateHostDataSizeProperty() {\r\n if (this._containerSizeChoicePicker?.value) {\r\n const value = this._containerSizeChoicePicker.value.toLowerCase();\r\n const currentValue = this._sampleHostData.widgetSize;\r\n\r\n // only update the payload if the value has changed\r\n if (currentValue !== value) {\r\n this._sampleHostData.widgetSize = value;\r\n \r\n this.setSampleHostDataPayload(this._sampleHostData);\r\n this.hostDataStructure = FieldDefinition.deriveFrom(this._sampleHostData);\r\n }\r\n }\r\n }\r\n\r\n // Update the theme property within the sample host data payload\r\n private updateHostDataThemeProperty() {\r\n if (this._containerThemeChoicePicker?.value) {\r\n const value = this._containerThemeChoicePicker.value.toLowerCase();\r\n const currentValue = this._sampleHostData.hostTheme;\r\n\r\n // only update the payload if the value has changed\r\n if (currentValue !== value) {\r\n this._sampleHostData.hostTheme = value;\r\n \r\n this.setSampleHostDataPayload(this._sampleHostData);\r\n this.hostDataStructure = FieldDefinition.deriveFrom(this._sampleHostData);\r\n }\r\n } \r\n }\r\n\r\n // Update the container size choice picker based on the host data value\r\n private updateContainerSizeChoicePicker() {\r\n // check for `size` in the host data payload\r\n if (this._containerSizeChoicePicker && this._sampleHostData.widgetSize) {\r\n const size = this._sampleHostData.widgetSize as String;\r\n\r\n // only update the choice picker if the value is different\r\n if (size !== this._containerSizeChoicePicker.value.toLowerCase()) {\r\n const choices = this._containerSizeChoicePicker.choices;\r\n\r\n // search for the matching choice and update the selectedIndex\r\n for (let i = 0; i < choices.length; i++) {\r\n if (choices.at(i).value.toLowerCase() === size.toLowerCase()) {\r\n this._containerSizeChoicePicker.selectedIndex = i;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Update the container theme choice picker based on the host data value\r\n private updateContainerThemeChoicePicker() {\r\n // check for `theme` in the host data payload\r\n if (this._containerThemeChoicePicker && this._sampleHostData.hostTheme) {\r\n const theme = this._sampleHostData.hostTheme as String;\r\n\r\n // only update the choice picker if the value is different\r\n if (theme !== this._containerThemeChoicePicker.value.toLowerCase()) {\r\n const choices = this._containerThemeChoicePicker.choices;\r\n\r\n // search for the matching choice and update the selectedIndex\r\n for (let i = 0; i < choices.length; i++) {\r\n if (choices.at(i).value.toLowerCase() === theme.toLowerCase()) {\r\n this._containerThemeChoicePicker.selectedIndex = i;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private updateToolbar() {\r\n this._undoButton.isEnabled = this.canUndo;\r\n this._redoButton.isEnabled = this.canRedo;\r\n }\r\n\r\n private addToUndoStack(payload: object) {\r\n let doAdd: boolean = !this._designerSurface.draggedPeer;\r\n\r\n if (doAdd) {\r\n if (this._undoStack.length > 0) {\r\n doAdd = this._undoStack[this._undoStack.length - 1] != payload;\r\n }\r\n\r\n if (doAdd) {\r\n let undoPayloadsToDiscard = this._undoStack.length - (this._undoStackIndex + 1);\r\n\r\n if (undoPayloadsToDiscard > 0) {\r\n this._undoStack.splice(this._undoStackIndex + 1, undoPayloadsToDiscard);\r\n }\r\n\r\n this._undoStack.push(payload);\r\n\r\n if (this._undoStack.length > CardDesigner.MAX_UNDO_STACK_SIZE) {\r\n this._undoStack.splice(0, 1);\r\n }\r\n\r\n this._undoStackIndex = this._undoStack.length - 1;\r\n\r\n this.updateToolbar();\r\n }\r\n }\r\n }\r\n\r\n private handlePointerUp(e: PointerEvent) {\r\n this.endDrag();\r\n\r\n if (this.designerSurface) {\r\n this.designerSurface.endDrag(false);\r\n }\r\n }\r\n\r\n private handlePointerMove(e: PointerEvent) {\r\n this._currentMousePosition = { x: e.x, y: e.y };\r\n\r\n if (this.designerSurface) {\r\n let isPointerOverDesigner = this.designerSurface.isPointerOver(this._currentMousePosition.x, this._currentMousePosition.y);\r\n let peerDropped = false;\r\n\r\n if (this._draggedPaletteItem && isPointerOverDesigner) {\r\n let peer = this._draggedPaletteItem.createPeer(this, this.designerSurface);\r\n\r\n let clientCoordinates = this.designerSurface.pageToClientCoordinates(this._currentMousePosition.x, this._currentMousePosition.y);\r\n\r\n if (this.designerSurface.tryDrop(clientCoordinates, peer)) {\r\n this.endDrag();\r\n\r\n this.designerSurface.startDrag(peer);\r\n\r\n peerDropped = true;\r\n }\r\n }\r\n\r\n if (!peerDropped && this._draggedElement) {\r\n const adjustedPosition = Utils.adjustPointForScroll(this._currentMousePosition);\r\n this._draggedElement.style.left = adjustedPosition.x - 10 + \"px\";\r\n this._draggedElement.style.top = adjustedPosition.y - 10 + \"px\";\r\n }\r\n }\r\n }\r\n\r\n readonly toolbar: Toolbar = new Toolbar();\r\n\r\n lockDataStructure: boolean = false;\r\n\r\n constructor(hostContainers: Array = null, deviceEmulations: Array = null) {\r\n super();\r\n\r\n Adaptive.GlobalSettings.enableFullJsonRoundTrip = true;\r\n Adaptive.GlobalSettings.allowPreProcessingPropertyValues = true;\r\n Adaptive.GlobalSettings.setTabIndexAtCardRoot = false;\r\n\r\n Adaptive.AdaptiveCard.onProcessMarkdown = (text: string, result: Adaptive.IMarkdownProcessingResult) => {\r\n CardDesigner.internalProcessMarkdown(text, result);\r\n }\r\n\r\n this._hostContainers = hostContainers ? hostContainers : [];\r\n this._deviceEmulations = deviceEmulations ? deviceEmulations : [];\r\n\r\n this.prepareToolbar();\r\n }\r\n\r\n monacoModuleLoaded(monaco: any = null) {\r\n if (!monaco) {\r\n monaco = window[\"monaco\"];\r\n }\r\n\r\n let monacoConfiguration = {\r\n schemas: [\r\n {\r\n uri: \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n schema: adaptiveCardSchema,\r\n fileMatch: [\"*\"],\r\n }\r\n ],\r\n validate: true,\r\n allowComments: true\r\n }\r\n\r\n // TODO: set this in our editor instead of defaults\r\n monaco.languages.json.jsonDefaults.setDiagnosticsOptions(monacoConfiguration);\r\n\r\n // Setup card JSON editor\r\n this._cardEditorToolbox.content = document.createElement(\"div\");\r\n this._cardEditorToolbox.content.setAttribute(\"role\", \"region\");\r\n this._cardEditorToolbox.content.setAttribute(\"aria-label\", \"card payload editor, press Ctrl+M to toggle behavior of the TAB key\");\r\n this._cardEditorToolbox.content.classList.add(\"acd-code-editor\");\r\n\r\n this._cardEditor = monaco.editor.create(\r\n this._cardEditorToolbox.content,\r\n {\r\n folding: true,\r\n fontSize: 13.5,\r\n language: 'json',\r\n minimap: {\r\n enabled: true\r\n }\r\n }\r\n );\r\n\r\n this._cardEditor.onDidChangeModelContent(() => {\r\n if (this._cardEditorUpdateCounter == 0) {\r\n this.scheduleUpdateCardFromJson();\r\n }\r\n });\r\n\r\n if (this._sampleDataEditorToolbox) {\r\n // Setup sample data JSON editor\r\n this._sampleDataEditorToolbox.content = document.createElement(\"div\");\r\n this._sampleDataEditorToolbox.content.setAttribute(\"role\", \"region\");\r\n this._sampleDataEditorToolbox.content.setAttribute(\"aria-label\", \"sample data editor\");\r\n this._sampleDataEditorToolbox.content.classList.add(\"acd-code-editor\");\r\n\r\n this._sampleDataEditor = monaco.editor.create(\r\n this._sampleDataEditorToolbox.content,\r\n {\r\n folding: true,\r\n fontSize: 13.5,\r\n language: 'json',\r\n minimap: {\r\n enabled: false\r\n }\r\n }\r\n );\r\n\r\n this._sampleDataEditor.onDidChangeModelContent(\r\n () => {\r\n this.updateSampleData();\r\n\r\n if (!this.lockDataStructure) {\r\n try {\r\n this.dataStructure = FieldDefinition.deriveFrom(JSON.parse(this.getCurrentSampleDataEditorPayload()));\r\n }\r\n catch {\r\n // Swallow exception\r\n }\r\n }\r\n });\r\n }\r\n\r\n if (this._sampleHostDataEditorToolbox) {\r\n // Setup sample host data JSON editor\r\n this._sampleHostDataEditorToolbox.content = document.createElement(\"div\");\r\n this._sampleHostDataEditorToolbox.content.setAttribute(\"role\", \"region\");\r\n this._sampleHostDataEditorToolbox.content.setAttribute(\"aria-label\", \"sample host data editor\");\r\n this._sampleHostDataEditorToolbox.content.classList.add(\"acd-code-editor\");\r\n\r\n this._sampleHostDataEditor = monaco.editor.create(\r\n this._sampleHostDataEditorToolbox.content,\r\n {\r\n folding: true,\r\n fontSize: 13.5,\r\n language: 'json',\r\n minimap: {\r\n enabled: false\r\n }\r\n }\r\n );\r\n\r\n this._sampleHostDataEditor.onDidChangeModelContent(\r\n () => {\r\n // Maybe we want just updateSampleData?\r\n this.updateSampleHostData();\r\n\r\n if (!this.lockDataStructure) {\r\n try {\r\n this.hostDataStructure = FieldDefinition.deriveFrom(JSON.parse(this.getCurrentSampleHostDataEditorPayload()));\r\n }\r\n catch {\r\n // Swallow exception\r\n }\r\n }\r\n });\r\n }\r\n\r\n window.addEventListener('resize', () => { this.onResize(); });\r\n\r\n this._isMonacoEditorLoaded = true;\r\n\r\n this.updateJsonEditorsLayout();\r\n this.updateJsonFromCard(true);\r\n }\r\n\r\n attachTo(root: HTMLElement) {\r\n let styleSheetLinkElement = document.createElement(\"link\");\r\n styleSheetLinkElement.id = \"__ac-designer\";\r\n styleSheetLinkElement.rel = \"stylesheet\";\r\n styleSheetLinkElement.type = \"text/css\";\r\n styleSheetLinkElement.href = Utils.joinPaths(this._assetPath, \"adaptivecards-designer.css\");\r\n\r\n document.getElementsByTagName(\"head\")[0].appendChild(styleSheetLinkElement);\r\n\r\n if (this._hostContainers && this._hostContainers.length > 0) {\r\n this._hostContainer = this._hostContainers[0];\r\n }\r\n else {\r\n this._hostContainer = new DefaultContainer(\"Default\", \"adaptivecards-defaulthost.css\");\r\n }\r\n\r\n if (this._deviceEmulationChoicePicker) {\r\n this._deviceEmulationChoicePicker.isHidden = !(!!this._hostContainer.enableDeviceEmulation);\r\n }\r\n\r\n if (this._containerSizeChoicePicker) {\r\n this._containerSizeChoicePicker.isHidden = !(!!this.hostContainer.supportsMultipleSizes);\r\n }\r\n\r\n if (this._containerThemeChoicePicker) {\r\n this._containerThemeChoicePicker.isEnabled = !!this.hostContainer.supportsMultipleThemes;\r\n }\r\n\r\n root.classList.add(\"acd-designer-root\");\r\n root.style.flex = \"1 1 auto\";\r\n root.style.display = \"flex\";\r\n root.style.flexDirection = \"column\";\r\n root.style.overflow = \"hidden\";\r\n\r\n root.innerHTML =\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
CARD PREVIEW
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
';\r\n\r\n this.toolbar.attachTo(document.getElementById(\"toolbarHost\"));\r\n\r\n if (this._versionChoicePicker) {\r\n this._versionChoicePicker.selectedIndex = Shared.GlobalSettings.supportedTargetVersions.indexOf(this.targetVersion);\r\n this._versionChoicePicker.onChanged = (sender: ToolbarChoicePicker) => {\r\n this.targetVersion = Shared.GlobalSettings.supportedTargetVersions[parseInt(this._versionChoicePicker.value)];\r\n }\r\n }\r\n\r\n if (this._copyJSONButton.isVisible) {\r\n new Clipboard(\r\n this._copyJSONButton.renderedElement,\r\n {\r\n text: (trigger) => JSON.stringify(this.getBoundCard(), null, 4)\r\n })\r\n .on(\"error\", () => this._copyJSONButton.renderedElement.focus())\r\n .on(\"success\", () => {\r\n this._copyJSONButton.renderedElement.focus()\r\n\r\n this.toolbar.addAlert(\"Card payload copied\");\r\n });\r\n }\r\n\r\n // Tool palette panel\r\n let toolPaletteHost = document.createElement(\"div\");\r\n toolPaletteHost.className = \"acd-dockedPane\";\r\n\r\n this._toolPaletteToolbox = new Toolbox(\"toolPalette\", Strings.toolboxes.toolPalette.title);\r\n this._toolPaletteToolbox.content = toolPaletteHost;\r\n\r\n let toolPalettePanel = new SidePanel(\r\n \"toolPalettePanel\",\r\n SidePanelAlignment.Left,\r\n document.getElementById(\"leftCollapsedPaneTabHost\"));\r\n toolPalettePanel.addToolbox(this._toolPaletteToolbox);\r\n toolPalettePanel.isResizable = false;\r\n\r\n toolPalettePanel.attachTo(document.getElementById(\"toolPalettePanel\"));\r\n\r\n // JSON editors panel\r\n this._cardEditorToolbox = new Toolbox(\"cardEditor\", Strings.toolboxes.cardEditor.title);\r\n this._cardEditorToolbox.content = document.createElement(\"div\");\r\n this._cardEditorToolbox.content.style.padding = \"8px\";\r\n this._cardEditorToolbox.content.innerText = Strings.loadingEditor;\r\n\r\n this._jsonEditorsPanel = new SidePanel(\r\n \"jsonEditorPanel\",\r\n SidePanelAlignment.Bottom,\r\n document.getElementById(\"bottomCollapsedPaneTabHost\"));\r\n this._jsonEditorsPanel.onResized = (sender: SidePanel) => {\r\n this.updateJsonEditorsLayout();\r\n }\r\n this._jsonEditorsPanel.onToolboxResized = (sender: SidePanel) => {\r\n this.updateJsonEditorsLayout();\r\n }\r\n this._jsonEditorsPanel.onToolboxExpandedOrCollapsed = (sender: SidePanel) => {\r\n this.updateJsonEditorsLayout();\r\n }\r\n\r\n this._jsonEditorsPanel.addToolbox(this._cardEditorToolbox);\r\n\r\n if (Shared.GlobalSettings.enableDataBindingSupport && Shared.GlobalSettings.showSampleDataEditorToolbox) {\r\n this._sampleDataEditorToolbox = new Toolbox(\"sampleDataEditor\", Strings.toolboxes.sampleDataEditor.title);\r\n this._sampleDataEditorToolbox.content = document.createElement(\"div\");\r\n this._sampleDataEditorToolbox.content.style.padding = \"8px\";\r\n this._sampleDataEditorToolbox.content.innerText = Strings.loadingEditor;\r\n\r\n this._jsonEditorsPanel.addToolbox(this._sampleDataEditorToolbox);\r\n }\r\n\r\n if (Shared.GlobalSettings.enableDataBindingSupport) {\r\n this._sampleHostDataEditorToolbox = new Toolbox(\"sampleHostDataEditor\", Strings.toolboxes.sampleHostDataEditor.title);\r\n this._sampleHostDataEditorToolbox.content = document.createElement(\"div\");\r\n this._sampleHostDataEditorToolbox.content.style.padding = \"8px\";\r\n this._sampleHostDataEditorToolbox.content.innerText = Strings.loadingEditor;\r\n\r\n this._sampleHostDataEditorToolbox.isVisible = Shared.GlobalSettings.showSampleHostDataEditorToolbox && (this._hostContainer instanceof WidgetContainer);\r\n\r\n this._jsonEditorsPanel.addToolbox(this._sampleHostDataEditorToolbox);\r\n }\r\n\r\n this._jsonEditorsPanel.attachTo(document.getElementById(\"jsonEditorPanel\"));\r\n\r\n // Property sheet panel\r\n let propertySheetHost = document.createElement(\"div\");\r\n propertySheetHost.className = \"acd-propertySheet-host\";\r\n\r\n this._propertySheetToolbox = new Toolbox(\"propertySheet\", Strings.toolboxes.propertySheet.title);\r\n this._propertySheetToolbox.content = propertySheetHost;\r\n\r\n let propertySheetPanel = new SidePanel(\r\n \"propertySheetPanel\",\r\n SidePanelAlignment.Right,\r\n document.getElementById(\"rightCollapsedPaneTabHost\"));\r\n propertySheetPanel.addToolbox(this._propertySheetToolbox);\r\n propertySheetPanel.onResized = (sender: SidePanel) => {\r\n this.scheduleLayoutUpdate();\r\n }\r\n\r\n propertySheetPanel.attachTo(document.getElementById(\"propertySheetPanel\"));\r\n\r\n // Tree view panel\r\n let treeViewHost = document.createElement(\"div\");\r\n treeViewHost.className = \"acd-treeView-host\";\r\n\r\n this._treeViewToolbox = new Toolbox(\"treeView\", Strings.toolboxes.cardStructure.title);\r\n this._treeViewToolbox.content = treeViewHost;\r\n\r\n let treeViewPanel = new SidePanel(\r\n \"treeViewPanel\",\r\n SidePanelAlignment.Right,\r\n document.getElementById(\"rightCollapsedPaneTabHost\"));\r\n treeViewPanel.addToolbox(this._treeViewToolbox);\r\n treeViewPanel.onResized = (sender: SidePanel) => {\r\n this.scheduleLayoutUpdate();\r\n }\r\n\r\n if (Shared.GlobalSettings.enableDataBindingSupport && Shared.GlobalSettings.showDataStructureToolbox) {\r\n let dataExplorerHost = document.createElement(\"div\");\r\n dataExplorerHost.className = \"acd-treeView-host\";\r\n\r\n this._dataToolbox = new Toolbox(\"data\", Strings.toolboxes.dataStructure.title);\r\n this._dataToolbox.content = dataExplorerHost;\r\n\r\n treeViewPanel.addToolbox(this._dataToolbox);\r\n }\r\n\r\n treeViewPanel.attachTo(document.getElementById(\"treeViewPanel\"));\r\n\r\n this._designerHostElement = document.getElementById(\"designerHost\");\r\n\r\n window.addEventListener(\"pointermove\", (e: PointerEvent) => { this.handlePointerMove(e); });\r\n window.addEventListener(\"resize\", () => { this.scheduleLayoutUpdate(); });\r\n window.addEventListener(\"pointerup\", (e: PointerEvent) => { this.handlePointerUp(e); });\r\n\r\n this._isAttached = true;\r\n\r\n this.recreateDesignerSurface();\r\n }\r\n\r\n createAndAddSampleHostDataEditorToolbox() {\r\n this._sampleHostDataEditorToolbox = new Toolbox(\"sampleHostDataEditor\", Strings.toolboxes.sampleHostDataEditor.title);\r\n this._sampleHostDataEditorToolbox.content = document.createElement(\"div\");\r\n this._sampleHostDataEditorToolbox.content.style.padding = \"8px\";\r\n this._sampleHostDataEditorToolbox.content.innerText = Strings.loadingEditor;\r\n\r\n this._jsonEditorsPanel.addToolbox(this._sampleHostDataEditorToolbox);\r\n }\r\n\r\n clearUndoStack() {\r\n this._undoStack = [];\r\n this._undoStackIndex = -1;\r\n this.updateToolbar();\r\n }\r\n\r\n setCard(payload: object) {\r\n this.clearUndoStack();\r\n this.setCardPayload(payload, true);\r\n }\r\n\r\n getCard(): object {\r\n return this._designerSurface ? this._designerSurface.getCardPayloadAsObject() : undefined;\r\n }\r\n\r\n getBoundCard(): object {\r\n return this._designerSurface ? this._designerSurface.getBoundCardPayloadAsObject() : undefined;\r\n }\r\n\r\n undo() {\r\n if (this.canUndo) {\r\n this._undoStackIndex--;\r\n\r\n let card = this._undoStack[this._undoStackIndex];\r\n\r\n this.setCardPayload(card, false);\r\n this.updateToolbar();\r\n }\r\n }\r\n\r\n redo() {\r\n if (this._undoStackIndex < this._undoStack.length - 1) {\r\n this._undoStackIndex++;\r\n\r\n let payload = this._undoStack[this._undoStackIndex];\r\n\r\n this.setCardPayload(payload, false);\r\n this.updateToolbar();\r\n }\r\n }\r\n\r\n showHelp() {\r\n let helpDialog = new HelpDialog();\r\n helpDialog.title = \"Help\";\r\n helpDialog.open();\r\n }\r\n\r\n newCard() {\r\n let card = {\r\n type: \"AdaptiveCard\",\r\n $schema: \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n version: this.targetVersion.toString(),\r\n body: [\r\n ]\r\n }\r\n\r\n this.setCardPayload(card, true);\r\n }\r\n\r\n onCardPayloadChanged: (designer: CardDesigner) => void;\r\n onCardValidated: (designer: CardDesigner, validationLogEntries: Adaptive.IValidationEvent[]) => void;\r\n onActiveHostContainerChanged: (designer: CardDesigner) => void;\r\n onTargetVersionChanged: (designer: CardDesigner) => void;\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return this._targetVersion;\r\n }\r\n\r\n set targetVersion(value: Adaptive.Version) {\r\n if (this._targetVersion.compareTo(value) !== 0 && !this._preventRecursiveSetTargetVersion) {\r\n this._preventRecursiveSetTargetVersion = true;\r\n\r\n try {\r\n this._targetVersion = value;\r\n\r\n this.targetVersionChanged();\r\n\r\n if (this._versionChoicePicker) {\r\n this._versionChoicePicker.selectedIndex = Shared.GlobalSettings.supportedTargetVersions.indexOf(this._targetVersion);\r\n }\r\n }\r\n finally {\r\n this._preventRecursiveSetTargetVersion = false;\r\n }\r\n }\r\n }\r\n\r\n get dataStructure(): FieldDefinition {\r\n return this._dataStructure;\r\n }\r\n\r\n set dataStructure(value: FieldDefinition) {\r\n this._dataStructure = value;\r\n\r\n this.buildDataExplorer();\r\n }\r\n\r\n get hostDataStructure(): FieldDefinition {\r\n return this._hostDataStructure;\r\n }\r\n\r\n set hostDataStructure(value: FieldDefinition) {\r\n this._hostDataStructure = value;\r\n }\r\n\r\n get sampleData(): any {\r\n return this._sampleData;\r\n }\r\n\r\n set sampleData(value: any) {\r\n this._sampleData = value;\r\n\r\n this.setSampleDataPayload(value);\r\n }\r\n\r\n get sampleHostData(): any {\r\n return this._sampleHostDataEditorToolbox.isVisible ? this._sampleHostData : \"{}\";\r\n }\r\n\r\n set sampleHostData(value: any) {\r\n this._sampleHostData = value;\r\n\r\n this.setSampleHostDataPayload(value);\r\n }\r\n\r\n get bindingPreviewMode(): Designer.BindingPreviewMode {\r\n return this._bindingPreviewMode;\r\n }\r\n\r\n set bindingPreviewMode(value: Designer.BindingPreviewMode) {\r\n this._bindingPreviewMode = value;\r\n }\r\n\r\n get hostContainer(): HostContainer {\r\n return this._hostContainer;\r\n }\r\n\r\n set hostContainer(value: HostContainer) {\r\n if (this._hostContainer !== value) {\r\n this._hostContainer = value;\r\n\r\n this.activeHostContainerChanged();\r\n\r\n if (Shared.GlobalSettings.selectedHostContainerControlsTargetVersion) {\r\n this.targetVersion = this._hostContainer.targetVersion;\r\n }\r\n }\r\n }\r\n\r\n get deviceEmulation(): DeviceEmulation {\r\n return this._deviceEmulation;\r\n }\r\n\r\n set deviceEmulation(value: DeviceEmulation) {\r\n if (this._deviceEmulation !== value) {\r\n this._deviceEmulation = value;\r\n this.activeDeviceEmulationChanged();\r\n this._designerSurface.updateLayout(true);\r\n }\r\n }\r\n\r\n get canUndo(): boolean {\r\n return this._undoStackIndex >= 1;\r\n }\r\n\r\n get canRedo(): boolean {\r\n return this._undoStackIndex < this._undoStack.length - 1;\r\n }\r\n\r\n get designerSurface(): Designer.CardDesignerSurface {\r\n return this._designerSurface;\r\n }\r\n\r\n get treeViewToolbox(): Toolbox {\r\n return this._treeViewToolbox;\r\n }\r\n\r\n get propertySheetToolbox(): Toolbox {\r\n return this._propertySheetToolbox;\r\n }\r\n\r\n get jsonEditorToolbox(): Toolbox {\r\n return this._cardEditorToolbox;\r\n }\r\n\r\n get toolPaletteToolbox(): Toolbox {\r\n return this._toolPaletteToolbox;\r\n }\r\n\r\n get dataToolbox(): Toolbox {\r\n return this._dataToolbox;\r\n }\r\n\r\n get assetPath(): string {\r\n return this._assetPath;\r\n }\r\n\r\n set assetPath(value: string) {\r\n this._assetPath = value;\r\n }\r\n\r\n get customPaletteItems(): CustomPaletteItem[] {\r\n return this._customPeletteItems;\r\n }\r\n\r\n set customPaletteItems(value: CustomPaletteItem[]) {\r\n this._customPeletteItems = value;\r\n\r\n this.buildPalette();\r\n }\r\n\r\n get sampleCatalogueUrl(): string {\r\n return this._sampleCatalogue.url;\r\n }\r\n\r\n set sampleCatalogueUrl(value: string) {\r\n this._sampleCatalogue.url = value;\r\n }\r\n}\r\n\r\nexport module CardDesigner {\r\n export class ToolbarCommands {\r\n static readonly HostAppPicker = \"__hostAppPicker\";\r\n static readonly DeviceEmulationPicker = \"__deviceEmulationPicker\";\r\n static readonly VersionPicker = \"__versionPicker\";\r\n static readonly Undo = \"__undoButton\";\r\n static readonly Redo = \"__redoButton\";\r\n static readonly NewCard = \"__newCardButton\";\r\n static readonly CopyJSON = \"__copyJsonButton\";\r\n static readonly TogglePreview = \"__togglePreviewButton\";\r\n static readonly Help = \"__helpButton\";\r\n static readonly ContainerSizePicker = \"__containerSizePicker\";\r\n static readonly ContainerThemePicker = \"__containerThemePicker\";\r\n }\r\n}\r\n","import * as Adaptive from \"adaptivecards\";\r\nimport { Downloader } from \"./downloader\";\r\n\r\nexport class CatalogueEntry {\r\n private _cardPayload: string;\r\n private _cardPayloadDownloaded: boolean = false;\r\n private _sampleData: string;\r\n private _sampleDataDownloaded: boolean = false;\r\n private _cardId: string;\r\n\r\n private downloadCompleted() {\r\n if (this._cardPayloadDownloaded && this._sampleDataDownloaded && this.onDownloaded) {\r\n this.onDownloaded(this);\r\n }\r\n }\r\n\r\n sampleDataUrl?: string;\r\n\r\n onDownloaded: (sender: CatalogueEntry) => void = null;\r\n\r\n constructor(readonly displayName: string, readonly cardPayloadUrl: string, sampleDataUrl?: string, cardId?:string) {\r\n this.sampleDataUrl = sampleDataUrl;\r\n this._cardId = cardId;\r\n }\r\n\r\n download() {\r\n let cardPayloadDownloadComplete = false;\r\n let sampleDataDownloadComplete = false;\r\n\r\n if (!this.cardPayloadDownloaded) {\r\n let payloadDownloader = new Downloader(this.cardPayloadUrl);\r\n payloadDownloader.onSuccess = () => {\r\n this._cardPayload = payloadDownloader.data;\r\n this._cardPayloadDownloaded = true;\r\n\r\n this.downloadCompleted();\r\n }\r\n payloadDownloader.onError = () => {\r\n this._cardPayloadDownloaded = true;\r\n\r\n this.downloadCompleted();\r\n }\r\n payloadDownloader.download();\r\n }\r\n else {\r\n cardPayloadDownloadComplete = true;\r\n }\r\n\r\n if (this.sampleDataUrl && !this.sampleDataDownloaded) {\r\n let sampleDataDownloader = new Downloader(this.sampleDataUrl);\r\n sampleDataDownloader.onSuccess = () => {\r\n this._sampleData = sampleDataDownloader.data;\r\n this._sampleDataDownloaded = true;\r\n\r\n this.downloadCompleted();\r\n }\r\n sampleDataDownloader.onError = () => {\r\n this._sampleDataDownloaded = true;\r\n\r\n this.downloadCompleted();\r\n }\r\n sampleDataDownloader.download();\r\n }\r\n else {\r\n this._sampleDataDownloaded = true;\r\n\r\n sampleDataDownloadComplete = true;\r\n }\r\n\r\n if (cardPayloadDownloadComplete && sampleDataDownloadComplete) {\r\n this.downloadCompleted();\r\n }\r\n }\r\n\r\n get cardPayloadDownloaded(): boolean {\r\n return this._cardPayloadDownloaded;\r\n }\r\n\r\n\r\n get cardId(): string {\r\n return this._cardId;\r\n }\r\n\r\n get cardPayload(): string {\r\n return this._cardPayload;\r\n }\r\n\r\n get sampleDataDownloaded(): boolean {\r\n return this._sampleDataDownloaded;\r\n }\r\n\r\n get sampleData(): string {\r\n return this._sampleData;\r\n }\r\n}\r\n\r\nexport class SampleCatalogue {\r\n private _entries: CatalogueEntry[] = [];\r\n private _isDownloaded: boolean = false;\r\n private _url: string;\r\n\r\n private downloaded() {\r\n this._isDownloaded = true;\r\n\r\n if (this.onDownloaded) {\r\n this.onDownloaded(this);\r\n }\r\n }\r\n\r\n private parse(input: any) {\r\n let entries: any[] = null;\r\n\r\n if (Array.isArray(input)) {\r\n entries = input;\r\n }\r\n else {\r\n entries = Array.isArray(input[\"entries\"]) ? input[\"entries\"] : null;\r\n }\r\n\r\n this._entries = [];\r\n\r\n if (entries != null) {\r\n for (let entry of entries) {\r\n if (typeof entry === \"object\") {\r\n let displayName = Adaptive.parseString(entry[\"displayName\"]);\r\n let cardPayloadUrl = Adaptive.parseString(entry[\"cardPayloadUrl\"]);\r\n\r\n if (displayName && cardPayloadUrl) {\r\n this._entries.push(\r\n new CatalogueEntry(\r\n displayName,\r\n cardPayloadUrl,\r\n Adaptive.parseString(entry[\"dataSampleUrl\"])));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n onDownloaded: (sender: SampleCatalogue) => void;\r\n\r\n constructor(url: string = \"./sample-catalogue.json\") {\r\n this.url = url;\r\n }\r\n\r\n download() {\r\n if (!this.isDownloaded) {\r\n let downloader = new Downloader(this.url);\r\n downloader.onError = () => {\r\n if (this._entries.length === 0) {\r\n this._entries = [];\r\n }\r\n \r\n this.downloaded();\r\n };\r\n downloader.onSuccess = () => {\r\n if (downloader.data) {\r\n try {\r\n this.parse(JSON.parse(downloader.data));\r\n }\r\n catch (e) {\r\n // Swallow the error\r\n }\r\n }\r\n\r\n this.downloaded();\r\n };\r\n downloader.download();\r\n }\r\n else {\r\n this.downloaded();\r\n }\r\n }\r\n\r\n get isDownloaded(): boolean {\r\n return this._isDownloaded;\r\n }\r\n\r\n get entries(): CatalogueEntry[] {\r\n return this._entries;\r\n }\r\n\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n set url(value: string) {\r\n if (value !== this._url) {\r\n this._url = value;\r\n\r\n this._isDownloaded = false;\r\n }\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport const otherTestPayload: string = `{\r\n\t\"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n\t\"type\": \"AdaptiveCard\",\r\n\t\"version\": \"1.0\",\r\n\t\"body\": [\r\n\t\t{\r\n\t\t\t\"type\": \"ActionSet\",\r\n\t\t\t\"actions\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"type\": \"Action.ShowCard\",\r\n\t\t\t\t\t\"title\": \"Set due date\",\r\n\t\t\t\t\t\"card\": {\r\n\t\t\t\t\t\t\"type\": \"AdaptiveCard\",\r\n\t\t\t\t\t\t\"body\": [\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\"type\": \"Input.Date\",\r\n\t\t\t\t\t\t\t\t\"id\": \"dueDate\",\r\n\t\t\t\t\t\t\t\t\"title\": \"Select due date\"\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\"type\": \"Input.Text\",\r\n\t\t\t\t\t\t\t\t\"id\": \"comment\",\r\n\t\t\t\t\t\t\t\t\"isMultiline\": true,\r\n\t\t\t\t\t\t\t\t\"placeholder\": \"Add a comment\"\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\"actions\": [\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\"type\": \"Action.OpenUrl\",\r\n\t\t\t\t\t\t\t\t\"title\": \"OK\",\r\n\t\t\t\t\t\t\t\t\"url\": \"https://adaptivecards.io\"\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t]\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"type\": \"Action.OpenUrl\",\r\n\t\t\t\t\t\"title\": \"View\",\r\n\t\t\t\t\t\"url\": \"https://adaptivecards.io\"\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t]\r\n}`;\r\n\r\nexport const defaultPayload: string = `{\r\n \"type\": \"AdaptiveCard\",\r\n \"body\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"size\": \"Medium\",\r\n \"weight\": \"Bolder\",\r\n \"text\": \"Publish Adaptive Card schema\"\r\n },\r\n {\r\n \"type\": \"ColumnSet\",\r\n \"columns\": [\r\n {\r\n \"type\": \"Column\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"style\": \"Person\",\r\n \"url\": \"https://matthidinger.com/images/bio-photo.jpg\",\r\n \"size\": \"Small\"\r\n }\r\n ],\r\n \"width\": \"auto\"\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"items\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"weight\": \"Bolder\",\r\n \"text\": \"Matt Hidinger\",\r\n \"wrap\": true\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"spacing\": \"None\",\r\n \"text\": \"Created {{DATE(2017-02-14T06:08:39Z,SHORT)}}\",\r\n \"isSubtle\": true,\r\n \"wrap\": true\r\n }\r\n ],\r\n \"width\": \"stretch\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.\",\r\n \"wrap\": true\r\n },\r\n {\r\n \"type\": \"FactSet\",\r\n \"facts\": [\r\n {\r\n \"title\": \"Board:\",\r\n \"value\": \"Adaptive Card\"\r\n },\r\n {\r\n \"title\": \"List:\",\r\n \"value\": \"Backlog\"\r\n },\r\n {\r\n \"title\": \"Assigned to:\",\r\n \"value\": \"Matt Hidinger\"\r\n },\r\n {\r\n \"title\": \"Due date:\",\r\n \"value\": \"Not set\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"type\": \"Action.ShowCard\",\r\n \"title\": \"Set due date\",\r\n \"card\": {\r\n \"type\": \"AdaptiveCard\",\r\n \"body\": [\r\n {\r\n \"type\": \"Input.Date\",\r\n \"id\": \"dueDate\"\r\n },\r\n {\r\n \"type\": \"Input.Text\",\r\n \"id\": \"comment\",\r\n \"placeholder\": \"Add a comment\",\r\n \"isMultiline\": true\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"type\": \"Action.OpenUrl\",\r\n \"title\": \"OK\",\r\n \"url\": \"http://adaptivecards.io\"\r\n }\r\n ],\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\"\r\n }\r\n },\r\n {\r\n \"type\": \"Action.OpenUrl\",\r\n \"title\": \"View\",\r\n \"url\": \"http://adaptivecards.io\"\r\n }\r\n ],\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"version\": \"1.0\"\r\n}`;\r\n\r\nexport const defaultTemplatePayload: string = `{\r\n \"type\": \"AdaptiveCard\",\r\n \"body\": [\r\n {\r\n \"type\": \"Container\",\r\n \"items\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"This example uses [Adaptive Card Templating](https://docs.microsoft.com/en-us/adaptive-cards/templating/) *(Preview)*\",\r\n \"size\": \"Medium\",\r\n \"wrap\": true\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"Click the **Preview mode** toolbar button to see the card bound to the **Sample Data** in the lower-right. Sample Data helps design your card by simulating the real data.\",\r\n \"wrap\": true\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"When you're ready to populate it with real data, use the Adaptive Card [templating SDKs](https://docs.microsoft.com/en-us/adaptive-cards/templating/sdk).\",\r\n \"wrap\": true\r\n }\r\n ],\r\n \"style\": \"good\",\r\n \"bleed\": true\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"size\": \"Medium\",\r\n \"weight\": \"Bolder\",\r\n \"text\": \"{title}\"\r\n },\r\n {\r\n \"type\": \"ColumnSet\",\r\n \"columns\": [\r\n {\r\n \"type\": \"Column\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"style\": \"Person\",\r\n \"url\": \"{creator.profileImage}\",\r\n \"size\": \"Small\"\r\n }\r\n ],\r\n \"width\": \"auto\"\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"items\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"weight\": \"Bolder\",\r\n \"text\": \"{creator.name}\",\r\n \"wrap\": true\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"spacing\": \"None\",\r\n \"text\": \"Created {{DATE({createdUtc},SHORT)}}\",\r\n \"isSubtle\": true,\r\n \"wrap\": true\r\n }\r\n ],\r\n \"width\": \"stretch\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"{description}\",\r\n \"wrap\": true\r\n },\r\n {\r\n \"type\": \"FactSet\",\r\n \"facts\": [\r\n {\r\n \"$data\": \"{properties}\",\r\n \"title\": \"{key}:\",\r\n \"value\": \"{value}\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"type\": \"Action.ShowCard\",\r\n \"title\": \"Set due date\",\r\n \"card\": {\r\n \"type\": \"AdaptiveCard\",\r\n \"body\": [\r\n {\r\n \"type\": \"Input.Date\",\r\n \"id\": \"dueDate\"\r\n },\r\n {\r\n \"type\": \"Input.Text\",\r\n \"id\": \"comment\",\r\n \"placeholder\": \"Add a comment\",\r\n \"isMultiline\": true\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"type\": \"Action.Submit\",\r\n \"title\": \"OK\"\r\n }\r\n ],\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\"\r\n }\r\n },\r\n {\r\n \"type\": \"Action.OpenUrl\",\r\n \"title\": \"View\",\r\n \"url\": \"{viewUrl}\"\r\n }\r\n ],\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"version\": \"1.0\"\r\n}`;\r\n\r\nexport const defaultDataPayload: string = `{\r\n \"title\": \"Publish Adaptive Card Schema\",\r\n \"description\": \"Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.\",\r\n \"creator\": {\r\n \"name\": \"Matt Hidinger\",\r\n \"profileImage\": \"https://matthidinger.com/images/bio-photo.jpg\"\r\n },\r\n \"createdUtc\": \"2017-02-14T06:08:39Z\",\r\n \"viewUrl\": \"https://adaptivecards.io\",\r\n \"properties\": [\r\n { \"key\": \"Board\", \"value\": \"Adaptive Cards\" },\r\n { \"key\": \"List\", \"value\": \"Backlog\" },\r\n { \"key\": \"Assigned to\", \"value\": \"Matt Hidinger\" },\r\n { \"key\": \"Due date\", \"value\": \"Not set\" }\r\n ]\r\n}`","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/render-to-image.json\";\r\n\r\nexport class BotFrameworkContainer extends SingleThemeHostContainer {\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"bf-images-card\");\r\n\r\n let frame = document.createElement(\"div\");\r\n frame.className = \"bf-images-frame\";\r\n frame.appendChild(this.cardHost);\r\n\r\n hostElement.appendChild(frame);\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n\r\n get enableDeviceEmulation(): boolean {\r\n return true;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/cortana-skills-classic.json\";\r\n\r\nexport class CortanaClassicContainer extends SingleThemeHostContainer {\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"cortana-card\");\r\n\r\n let leftSide = document.createElement(\"div\");\r\n leftSide.classList.add(\"cortana-leftside\");\r\n\r\n let topLeft = document.createElement(\"div\");\r\n topLeft.classList.add(\"cortana-topleft\");\r\n\r\n let middleLeft = document.createElement(\"div\");\r\n middleLeft.classList.add(\"cortana-middleleft\");\r\n\r\n let bottomLeft = document.createElement(\"div\");\r\n bottomLeft.classList.add(\"cortana-bottomleft\");\r\n\r\n leftSide.appendChild(topLeft);\r\n leftSide.appendChild(middleLeft);\r\n leftSide.appendChild(bottomLeft);\r\n\r\n let rightSide = document.createElement(\"div\");\r\n rightSide.classList.add(\"cortana-rightside\");\r\n\r\n let header = document.createElement(\"div\");\r\n header.classList.add(\"cortana-header\");\r\n\r\n let searchBox = document.createElement(\"div\");\r\n searchBox.classList.add(\"cortana-searchbox\");\r\n\r\n let magnifyingGlass = document.createElement(\"div\");\r\n magnifyingGlass.classList.add(\"cortana-searchbox-magnifyingglass\");\r\n\r\n let searchBoxMiddle = document.createElement(\"div\");\r\n searchBoxMiddle.classList.add(\"cortana-searchbox-middle\");\r\n\r\n let microphone = document.createElement(\"div\");\r\n microphone.classList.add(\"cortana-searchbox-microphone\");\r\n\r\n searchBox.appendChild(magnifyingGlass);\r\n searchBox.appendChild(searchBoxMiddle);\r\n searchBox.appendChild(microphone);\r\n\r\n rightSide.appendChild(header);\r\n rightSide.appendChild(this.cardHost);\r\n rightSide.appendChild(searchBox);\r\n\r\n let frame = document.createElement(\"div\");\r\n frame.classList.add(\"cortana-frame\");\r\n\r\n frame.appendChild(leftSide);\r\n frame.appendChild(rightSide);\r\n\r\n hostElement.classList.add(\"cortana-outer-frame\");\r\n hostElement.appendChild(frame);\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { MultiThemeHostContainer } from \"../multi-theme-host-container\";\r\nimport * as hostConfigLight from \"../../hostConfigs/cortana-skills-light.json\";\r\nimport * as hostConfigDark from \"../../hostConfigs/cortana-skills-dark.json\";\r\n\r\nexport class CortanaContainer extends MultiThemeHostContainer {\r\n constructor() {\r\n super(\r\n \"Cortana Skills\",\r\n \"cortana-container\",\r\n hostConfigLight,\r\n hostConfigDark,\r\n \"#F6F6F6\",\r\n \"#201E1F\"\r\n );\r\n }\r\n\r\n public renderTo(hostElement: HTMLElement) {\r\n var frame = document.createElement(\"div\");\r\n\r\n frame.appendChild(this.cardHost);\r\n\r\n hostElement.appendChild(frame);\r\n }\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return Adaptive.Versions.v1_2;\r\n }\r\n\r\n get enableDeviceEmulation(): boolean {\r\n return true;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\n\r\nexport class DefaultContainer extends SingleThemeHostContainer {\r\n public renderTo(hostElement: HTMLElement) {\r\n hostElement.classList.add(\"card-frame\");\r\n hostElement.appendChild(this.cardHost);\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/federated-search.json\";\r\n\r\nexport class FederatedSearchContainer extends SingleThemeHostContainer {\r\n constructor(name: string, styleSheet: string) {\r\n super(name, styleSheet);\r\n\r\n this.actionsRegistry.unregister(\"Action.Submit\");\r\n this.elementsRegistry.unregister(\"Input.Text\");\r\n this.elementsRegistry.unregister(\"Input.Date\");\r\n this.elementsRegistry.unregister(\"Input.Time\");\r\n this.elementsRegistry.unregister(\"Input.Toggle\");\r\n this.elementsRegistry.unregister(\"Input.ChoiceSet\");\r\n this.elementsRegistry.unregister(\"Input.Number\");\r\n }\r\n\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"fedsearch-card\");\r\n hostElement.appendChild(this.cardHost);\r\n }\r\n\r\n public initialize() {\r\n super.initialize();\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return Adaptive.Versions.v1_4;\r\n }\r\n\r\n get enableDeviceEmulation(): boolean {\r\n return true;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { GlobalSettings, GlobalRegistry, CardObjectRegistry, CardElement, Action, HostConfig, SerializationContext, Version, Versions } from \"adaptivecards\";\r\nimport * as hostConfig from \"../hostConfigs/sample.json\";\r\n\r\nexport enum ColorTheme {\r\n Light = \"Light\",\r\n Dark = \"Dark\"\r\n};\r\n\r\nexport abstract class HostContainer {\r\n private _cardHost: HTMLElement;\r\n private _elementsRegistry = new CardObjectRegistry();\r\n private _actionsRegistry = new CardObjectRegistry();\r\n\r\n readonly name: string;\r\n\r\n constructor(name: string) {\r\n this.name = name;\r\n\r\n this._cardHost = document.createElement(\"div\");\r\n this._cardHost.className = \"cardHost\";\r\n\r\n GlobalRegistry.populateWithDefaultElements(this._elementsRegistry);\r\n GlobalRegistry.populateWithDefaultActions(this._actionsRegistry);\r\n }\r\n\r\n abstract renderTo(hostElement: HTMLElement);\r\n \r\n abstract getCurrentStyleSheet(): string;\r\n\r\n public initialize() {\r\n GlobalSettings.useMarkdownInRadioButtonAndCheckbox = true;\r\n GlobalSettings.useAdvancedCardBottomTruncation = false;\r\n GlobalSettings.useAdvancedTextBlockTruncation = true;\r\n }\r\n\r\n public createSerializationContext(targetVersion: Version): SerializationContext {\r\n let context = new SerializationContext(targetVersion);\r\n context.setElementRegistry(this.elementsRegistry);\r\n context.setActionRegistry(this.actionsRegistry);\r\n\r\n return context;\r\n }\r\n\r\n public getBackgroundColor(): string {\r\n return \"#F6F6F6\";\r\n }\r\n\r\n public parseElement(element: CardElement, source: any, context: SerializationContext) {\r\n // Do nothing in base implementation\r\n }\r\n\r\n public anchorClicked(element: CardElement, anchor: HTMLAnchorElement): boolean {\r\n // Not handled by the host container by default\r\n return false;\r\n }\r\n\r\n public getHostConfig(): HostConfig {\r\n return new HostConfig(hostConfig);\r\n }\r\n\r\n public requiresOverflowStyling(): boolean {\r\n // By default, overflow styling is not handled\r\n return false;\r\n }\r\n\r\n public adjustStyleForBackground(): void {\r\n // By default, we make no adjustments\r\n return;\r\n }\r\n\r\n supportsActionBar: boolean = false;\r\n\r\n get cardHost(): HTMLElement {\r\n return this._cardHost;\r\n }\r\n\r\n get isFixedHeight(): boolean {\r\n return false;\r\n }\r\n\r\n get elementsRegistry(): CardObjectRegistry {\r\n return this._elementsRegistry;\r\n }\r\n\r\n get actionsRegistry(): CardObjectRegistry {\r\n return this._actionsRegistry;\r\n }\r\n\r\n get targetVersion(): Version {\r\n return Versions.v1_0;\r\n }\r\n\r\n get enableDeviceEmulation(): boolean {\r\n return false;\r\n }\r\n\r\n get supportsMultipleSizes(): boolean {\r\n // By default, we do not support different container sizes\r\n return false;\r\n }\r\n\r\n // if various containers support different themes in the future, we can override this method\r\n static get supportedContainerThemes(): string[] {\r\n return Object.values(ColorTheme);\r\n }\r\n\r\n get supportsMultipleThemes(): boolean {\r\n // By default, we do not support different color themes\r\n return false;\r\n }\r\n\r\n set colorTheme(value: ColorTheme) {\r\n // Not handled by the host container by default\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport * from \"./host-container\";\r\nexport * from \"./default/default-container\";\r\nexport * from \"./widget/widget-container\";\r\nexport * from \"./bf-image/bf-image-container\";\r\nexport * from \"./cortana-classic/cortana-classic-container\";\r\nexport * from \"./cortana/cortana-container\"\r\nexport * from \"./notifications/toast-container\";\r\nexport * from \"./outlook/outlook-container\";\r\nexport * from \"./skype/skype-container\";\r\nexport * from \"./teams/teams-container\";\r\nexport * from \"./timeline/timeline-container\";\r\nexport * from \"./webchat/webchat-container\";\r\nexport * from \"./viva-connections/viva-connections-container\";\r\nexport * from \"./federated-search/federated-search-container\";\r\n","import * as Adaptive from \"adaptivecards\";\r\nimport { HostContainer } from \"./host-container\";\r\n\r\nexport enum ColorTheme {\r\n Light = \"Light\",\r\n Dark = \"Dark\"\r\n}\r\n\r\nexport abstract class MultiThemeHostContainer extends HostContainer {\r\n private _colorTheme: ColorTheme = ColorTheme.Light;\r\n private _cssFileName: string;\r\n private _hostConfigLight: any;\r\n private _hostConfigDark: any;\r\n private _lightBackground: string;\r\n private _darkBackground: string;\r\n\r\n constructor(\r\n name: string,\r\n cssFileName: string,\r\n hostConfigLight: any,\r\n hostConfigDark: any,\r\n lightBackground: string,\r\n darkBackground: string\r\n ) {\r\n super(name);\r\n\r\n this._cssFileName = cssFileName;\r\n this._hostConfigLight = hostConfigLight;\r\n this._hostConfigDark = hostConfigDark;\r\n this._lightBackground = lightBackground;\r\n this._darkBackground = darkBackground;\r\n }\r\n\r\n public getCurrentStyleSheet(): string {\r\n return `containers/${this._cssFileName}-${this._colorTheme.toLowerCase()}.css`;\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(\r\n this._colorTheme === ColorTheme.Light ? this._hostConfigLight : this._hostConfigDark\r\n );\r\n }\r\n\r\n public getBackgroundColor(): string {\r\n return this._colorTheme === ColorTheme.Light ? this._lightBackground : this._darkBackground;\r\n }\r\n\r\n set colorTheme(value: ColorTheme) {\r\n this._colorTheme = value;\r\n }\r\n\r\n get supportsMultipleThemes(): boolean {\r\n return true;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/windows-notification.json\";\r\n\r\nexport class ToastContainer extends SingleThemeHostContainer {\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"toast-card\");\r\n\r\n let frame = document.createElement(\"div\");\r\n frame.className = \"toast-frame\";\r\n frame.appendChild(this.cardHost);\r\n\r\n hostElement.appendChild(frame);\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/outlook-desktop.json\";\r\n\r\nexport class OutlookContainer extends SingleThemeHostContainer {\r\n constructor(name: string, styleSheet: string) {\r\n super(name, styleSheet);\r\n\r\n this.actionsRegistry.unregister(\"Action.Submit\");\r\n this.actionsRegistry.register(\"Action.Http\", Adaptive.HttpAction);\r\n }\r\n\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"outlook-frame\");\r\n hostElement.appendChild(this.cardHost);\r\n }\r\n\r\n public initialize() {\r\n super.initialize();\r\n\r\n Adaptive.GlobalSettings.useMarkdownInRadioButtonAndCheckbox = false;\r\n }\r\n\r\n private parsePadding(source: any): Adaptive.PaddingDefinition {\r\n if (source) {\r\n if (typeof source === \"string\") {\r\n var uniformPadding = Adaptive.parseEnum(Adaptive.Spacing, source, Adaptive.Spacing.None);\r\n\r\n return new Adaptive.PaddingDefinition(\r\n uniformPadding,\r\n uniformPadding,\r\n uniformPadding,\r\n uniformPadding);\r\n }\r\n else if (typeof source === \"object\") {\r\n return new Adaptive.PaddingDefinition(\r\n Adaptive.parseEnum(Adaptive.Spacing, source[\"top\"], Adaptive.Spacing.None),\r\n Adaptive.parseEnum(Adaptive.Spacing, source[\"right\"], Adaptive.Spacing.None),\r\n Adaptive.parseEnum(Adaptive.Spacing, source[\"bottom\"], Adaptive.Spacing.None),\r\n Adaptive.parseEnum(Adaptive.Spacing, source[\"left\"], Adaptive.Spacing.None));\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n public parseElement(element: Adaptive.CardElement, source: any, context: Adaptive.SerializationContext) {\r\n if (element instanceof Adaptive.Container && typeof source[\"rtl\"] === \"boolean\") {\r\n element.rtl = source[\"rtl\"];\r\n }\r\n\r\n if (element instanceof Adaptive.AdaptiveCard) {\r\n var card = element;\r\n var actionArray: Array = [];\r\n\r\n card[\"resources\"] = { actions: actionArray };\r\n\r\n if (typeof source[\"resources\"] === \"object\") {\r\n var actionResources = source[\"resources\"][\"actions\"] as Array;\r\n\r\n for (let i = 0; i < actionResources.length; i++) {\r\n let action = this.actionsRegistry.createInstance(actionResources[i][\"type\"], context.targetVersion);\r\n\r\n if (action) {\r\n action.parse(actionResources[i], context);\r\n action.setParent(card);\r\n\r\n actionArray.push(action);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (element instanceof Adaptive.Image) {\r\n (element).backgroundColor = source[\"backgroundColor\"];\r\n }\r\n\r\n if (element instanceof Adaptive.Container) {\r\n var padding = this.parsePadding(source[\"padding\"]);\r\n\r\n if (padding) {\r\n (element).padding = padding;\r\n }\r\n }\r\n\r\n if (element instanceof Adaptive.ColumnSet) {\r\n var padding = this.parsePadding(source[\"padding\"]);\r\n\r\n if (padding) {\r\n (element).padding = padding;\r\n }\r\n }\r\n }\r\n\r\n public anchorClicked(element: Adaptive.CardElement, anchor: HTMLAnchorElement): boolean {\r\n var regEx = /^action:([a-z0-9]+)$/ig;\r\n var rootCard = element.getRootElement() as Adaptive.AdaptiveCard;\r\n var matches = regEx.exec(anchor.href);\r\n\r\n if (matches) {\r\n var actionId = matches[1];\r\n\r\n if (rootCard) {\r\n var actionArray = rootCard[\"resources\"][\"actions\"] as Array;\r\n\r\n for (let i = 0; i < actionArray.length; i++) {\r\n if (actionArray[i].id == actionId) {\r\n actionArray[i].execute();\r\n\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return Adaptive.Versions.v1_4;\r\n }\r\n\r\n get enableDeviceEmulation(): boolean {\r\n return true;\r\n }\r\n}\r\n","import { HostContainer } from \"./host-container\";\r\n\r\nexport abstract class SingleThemeHostContainer extends HostContainer {\r\n private _styleSheet: string;\r\n\r\n constructor(name: string, styleSheet: string) {\r\n super(name);\r\n this._styleSheet = styleSheet;\r\n }\r\n\r\n public getCurrentStyleSheet(): string {\r\n return this._styleSheet;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/skype.json\";\r\n\r\nexport class SkypeContainer extends SingleThemeHostContainer {\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"skype-card\");\r\n\r\n var frame = document.createElement(\"div\");\r\n frame.className = \"skype-frame\";\r\n\r\n // Draw the hexagon bot logo\r\n var hexagonOuter = document.createElement(\"div\");\r\n hexagonOuter.className = \"skype-hexagon-outer\";\r\n\r\n var hexagonInner = document.createElement(\"div\");\r\n hexagonInner.className = \"skype-hexagon-inner\";\r\n\r\n var botLogo = document.createElement(\"div\");\r\n botLogo.className = \"skype-bot-logo\";\r\n\r\n hexagonOuter.appendChild(hexagonInner);\r\n hexagonInner.appendChild(botLogo);\r\n\r\n frame.appendChild(hexagonOuter);\r\n frame.appendChild(this.cardHost);\r\n\r\n hostElement.appendChild(frame);\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { MultiThemeHostContainer } from \"../multi-theme-host-container\";\r\nimport * as hostConfigLight from \"../../hostConfigs/microsoft-teams-light.json\";\r\nimport * as hostConfigDark from \"../../hostConfigs/microsoft-teams-dark.json\";\r\n\r\nexport class TeamsContainer extends MultiThemeHostContainer {\r\n constructor() {\r\n super(\r\n \"Microsoft Teams\",\r\n \"teams-container\",\r\n hostConfigLight,\r\n hostConfigDark,\r\n \"#F6F6F6\",\r\n \"#201E1F\"\r\n );\r\n }\r\n\r\n public renderTo(hostElement: HTMLElement) {\r\n var outerFrame = document.createElement(\"div\");\r\n outerFrame.className = \"teams-frame\";\r\n\r\n // Draw the hexagon bot logo\r\n var hexagonOuter = document.createElement(\"div\");\r\n hexagonOuter.className = \"teams-hexagon-outer\";\r\n\r\n var hexagonInner = document.createElement(\"div\");\r\n hexagonInner.className = \"teams-hexagon-inner\";\r\n\r\n var botLogo = document.createElement(\"div\");\r\n botLogo.className = \"teams-bot-logo\";\r\n\r\n hexagonOuter.appendChild(hexagonInner);\r\n hexagonInner.appendChild(botLogo);\r\n\r\n outerFrame.appendChild(hexagonOuter);\r\n\r\n let innerFrame = document.createElement(\"div\");\r\n innerFrame.className = \"teams-inner-frame\";\r\n\r\n this.cardHost.classList.add(\"teams-card\");\r\n\r\n let botNameAndTime = document.createElement(\"div\");\r\n botNameAndTime.className = \"teams-botNameAndTime\";\r\n botNameAndTime.innerText = \"Test Bot 2:36 PM\";\r\n\r\n innerFrame.appendChild(botNameAndTime);\r\n innerFrame.appendChild(this.cardHost);\r\n\r\n outerFrame.appendChild(innerFrame);\r\n\r\n hostElement.appendChild(outerFrame);\r\n }\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return Adaptive.Versions.v1_5;\r\n }\r\n\r\n get enableDeviceEmulation(): boolean {\r\n return true;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/windows-timeline.json\";\r\n\r\nexport class TimelineContainer extends SingleThemeHostContainer {\r\n public initialize() {\r\n super.initialize();\r\n\r\n Adaptive.GlobalSettings.useMarkdownInRadioButtonAndCheckbox = true;\r\n Adaptive.GlobalSettings.useAdvancedCardBottomTruncation = true;\r\n Adaptive.GlobalSettings.useAdvancedTextBlockTruncation = true;\r\n }\r\n\r\n public renderTo(hostElement: HTMLElement) {\r\n let target = document.getElementById(\"designerHost\");\r\n let frame = document.createElement(\"div\");\r\n frame.className = \"timeline-frame\";\r\n target.appendChild(frame);\r\n\r\n let cardContainer = document.createElement(\"div\");\r\n cardContainer.className = \"timeline-card\";\r\n frame.appendChild(cardContainer);\r\n\r\n this.cardHost.style.height = \"100%\";\r\n this.cardHost.style.width = \"100%\";\r\n this.cardHost.style.overflow = \"hidden\";\r\n\r\n cardContainer.appendChild(this.cardHost);\r\n hostElement.appendChild(frame);\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n\r\n get isFixedHeight(): boolean {\r\n return true;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { MultiThemeHostContainer } from \"../multi-theme-host-container\";\r\nimport * as hostConfigLight from \"../../hostConfigs/viva-connections-light.json\";\r\nimport * as hostConfigDark from \"../../hostConfigs/viva-connections-dark.json\";\r\n\r\nexport class VivaConnectionsContainer extends MultiThemeHostContainer {\r\n constructor() {\r\n super(\r\n \"Viva Connections\",\r\n \"viva-connections-container\",\r\n hostConfigLight,\r\n hostConfigDark,\r\n \"#F6F6F6\",\r\n \"#1b1a19\"\r\n );\r\n }\r\n\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"vivaConnectionsContainer\");\r\n\r\n let vcContainer = document.createElement(\"div\");\r\n vcContainer.className = \"vivaConnectionsContainer\";\r\n vcContainer.appendChild(this.cardHost);\r\n\r\n hostElement.appendChild(vcContainer);\r\n }\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return Adaptive.Versions.v1_5;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { SingleThemeHostContainer } from \"../single-theme-host-container\";\r\nimport * as hostConfig from \"../../hostConfigs/webchat.json\";\r\n\r\nexport class WebChatContainer extends SingleThemeHostContainer {\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.add(\"webChatOuterContainer\");\r\n\r\n let frame = document.createElement(\"div\");\r\n frame.className = \"webChatInnerContainer\";\r\n frame.appendChild(this.cardHost);\r\n\r\n hostElement.appendChild(frame);\r\n }\r\n\r\n public getHostConfig(): Adaptive.HostConfig {\r\n return new Adaptive.HostConfig(hostConfig);\r\n }\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return Adaptive.Versions.v1_6;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { MultiThemeHostContainer } from \"../multi-theme-host-container\";\r\nimport * as hostConfigLight from \"../../hostConfigs/widget-light.json\";\r\nimport * as hostConfigDark from \"../../hostConfigs/widget-dark.json\";\r\n\r\nexport enum ContainerSize {\r\n Small = \"Small\",\r\n Medium = \"Medium\",\r\n Large = \"Large\"\r\n}\r\n\r\nexport class WidgetContainer extends MultiThemeHostContainer {\r\n private _containerSize: ContainerSize;\r\n private _outerFrame: HTMLDivElement;\r\n\r\n constructor(size: ContainerSize) {\r\n super(\r\n \"Widgets Board\",\r\n \"widget-container\",\r\n hostConfigLight,\r\n hostConfigDark,\r\n \"#D2D2D2\",\r\n \"#616161\"\r\n );\r\n this._containerSize = size;\r\n }\r\n \r\n static readonly widgetPadding: number = 16;\r\n\r\n public initialize(): void {\r\n super.initialize();\r\n Adaptive.GlobalSettings.removePaddingFromContainersWithBackgroundImage = true;\r\n }\r\n\r\n public renderTo(hostElement: HTMLElement) {\r\n this.cardHost.classList.remove(\r\n \"widget-small-card\",\r\n \"widget-medium-card\",\r\n \"widget-large-card\"\r\n );\r\n this.cardHost.classList.add(`widget-${this._containerSize.toLowerCase()}-card`);\r\n this._outerFrame = document.createElement(\"div\");\r\n this._outerFrame.classList.add(\"widget-outer-container\");\r\n this._outerFrame.classList.add(`widget-${this._containerSize.toLowerCase()}-container`);\r\n\r\n const header = document.createElement(\"div\");\r\n header.className = \"widget-header\";\r\n this._outerFrame.appendChild(header);\r\n\r\n const headerText = document.createElement(\"p\");\r\n headerText.className = \"widget-header-text\";\r\n headerText.textContent = \"Widget Header\";\r\n header.appendChild(headerText);\r\n\r\n const moreButton = document.createElement(\"div\");\r\n moreButton.className = \"widget-header-more-button\";\r\n moreButton.setAttribute(\"role\", \"button\");\r\n moreButton.tabIndex = 0;\r\n header.appendChild(moreButton);\r\n\r\n const innerFrame = document.createElement(\"div\");\r\n innerFrame.className = \"widget-inner-container\";\r\n innerFrame.appendChild(this.cardHost);\r\n\r\n this._outerFrame.appendChild(innerFrame);\r\n hostElement.appendChild(this._outerFrame);\r\n }\r\n\r\n public requiresOverflowStyling(): boolean {\r\n const renderedCard = document.getElementsByClassName(\"ac-adaptiveCard\")[0] as HTMLElement;\r\n\r\n const cardHeight = renderedCard.getBoundingClientRect().height;\r\n const widgetHeight = this.cardHost.getBoundingClientRect().height;\r\n \r\n if (cardHeight > widgetHeight) {\r\n this.applyWidgetOverflowStyling(renderedCard);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private applyWidgetOverflowStyling(renderedCard: HTMLElement) {\r\n renderedCard.style.height = \"100%\";\r\n\r\n const cardElementsWrapper = this.addCardElementsWrapper(renderedCard);\r\n cardElementsWrapper.classList.add(\"no-overflow\");\r\n\r\n const carouselElements = renderedCard.getElementsByClassName(\"ac-carousel-container\");\r\n\r\n for (let i = 0; i < carouselElements.length; i++) {\r\n const currentCarousel = carouselElements[i] as HTMLElement;\r\n\r\n const carouselRect = currentCarousel.getBoundingClientRect();\r\n const wrapperRect = cardElementsWrapper.getBoundingClientRect();\r\n\r\n // pagination will be in the bottom 16px of a carousel\r\n const paginationTop = carouselRect.bottom - 16;\r\n const paginationBottom = carouselRect.bottom;\r\n\r\n const paginationOverlapsBoundary = ((paginationBottom >= wrapperRect.bottom) && (paginationBottom < (wrapperRect.bottom + WidgetContainer.widgetPadding)) ||\r\n (paginationTop >= wrapperRect.bottom) && (paginationTop < (wrapperRect.bottom + WidgetContainer.widgetPadding)));\r\n\r\n if (paginationOverlapsBoundary) {\r\n // Hide overflow on the cardElement instead of the wrapper since pagination dots are in the margin\r\n renderedCard.classList.add(\"no-overflow\");\r\n cardElementsWrapper.classList.remove(\"no-overflow\");\r\n\r\n // Add the padding to the carousel if the pagination dots are in the margin\r\n currentCarousel.style.marginBottom = WidgetContainer.widgetPadding + \"px\";\r\n break;\r\n }\r\n }\r\n }\r\n \r\n private addCardElementsWrapper(parentElement: Element): HTMLElement {\r\n const cardElementsWrapper = document.createElement(\"div\");\r\n cardElementsWrapper.classList.add(\"ac-card-elements-wrapper\");\r\n\r\n Array.from(parentElement.children).forEach((child) => {\r\n cardElementsWrapper.appendChild(child);\r\n })\r\n\r\n parentElement.appendChild(cardElementsWrapper);\r\n return cardElementsWrapper;\r\n }\r\n \r\n public adjustStyleForBackground() {\r\n this._outerFrame.classList.remove(\r\n \"widget-small-container-no-border\",\r\n \"widget-medium-container-no-border\",\r\n \"widget-large-container-no-border\"\r\n );\r\n\r\n const renderedCard = document.getElementsByClassName(\"ac-adaptiveCard\")[0] as HTMLElement;\r\n if (renderedCard.style.backgroundImage) {\r\n // If there is a background image present, we should remove the border\r\n this._outerFrame.classList.add(`widget-${this._containerSize.toLowerCase()}-container-no-border`);\r\n }\r\n }\r\n\r\n get targetVersion(): Adaptive.Version {\r\n return Adaptive.Versions.v1_6;\r\n }\r\n\r\n get isFixedHeight(): boolean {\r\n return true;\r\n }\r\n\r\n set containerSize(value: ContainerSize) {\r\n this._containerSize = value;\r\n }\r\n\r\n get supportsMultipleSizes(): boolean {\r\n return true;\r\n }\r\n\r\n static get supportedContainerSizes(): string[] {\r\n return Object.values(ContainerSize);\r\n }\r\n}\r\n","import { BaseTreeItem } from \"./base-tree-item\";\r\nimport * as Data from \"./data\";\r\n\r\nexport class DataTreeItem extends BaseTreeItem {\r\n private _children: Array = null;\r\n\r\n private buildChildList() {\r\n if (!this._children) {\r\n this._children = [];\r\n\r\n let properties = this.field.children;\r\n\r\n if (properties) {\r\n let keys = Object.keys(properties);\r\n\r\n for (let key of keys) {\r\n this._children.push(new DataTreeItem(properties[key]));\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected getLabelText(): string {\r\n return this.field.displayName;\r\n }\r\n\r\n protected getAdditionalText(): string {\r\n return this.field.valueType;\r\n }\r\n\r\n protected getAdditionalTextClass(): string {\r\n return \"acd-data-tree-item-additionalText\";\r\n }\r\n\r\n readonly field: Data.FieldDefinition;\r\n\r\n constructor(field: Data.FieldDefinition) {\r\n super();\r\n\r\n this.field = field;\r\n\r\n this._level = 0;\r\n\r\n let currentField = field;\r\n\r\n while (currentField) {\r\n this._level++;\r\n\r\n currentField = currentField.parent;\r\n }\r\n }\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n\r\n getChildCount(): number {\r\n this.buildChildList();\r\n\r\n return this._children.length;\r\n }\r\n\r\n getChildAt(index: number): DataTreeItem {\r\n this.buildChildList();\r\n\r\n return this._children[index];\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nfunction shouldUseIndexerSyntax(name: string): boolean {\r\n let regEx = /[a-zA-Z0-9_$]*/;\r\n let matches = regEx.exec(name);\r\n\r\n // If name doesn't only contain letters/digits/_\r\n // the accessor must use the indexer syntax\r\n return !(matches && matches[0] === name);\r\n} \r\n\r\nexport type ValueType = \"String\" | \"Boolean\" | \"Number\" | \"Array\" | \"Object\";\r\n\r\nexport interface IStringData {\r\n valueType: \"String\"\r\n sampleValue?: string;\r\n}\r\n\r\nexport interface INumberData {\r\n valueType: \"Number\"\r\n sampleValue?: number;\r\n}\r\n\r\nexport interface IBooleanData {\r\n valueType: \"Boolean\"\r\n sampleValue?: boolean;\r\n}\r\n\r\nexport interface IArrayData {\r\n valueType: \"Array\";\r\n itemType: IData;\r\n}\r\n\r\nexport interface IObjectData {\r\n valueType: \"Object\";\r\n fields: IField[];\r\n}\r\n\r\nexport type IData = IStringData | IBooleanData | INumberData | IArrayData | IObjectData;\r\n\r\nexport interface IDataField {\r\n name: string;\r\n displayName: string;\r\n}\r\n\r\nexport interface IStringField extends IDataField, IStringData { }\r\nexport interface INumberField extends IDataField, INumberData { }\r\nexport interface IBooleanField extends IDataField, IBooleanData { }\r\nexport interface IObjectField extends IDataField, IObjectData { }\r\nexport interface IArrayField extends IDataField, IArrayData { }\r\n\r\nexport type IField = IStringField | INumberField | IBooleanField | IObjectField | IArrayField;\r\n\r\nexport abstract class DataType {\r\n static parse(parent: FieldDefinition, data: IData): DataType {\r\n switch (data.valueType) {\r\n case \"String\":\r\n return new ValueTypeData(parent, \"Sample data\", data.sampleValue);\r\n case \"Number\":\r\n return new ValueTypeData(parent, 123, data.sampleValue);\r\n case \"Boolean\":\r\n return new ValueTypeData(parent, true, data.sampleValue);\r\n case \"Array\":\r\n return ArrayData.parse(parent, data);\r\n case \"Object\":\r\n return ObjectData.parse(parent, data);\r\n }\r\n }\r\n\r\n static deriveFrom(parent: FieldDefinition, value: any): DataType {\r\n if (typeof value === \"string\") {\r\n return new ValueTypeData(parent, \"Sample data\", value);\r\n }\r\n else if (typeof value === \"boolean\") {\r\n return new ValueTypeData(parent, true, value);\r\n }\r\n else if (typeof value === \"number\") {\r\n return new ValueTypeData(parent, 123, value);\r\n }\r\n else if (typeof value === \"object\") {\r\n if (Array.isArray(value)) {\r\n return ArrayData.deriveFrom(parent, value);\r\n }\r\n else {\r\n return ObjectData.deriveFrom(parent, value);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Unsupported data type: \" + typeof value);\r\n }\r\n }\r\n\r\n constructor(readonly owner: FieldDefinition) {}\r\n\r\n abstract generateSampleData(): any;\r\n\r\n getChildFields(): FieldDefinition[] {\r\n return null;\r\n }\r\n\r\n qualifyFieldName(fieldName: string, fieldIsLeaf: boolean) {\r\n return fieldName;\r\n }\r\n\r\n abstract get valueType(): ValueType;\r\n\r\n get isCollection(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class ValueTypeData extends DataType {\r\n private _sampleValue: T;\r\n\r\n constructor(\r\n readonly owner: FieldDefinition,\r\n readonly defaultSampleValue: T,\r\n sampleValue?: T) {\r\n super(owner);\r\n\r\n this._sampleValue = sampleValue;\r\n }\r\n\r\n generateSampleData(): T {\r\n return this.sampleValue ? this.sampleValue : this.defaultSampleValue;\r\n }\r\n\r\n get sampleValue() {\r\n return this._sampleValue;\r\n }\r\n\r\n get valueType(): ValueType {\r\n switch (typeof this.defaultSampleValue) {\r\n case \"string\":\r\n return \"String\";\r\n case \"number\":\r\n return \"Number\";\r\n case \"boolean\":\r\n return \"Boolean\";\r\n }\r\n }\r\n}\r\n\r\nexport class ArrayData extends DataType {\r\n static parse(parent: FieldDefinition, data: IArrayData): ArrayData {\r\n let result = new ArrayData(parent);\r\n result.dataType = DataType.parse(parent, data.itemType);\r\n\r\n return result;\r\n }\r\n\r\n static deriveFrom(parent: FieldDefinition, input: object): ArrayData {\r\n if (!Array.isArray(input)) {\r\n throw new Error(\"Input is not an array.\");\r\n }\r\n\r\n let result = new ArrayData(parent);\r\n\r\n if (input.length > 0) {\r\n result.dataType = DataType.deriveFrom(parent, input[0]);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n dataType: DataType = undefined;\r\n\r\n constructor(readonly owner: FieldDefinition) {\r\n super(owner);\r\n }\r\n\r\n generateSampleData(): any {\r\n let result = [];\r\n\r\n if (this.dataType) {\r\n for (let i = 1; i <= 3; i++) {\r\n result.push(this.dataType.generateSampleData());\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getChildFields(): FieldDefinition[] {\r\n return this.dataType ? this.dataType.getChildFields() : [];\r\n }\r\n\r\n qualifyFieldName(fieldName: string, fieldIsLeaf: boolean) {\r\n if (!fieldIsLeaf) {\r\n return fieldName + \"[0]\";\r\n }\r\n else {\r\n return super.qualifyFieldName(fieldName, fieldIsLeaf);\r\n }\r\n }\r\n\r\n get isCollection(): boolean {\r\n return true;\r\n }\r\n\r\n get valueType(): ValueType {\r\n return \"Array\";\r\n }\r\n}\r\n\r\nexport class ObjectData extends DataType {\r\n static parse(parent: FieldDefinition, data: IObjectData): ObjectData {\r\n let result = new ObjectData(parent);\r\n\r\n for (let field of data.fields) {\r\n let fieldDefinition = new FieldDefinition(parent);\r\n fieldDefinition.name = field.name;\r\n fieldDefinition.displayName = field.displayName;\r\n fieldDefinition.dataType = DataType.parse(fieldDefinition, field);\r\n\r\n result.fields.push(fieldDefinition);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n static deriveFrom(parent: FieldDefinition, input: object): ObjectData {\r\n let result = new ObjectData(parent);\r\n\r\n if (input !== null) {\r\n for (let key of Object.keys(input)) {\r\n let field = new FieldDefinition(parent);\r\n field.dataType = DataType.deriveFrom(field, input[key]);\r\n field.name = key;\r\n\r\n result.fields.push(field);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n readonly fields: FieldDefinition[] = [];\r\n\r\n constructor(readonly owner: FieldDefinition) {\r\n super(owner);\r\n }\r\n\r\n generateSampleData(): any {\r\n let result = {};\r\n\r\n for (let field of this.fields) {\r\n result[field.name] = field.dataType.generateSampleData();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getChildFields(): FieldDefinition[] {\r\n return this.fields;\r\n }\r\n\r\n get valueType(): ValueType {\r\n return \"Object\";\r\n }\r\n}\r\n\r\nexport class FieldDefinition {\r\n static parse(data: IData): FieldDefinition {\r\n let field = new FieldDefinition(null);\r\n field.name = \"$root\";\r\n field.dataType = DataType.parse(field, data);\r\n\r\n return field;\r\n }\r\n\r\n static deriveFrom(input: any): FieldDefinition {\r\n let field = new FieldDefinition(null);\r\n field.name = \"$root\";\r\n field.dataType = DataType.deriveFrom(field, input);\r\n\r\n return field;\r\n }\r\n\r\n private _displayName: string;\r\n\r\n name: string;\r\n dataType: DataType;\r\n\r\n constructor(readonly parent: FieldDefinition) {}\r\n\r\n asExpression(): string {\r\n return \"${\" + this.getPath() + \"}\";\r\n }\r\n\r\n getPath(asLeaf: boolean = true): string {\r\n let currentField: FieldDefinition = this;\r\n let path: FieldDefinition[] = [];\r\n\r\n while (currentField) {\r\n path.push(currentField);\r\n\r\n currentField = currentField.parent;\r\n }\r\n\r\n let result = \"\";\r\n let forceIndexerSyntax: boolean = false;\r\n\r\n for (let i = path.length - 1; i >= 0; i--) {\r\n let qualifiedName = path[i].qualifiedName(false)\r\n\r\n if (shouldUseIndexerSyntax(qualifiedName) || forceIndexerSyntax) {\r\n qualifiedName = \"['\" + qualifiedName + \"']\";\r\n\r\n forceIndexerSyntax = true;\r\n }\r\n else {\r\n if (result) {\r\n result += \".\";\r\n }\r\n }\r\n\r\n result += qualifiedName;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n qualifiedName(asLeaf: boolean): string {\r\n return this.dataType.qualifyFieldName(this.name, asLeaf);\r\n }\r\n\r\n get displayName(): string {\r\n return this._displayName ? this._displayName : this.name;\r\n }\r\n\r\n set displayName(value: string) {\r\n this._displayName = value;\r\n }\r\n\r\n get children(): FieldDefinition[] {\r\n return this.dataType.getChildFields();\r\n }\r\n\r\n get isCollection(): boolean {\r\n return this.dataType.isCollection;\r\n }\r\n\r\n get valueType(): string {\r\n return this.dataType.valueType;\r\n }\r\n}\r\n","// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { BaseTreeItem } from \"./base-tree-item\";\r\nimport { DesignerPeer, CardElementPeer } from \"./designer-peers\";\r\n\r\nexport class DesignerPeerTreeItem extends BaseTreeItem {\r\n private computeLevel() {\r\n this._level = 0;\r\n\r\n let peer = this.owner;\r\n\r\n while (peer) {\r\n this._level++;\r\n\r\n peer = peer.parent;\r\n }\r\n\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n (this.getChildAt(i) as DesignerPeerTreeItem).computeLevel();\r\n }\r\n }\r\n\r\n protected getIconClass(): string {\r\n return this.owner.registration.iconClass;\r\n }\r\n\r\n protected getLabelText(): string {\r\n return this.owner.getCardObject().getJsonTypeName();\r\n }\r\n\r\n protected getAdditionalText(): string {\r\n return this.owner.getTreeItemText();\r\n }\r\n\r\n protected selectedChanged(scrollIntoView: boolean) {\r\n super.selectedChanged(scrollIntoView);\r\n\r\n this.owner.isSelected = this.isSelected;\r\n }\r\n\r\n readonly owner: DesignerPeer;\r\n\r\n constructor(owner: DesignerPeer, isExpanded: boolean = true) {\r\n super(isExpanded);\r\n\r\n this.owner = owner;\r\n this.owner.onParentChanged = (sender: DesignerPeer) => {\r\n this.computeLevel();\r\n }\r\n\r\n this.computeLevel();\r\n }\r\n\r\n getChildCount(): number {\r\n return this.owner.getChildCount();\r\n }\r\n\r\n getChildAt(index: number): BaseTreeItem {\r\n return this.owner.getChildAt(index).treeItem;\r\n }\r\n\r\n protected click(e: MouseEvent) {\r\n super.click(e);\r\n\r\n let currentPeer = this.owner;\r\n\r\n while (currentPeer) {\r\n if (currentPeer instanceof CardElementPeer && currentPeer.bringCardElementIntoView()) {\r\n break;\r\n }\r\n currentPeer = currentPeer.parent;\r\n }\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport * as Controls from \"adaptivecards-controls\";\r\nimport { DraggableElement } from \"./draggable-element\";\r\nimport { PeerCommand } from \"./peer-command\";\r\nimport { CardDesignerSurface, DesignContext } from \"./card-designer-surface\";\r\nimport { DesignerPeerTreeItem } from \"./designer-peer-treeitem\";\r\nimport { Rect, IPoint, Utils } from \"./miscellaneous\";\r\nimport { GlobalSettings } from \"./shared\";\r\nimport { FieldPicker } from \"./field-picker\";\r\nimport { Strings } from \"./strings\";\r\n\r\nexport abstract class DesignerPeerInplaceEditor {\r\n onClose: (applyChanges: boolean) => void;\r\n\r\n abstract initialize();\r\n abstract applyChanges();\r\n abstract render(): HTMLElement;\r\n}\r\n\r\nexport abstract class CardElementPeerInplaceEditor extends DesignerPeerInplaceEditor {\r\n readonly cardElement: TCardElement;\r\n\r\n constructor(cardElement: TCardElement) {\r\n super();\r\n\r\n this.cardElement = cardElement;\r\n }\r\n}\r\n\r\nexport class DesignerPeerRegistrationBase {\r\n private _iconClass?: string;\r\n\r\n readonly category: string;\r\n\r\n constructor(category: string, iconClass?: string) {\r\n this.category = category;\r\n this._iconClass = iconClass;\r\n }\r\n\r\n get iconClass(): string {\r\n return this._iconClass ? this._iconClass : \"acd-icon-defaultElementIcon\";\r\n }\r\n}\r\n\r\nexport class DesignerPeerRegistration extends DesignerPeerRegistrationBase{\r\n readonly sourceType: TSource;\r\n\r\n peerType: TPeer;\r\n\r\n constructor(sourceType: TSource, peerType: TPeer, category: string, iconClass: string = null) {\r\n super(category, iconClass);\r\n\r\n this.sourceType = sourceType;\r\n this.peerType = peerType;\r\n }\r\n}\r\n\r\nexport class PropertySheetCategory {\r\n static readonly DefaultCategory = \"__defaultCategory\";\r\n static readonly LayoutCategory = \"Layout\";\r\n static readonly StyleCategory = \"Style\";\r\n static readonly SelectionAction = \"Selection action\";\r\n static readonly InlineAction = \"Inline action\";\r\n static readonly Validation = \"Validation\";\r\n static readonly Refresh = \"Refresh\";\r\n\r\n private _entries: PropertySheetEntry[] = [];\r\n\r\n constructor(readonly name: string) { }\r\n\r\n render(container: Adaptive.Container, context: PropertySheetContext, displayCategoryName: boolean) {\r\n let entriesToRender: PropertySheetEntry[] = [];\r\n\r\n for (let entry of this._entries) {\r\n if (Adaptive.isVersionLessOrEqual(entry.targetVersion, context.designContext.targetVersion)) {\r\n entriesToRender.push(entry);\r\n }\r\n }\r\n\r\n if (entriesToRender.length > 0) {\r\n if (displayCategoryName) {\r\n let header = new Adaptive.TextBlock();\r\n header.separator = true;\r\n header.text = \"**\" + (this.name === PropertySheetCategory.DefaultCategory ? context.peer.getCardObject().getJsonTypeName() : this.name) + \"**\";\r\n\r\n container.addItem(header);\r\n }\r\n\r\n for (let entry of entriesToRender) {\r\n if (Adaptive.isVersionLessOrEqual(entry.targetVersion, context.designContext.targetVersion)) {\r\n container.addItem(entry.render(context));\r\n }\r\n }\r\n }\r\n }\r\n\r\n add(...entries: PropertySheetEntry[]) {\r\n this._entries = this._entries.concat(entries);\r\n }\r\n\r\n remove(...entries: PropertySheetEntry[]) {\r\n for (let entry of entries) {\r\n let index: number;\r\n\r\n do {\r\n let index = this._entries.indexOf(entry);\r\n\r\n if (index >= 0) {\r\n this._entries.splice(index, 1);\r\n }\r\n } while (index >= 0);\r\n }\r\n }\r\n\r\n getEntryAt(index: number): PropertySheetEntry {\r\n return this._entries[index];\r\n }\r\n\r\n get length(): number {\r\n return this._entries.length;\r\n }\r\n}\r\n\r\nexport class PropertySheet {\r\n private _categories: { [key: string]: PropertySheetCategory } = {};\r\n\r\n constructor(readonly displayCategoryNames: boolean = true) {\r\n this._categories[PropertySheetCategory.DefaultCategory] = new PropertySheetCategory(PropertySheetCategory.DefaultCategory);\r\n this._categories[PropertySheetCategory.LayoutCategory] = new PropertySheetCategory(PropertySheetCategory.LayoutCategory);\r\n this._categories[PropertySheetCategory.StyleCategory] = new PropertySheetCategory(PropertySheetCategory.StyleCategory);\r\n }\r\n\r\n add(categoryName: string, ...entries: PropertySheetEntry[]) {\r\n let category = this._categories[categoryName];\r\n\r\n if (!category) {\r\n category = new PropertySheetCategory(categoryName);\r\n\r\n this._categories[categoryName] = category;\r\n }\r\n\r\n category.add(...entries);\r\n }\r\n\r\n addActionProperties(\r\n targetVersion: Adaptive.Version,\r\n peer: DesignerPeer,\r\n action: Adaptive.Action,\r\n category: string,\r\n excludeProperties: PropertySheetEntry[] = [ ActionPeer.iconUrlProperty, ActionPeer.styleProperty, ActionPeer.modeProperty ]) {\r\n let actionPeer = CardDesignerSurface.actionPeerRegistry.createPeerInstance(peer.designerSurface, null, action);\r\n actionPeer.onChanged = (sender: DesignerPeer, updatePropertySheet: boolean) => { peer.changed(updatePropertySheet); };\r\n\r\n let subPropertySheet = new PropertySheet(false);\r\n actionPeer.populatePropertySheet(subPropertySheet, category);\r\n\r\n if (excludeProperties.length > 0) {\r\n subPropertySheet.remove(...excludeProperties);\r\n }\r\n\r\n this.add(\r\n category,\r\n new SubPropertySheetEntry(targetVersion, action, subPropertySheet));\r\n }\r\n\r\n remove(...entries: PropertySheetEntry[]) {\r\n for (let categoryName of Object.keys(this._categories)) {\r\n this._categories[categoryName].remove(...entries);\r\n }\r\n }\r\n\r\n render(container: Adaptive.Container, context: PropertySheetContext) {\r\n for (let categoryName of Object.keys(this._categories)) {\r\n this._categories[categoryName].render(container, context, this.displayCategoryNames);\r\n }\r\n }\r\n}\r\n\r\nexport class PropertySheetContext {\r\n private _target: object = undefined;\r\n\r\n constructor(\r\n readonly designContext: DesignContext,\r\n readonly peer: DesignerPeer,\r\n target: object = undefined) {\r\n this._target = target;\r\n }\r\n\r\n get target(): object {\r\n return this._target != undefined ? this._target : this.peer.getCardObject();\r\n }\r\n}\r\n\r\nexport abstract class PropertySheetEntry {\r\n abstract render(context: PropertySheetContext): Adaptive.CardElement;\r\n\r\n constructor(readonly targetVersion: Adaptive.TargetVersion) { }\r\n}\r\n\r\nexport class SubPropertySheetEntry {\r\n render(context: PropertySheetContext): Adaptive.CardElement {\r\n let container = new Adaptive.Container();\r\n container.spacing = Adaptive.Spacing.Small;\r\n\r\n this.propertySheet.render(container, new PropertySheetContext(\r\n context.designContext,\r\n context.peer,\r\n this.target));\r\n\r\n return container;\r\n }\r\n\r\n constructor(readonly targetVersion: Adaptive.TargetVersion, readonly target: object, readonly propertySheet: PropertySheet) { }\r\n}\r\n\r\nexport class CustomPropertySheetEntry extends PropertySheetEntry {\r\n render(context: PropertySheetContext): Adaptive.CardElement {\r\n if (this.onRender) {\r\n return this.onRender(context);\r\n }\r\n }\r\n\r\n constructor(readonly targetVersion: Adaptive.TargetVersion, readonly onRender: (context: PropertySheetContext) => Adaptive.CardElement) {\r\n super(targetVersion);\r\n }\r\n}\r\n\r\nexport interface IPropertySheetEditorCommand {\r\n id?: string;\r\n caption: string;\r\n altText?: string;\r\n expanded?: boolean;\r\n onExecute: (sender: SingleInputPropertyEditor, clickedElement: HTMLElement) => void;\r\n}\r\n\r\nexport abstract class SingleInputPropertyEditor extends PropertySheetEntry {\r\n protected abstract createInput(context: PropertySheetContext): Adaptive.Input;\r\n\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n return context.target[this.propertyName];\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n context.target[this.propertyName] = value;\r\n }\r\n\r\n protected getAdditionalCommands(context: PropertySheetContext): IPropertySheetEditorCommand[] {\r\n return [];\r\n }\r\n\r\n render(context: PropertySheetContext): Adaptive.CardElement {\r\n let leftColumn = new Adaptive.Column();\r\n leftColumn.width = new Adaptive.SizeAndUnit(100, Adaptive.SizeUnit.Pixel);\r\n leftColumn.verticalContentAlignment = Adaptive.VerticalAlignment.Center;\r\n\r\n let rightColumn = new Adaptive.Column();\r\n rightColumn.width = \"stretch\";\r\n rightColumn.verticalContentAlignment = Adaptive.VerticalAlignment.Center;\r\n\r\n let columnSet = new Adaptive.ColumnSet();\r\n\r\n columnSet.spacing = Adaptive.Spacing.Small;\r\n\r\n columnSet.addColumn(leftColumn);\r\n columnSet.addColumn(rightColumn);\r\n\r\n let label = new Adaptive.TextBlock();\r\n label.horizontalAlignment = Adaptive.HorizontalAlignment.Right;\r\n label.wrap = true;\r\n label.text = this.label;\r\n label.id = Adaptive.generateUniqueId();\r\n\r\n let input = this.createInput(context);\r\n input.labelledBy = label.id;\r\n\r\n input.onValueChanged = () => {\r\n this.setPropertyValue(context, input.value);\r\n\r\n context.peer.changed(this.causesPropertySheetRefresh);\r\n }\r\n\r\n leftColumn.addItem(label);\r\n rightColumn.addItem(input);\r\n\r\n let additionalCommands = this.getAdditionalCommands(context);\r\n\r\n if (additionalCommands && additionalCommands.length > 0) {\r\n let commandColumn = new Adaptive.Column();\r\n commandColumn.width = \"auto\";\r\n commandColumn.spacing = Adaptive.Spacing.Small;\r\n commandColumn.verticalContentAlignment = Adaptive.VerticalAlignment.Center;\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n\r\n for (let command of additionalCommands) {\r\n let action = new Adaptive.SubmitAction();\r\n action.id = command.id;\r\n action.title = command.caption;\r\n action.tooltip = command.altText;\r\n\r\n if (command.expanded) {\r\n action.state = Adaptive.ActionButtonState.Expanded;\r\n }\r\n \r\n action.onExecute = (sender: Adaptive.Action) => { command.onExecute(this, sender.renderedElement); };\r\n\r\n actionSet.addAction(action);\r\n }\r\n\r\n commandColumn.addItem(actionSet);\r\n columnSet.addColumn(commandColumn);\r\n }\r\n\r\n return columnSet;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly causesPropertySheetRefresh: boolean = false) {\r\n super(targetVersion);\r\n }\r\n}\r\n\r\nexport class BaseStringPropertyEditor extends SingleInputPropertyEditor {\r\n protected placeHolder: string = \"(not set)\";\r\n\r\n protected createInput(context: PropertySheetContext): Adaptive.Input {\r\n let input = new Adaptive.TextInput();\r\n input.defaultValue = this.getPropertyValue(context);\r\n input.placeholder = this.placeHolder;\r\n input.isMultiline = this.isMultiline;\r\n\r\n return input;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly allowBinding: boolean = false,\r\n readonly isMultiline: boolean = false,\r\n readonly causesPropertySheetRefresh: boolean = false) {\r\n super(targetVersion, propertyName, label, causesPropertySheetRefresh);\r\n }\r\n}\r\n\r\nexport class StringPropertyEditor extends BaseStringPropertyEditor {\r\n protected getAdditionalCommands(context: PropertySheetContext): IPropertySheetEditorCommand[] {\r\n if (GlobalSettings.enableDataBindingSupport && this.allowBinding) {\r\n return [\r\n {\r\n id: this.propertyName + \"BindData\",\r\n caption: Strings.toolboxes.propertySheet.commands.bindData.displayText(),\r\n altText: Strings.toolboxes.propertySheet.commands.bindData.accessibleText(this.label),\r\n expanded: false,\r\n onExecute: (sender: SingleInputPropertyEditor, clickedElement: HTMLElement) => {\r\n clickedElement.setAttribute(\"aria-expanded\", \"true\");\r\n\r\n // TODO: Add host parameter to field picker\r\n let fieldPicker = new FieldPicker(context.designContext.dataStructure);\r\n fieldPicker.onClose = (sender, wasCancelled) => {\r\n clickedElement.setAttribute(\"aria-expanded\", \"false\");\r\n if (!wasCancelled) {\r\n this.setPropertyValue(context, fieldPicker.selectedField.asExpression());\r\n clickedElement.focus();\r\n context.peer.changed(true);\r\n }\r\n clickedElement.focus();\r\n }\r\n fieldPicker.popup(clickedElement);\r\n }\r\n }\r\n ];\r\n } else {\r\n return super.getAdditionalCommands(context);\r\n }\r\n }\r\n}\r\n\r\nexport class StringArrayPropertyEditor extends BaseStringPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n let rawValue = context.target[this.propertyName];\r\n let result: string[] = [];\r\n\r\n if (rawValue !== undefined && Array.isArray(rawValue)) {\r\n for (let item of rawValue) {\r\n if (typeof item === \"string\") {\r\n result.push(item);\r\n }\r\n }\r\n }\r\n\r\n return result.length > 0 ? result.join(\",\") : undefined;\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n if (value !== undefined) {\r\n let rawValues = value.split(\",\");\r\n let result: string[] = [];\r\n\r\n for (let rawValue of rawValues) {\r\n if (rawValue) {\r\n result.push(rawValue);\r\n }\r\n }\r\n\r\n context.target[this.propertyName] = result.length > 0 ? result : undefined;\r\n }\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly allowBinding: boolean = false,\r\n readonly isMultiline: boolean = false,\r\n readonly causesPropertySheetRefresh: boolean = false) {\r\n super(targetVersion, propertyName, label, allowBinding, isMultiline, causesPropertySheetRefresh);\r\n\r\n this.placeHolder = \"(not set, comma-separated list)\";\r\n }\r\n}\r\n\r\nexport class NumberPropertyEditor extends SingleInputPropertyEditor {\r\n protected _input: Adaptive.NumberInput;\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n try {\r\n context.target[this.propertyName] = parseFloat(value);\r\n } catch {\r\n context.target[this.propertyName] = this.defaultValue;\r\n }\r\n }\r\n\r\n protected createInput(context: PropertySheetContext): Adaptive.Input {\r\n let input = new Adaptive.NumberInput();\r\n\r\n input.defaultValue = this.getPropertyValue(context) ?? this.defaultValue;\r\n input.placeholder = \"(not set)\";\r\n\r\n this._input = input;\r\n return this._input;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly defaultValue: number | undefined = undefined,\r\n readonly causesPropertySheetRefresh: boolean = false) {\r\n super(targetVersion, propertyName, label, causesPropertySheetRefresh);\r\n }\r\n}\r\n\r\nexport class ObjectPropertyEditor extends StringPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n return JSON.stringify(context.target[this.propertyName]);\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n context.target[this.propertyName] = JSON.parse(value);\r\n }\r\n}\r\n\r\nexport class CustomCardObjectPropertyEditor extends StringPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n return context.peer.getCardObject().getCustomProperty(this.propertyName);\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n context.peer.getCardObject().setCustomProperty(this.propertyName, value);\r\n }\r\n}\r\n\r\nexport class BooleanPropertyEditor extends SingleInputPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n let v = context.target[this.propertyName];\r\n\r\n return typeof v === \"boolean\" ? v.toString() : \"false\";\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n context.target[this.propertyName] = value == \"true\";\r\n }\r\n\r\n protected createInput(context: PropertySheetContext): Adaptive.Input {\r\n let input = new Adaptive.ToggleInput();\r\n input.defaultValue = this.getPropertyValue(context);\r\n\r\n return input;\r\n }\r\n}\r\n\r\nexport interface IVersionedChoice {\r\n targetVersion: Adaptive.TargetVersion;\r\n name: string;\r\n value: string;\r\n}\r\n\r\nconst NotSetValue = \"@@not_set@@\";\r\n\r\nexport class ChoicePropertyEditor extends SingleInputPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n let currentValue = context.target[this.propertyName];\r\n\r\n return currentValue !== undefined ? currentValue.toString() : NotSetValue;\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n if (value === NotSetValue) {\r\n context.target[this.propertyName] = undefined;\r\n } else {\r\n context.target[this.propertyName] = value;\r\n }\r\n }\r\n\r\n protected createInput(context: PropertySheetContext): Adaptive.Input {\r\n let input = new Adaptive.ChoiceSetInput();\r\n input.defaultValue = this.getPropertyValue(context);\r\n input.isCompact = true;\r\n\r\n if (this.isNullable) {\r\n input.choices.push(new Adaptive.Choice(\"(not set)\", NotSetValue));\r\n } else {\r\n input.placeholder = \"(not set)\";\r\n }\r\n\r\n for (let choice of this.choices) {\r\n if (Adaptive.isVersionLessOrEqual(choice.targetVersion, context.designContext.targetVersion)) {\r\n input.choices.push(new Adaptive.Choice(choice.name, choice.value));\r\n }\r\n }\r\n\r\n return input;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly choices: IVersionedChoice[],\r\n readonly causesPropertySheetRefresh: boolean = false,\r\n readonly isNullable: boolean = false) {\r\n super(targetVersion, propertyName, label, causesPropertySheetRefresh);\r\n }\r\n}\r\n\r\nexport class ContainerStylePropertyEditor extends ChoicePropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n let currentStyle = context.target[this.propertyName];\r\n\r\n return currentStyle ? currentStyle.toString() : NotSetValue;\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n if (value == NotSetValue) {\r\n context.target[this.propertyName] = undefined;\r\n } else {\r\n context.target[this.propertyName] = value;\r\n }\r\n }\r\n\r\n constructor(readonly targetVersion: Adaptive.TargetVersion, readonly propertyName: string, readonly label: string) {\r\n super(\r\n targetVersion,\r\n propertyName,\r\n label,\r\n [\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"(not set)\", value: NotSetValue },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"Default\", value: \"default\" },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"Emphasis\", value: \"emphasis\" },\r\n { targetVersion: Adaptive.Versions.v1_2, name: \"Accent\", value: \"accent\" },\r\n { targetVersion: Adaptive.Versions.v1_2, name: \"Good\", value: \"good\" },\r\n { targetVersion: Adaptive.Versions.v1_2, name: \"Attention\", value: \"attention\" },\r\n { targetVersion: Adaptive.Versions.v1_2, name: \"Warning\", value: \"warning\" }\r\n ]);\r\n }\r\n}\r\n\r\nexport class NullableBooleanPropertyEditor extends ChoicePropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n let currentValue = context.target[this.propertyName];\r\n\r\n return typeof currentValue === \"boolean\" ? currentValue.toString() : NotSetValue;\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n if (value === NotSetValue) {\r\n context.target[this.propertyName] = undefined;\r\n } else {\r\n context.target[this.propertyName] = value === \"true\";\r\n }\r\n }\r\n\r\n constructor(readonly targetVersion: Adaptive.TargetVersion, readonly propertyName: string, readonly label: string) {\r\n super(\r\n targetVersion,\r\n propertyName,\r\n label,\r\n [\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"(not set)\", value: NotSetValue },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"True\", value: \"true\" },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"False\", value: \"false\" }\r\n ]);\r\n }\r\n}\r\n\r\nexport class ColumnWidthPropertyEditor extends ChoicePropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n if (context.target[this.propertyName] instanceof Adaptive.SizeAndUnit) {\r\n if (context.target[this.propertyName].unit == Adaptive.SizeUnit.Pixel) {\r\n return \"pixels\";\r\n } else {\r\n return \"weighted\";\r\n }\r\n } else {\r\n return context.target[this.propertyName].toString();\r\n }\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n switch (value) {\r\n case \"auto\":\r\n context.target[this.propertyName] = \"auto\";\r\n break;\r\n case \"pixels\":\r\n context.target[this.propertyName] = new Adaptive.SizeAndUnit(50, Adaptive.SizeUnit.Pixel);\r\n break;\r\n case \"weighted\":\r\n context.target[this.propertyName] = new Adaptive.SizeAndUnit(50, Adaptive.SizeUnit.Weight);\r\n break;\r\n case \"stretch\":\r\n default:\r\n context.target[this.propertyName] = \"stretch\";\r\n break;\r\n }\r\n }\r\n}\r\n\r\nexport class HeightPropertyEditor extends ChoicePropertyEditor {\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n let processedValue: string;\r\n\r\n switch (value) {\r\n case \"auto\":\r\n case \"stretch\":\r\n processedValue = value;\r\n break;\r\n default:\r\n processedValue = \"auto\";\r\n break;\r\n }\r\n\r\n context.target[this.propertyName] = processedValue;\r\n }\r\n}\r\n\r\nexport class SizeAndUnitPropertyEditor extends NumberPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n return (context.target[this.propertyName]).physicalSize.toString();\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n context.target[this.propertyName] = new Adaptive.SizeAndUnit(parseInt(value), this.sizeUnit);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly sizeUnit: Adaptive.SizeUnit,\r\n readonly defaultValue: number | undefined = undefined,\r\n readonly causesPropertySheetRefresh: boolean = false) {\r\n super(targetVersion, propertyName, label, defaultValue, causesPropertySheetRefresh);\r\n }\r\n}\r\n\r\nexport class CarouselTimerPropertyEditor extends NumberPropertyEditor {\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n try {\r\n const parsedValue = parseFloat(value);\r\n const minAutoplayDelay = context.designContext.hostContainer.getHostConfig().carousel.minAutoplayDelay;\r\n\r\n if (parsedValue < minAutoplayDelay) {\r\n\r\n // TODO: This causes a strange bug - basically cannot clear NumberInput and type a new number\r\n // Need to update where we call setPropertyValue/at least display a visual warning\r\n this._input.value = minAutoplayDelay;\r\n\r\n console.warn(Adaptive.Strings.errors.tooLittleTimeDelay);\r\n context.target[this.propertyName] = minAutoplayDelay; \r\n } else {\r\n context.target[this.propertyName] = parsedValue;\r\n }\r\n } catch {\r\n context.target[this.propertyName] = this.defaultValue;\r\n }\r\n }\r\n}\r\n\r\nexport class ActionPropertyEditor extends SingleInputPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n let action = context.target[this.propertyName];\r\n\r\n return action ? action.getJsonTypeName() : \"none\";\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n if (value == \"none\") {\r\n context.target[this.propertyName] = undefined;\r\n } else {\r\n context.target[this.propertyName] = context.designContext.hostContainer.actionsRegistry.createInstance(value, context.designContext.targetVersion);\r\n }\r\n }\r\n\r\n protected createInput(context: PropertySheetContext): Adaptive.Input {\r\n let input = new Adaptive.ChoiceSetInput();\r\n input.defaultValue = this.getPropertyValue(context);\r\n input.isCompact = true;\r\n input.placeholder = \"(not set)\";\r\n input.choices.push(new Adaptive.Choice(\"(not set)\", \"none\"));\r\n\r\n for (let i = 0; i < context.designContext.hostContainer.actionsRegistry.getItemCount(); i++) {\r\n let actionType = context.designContext.hostContainer.actionsRegistry.getItemAt(i).typeName;\r\n let excludeAction = true;\r\n\r\n if (this.forbiddenActionTypes) {\r\n // If the list contains \"*\", all action types are disallowed...\r\n excludeAction = this.forbiddenActionTypes.indexOf(\"*\") >= 0 || this.forbiddenActionTypes.indexOf(actionType) >= 0;\r\n\r\n if (excludeAction) {\r\n // ...except if the list explicitly contains the type name prefixed with a \"-\" character\r\n // Example:\r\n // [ \"*\", \"-Action.Execute\", \"-Action.Submit\" ]\r\n // Meaning: all actions are disallowed except Action.Execute and Action.Submit\r\n excludeAction = this.forbiddenActionTypes.indexOf(\"-\" + actionType) < 0;\r\n }\r\n }\r\n\r\n if (!excludeAction) {\r\n let choice = new Adaptive.Choice(actionType, actionType);\r\n\r\n input.choices.push(choice);\r\n }\r\n }\r\n\r\n return input;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly forbiddenActionTypes: string[] = [],\r\n readonly causesPropertySheetRefresh: boolean = false) {\r\n super(targetVersion, propertyName, label, causesPropertySheetRefresh);\r\n }\r\n}\r\n\r\nexport class CompoundPropertyEditor extends PropertySheetEntry {\r\n render(context: PropertySheetContext): Adaptive.CardElement {\r\n let container = new Adaptive.Container();\r\n\r\n let target = context.target[this.propertyName];\r\n\r\n if (target === undefined && this.initializeProperty) {\r\n target = this.initializeProperty();\r\n\r\n context.target[this.propertyName] = target;\r\n }\r\n\r\n if (target) {\r\n for (let entry of this.entries) {\r\n if (Adaptive.isVersionLessOrEqual(entry.targetVersion, context.designContext.targetVersion)) {\r\n container.addItem(\r\n entry.render(\r\n new PropertySheetContext(\r\n context.designContext,\r\n context.peer,\r\n target)));\r\n }\r\n }\r\n }\r\n\r\n return container;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly entries: PropertySheetEntry[] = [],\r\n readonly initializeProperty?: () => object) {\r\n super(targetVersion);\r\n }\r\n}\r\n\r\nexport class EnumPropertyEditor extends SingleInputPropertyEditor {\r\n protected getPropertyValue(context: PropertySheetContext): any {\r\n let value = context.target[this.propertyName];\r\n\r\n return value !== undefined ? value : \"-1\";\r\n }\r\n\r\n protected setPropertyValue(context: PropertySheetContext, value: string) {\r\n let valueAsInt = parseInt(value, 10);\r\n\r\n if (valueAsInt >= 0) {\r\n context.target[this.propertyName] = valueAsInt;\r\n } else {\r\n context.target[this.propertyName] = undefined;\r\n }\r\n }\r\n\r\n protected createInput(context: PropertySheetContext): Adaptive.Input {\r\n let input = new Adaptive.ChoiceSetInput();\r\n input.isCompact = true;\r\n\r\n let defaultValue = this.getPropertyValue(context);\r\n input.defaultValue = defaultValue !== undefined ? defaultValue : \"-1\";\r\n\r\n if (this.isNullable) {\r\n input.choices.push(new Adaptive.Choice(\"(not set)\", \"-1\"));\r\n } else {\r\n input.placeholder = \"(not set)\";\r\n }\r\n\r\n for (let key in this.enumType) {\r\n let v = parseInt(key, 10);\r\n\r\n if (!isNaN(v)) {\r\n input.choices.push(new Adaptive.Choice(this.enumType[key], key));\r\n }\r\n }\r\n\r\n return input;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly propertyName: string,\r\n readonly label: string,\r\n readonly enumType: { [s: number]: string },\r\n readonly causesPropertySheetRefresh: boolean = false,\r\n readonly isNullable: boolean = false) {\r\n super(targetVersion, propertyName, label, causesPropertySheetRefresh);\r\n }\r\n}\r\n\r\ninterface INameValuePair {\r\n name: string;\r\n value: string;\r\n}\r\n\r\nclass NameValuePairPropertyEditor extends PropertySheetEntry {\r\n private collectionChanged(context: PropertySheetContext, nameValuePairs: INameValuePair[], refreshPropertySheet: boolean) {\r\n context.target[this.collectionPropertyName] = [];\r\n\r\n for (let nameValuePair of nameValuePairs) {\r\n let item = this.createCollectionItem(nameValuePair.name, nameValuePair.value);\r\n\r\n context.target[this.collectionPropertyName].push(item);\r\n }\r\n\r\n context.peer.changed(refreshPropertySheet);\r\n }\r\n\r\n render(context: PropertySheetContext): Adaptive.CardElement {\r\n let result = new Adaptive.Container();\r\n\r\n let collection = context.target[this.collectionPropertyName];\r\n\r\n if (!Array.isArray(collection)) {\r\n throw new Error(\"The \" + this.collectionPropertyName + \" property on \" + context.peer.getCardObject().getJsonTypeName() + \" either doesn't exist or isn't an array.\")\r\n }\r\n\r\n let nameValuePairs: INameValuePair[] = [];\r\n\r\n for (let pair of collection) {\r\n nameValuePairs.push(\r\n {\r\n name: pair[this.namePropertyName],\r\n value: pair[this.valuePropertyName]\r\n }\r\n );\r\n }\r\n\r\n if (nameValuePairs.length == 0) {\r\n let messageTextBlock = new Adaptive.TextBlock();\r\n messageTextBlock.spacing = Adaptive.Spacing.Small;\r\n messageTextBlock.text = this.messageIfEmpty;\r\n\r\n result.addItem(messageTextBlock);\r\n } else {\r\n for (let i = 0; i < nameValuePairs.length; i++) {\r\n let textInput = new Adaptive.TextInput();\r\n textInput.placeholder = this.namePropertyLabel;\r\n textInput.defaultValue = nameValuePairs[i].name;\r\n textInput.onValueChanged = (sender) => {\r\n nameValuePairs[i].name = sender.value;\r\n\r\n this.collectionChanged(context, nameValuePairs, false);\r\n };\r\n\r\n let nameColumn = new Adaptive.Column(\"stretch\");\r\n nameColumn.addItem(textInput);\r\n\r\n textInput = new Adaptive.TextInput();\r\n textInput.placeholder = this.valuePropertyLabel;\r\n textInput.defaultValue = nameValuePairs[i].value;\r\n textInput.onValueChanged = (sender) => {\r\n nameValuePairs[i].value = sender.value;\r\n\r\n this.collectionChanged(context, nameValuePairs, false);\r\n };\r\n\r\n let valueColumn = new Adaptive.Column(\"stretch\");\r\n valueColumn.spacing = Adaptive.Spacing.Small;\r\n valueColumn.addItem(textInput);\r\n\r\n let removeAction = new Adaptive.SubmitAction();\r\n removeAction.iconUrl = require(\"./assets/xmark.svg\");\r\n removeAction.tooltip = \"Remove\";\r\n removeAction.onExecute = (sender) => {\r\n nameValuePairs.splice(i, 1);\r\n\r\n this.collectionChanged(context, nameValuePairs, true);\r\n };\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n actionSet.addAction(removeAction);\r\n\r\n let removeColumn = new Adaptive.Column(\"auto\");\r\n removeColumn.spacing = Adaptive.Spacing.Small;\r\n removeColumn.addItem(actionSet);\r\n\r\n let columnSet = new Adaptive.ColumnSet();\r\n columnSet.spacing = Adaptive.Spacing.Small;\r\n columnSet.addColumn(nameColumn);\r\n columnSet.addColumn(valueColumn);\r\n columnSet.addColumn(removeColumn);\r\n\r\n result.addItem(columnSet);\r\n }\r\n }\r\n\r\n let addAction = new Adaptive.SubmitAction();\r\n addAction.title = this.addButtonTitle;\r\n addAction.onExecute = (sender) => {\r\n nameValuePairs.push({ name: \"\", value: \"\" });\r\n\r\n this.collectionChanged(context, nameValuePairs, true);\r\n };\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n actionSet.spacing = Adaptive.Spacing.Small;\r\n actionSet.addAction(addAction);\r\n\r\n result.addItem(actionSet);\r\n\r\n return result;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly collectionPropertyName: string,\r\n readonly namePropertyName: string,\r\n readonly valuePropertyName: string,\r\n readonly createCollectionItem: (name: string, value: string) => any,\r\n readonly namePropertyLabel: string = \"Name\",\r\n readonly valuePropertyLabel: string = \"Value\",\r\n readonly addButtonTitle: string = \"Add\",\r\n readonly messageIfEmpty: string = \"This collection is empty\") {\r\n super(targetVersion);\r\n }\r\n}\r\n\r\ntype NameAndValue = {\r\n name: string;\r\n value?: string;\r\n};\r\n\r\ntype InnerPropertiesDictionary = {\r\n [name: string]: NameAndValue;\r\n};\r\n\r\nclass InnerStructPropertyEditor extends PropertySheetEntry {\r\n private collectionChanged(context: PropertySheetContext, innerPropertiesList: InnerPropertiesDictionary[], refreshPropertySheet: boolean) {\r\n context.target[this.collectionPropertyName] = [];\r\n\r\n const collectionItems = innerPropertiesList.map(e => this.createCollectionItem(e));\r\n context.target[this.collectionPropertyName].push(...collectionItems);\r\n\r\n context.peer.changed(refreshPropertySheet);\r\n }\r\n\r\n render(context: PropertySheetContext): Adaptive.CardElement {\r\n const result = new Adaptive.Container();\r\n\r\n let collection = context.target[this.collectionPropertyName];\r\n\r\n if (!Array.isArray(collection)) {\r\n throw new Error(\"The \" + this.collectionPropertyName + \" property on \" + context.peer.getCardObject().getJsonTypeName() + \" either doesn't exist or isn't an array.\")\r\n }\r\n\r\n let innerPropertiesList: InnerPropertiesDictionary[] = [];\r\n\r\n for (let innerProperties of collection) {\r\n var newItem : InnerPropertiesDictionary = {};\r\n Object.keys(this.innerPropertiesDefaults).forEach(key => newItem[key] = { name: this.innerPropertiesDefaults[key].name, value: innerProperties[key]});\r\n innerPropertiesList.push(newItem);\r\n }\r\n\r\n if (innerPropertiesList.length == 0) {\r\n let messageTextBlock = new Adaptive.TextBlock();\r\n messageTextBlock.spacing = Adaptive.Spacing.Small;\r\n messageTextBlock.text = this.messageIfEmpty;\r\n\r\n result.addItem(messageTextBlock);\r\n } else {\r\n for (let i = 0; i < innerPropertiesList.length; i++) {\r\n let columnSet = new Adaptive.ColumnSet();\r\n columnSet.spacing = Adaptive.Spacing.Medium;\r\n columnSet.separator = true;\r\n\r\n let newColumn = new Adaptive.Column(\"stretch\");\r\n Object.keys(innerPropertiesList[i]).forEach(key => {\r\n let textInput = new Adaptive.TextInput();\r\n textInput.defaultValue = innerPropertiesList[i][key].value;\r\n textInput.placeholder = innerPropertiesList[i][key].name;\r\n textInput.label = innerPropertiesList[i][key].name;\r\n textInput.onValueChanged = (sender) => {\r\n innerPropertiesList[i][key].value = sender.value;\r\n this.collectionChanged(context, innerPropertiesList, false);\r\n };\r\n textInput.spacing = Adaptive.Spacing.Small;\r\n newColumn.addItem(textInput);\r\n });\r\n columnSet.addColumn(newColumn);\r\n\r\n let removeAction = new Adaptive.SubmitAction();\r\n removeAction.title = \"X\";\r\n removeAction.tooltip = \"Remove\";\r\n removeAction.onExecute = (sender) => {\r\n innerPropertiesList.splice(i, 1);\r\n\r\n this.collectionChanged(context, innerPropertiesList, true);\r\n };\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n actionSet.addAction(removeAction);\r\n\r\n let removeColumn = new Adaptive.Column(\"auto\");\r\n removeColumn.spacing = Adaptive.Spacing.Small;\r\n removeColumn.verticalContentAlignment = Adaptive.VerticalAlignment.Center;\r\n removeColumn.addItem(actionSet);\r\n\r\n columnSet.addColumn(removeColumn);\r\n\r\n result.addItem(columnSet);\r\n }\r\n }\r\n\r\n let addAction = new Adaptive.SubmitAction();\r\n addAction.title = this.addButtonTitle;\r\n addAction.onExecute = (sender) => {\r\n innerPropertiesList.push({...this.innerPropertiesDefaults});\r\n this.collectionChanged(context, innerPropertiesList, true);\r\n };\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n actionSet.spacing = Adaptive.Spacing.Small;\r\n actionSet.addAction(addAction);\r\n\r\n result.addItem(actionSet);\r\n\r\n return result;\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Adaptive.TargetVersion,\r\n readonly collectionPropertyName: string,\r\n readonly innerPropertiesDefaults: InnerPropertiesDictionary,\r\n readonly createCollectionItem: (innerProperties: InnerPropertiesDictionary) => any,\r\n readonly addButtonTitle: string = \"Add\",\r\n readonly messageIfEmpty: string = \"This collection is empty\") {\r\n super(targetVersion);\r\n }\r\n}\r\n\r\nexport abstract class DesignerPeer extends DraggableElement {\r\n static readonly idProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"id\", \"Id\");\r\n\r\n static onPopulatePropertySheet?: (sender: DesignerPeer, propertySheet: PropertySheet) => void;\r\n\r\n private _parent: DesignerPeer;\r\n private _cardObject: Adaptive.CardObject;\r\n private _children: Array = [];\r\n private _isSelected: boolean = false;\r\n private _inplaceEditorOverlay: HTMLElement;\r\n private _inplaceEditor: DesignerPeerInplaceEditor = null;\r\n private _insertAfterNeighbor = false;\r\n private _parentCarouselPagePeer: CarouselPagePeer | undefined = undefined;\r\n\r\n private closeInplaceEditor(applyChanges: boolean) {\r\n if (this._inplaceEditor) {\r\n if (applyChanges) {\r\n this._inplaceEditor.applyChanges();\r\n\r\n this.changed(true);\r\n }\r\n\r\n this._inplaceEditor = null;\r\n\r\n this._inplaceEditorOverlay.parentNode.removeChild(this._inplaceEditorOverlay);\r\n }\r\n }\r\n\r\n private tryOpenInplaceEditor(): boolean {\r\n this._inplaceEditor = this.createInplaceEditor();\r\n\r\n if (this._inplaceEditor) {\r\n this._inplaceEditor.onClose = (applyChanges: boolean) => {\r\n this.closeInplaceEditor(applyChanges);\r\n };\r\n\r\n this._inplaceEditorOverlay = document.createElement(\"div\");\r\n this._inplaceEditorOverlay.tabIndex = 0;\r\n this._inplaceEditorOverlay.style.zIndex = \"600\";\r\n this._inplaceEditorOverlay.style.backgroundColor = \"transparent\";\r\n this._inplaceEditorOverlay.style.position = \"absolute\";\r\n this._inplaceEditorOverlay.style.left = \"0\";\r\n this._inplaceEditorOverlay.style.top = \"0\";\r\n this._inplaceEditorOverlay.style.width = document.documentElement.scrollWidth + \"px\";\r\n this._inplaceEditorOverlay.style.height = document.documentElement.scrollHeight + \"px\";\r\n this._inplaceEditorOverlay.onfocus = (e) => { this.closeInplaceEditor(true); };\r\n\r\n let cardObjectBoundingRect = this.getCardObjectBoundingRect();\r\n let peerBoundingRect = this.getBoundingRect();\r\n let topPadding = peerBoundingRect.height - cardObjectBoundingRect.height;\r\n\r\n let inplaceEditorHost = document.createElement(\"div\");\r\n inplaceEditorHost.className = \"acd-inplace-editor-host\";\r\n inplaceEditorHost.style.left = Math.floor(cardObjectBoundingRect.left + pageXOffset) + \"px\";\r\n inplaceEditorHost.style.top = Math.floor(cardObjectBoundingRect.top + pageYOffset - topPadding) + \"px\";\r\n inplaceEditorHost.style.width = Math.ceil(peerBoundingRect.width) + \"px\";\r\n inplaceEditorHost.style.height = Math.ceil(peerBoundingRect.height) + \"px\";\r\n inplaceEditorHost.style.paddingTop = topPadding + \"px\";\r\n\r\n let renderedInplaceEditor = this._inplaceEditor.render();\r\n renderedInplaceEditor.classList.add(\"acd-inplace-editor\");\r\n renderedInplaceEditor.tabIndex = 0;\r\n renderedInplaceEditor.onblur = (e) => { this.closeInplaceEditor(true); };\r\n\r\n inplaceEditorHost.appendChild(renderedInplaceEditor);\r\n\r\n this._inplaceEditorOverlay.appendChild(inplaceEditorHost);\r\n\r\n document.body.appendChild(this._inplaceEditorOverlay);\r\n\r\n this._inplaceEditor.initialize();\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected click(e: MouseEvent) {\r\n super.click(e);\r\n\r\n this.isSelected = true;\r\n }\r\n\r\n protected doubleClick(e: MouseEvent) {\r\n super.doubleClick(e);\r\n\r\n this.tryOpenInplaceEditor();\r\n }\r\n\r\n protected isContainer(): boolean {\r\n return false;\r\n }\r\n\r\n protected getToolTip(): string {\r\n return null;\r\n }\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n // Do nothing in base implementation\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n let element = document.createElement(\"div\");\r\n element.classList.add(\"acd-peer\");\r\n element.tabIndex = 0;\r\n element.onfocus = (e) => {\r\n this.isSelected = true;\r\n };\r\n\r\n let toolTip = this.getToolTip();\r\n\r\n if (toolTip) {\r\n element.title = toolTip;\r\n }\r\n\r\n if (this.isContainer()) {\r\n element.classList.add(\"container\");\r\n }\r\n\r\n element.style.position = \"absolute\";\r\n // Issue: I believe this stops us from interacting with the elements - this could be okay since it shouldn't be an issue in preview mode\r\n // Ensure that the peer is in front of the card\r\n element.style.zIndex = \"10\";\r\n\r\n return element;\r\n }\r\n\r\n protected internalUpdateCssStyles() {\r\n if (this.isSelected) {\r\n this.renderedElement.classList.add(\"selected\");\r\n } else {\r\n this.renderedElement.classList.remove(\"selected\");\r\n }\r\n\r\n if (this.dragging) {\r\n this.renderedElement.classList.add(\"dragging\");\r\n } else {\r\n this.renderedElement.classList.remove(\"dragging\");\r\n }\r\n }\r\n\r\n protected peerAdded(newPeer: DesignerPeer) {\r\n this.changed(false);\r\n\r\n if (this.onPeerAdded) {\r\n this.onPeerAdded(this, newPeer);\r\n }\r\n }\r\n\r\n protected peerRemoved(peer: DesignerPeer) {\r\n if (this.onPeerRemoved) {\r\n this.onPeerRemoved(peer);\r\n }\r\n }\r\n\r\n protected internalUpdateLayout() {\r\n if (this.renderedElement) {\r\n let clientRect = this.getBoundingRect();\r\n\r\n this.renderedElement.style.width = clientRect.width + \"px\";\r\n this.renderedElement.style.height = clientRect.height + \"px\";\r\n this.renderedElement.style.left = clientRect.left + \"px\";\r\n this.renderedElement.style.top = clientRect.top + \"px\";\r\n }\r\n\r\n this.updateAriaProperties();\r\n }\r\n\r\n protected updateAriaProperties() {\r\n if (this._children.length === 0 && this.getCardObject() instanceof Adaptive.CardElementContainer) {\r\n this.renderedElement.setAttribute(\"aria-label\", \"Empty \" + this.getCardObject().getJsonTypeName());\r\n } else {\r\n this.renderedElement.setAttribute(\"aria-label\", this.getCardObject().getJsonTypeName());\r\n }\r\n }\r\n\r\n protected createInplaceEditor(): DesignerPeerInplaceEditor {\r\n return null;\r\n }\r\n\r\n protected internalGetTreeItemText(): string {\r\n return null;\r\n }\r\n\r\n protected abstract internalRemove(): boolean;\r\n\r\n readonly registration: DesignerPeerRegistrationBase;\r\n readonly designerSurface: CardDesignerSurface;\r\n readonly treeItem: DesignerPeerTreeItem;\r\n\r\n onParentChanged: (sender: DesignerPeer) => void;\r\n onSelectedChanged: (sender: DesignerPeer) => void;\r\n onChanged: (sender: DesignerPeer, updatePropertySheet: boolean) => void;\r\n onPeerRemoved: (sender: DesignerPeer) => void;\r\n onPeerAdded: (sender: DesignerPeer, newPeer: DesignerPeer) => void;\r\n\r\n constructor(\r\n parent: DesignerPeer,\r\n designerSurface: CardDesignerSurface,\r\n registration: DesignerPeerRegistrationBase,\r\n cardObject: Adaptive.CardObject) {\r\n super();\r\n\r\n this._parent = parent;\r\n\r\n this.registration = registration;\r\n this.designerSurface = designerSurface;\r\n this._cardObject = cardObject;\r\n this.treeItem = new DesignerPeerTreeItem(this, this.isTreeItemExpandedByDefault);\r\n }\r\n\r\n abstract getBoundingRect(): Rect;\r\n abstract getCardObjectBoundingRect(): Rect;\r\n\r\n getCardObject(): Adaptive.CardObject {\r\n return this._cardObject;\r\n }\r\n\r\n updateChildren() {\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n this.getChildAt(i).updateChildren();\r\n }\r\n }\r\n\r\n changed(updatePropertySheet: boolean) {\r\n if (this.onChanged) {\r\n this.onChanged(this, updatePropertySheet);\r\n }\r\n }\r\n\r\n getTreeItemText(): string {\r\n return this.internalGetTreeItemText();\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n // Do nothing in base implementation\r\n }\r\n\r\n canDrop(peer: DesignerPeer): boolean {\r\n return false;\r\n }\r\n\r\n canBeRemoved(): boolean {\r\n return true;\r\n }\r\n\r\n tryDrop(peer: DesignerPeer, insertionPoint: IPoint): boolean {\r\n return false;\r\n }\r\n\r\n tryAdd(peer: DesignerPeer): boolean {\r\n return false;\r\n }\r\n\r\n insertChild(peer: DesignerPeer, index: number = -1) {\r\n if (index == -1) {\r\n this._children.push(peer);\r\n } else {\r\n this._children.splice(index, 0, peer);\r\n }\r\n\r\n peer.parent = this;\r\n\r\n this.peerAdded(peer);\r\n }\r\n\r\n removeChild(peer: DesignerPeer) {\r\n var index = this._children.indexOf(peer);\r\n\r\n if (index >= 0) {\r\n peer.parent = null;\r\n this._children.splice(index, 1);\r\n }\r\n }\r\n\r\n getChildCount(): number {\r\n return this._children.length;\r\n }\r\n\r\n getChildAt(index: number): DesignerPeer {\r\n return this._children[index];\r\n }\r\n\r\n getCommands(context: DesignContext, promoteParentCommands: boolean = false): Array {\r\n let result: Array = [];\r\n\r\n this.internalAddCommands(context, result);\r\n\r\n if (promoteParentCommands && this.parent) {\r\n let parentCommands = this.parent.getCommands(context);\r\n\r\n for (let command of parentCommands) {\r\n if (command.isPromotable) {\r\n result.push(command);\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n remove(onlyFromCard: boolean, removeChildren: boolean): boolean {\r\n if (removeChildren) {\r\n while (this._children.length > 0) {\r\n this._children[0].remove(onlyFromCard, removeChildren);\r\n }\r\n }\r\n\r\n var result = this.internalRemove();\r\n\r\n if (result && !onlyFromCard) {\r\n if (this.parent) {\r\n this.parent.removeChild(this);\r\n }\r\n\r\n this.removeElementsFromDesignerSurface();\r\n this.peerRemoved(this);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addElementsToDesignerSurface(designerSurface: HTMLElement, neighbor: HTMLElement = undefined): HTMLElement {\r\n if (this.renderedElement) {\r\n if (neighbor) {\r\n // Adds the rendered element after its neighbor\r\n neighbor.after(this.renderedElement);\r\n\r\n if (this.getChildCount() >= 0) {\r\n neighbor = this.renderedElement;\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n // We need to update the neighbor with the most recently added element\r\n neighbor = this.getChildAt(i).addElementsToDesignerSurface(designerSurface, neighbor);\r\n }\r\n }\r\n } else {\r\n // The first time we render the card, we can append the elements in order\r\n designerSurface.appendChild(this.renderedElement);\r\n }\r\n }\r\n return neighbor;\r\n }\r\n\r\n removeElementsFromDesignerSurface(processChildren: boolean = false) {\r\n this.renderedElement.parentNode.removeChild(this.renderedElement);\r\n\r\n if (processChildren) {\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n this.getChildAt(i).removeElementsFromDesignerSurface(processChildren);\r\n }\r\n }\r\n }\r\n\r\n buildPropertySheetCard(context: DesignContext): Adaptive.AdaptiveCard {\r\n let card = new Adaptive.AdaptiveCard();\r\n card.padding = new Adaptive.PaddingDefinition(\r\n Adaptive.Spacing.Small,\r\n Adaptive.Spacing.Small,\r\n Adaptive.Spacing.Small,\r\n Adaptive.Spacing.Small);\r\n\r\n let propertySheet = new PropertySheet();\r\n\r\n this.populatePropertySheet(propertySheet);\r\n\r\n if (DesignerPeer.onPopulatePropertySheet) {\r\n DesignerPeer.onPopulatePropertySheet(this, propertySheet);\r\n }\r\n\r\n propertySheet.render(\r\n card,\r\n new PropertySheetContext(context, this));\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n let commands = this.getCommands(context, true);\r\n\r\n for (let command of commands) {\r\n if (command.showInPropertySheet) {\r\n let action = new Adaptive.SubmitAction();\r\n action.title = command.name;\r\n action.onExecute = (sender: Adaptive.Action) => {\r\n command.execute(command, action.renderedElement);\r\n };\r\n\r\n actionSet.addAction(action);\r\n }\r\n }\r\n\r\n actionSet.separator = true;\r\n\r\n card.addItem(actionSet);\r\n\r\n return card;\r\n }\r\n\r\n scrollIntoView() {\r\n if (this.renderedElement) {\r\n this.renderedElement.scrollIntoView();\r\n }\r\n\r\n if (this.treeItem && this.treeItem.renderedElement) {\r\n this.treeItem.renderedElement.scrollIntoView();\r\n }\r\n }\r\n\r\n private updateParentCarouselPagePeer(value: CarouselPagePeer | undefined) {\r\n // If the value has changed, we should update it and the current peer's children\r\n if (value !== this._parentCarouselPagePeer) {\r\n this._parentCarouselPagePeer = value;\r\n\r\n for (const child of this._children) {\r\n child.updateParentCarouselPagePeer(this._parentCarouselPagePeer);\r\n }\r\n }\r\n }\r\n\r\n get isTreeItemExpandedByDefault(): boolean {\r\n return true;\r\n }\r\n\r\n get parent(): DesignerPeer {\r\n return this._parent;\r\n }\r\n\r\n set parent(value: DesignerPeer) {\r\n this._parent = value;\r\n\r\n this.updateParentCarouselPagePeer(this._parent instanceof CarouselPagePeer ? this._parent : this._parent?._parentCarouselPagePeer);\r\n\r\n if (this.onParentChanged) {\r\n this.onParentChanged(this);\r\n }\r\n }\r\n\r\n get isSelected(): boolean {\r\n return this._isSelected;\r\n }\r\n\r\n set isSelected(value: boolean) {\r\n if (value != this._isSelected) {\r\n this._isSelected = value;\r\n\r\n this.updateLayout();\r\n this.treeItem.isSelected = this._isSelected;\r\n\r\n if (this.onSelectedChanged) {\r\n this.onSelectedChanged(this);\r\n }\r\n }\r\n }\r\n\r\n get insertAfterNeighbor(): boolean {\r\n return this._insertAfterNeighbor;\r\n }\r\n\r\n set insertAfterNeighbor(insertAfterNeighbor: boolean) {\r\n this._insertAfterNeighbor = insertAfterNeighbor;\r\n }\r\n\r\n get children(): Array {\r\n return this._children;\r\n }\r\n\r\n get parentCarouselPagePeer(): CarouselPagePeer | undefined {\r\n return this._parentCarouselPagePeer;\r\n }\r\n}\r\n\r\nexport class ActionPeer extends DesignerPeer {\r\n static readonly titleProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"title\", \"Title\", true);\r\n static readonly modeProperty = new ChoicePropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"mode\",\r\n \"Mode\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_5, name: \"Primary\", value: Adaptive.ActionMode?.Primary },\r\n { targetVersion: Adaptive.Versions.v1_5, name: \"Secondary\", value: Adaptive.ActionMode?.Secondary }\r\n ]);\r\n static readonly styleProperty = new ChoicePropertyEditor(\r\n Adaptive.Versions.v1_2,\r\n \"style\",\r\n \"Style\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_2, name: \"Default\", value: Adaptive.ActionStyle?.Default },\r\n { targetVersion: Adaptive.Versions.v1_2, name: \"Positive\", value: Adaptive.ActionStyle?.Positive },\r\n { targetVersion: Adaptive.Versions.v1_2, name: \"Destructive\", value: Adaptive.ActionStyle?.Destructive }\r\n ]);\r\n static readonly iconUrlProperty = new StringPropertyEditor(Adaptive.Versions.v1_1, \"iconUrl\", \"Icon URL\");\r\n static readonly tooltipProperty = new StringPropertyEditor(Adaptive.Versions.v1_5, \"tooltip\", \"Tooltip\");\r\n static readonly isEnabledProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_5, \"isEnabled\", \"Enabled\");\r\n static readonly roleProperty = new EnumPropertyEditor(Adaptive.Versions.v1_6, \"role\", \"Role\", Adaptive.ActionRole);\r\n\r\n protected doubleClick(e: MouseEvent) {\r\n super.doubleClick(e);\r\n\r\n this.action.renderedElement.click();\r\n }\r\n\r\n protected internalRemove(): boolean {\r\n return this.action.remove();\r\n }\r\n\r\n constructor(\r\n parent: DesignerPeer,\r\n designerSurface: CardDesignerSurface,\r\n registration: DesignerPeerRegistrationBase,\r\n action: Adaptive.Action) {\r\n super(parent, designerSurface, registration, action);\r\n }\r\n\r\n protected internalGetTreeItemText(): string {\r\n if (this.action.title && this.action.title != \"\") {\r\n return this.action.title;\r\n } else {\r\n return super.internalGetTreeItemText();\r\n }\r\n }\r\n \r\n protected internalUpdateLayout() {\r\n if (this.action.renderedElement) {\r\n super.internalUpdateLayout();\r\n }\r\n }\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n\r\n getBoundingRect(): Rect {\r\n let designSurfaceOffset = this.designerSurface.getDesignerSurfaceOffset();\r\n let actionBoundingRect = this.action.renderedElement.getBoundingClientRect();\r\n\r\n return new Rect(\r\n actionBoundingRect.top - designSurfaceOffset.y,\r\n actionBoundingRect.right - designSurfaceOffset.x,\r\n actionBoundingRect.bottom - designSurfaceOffset.y,\r\n actionBoundingRect.left - designSurfaceOffset.x\r\n );\r\n }\r\n\r\n getCardObjectBoundingRect(): Rect {\r\n let actionBoundingRect = this.action.renderedElement.getBoundingClientRect();\r\n\r\n return new Rect(\r\n actionBoundingRect.top,\r\n actionBoundingRect.right,\r\n actionBoundingRect.bottom,\r\n actionBoundingRect.left\r\n );\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n ActionPeer.idProperty,\r\n ActionPeer.isEnabledProperty,\r\n ActionPeer.titleProperty,\r\n ActionPeer.tooltipProperty,\r\n ActionPeer.modeProperty,\r\n ActionPeer.styleProperty,\r\n ActionPeer.iconUrlProperty,\r\n ActionPeer.roleProperty);\r\n }\r\n\r\n get action(): Adaptive.Action {\r\n return this.getCardObject();\r\n }\r\n}\r\n\r\nexport abstract class TypedActionPeer extends ActionPeer {\r\n constructor(\r\n parent: DesignerPeer,\r\n designerSurface: CardDesignerSurface,\r\n registration: DesignerPeerRegistrationBase,\r\n action: TAction) {\r\n super(parent, designerSurface, registration, action);\r\n }\r\n\r\n get action(): TAction {\r\n return this.getCardObject();\r\n }\r\n}\r\n\r\nexport class HttpActionPeer extends TypedActionPeer {\r\n static readonly ignoreInputValidationProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_3, \"ignoreInputValidation\", \"Ignore input validation\");\r\n static readonly methodProperty = new ChoicePropertyEditor(\r\n Adaptive.Versions.v1_0,\r\n \"method\",\r\n \"Method\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"GET\", value: \"GET\" },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"POST\", value: \"POST\" }\r\n ],\r\n true);\r\n static readonly urlProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"url\", \"Url\");\r\n static readonly bodyProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"body\", \"Body\", false, true);\r\n static readonly headersProperty = new NameValuePairPropertyEditor(\r\n Adaptive.Versions.v1_0,\r\n \"headers\",\r\n \"name\",\r\n \"value\",\r\n (name: string, value: string) => { return new Adaptive.HttpHeader(name, value); },\r\n \"Name\",\r\n \"Value\",\r\n \"Add a new header\",\r\n \"This action has no header.\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.DefaultCategory,\r\n HttpActionPeer.ignoreInputValidationProperty);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n HttpActionPeer.methodProperty,\r\n HttpActionPeer.urlProperty);\r\n\r\n if (this.action.method == \"POST\") {\r\n propertySheet.add(\r\n defaultCategory,\r\n HttpActionPeer.bodyProperty);\r\n }\r\n\r\n propertySheet.add(\r\n \"HTTP headers\",\r\n HttpActionPeer.headersProperty);\r\n }\r\n}\r\n\r\nexport abstract class BaseSubmitActionPeer extends TypedActionPeer {\r\n static readonly dataProperty = new ObjectPropertyEditor(Adaptive.Versions.v1_0, \"data\", \"Data\");\r\n static readonly associatedInputsProperty = new ChoicePropertyEditor(\r\n Adaptive.Versions.v1_3,\r\n \"associatedInputs\",\r\n \"Associated inputs\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_3, name: \"Automatic\", value: \"auto\" },\r\n { targetVersion: Adaptive.Versions.v1_3, name: \"None\", value: \"none\" }\r\n ]);\r\n static readonly disabledUnlessAssociatedInputsChangeProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_6, \"disabledUnlessAssociatedInputsChange\", \"Only enable when associated inputs change\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n BaseSubmitActionPeer.dataProperty,\r\n BaseSubmitActionPeer.associatedInputsProperty,\r\n BaseSubmitActionPeer.disabledUnlessAssociatedInputsChangeProperty);\r\n }\r\n}\r\n\r\nexport class SubmitActionPeer extends BaseSubmitActionPeer { }\r\n\r\nexport class ExecuteActionPeer extends BaseSubmitActionPeer {\r\n static readonly verbProperty = new StringPropertyEditor(Adaptive.Versions.v1_4, \"verb\", \"Verb\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(defaultCategory, ExecuteActionPeer.verbProperty);\r\n }\r\n}\r\n\r\nexport class OpenUrlActionPeer extends TypedActionPeer {\r\n static readonly urlProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"url\", \"Url\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n OpenUrlActionPeer.urlProperty);\r\n }\r\n}\r\n\r\nexport class ShowCardActionPeer extends TypedActionPeer {\r\n protected getToolTip(): string {\r\n return \"Double click to open/close\";\r\n }\r\n}\r\n\r\nexport class ToggleVisibilityActionPeer extends TypedActionPeer {\r\n}\r\n\r\nexport class CardElementPeer extends DesignerPeer {\r\n static readonly dataContextProperty = new CustomCardObjectPropertyEditor(\"*\", \"$data\", \"Data context\", true);\r\n static readonly whenProperty = new CustomCardObjectPropertyEditor(\"*\", \"$when\", \"Only show when\", true);\r\n static readonly idProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"id\", \"Id\");\r\n static readonly isVisibleProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_2, \"isVisible\", \"Initially visible\");\r\n static readonly spacingProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"spacing\", \"Spacing\", Adaptive.Spacing);\r\n static readonly separatorProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_0, \"separator\", \"Separator\");\r\n static readonly horizontalAlignmentProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"horizontalAlignment\", \"Horizontal alignment\", Adaptive.HorizontalAlignment);\r\n static readonly heightProperty = new HeightPropertyEditor(\r\n Adaptive.Versions.v1_1,\r\n \"height\",\r\n \"Height\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_1, name: \"Automatic\", value: \"auto\" },\r\n { targetVersion: Adaptive.Versions.v1_1, name: \"Stretch\", value: \"stretch\" }\r\n ]\r\n );\r\n\r\n protected insertElementAfter(newElement: Adaptive.CardElement) {\r\n if (this.cardElement.parent instanceof Adaptive.Container) {\r\n this.cardElement.parent.insertItemAfter(newElement, this.cardElement);\r\n\r\n var newPeer = CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(this.designerSurface, this, newElement);\r\n\r\n this.peerAdded(newPeer);\r\n }\r\n }\r\n\r\n protected internalRemove(): boolean {\r\n return this.cardElement.remove();\r\n }\r\n\r\n protected internalUpdateCssStyles() {\r\n super.internalUpdateCssStyles();\r\n\r\n if (this.cardElement.isVisible) {\r\n this.renderedElement.classList.remove(\"invisible\");\r\n } else {\r\n this.renderedElement.classList.add(\"invisible\");\r\n }\r\n }\r\n\r\n constructor(\r\n parent: DesignerPeer,\r\n designerSurface: CardDesignerSurface,\r\n registration: DesignerPeerRegistrationBase,\r\n cardElement: Adaptive.CardElement,\r\n initializeCardElement?: boolean) {\r\n super(parent, designerSurface, registration, cardElement);\r\n\r\n if (initializeCardElement === true) {\r\n this.initializeCardElement();\r\n }\r\n\r\n this.updateChildren();\r\n }\r\n\r\n findCardElementChild(element: Adaptive.CardElement) : CardElementPeer | undefined {\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n let peer = this.getChildAt(i);\r\n\r\n if (peer instanceof CardElementPeer && peer.cardElement === element) {\r\n return peer;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n findActionChild(action: Adaptive.Action) : ActionPeer | undefined {\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n let peer = this.getChildAt(i);\r\n\r\n if (peer instanceof ActionPeer && peer.action === action) {\r\n return peer;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n updateChildren(initializeCardElement?: boolean) {\r\n // Remove all peers from the designer surface\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n let existingPeer = this.getChildAt(i);\r\n\r\n if (existingPeer instanceof CardElementPeer && this.cardElement.indexOf(existingPeer.cardElement) < 0) {\r\n this.removeChild(existingPeer);\r\n }\r\n\r\n if (existingPeer instanceof ActionPeer && this.cardElement.indexOfAction(existingPeer.action) < 0) {\r\n this.removeChild(existingPeer);\r\n }\r\n }\r\n\r\n let itemCount = 0;\r\n if (this.cardElement instanceof Adaptive.CardElementContainer) {\r\n itemCount = this.cardElement.getItemCount();\r\n for (let i = 0; i < itemCount; i++) {\r\n let existingPeer = this.findCardElementChild(this.cardElement.getItemAt(i));\r\n\r\n if (!existingPeer) {\r\n\r\n const peer = CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(\r\n this.designerSurface,\r\n this,\r\n this.cardElement.getItemAt(i),\r\n initializeCardElement);\r\n\r\n this.insertChild(peer, i);\r\n\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0; i < this.cardElement.getActionCount(); i++) {\r\n let existingPeer = this.findActionChild(this.cardElement.getActionAt(i));\r\n\r\n if (!existingPeer) {\r\n this.insertChild(\r\n CardDesignerSurface.actionPeerRegistry.createPeerInstance(\r\n this.designerSurface,\r\n this,\r\n this.cardElement.getActionAt(i)),\r\n itemCount + i);\r\n }\r\n }\r\n\r\n super.updateChildren();\r\n }\r\n\r\n getTreeItemText(): string {\r\n let text = super.getTreeItemText();\r\n\r\n if (this.cardElement.isVisible) {\r\n return text;\r\n } else {\r\n let result = \"Hidden\";\r\n\r\n if (text) {\r\n result += \" - \" + text;\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n initializeCardElement() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n canDrop(peer: DesignerPeer) {\r\n let parent = this.parent;\r\n let parentCanContainElement = true;\r\n\r\n while (parent) {\r\n if (parent instanceof CarouselPagePeer) { \r\n parentCanContainElement = parent.canDrop(peer);\r\n break;\r\n }\r\n\r\n parent = parent.parent;\r\n } \r\n\r\n return this.cardElement instanceof Adaptive.Container && peer instanceof CardElementPeer && parentCanContainElement;\r\n }\r\n\r\n tryDrop(peer: DesignerPeer, insertionPoint: IPoint): boolean {\r\n // Even though Carousel is a Container, we do not want to be able to drop peers\r\n if (this.cardElement instanceof Adaptive.Container && peer instanceof CardElementPeer && !(this.cardElement instanceof Adaptive.Carousel)) {\r\n let targetChild: DesignerPeer = null;\r\n let insertAfter: boolean;\r\n\r\n for (let i = 0; i < this.getChildCount(); i++) {\r\n let rect = this.getChildAt(i).getBoundingRect();\r\n\r\n if (rect.isInside(insertionPoint)) {\r\n targetChild = this.getChildAt(i);\r\n\r\n insertAfter = (insertionPoint.y - rect.top) >= (rect.height / 2);\r\n\r\n break;\r\n }\r\n }\r\n\r\n if (targetChild != peer) {\r\n if (peer.cardElement.parent) {\r\n if (!peer.remove(true, false)) {\r\n return false;\r\n }\r\n\r\n peer.parent.removeChild(peer);\r\n }\r\n\r\n if (!targetChild) {\r\n let rect = this.getBoundingRect();\r\n\r\n insertAfter = (insertionPoint.y - rect.top) >= (rect.height / 2);\r\n\r\n if (this.cardElement.getItemCount() > 0 && insertAfter) {\r\n this.cardElement.insertItemAfter(peer.cardElement, this.cardElement.getItemAt(this.cardElement.getItemCount() - 1));\r\n } else {\r\n this.cardElement.insertItemAfter(peer.cardElement, null);\r\n }\r\n } else {\r\n if (insertAfter) {\r\n this.cardElement.insertItemAfter(peer.cardElement, (targetChild).cardElement);\r\n } else {\r\n this.cardElement.insertItemBefore(peer.cardElement, (targetChild).cardElement);\r\n }\r\n }\r\n\r\n this.insertChild(peer, peer.cardElement.index);\r\n this.changed(false);\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n tryAdd(peer: DesignerPeer): boolean {\r\n if (this.cardElement instanceof Adaptive.Container && peer instanceof CardElementPeer) {\r\n if (peer.cardElement.parent) {\r\n if (!peer.remove(true, false)) {\r\n return false;\r\n }\r\n\r\n peer.parent.removeChild(peer);\r\n }\r\n\r\n this.cardElement.addItem(peer.cardElement);\r\n this.insertChild(peer, peer.cardElement.index);\r\n this.changed(false);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n getBoundingRect(): Rect {\r\n let designSurfaceOffset = this.designerSurface.getDesignerSurfaceOffset();\r\n let cardElementBoundingRect = this.cardElement.renderedElement.getBoundingClientRect();\r\n\r\n let returnRect = undefined;\r\n if (this.cardElement.hasVisibleSeparator) {\r\n let separatorBoundingRect = this.cardElement.separatorElement.getBoundingClientRect();\r\n\r\n returnRect = new Rect(\r\n Math.min(separatorBoundingRect.top, cardElementBoundingRect.top) - designSurfaceOffset.y,\r\n Math.max(separatorBoundingRect.right, cardElementBoundingRect.right) - designSurfaceOffset.x,\r\n Math.max(separatorBoundingRect.bottom, cardElementBoundingRect.bottom) - designSurfaceOffset.y,\r\n Math.min(separatorBoundingRect.left, cardElementBoundingRect.left) - designSurfaceOffset.x\r\n );\r\n } else {\r\n returnRect = new Rect(\r\n cardElementBoundingRect.top - designSurfaceOffset.y,\r\n cardElementBoundingRect.right - designSurfaceOffset.x,\r\n cardElementBoundingRect.bottom - designSurfaceOffset.y,\r\n cardElementBoundingRect.left - designSurfaceOffset.x\r\n );\r\n }\r\n\r\n // If we are displaying a carousel, we need to make sure that all of the child peers are in the correct location\r\n // First check if the peer has a parent that is a CarouselPagePeer and it is the visible page\r\n // Then see if the bounding rect needs to be adjusted\r\n if (this.parentCarouselPagePeer?.isVisible() && !this.parentCarouselPagePeer.peerInCorrectLocation({ x: returnRect.x, y: returnRect.y })) {\r\n returnRect.left = returnRect.left - this.parentCarouselPagePeer.pageOffset;\r\n returnRect.right = returnRect.right - this.parentCarouselPagePeer.pageOffset;\r\n }\r\n\r\n return returnRect;\r\n }\r\n\r\n getCardObjectBoundingRect(): Rect {\r\n let cardElementBoundingRect = this.cardElement.renderedElement.getBoundingClientRect();\r\n\r\n return new Rect(\r\n cardElementBoundingRect.top,\r\n cardElementBoundingRect.right,\r\n cardElementBoundingRect.bottom,\r\n cardElementBoundingRect.left\r\n );\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n if (GlobalSettings.enableDataBindingSupport) {\r\n propertySheet.add(\r\n defaultCategory,\r\n CardElementPeer.dataContextProperty,\r\n CardElementPeer.whenProperty);\r\n }\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n CardElementPeer.idProperty,\r\n CardElementPeer.isVisibleProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n CardElementPeer.spacingProperty,\r\n CardElementPeer.separatorProperty,\r\n CardElementPeer.horizontalAlignmentProperty,\r\n CardElementPeer.heightProperty);\r\n }\r\n\r\n get cardElement(): Adaptive.CardElement {\r\n return this.getCardObject();\r\n }\r\n\r\n isVisible(): boolean {\r\n if (this.parent instanceof CardElementPeer) {\r\n return this.parent.isVisible();\r\n }\r\n return true;\r\n }\r\n\r\n bringCardElementIntoView(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport abstract class TypedCardElementPeer extends CardElementPeer {\r\n constructor(\r\n parent: DesignerPeer,\r\n designerSurface: CardDesignerSurface,\r\n registration: DesignerPeerRegistrationBase,\r\n cardElement: TCardElement,\r\n initializeCardElement?: boolean) {\r\n super(parent, designerSurface, registration, cardElement, initializeCardElement);\r\n }\r\n\r\n get cardElement(): TCardElement {\r\n return this.getCardObject();\r\n }\r\n}\r\n\r\nexport class AdaptiveCardPeer extends TypedCardElementPeer {\r\n static readonly langProperty = new StringPropertyEditor(Adaptive.Versions.v1_1, \"lang\", \"Language\");\r\n static readonly fallbackTextProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"fallbackText\", \"Fallback text\", false, true);\r\n static readonly speakProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"speak\", \"Speak\");\r\n static readonly refreshProperty = new CompoundPropertyEditor(\r\n Adaptive.Versions.v1_4,\r\n \"refresh\",\r\n [\r\n new StringArrayPropertyEditor(Adaptive.Versions.v1_4, \"userIds\", \"User IDs\", false, true),\r\n new ActionPropertyEditor(Adaptive.Versions.v1_4, \"action\", \"Action\", [ \"*\", \"-Action.Execute\" ], true)\r\n ],\r\n () => { return new Adaptive.RefreshDefinition() });\r\n\r\n protected addAction(action: Adaptive.Action) {\r\n this.cardElement.addAction(action);\r\n\r\n this.insertChild(CardDesignerSurface.actionPeerRegistry.createPeerInstance(this.designerSurface, this, action));\r\n }\r\n\r\n protected internalRemove(): boolean {\r\n return true;\r\n }\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n let availableActions: Adaptive.ITypeRegistration[] = [];\r\n\r\n for (let i = 0; i < context.hostContainer.actionsRegistry.getItemCount(); i++) {\r\n let typeRegistration = context.hostContainer.actionsRegistry.getItemAt(i);\r\n\r\n if (typeRegistration.schemaVersion.compareTo(context.targetVersion) <= 0) {\r\n availableActions.push(typeRegistration);\r\n }\r\n }\r\n\r\n if (availableActions.length > 0) {\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Add an action\",\r\n alwaysShowName: true,\r\n iconClass: \"acd-icon-bolt\",\r\n showInPropertySheet: true,\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n let popupMenu = new Controls.PopupMenu();\r\n\r\n for (let i = 0; i < availableActions.length; i++) {\r\n let menuItem = new Controls.DropDownItem(i.toString(), availableActions[i].typeName);\r\n menuItem.onClick = (clickedItem: Controls.DropDownItem) => {\r\n let registration = availableActions[i];\r\n let action = new registration.objectType();\r\n action.title = registration.typeName;\r\n\r\n this.addAction(action);\r\n\r\n popupMenu.closePopup(false);\r\n this.renderedElement.focus();\r\n };\r\n\r\n popupMenu.items.add(menuItem);\r\n }\r\n\r\n popupMenu.popup(clickedElement);\r\n }\r\n })\r\n );\r\n }\r\n }\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n\r\n canBeRemoved(): boolean {\r\n return false;\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.remove(\r\n DesignerPeer.idProperty,\r\n CardElementPeer.isVisibleProperty,\r\n CardElementPeer.horizontalAlignmentProperty,\r\n CardElementPeer.separatorProperty,\r\n CardElementPeer.heightProperty,\r\n CardElementPeer.spacingProperty);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n AdaptiveCardPeer.langProperty,\r\n AdaptiveCardPeer.fallbackTextProperty,\r\n AdaptiveCardPeer.speakProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.Refresh,\r\n AdaptiveCardPeer.refreshProperty);\r\n\r\n if (this.cardElement.refresh && this.cardElement.refresh.action) {\r\n propertySheet.addActionProperties(\r\n Adaptive.Versions.v1_4,\r\n this,\r\n this.cardElement.refresh.action,\r\n PropertySheetCategory.Refresh,\r\n [ BaseSubmitActionPeer.associatedInputsProperty, ActionPeer.iconUrlProperty, ActionPeer.styleProperty, ActionPeer.modeProperty ]);\r\n }\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ContainerPeer.minHeightProperty,\r\n ContainerPeer.verticalContentAlignmentProperty,\r\n ContainerPeer.rtlProperty);\r\n\r\n propertySheet.add(\r\n \"Background image\",\r\n ContainerPeer.backgroundImageProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.SelectionAction,\r\n ContainerPeer.selectActionProperty);\r\n\r\n if (this.cardElement.selectAction) {\r\n propertySheet.addActionProperties(\r\n Adaptive.Versions.v1_0,\r\n this,\r\n this.cardElement.selectAction,\r\n PropertySheetCategory.SelectionAction);\r\n }\r\n }\r\n}\r\n\r\nexport class ColumnPeer extends TypedCardElementPeer {\r\n private static readonly pixelWidthProperty = new SizeAndUnitPropertyEditor(Adaptive.Versions.v1_1, \"width\", \"Width in pixels\", Adaptive.SizeUnit.Pixel);\r\n private static readonly weightProperty = new SizeAndUnitPropertyEditor(Adaptive.Versions.v1_0, \"width\", \"Weight\", Adaptive.SizeUnit.Weight);\r\n\r\n static readonly widthProperty = new ColumnWidthPropertyEditor(\r\n Adaptive.Versions.v1_0,\r\n \"width\",\r\n \"Width\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"Automatic\", value: \"auto\" },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"Stretch\", value: \"stretch\" },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"Weighted\", value: \"weighted\" },\r\n { targetVersion: Adaptive.Versions.v1_1, name: \"Pixels\", value: \"pixels\" }\r\n ],\r\n true);\r\n\r\n protected isContainer(): boolean {\r\n return true;\r\n }\r\n\r\n protected internalGetTreeItemText(): string {\r\n if (this.cardElement.width instanceof Adaptive.SizeAndUnit) {\r\n switch (this.cardElement.width.unit) {\r\n case Adaptive.SizeUnit.Weight:\r\n return \"Weight: \" + this.cardElement.width.physicalSize;\r\n default:\r\n return this.cardElement.width.physicalSize + \" pixels\";\r\n }\r\n } else {\r\n switch (this.cardElement.width) {\r\n case \"stretch\":\r\n return \"Stretch\";\r\n case \"auto\":\r\n return \"Automatic\";\r\n default:\r\n return \"\";\r\n }\r\n }\r\n }\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ColumnPeer.widthProperty);\r\n\r\n if (this.cardElement.width instanceof Adaptive.SizeAndUnit) {\r\n if (this.cardElement.width.unit == Adaptive.SizeUnit.Pixel) {\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ColumnPeer.pixelWidthProperty);\r\n } else {\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ColumnPeer.weightProperty);\r\n }\r\n }\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ContainerPeer.minHeightProperty,\r\n ContainerPeer.verticalContentAlignmentProperty,\r\n ContainerPeer.rtlProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.StyleCategory,\r\n ContainerPeer.styleProperty,\r\n ContainerPeer.bleedProperty);\r\n\r\n propertySheet.add(\r\n \"Background image\",\r\n ContainerPeer.backgroundImageProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.SelectionAction,\r\n ContainerPeer.selectActionProperty);\r\n\r\n if (this.cardElement.selectAction) {\r\n propertySheet.addActionProperties(\r\n Adaptive.Versions.v1_0,\r\n this,\r\n this.cardElement.selectAction,\r\n PropertySheetCategory.SelectionAction);\r\n }\r\n }\r\n}\r\n\r\nexport class ColumnSetPeer extends TypedCardElementPeer {\r\n protected isContainer(): boolean {\r\n return true;\r\n }\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Add a column\",\r\n iconClass: \"acd-icon-addColumn\",\r\n isPromotable: true,\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n var column = new Adaptive.Column();\r\n column.width = \"stretch\";\r\n\r\n this.cardElement.addColumn(column);\r\n\r\n const newPeer = CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(this.designerSurface, this, column);\r\n newPeer.insertAfterNeighbor = true;\r\n\r\n this.insertChild(newPeer);\r\n }\r\n })\r\n );\r\n }\r\n\r\n protected internalGetTreeItemText(): string {\r\n let columnCount = this.cardElement.getItemCount();\r\n\r\n switch (columnCount) {\r\n case 0:\r\n return \"No column\";\r\n case 1:\r\n return \"1 column\";\r\n default:\r\n return columnCount + \" columns\";\r\n }\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n ContainerPeer.minHeightProperty,\r\n ContainerPeer.styleProperty,\r\n ContainerPeer.bleedProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.SelectionAction,\r\n ContainerPeer.selectActionProperty);\r\n\r\n if (this.cardElement.selectAction) {\r\n propertySheet.addActionProperties(\r\n Adaptive.Versions.v1_0,\r\n this,\r\n this.cardElement.selectAction,\r\n PropertySheetCategory.SelectionAction);\r\n }\r\n }\r\n\r\n canDrop(peer: DesignerPeer) {\r\n return true;\r\n }\r\n}\r\n\r\nexport class ContainerPeer extends TypedCardElementPeer {\r\n static readonly selectActionProperty = new ActionPropertyEditor(Adaptive.Versions.v1_1, \"selectAction\", \"Action type\", [ Adaptive.ShowCardAction.JsonTypeName ], true);\r\n static readonly minHeightProperty = new NumberPropertyEditor(Adaptive.Versions.v1_2, \"minPixelHeight\", \"Minimum height in pixels\");\r\n static readonly verticalContentAlignmentProperty = new EnumPropertyEditor(Adaptive.Versions.v1_1, \"verticalContentAlignment\", \"Vertical content alignment\", Adaptive.VerticalAlignment);\r\n static readonly styleProperty = new ContainerStylePropertyEditor(Adaptive.Versions.v1_0, \"style\", \"Style\");\r\n static readonly bleedProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_2, \"bleed\", \"Bleed\");\r\n static readonly backgroundImageProperty = new CompoundPropertyEditor(\r\n Adaptive.Versions.v1_0,\r\n \"backgroundImage\",\r\n [\r\n new StringPropertyEditor(Adaptive.Versions.v1_0, \"url\", \"URL\", true),\r\n new EnumPropertyEditor(Adaptive.Versions.v1_2, \"fillMode\", \"Fill mode\", Adaptive.FillMode),\r\n new EnumPropertyEditor(Adaptive.Versions.v1_2, \"horizontalAlignment\", \"Horizontal alignment\", Adaptive.HorizontalAlignment),\r\n new EnumPropertyEditor(Adaptive.Versions.v1_2, \"verticalAlignment\", \"Vertical alignment\", Adaptive.VerticalAlignment)\r\n ]\r\n );\r\n static readonly rtlProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_5, \"rtl\", \"Present right to left\");\r\n\r\n protected isContainer(): boolean {\r\n return true;\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ContainerPeer.minHeightProperty,\r\n ContainerPeer.verticalContentAlignmentProperty,\r\n ContainerPeer.rtlProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.StyleCategory,\r\n ContainerPeer.styleProperty,\r\n ContainerPeer.bleedProperty);\r\n\r\n propertySheet.add(\r\n \"Background image\",\r\n ContainerPeer.backgroundImageProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.SelectionAction,\r\n ContainerPeer.selectActionProperty);\r\n\r\n if (this.cardElement.selectAction) {\r\n propertySheet.addActionProperties(\r\n Adaptive.Versions.v1_0,\r\n this,\r\n this.cardElement.selectAction,\r\n PropertySheetCategory.SelectionAction);\r\n }\r\n }\r\n}\r\n\r\nexport class ActionSetPeer extends TypedCardElementPeer {\r\n protected addAction(action: Adaptive.Action) {\r\n this.cardElement.addAction(action);\r\n\r\n const newPeer = CardDesignerSurface.actionPeerRegistry.createPeerInstance(this.designerSurface, this, action);\r\n newPeer.insertAfterNeighbor = true;\r\n\r\n this.insertChild(newPeer);\r\n }\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n let availableActions: Adaptive.ITypeRegistration[] = [];\r\n\r\n for (let i = 0; i < context.hostContainer.actionsRegistry.getItemCount(); i++) {\r\n let typeRegistration = context.hostContainer.actionsRegistry.getItemAt(i);\r\n\r\n if (typeRegistration.schemaVersion.compareTo(context.targetVersion) <= 0) {\r\n availableActions.push(typeRegistration);\r\n }\r\n }\r\n\r\n if (availableActions.length > 0) {\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Add an action\",\r\n alwaysShowName: true,\r\n iconClass: \"acd-icon-bolt\",\r\n showInPropertySheet: true,\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n let popupMenu = new Controls.PopupMenu();\r\n\r\n for (let i = 0; i < availableActions.length; i++) {\r\n let menuItem = new Controls.DropDownItem(i.toString(), availableActions[i].typeName);\r\n menuItem.onClick = (clickedItem: Controls.DropDownItem) => {\r\n let registration = availableActions[i];\r\n let action = new registration.objectType();\r\n action.title = registration.typeName;\r\n\r\n this.addAction(action);\r\n\r\n popupMenu.closePopup(false);\r\n };\r\n\r\n popupMenu.items.add(menuItem);\r\n }\r\n\r\n popupMenu.popup(clickedElement);\r\n }\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport class ImageSetPeer extends TypedCardElementPeer {\r\n static readonly ImageSizeProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"imageSize\", \"Image size\", Adaptive.ImageSize);\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Add an image\",\r\n iconClass: \"acd-icon-image\",\r\n isPromotable: true,\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n let newImage = new Adaptive.Image();\r\n\r\n this.cardElement.addImage(newImage);\r\n\r\n const newPeer = CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(this.designerSurface, this, newImage);\r\n newPeer.insertAfterNeighbor = true;\r\n\r\n this.insertChild(newPeer);\r\n }\r\n })\r\n );\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n ImageSetPeer.ImageSizeProperty);\r\n }\r\n}\r\n\r\nexport class ImagePeer extends TypedCardElementPeer {\r\n static readonly urlProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"url\", \"Url\", true);\r\n static readonly altTextProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"altText\", \"Alternate text\", true);\r\n static readonly sizeProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"size\", \"Size\", Adaptive.Size);\r\n static readonly pixelWidthProperty = new NumberPropertyEditor(Adaptive.Versions.v1_1, \"pixelWidth\", \"Width in pixels\");\r\n static readonly pixelHeightProperty = new NumberPropertyEditor(Adaptive.Versions.v1_1, \"pixelHeight\", \"Height in pixels\");\r\n static readonly styleProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"style\", \"Style\", Adaptive.ImageStyle);\r\n static readonly backgroundColorProperty = new StringPropertyEditor(Adaptive.Versions.v1_1, \"backgroundColor\", \"Background color\");\r\n\r\n private get isParentImageSet(): boolean {\r\n return this.parent && this.parent instanceof ImageSetPeer;\r\n }\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n if (GlobalSettings.enableDataBindingSupport && context.dataStructure) {\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Bind...\",\r\n alwaysShowName: true,\r\n toolTip: \"Select a data field to bind this Image to.\",\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n let fieldPicker = new FieldPicker(context.dataStructure);\r\n fieldPicker.onClose = (sender, wasCancelled) => {\r\n if (!wasCancelled) {\r\n this.cardElement.url = fieldPicker.selectedField.asExpression();\r\n\r\n this.changed(true);\r\n }\r\n };\r\n fieldPicker.popup(clickedElement);\r\n }\r\n })\r\n );\r\n }\r\n }\r\n\r\n isDraggable(): boolean {\r\n return !this.isParentImageSet;\r\n }\r\n\r\n getBoundingRect(): Rect {\r\n if (this.isParentImageSet) {\r\n let designSurfaceOffset = this.designerSurface.getDesignerSurfaceOffset();\r\n let actionBoundingRect = this.cardElement.renderedElement.getBoundingClientRect();\r\n\r\n let returnRect = new Rect(\r\n actionBoundingRect.top - designSurfaceOffset.y,\r\n actionBoundingRect.right - designSurfaceOffset.x,\r\n actionBoundingRect.bottom - designSurfaceOffset.y,\r\n actionBoundingRect.left - designSurfaceOffset.x\r\n );\r\n\r\n // If we are displaying a carousel, we need to make sure that all of the child peers are in the correct location\r\n // First check if the peer has a parent that is a CarouselPagePeer and it is the visible page\r\n // Then see if the bounding rect needs to be adjusted\r\n if (this.parentCarouselPagePeer?.isVisible() && !this.parentCarouselPagePeer.peerInCorrectLocation({ x: returnRect.right, y: returnRect.bottom })) {\r\n returnRect.left = returnRect.left - this.parentCarouselPagePeer.pageOffset;\r\n returnRect.right = returnRect.right - this.parentCarouselPagePeer.pageOffset;\r\n }\r\n\r\n return returnRect;\r\n } else {\r\n return super.getBoundingRect();\r\n }\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n ImagePeer.urlProperty,\r\n ImagePeer.altTextProperty);\r\n\r\n if (!this.isParentImageSet) {\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ImagePeer.sizeProperty,\r\n ImagePeer.pixelWidthProperty,\r\n ImagePeer.pixelHeightProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.StyleCategory,\r\n ImagePeer.styleProperty,\r\n ImagePeer.backgroundColorProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.SelectionAction,\r\n ContainerPeer.selectActionProperty);\r\n\r\n if (this.cardElement.selectAction) {\r\n propertySheet.addActionProperties(\r\n Adaptive.Versions.v1_0,\r\n this,\r\n this.cardElement.selectAction,\r\n PropertySheetCategory.SelectionAction);\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport class MediaPeer extends TypedCardElementPeer {\r\n static readonly altTextProperty = new StringPropertyEditor(Adaptive.Versions.v1_1, \"altText\", \"Alternate text\", true);\r\n static readonly posterUrlProperty = new StringPropertyEditor(Adaptive.Versions.v1_1, \"posterUrl\", \"Poster URL\", true);\r\n static readonly sourcesProperty = new InnerStructPropertyEditor(\r\n Adaptive.Versions.v1_1,\r\n \"sources\",\r\n {\"url\": {name: \"URL\"}, \"mimeType\": {name: \"MIME Type\"}},\r\n (innerProperties: InnerPropertiesDictionary) => { return new Adaptive.MediaSource(innerProperties[\"url\"].value, innerProperties[\"mimeType\"].value); },\r\n \"Add a new source\",\r\n \"No source has been defined.\");\r\n static readonly captionSourcesProperty = new InnerStructPropertyEditor(\r\n Adaptive.Versions.v1_6,\r\n \"captionSources\",\r\n {\"url\": {name: \"URL\"}, \"mimeType\": {name: \"MIME Type\"}, \"label\": {name: \"Label\"}},\r\n (innerProperties: InnerPropertiesDictionary) => { return new Adaptive.CaptionSource(innerProperties[\"url\"].value, innerProperties[\"mimeType\"].value, innerProperties[\"label\"].value); },\r\n \"Add a new caption source\",\r\n \"No caption source has been defined.\");\r\n\r\n protected internalGetTreeItemText(): string {\r\n if (this.cardElement.selectedMediaType == \"audio\") {\r\n return \"audio\";\r\n } else if (this.cardElement.selectedMediaType == \"video\") {\r\n return \"video\";\r\n } else {\r\n return super.internalGetTreeItemText();\r\n }\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n MediaPeer.altTextProperty,\r\n MediaPeer.posterUrlProperty);\r\n\r\n propertySheet.add(\r\n \"Sources\",\r\n MediaPeer.sourcesProperty);\r\n\r\n propertySheet.add(\r\n \"Caption Sources\",\r\n MediaPeer.captionSourcesProperty);\r\n }\r\n}\r\n\r\nexport class FactSetPeer extends TypedCardElementPeer {\r\n static readonly factsProperty = new NameValuePairPropertyEditor(\r\n Adaptive.Versions.v1_0,\r\n \"facts\",\r\n \"name\",\r\n \"value\",\r\n (name: string, value: string) => { return new Adaptive.Fact(name, value); },\r\n \"Name\",\r\n \"Value\",\r\n \"Add a new fact\",\r\n \"This FactSet is empty.\");\r\n\r\n protected internalGetTreeItemText(): string {\r\n if (this.cardElement.facts.length == 0) {\r\n return \"No fact\";\r\n }\r\n\r\n let allNames = this.cardElement.facts.map(\r\n (value, index, array) => {\r\n return value.name;\r\n }\r\n )\r\n\r\n return allNames.join(\", \");\r\n }\r\n\r\n initializeCardElement() {\r\n super.initializeCardElement();\r\n\r\n this.cardElement.facts.push(\r\n new Adaptive.Fact(\"Fact 1\", \"Value 1\"),\r\n new Adaptive.Fact(\"Fact 2\", \"Value 2\")\r\n );\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n \"Facts\",\r\n FactSetPeer.factsProperty);\r\n\r\n propertySheet.remove(CardElementPeer.horizontalAlignmentProperty);\r\n }\r\n}\r\n\r\nexport abstract class InputPeer extends TypedCardElementPeer {\r\n static readonly labelProperty = new StringPropertyEditor(\r\n Adaptive.Versions.v1_3,\r\n \"label\",\r\n \"Label\");\r\n\r\n static readonly isRequiredProperty = new BooleanPropertyEditor(\r\n Adaptive.Versions.v1_3,\r\n \"isRequired\",\r\n \"Required\");\r\n\r\n static readonly errorMessageProperty = new StringPropertyEditor(\r\n Adaptive.Versions.v1_3,\r\n \"errorMessage\",\r\n \"Error message\");\r\n\r\n protected internalGetTreeItemText(): string {\r\n return this.cardElement.id ? this.cardElement.id : super.internalGetTreeItemText();\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(defaultCategory, InputPeer.labelProperty);\r\n propertySheet.add(\r\n PropertySheetCategory.Validation,\r\n InputPeer.isRequiredProperty,\r\n InputPeer.errorMessageProperty);\r\n\r\n propertySheet.remove(\r\n CardElementPeer.horizontalAlignmentProperty,\r\n CardElementPeer.heightProperty);\r\n }\r\n}\r\n\r\nexport class TextInputPeer extends InputPeer {\r\n static readonly defaultValueProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"defaultValue\", \"Default value\");\r\n static readonly placeholderProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"placeholder\", \"Placeholder\");\r\n static readonly isMultilineProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_0, \"isMultiline\", \"Multi-line\", true);\r\n static readonly styleProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"style\", \"Style\", Adaptive.InputTextStyle);\r\n static readonly maxLengthProperty = new NumberPropertyEditor(Adaptive.Versions.v1_0, \"maxLength\", \"Maximum length\");\r\n static readonly inlineActionProperty = new ActionPropertyEditor(Adaptive.Versions.v1_2, \"inlineAction\", \"Action type\", [ Adaptive.ShowCardAction.JsonTypeName ], true);\r\n static readonly regexProperty = new StringPropertyEditor(Adaptive.Versions.v1_3, \"regex\", \"Pattern\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n TextInputPeer.placeholderProperty,\r\n TextInputPeer.isMultilineProperty);\r\n\r\n if (!this.cardElement.isMultiline) {\r\n propertySheet.add(\r\n PropertySheetCategory.DefaultCategory,\r\n TextInputPeer.styleProperty);\r\n } else {\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n CardElementPeer.heightProperty);\r\n }\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.InlineAction,\r\n TextInputPeer.inlineActionProperty);\r\n\r\n if (this.cardElement.inlineAction) {\r\n propertySheet.addActionProperties(\r\n Adaptive.Versions.v1_2,\r\n this,\r\n this.cardElement.inlineAction,\r\n PropertySheetCategory.InlineAction,\r\n [ ActionPeer.styleProperty, ActionPeer.modeProperty ]);\r\n }\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n TextInputPeer.maxLengthProperty,\r\n TextInputPeer.defaultValueProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.Validation,\r\n TextInputPeer.regexProperty);\r\n }\r\n\r\n initializeCardElement() {\r\n super.initializeCardElement();\r\n\r\n this.cardElement.placeholder = \"Placeholder text\";\r\n }\r\n}\r\n\r\nexport class NumberInputPeer extends InputPeer {\r\n static readonly defaultValueProperty = new NumberPropertyEditor(Adaptive.Versions.v1_0, \"defaultValue\", \"Default value\");\r\n static readonly placeholderProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"placeholder\", \"Placeholder\");\r\n static readonly minProperty = new NumberPropertyEditor(Adaptive.Versions.v1_0, \"min\", \"Minimum value\");\r\n static readonly maxProperty = new NumberPropertyEditor(Adaptive.Versions.v1_0, \"max\", \"Maximum value\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n NumberInputPeer.placeholderProperty,\r\n NumberInputPeer.defaultValueProperty,\r\n NumberInputPeer.minProperty,\r\n NumberInputPeer.maxProperty);\r\n }\r\n\r\n initializeCardElement() {\r\n super.initializeCardElement();\r\n\r\n this.cardElement.placeholder = \"Placeholder text\";\r\n }\r\n}\r\n\r\nexport class DateInputPeer extends InputPeer {\r\n static readonly defaultValueProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"defaultValue\", \"Default value\");\r\n static readonly minProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"min\", \"Minimum value\");\r\n static readonly maxProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"max\", \"Maximum value\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n DateInputPeer.defaultValueProperty,\r\n DateInputPeer.minProperty,\r\n DateInputPeer.maxProperty);\r\n }\r\n}\r\n\r\nexport class TimeInputPeer extends InputPeer {\r\n static readonly defaultValueProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"defaultValue\", \"Default value\");\r\n static readonly minProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"min\", \"Minimum value\");\r\n static readonly maxProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"max\", \"Maximum value\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n TimeInputPeer.defaultValueProperty,\r\n TimeInputPeer.minProperty,\r\n TimeInputPeer.maxProperty);\r\n }\r\n}\r\n\r\nexport class ToggleInputPeer extends InputPeer {\r\n static readonly defaultValueProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"defaultValue\", \"Default value\");\r\n static readonly titleProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"title\", \"Title\", true);\r\n static readonly valueOnProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"valueOn\", \"Value when on\");\r\n static readonly valueOffProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"valueOff\", \"Value when off\");\r\n static readonly wrapProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_2, \"wrap\", \"Wrap\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n ToggleInputPeer.titleProperty,\r\n ToggleInputPeer.valueOnProperty,\r\n ToggleInputPeer.valueOffProperty,\r\n ToggleInputPeer.defaultValueProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ToggleInputPeer.wrapProperty);\r\n }\r\n\r\n initializeCardElement() {\r\n this.cardElement.title = \"New Input.Toggle\";\r\n }\r\n}\r\n\r\nexport class ChoiceSetInputPeer extends InputPeer {\r\n static readonly defaultValueProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"defaultValue\", \"Default value\");\r\n static readonly placeholderProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"placeholder\", \"Placeholder\");\r\n static readonly isMultiselectProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_0, \"isMultiSelect\", \"Allow multi selection\");\r\n static readonly styleProperty = new ChoicePropertyEditor(\r\n Adaptive.Versions.v1_0,\r\n \"style\",\r\n \"Style\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"Compact\", value: \"compact\" },\r\n { targetVersion: Adaptive.Versions.v1_0, name: \"Expanded\", value: \"expanded\" },\r\n { targetVersion: Adaptive.Versions.v1_5, name: \"Filtered\", value: \"filtered\" }\r\n ],\r\n true);\r\n static readonly wrapProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_2, \"wrap\", \"Wrap\");\r\n static readonly choicesProperty = new NameValuePairPropertyEditor(\r\n Adaptive.Versions.v1_0,\r\n \"choices\",\r\n \"title\",\r\n \"value\",\r\n (name: string, value: string) => { return new Adaptive.Choice(name, value); },\r\n \"Title\",\r\n \"Value\",\r\n \"Add a new choice\",\r\n \"This ChoiceSet is empty\");\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n ChoiceSetInputPeer.placeholderProperty,\r\n ChoiceSetInputPeer.isMultiselectProperty,\r\n ChoiceSetInputPeer.styleProperty,\r\n ChoiceSetInputPeer.defaultValueProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n ToggleInputPeer.wrapProperty);\r\n\r\n propertySheet.add(\r\n \"Choices\",\r\n ChoiceSetInputPeer.choicesProperty);\r\n }\r\n\r\n initializeCardElement() {\r\n this.cardElement.placeholder = \"Placeholder text\";\r\n\r\n this.cardElement.choices.push(\r\n new Adaptive.Choice(\"Choice 1\", \"Choice 1\"),\r\n new Adaptive.Choice(\"Choice 2\", \"Choice 2\")\r\n );\r\n }\r\n}\r\n\r\nclass TextBlockPeerInplaceEditor extends CardElementPeerInplaceEditor {\r\n private _renderedElement: HTMLTextAreaElement;\r\n\r\n private close(applyChanges: boolean) {\r\n if (this.onClose) {\r\n this.onClose(applyChanges);\r\n }\r\n }\r\n\r\n initialize() {\r\n this._renderedElement.select();\r\n }\r\n\r\n applyChanges() {\r\n this.cardElement.text = this._renderedElement.value;\r\n }\r\n\r\n render() {\r\n this._renderedElement = document.createElement(\"textarea\");\r\n this._renderedElement.className = \"acd-textBlock-inplace-editor\";\r\n this._renderedElement.value = this.cardElement.text;\r\n this._renderedElement.onkeydown = (e) => {\r\n switch (e.key) {\r\n case Controls.Constants.keys.escape:\r\n this.close(false);\r\n\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n break;\r\n case Controls.Constants.keys.enter:\r\n this.close(true);\r\n\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n break;\r\n }\r\n\r\n return !e.cancelBubble;\r\n };\r\n\r\n this.cardElement.applyStylesTo(this._renderedElement);\r\n\r\n return this._renderedElement;\r\n }\r\n}\r\n\r\nexport class TextBlockPeer extends TypedCardElementPeer {\r\n static readonly textProperty = new StringPropertyEditor(Adaptive.Versions.v1_0, \"text\", \"Text\", true, true);\r\n static readonly wrapProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_0, \"wrap\", \"Wrap\");\r\n static readonly maxLinesProperty = new NumberPropertyEditor(Adaptive.Versions.v1_0, \"maxLines\", \"Maximum lines\", 0);\r\n static readonly fontTypeProperty = new EnumPropertyEditor(Adaptive.Versions.v1_2, \"fontType\", \"Font type\", Adaptive.FontType, false, true);\r\n static readonly sizeProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"size\", \"Size\", Adaptive.TextSize, false, true);\r\n static readonly weightProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"weight\", \"Weight\", Adaptive.TextWeight, false, true);\r\n static readonly colorProperty = new EnumPropertyEditor(Adaptive.Versions.v1_0, \"color\", \"Color\", Adaptive.TextColor, false, true);\r\n static readonly subtleProperty = new NullableBooleanPropertyEditor(Adaptive.Versions.v1_0, \"isSubtle\", \"Subtle\");\r\n static readonly styleProperty = new ChoicePropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"style\",\r\n \"Base style\",\r\n [\r\n { targetVersion: Adaptive.Versions.v1_5, name: \"Default\", value: \"default\" },\r\n { targetVersion: Adaptive.Versions.v1_5, name: \"Heading\", value: \"heading\" },\r\n { targetVersion: Adaptive.Versions.v1_5, name: \"Column header\", value: \"columnHeader\" }\r\n ],\r\n false,\r\n true);\r\n\r\n protected createInplaceEditor(): DesignerPeerInplaceEditor {\r\n return new TextBlockPeerInplaceEditor(this.cardElement);\r\n }\r\n\r\n protected internalGetTreeItemText(): string {\r\n return this.cardElement.text;\r\n }\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n if (context.dataStructure) {\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Bind...\",\r\n alwaysShowName: true,\r\n toolTip: \"Select a data field to bind this TextBlock to.\",\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n let fieldPicker = new FieldPicker(context.dataStructure);\r\n fieldPicker.onClose = (sender, wasCancelled) => {\r\n if (!wasCancelled) {\r\n this.cardElement.text = fieldPicker.selectedField.asExpression();\r\n\r\n this.changed(true);\r\n }\r\n };\r\n fieldPicker.popup(clickedElement);\r\n }\r\n })\r\n );\r\n }\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n TextBlockPeer.textProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n TextBlockPeer.wrapProperty,\r\n TextBlockPeer.maxLinesProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.StyleCategory,\r\n TextBlockPeer.styleProperty,\r\n TextBlockPeer.fontTypeProperty,\r\n TextBlockPeer.sizeProperty,\r\n TextBlockPeer.weightProperty,\r\n TextBlockPeer.colorProperty,\r\n TextBlockPeer.subtleProperty);\r\n }\r\n\r\n getToolTip(): string {\r\n return \"Double click to edit\";\r\n }\r\n\r\n initializeCardElement() {\r\n if (!this.cardElement.text || this.cardElement.text == \"\") {\r\n this.cardElement.text = \"New TextBlock\";\r\n }\r\n\r\n this.cardElement.wrap = true;\r\n }\r\n}\r\n\r\nexport class RichTextBlockPeer extends TypedCardElementPeer {\r\n protected internalGetTreeItemText(): string {\r\n return this.cardElement.asString();\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n new CustomPropertySheetEntry(\r\n \"*\",\r\n (context: PropertySheetContext) => {\r\n let infoTextBlock = new Adaptive.TextBlock();\r\n infoTextBlock.text = \"Use the **Card Payload Editor** to edit the text of this RichTextBlock element.\";\r\n infoTextBlock.wrap = true;\r\n infoTextBlock.spacing = Adaptive.Spacing.Large;\r\n infoTextBlock.separator = true;\r\n infoTextBlock.horizontalAlignment = Adaptive.HorizontalAlignment.Center;\r\n\r\n return infoTextBlock;\r\n }\r\n )\r\n );\r\n }\r\n\r\n initializeCardElement() {\r\n let textRun = new Adaptive.TextRun();\r\n textRun.text = \"New RichTextBlock\";\r\n\r\n this.cardElement.addInline(textRun);\r\n }\r\n}\r\n\r\nexport class TableCellPeer extends ContainerPeer {\r\n canBeRemoved(): boolean {\r\n return false;\r\n }\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class TableRowPeer extends TypedCardElementPeer {\r\n static readonly horizontalCellContentAlignmentProperty = new EnumPropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n \"Horizontal cell content alignment\",\r\n Adaptive.HorizontalAlignment,\r\n false,\r\n true);\r\n\r\n static readonly verticalCellContentAlignmentProperty = new EnumPropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n \"Vertical cell content alignment\",\r\n Adaptive.VerticalAlignment,\r\n false,\r\n true);\r\n\r\n protected isContainer(): boolean {\r\n return true;\r\n }\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.StyleCategory,\r\n ContainerPeer.styleProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n TableRowPeer.horizontalCellContentAlignmentProperty,\r\n TableRowPeer.verticalCellContentAlignmentProperty);\r\n }\r\n\r\n get isTreeItemExpandedByDefault(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nclass TableColumnsPropertyEditor extends PropertySheetEntry {\r\n private columnsChanged(context: PropertySheetContext, refreshPropertySheet: boolean) {\r\n context.peer.updateChildren();\r\n context.peer.changed(refreshPropertySheet);\r\n }\r\n\r\n render(context: PropertySheetContext): Adaptive.CardElement {\r\n let result = new Adaptive.Container();\r\n let peer = context.peer as TablePeer;\r\n\r\n if (peer.cardElement.getColumnCount() === 0) {\r\n let messageTextBlock = new Adaptive.TextBlock();\r\n messageTextBlock.spacing = Adaptive.Spacing.Small;\r\n messageTextBlock.text = \"No column has been defined\";\r\n\r\n result.addItem(messageTextBlock);\r\n } else {\r\n for (let i = 0; i < peer.cardElement.getColumnCount(); i++) {\r\n let columnDefinition = peer.cardElement.getColumnAt(i);\r\n\r\n let widthInput = new Adaptive.NumberInput();\r\n widthInput.placeholder = \"Width\";\r\n widthInput.min = 0;\r\n widthInput.defaultValue = columnDefinition.width.physicalSize;\r\n widthInput.onValueChanged = (sender) => {\r\n columnDefinition.width.physicalSize = sender.value;\r\n\r\n this.columnsChanged(context, false);\r\n };\r\n\r\n let widthColumn = new Adaptive.Column(\"stretch\");\r\n widthColumn.addItem(widthInput);\r\n\r\n let unitInput = new Adaptive.ChoiceSetInput();\r\n unitInput.placeholder = \"Unit\";\r\n unitInput.choices.push(\r\n new Adaptive.Choice(\"Pixels\", Adaptive.SizeUnit.Pixel.toString()),\r\n new Adaptive.Choice(\"Weight\", Adaptive.SizeUnit.Weight.toString())\r\n );\r\n unitInput.defaultValue = columnDefinition.width.unit.toString();\r\n unitInput.onValueChanged = (sender) => {\r\n columnDefinition.width.unit = parseInt(sender.value);\r\n\r\n this.columnsChanged(context, false);\r\n };\r\n\r\n let unitColumn = new Adaptive.Column(\"stretch\");\r\n unitColumn.spacing = Adaptive.Spacing.Small;\r\n unitColumn.addItem(unitInput);\r\n\r\n let removeAction = new Adaptive.SubmitAction();\r\n removeAction.title = \"X\";\r\n removeAction.tooltip = \"Remove\";\r\n removeAction.onExecute = (sender) => {\r\n peer.cardElement.removeColumn(columnDefinition);\r\n\r\n this.columnsChanged(context, true);\r\n };\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n actionSet.addAction(removeAction);\r\n\r\n let removeActionColumn = new Adaptive.Column(\"auto\");\r\n removeActionColumn.spacing = Adaptive.Spacing.Small;\r\n removeActionColumn.addItem(actionSet);\r\n\r\n let columnSet = new Adaptive.ColumnSet();\r\n columnSet.spacing = Adaptive.Spacing.Small;\r\n columnSet.addColumn(widthColumn);\r\n columnSet.addColumn(unitColumn);\r\n columnSet.addColumn(removeActionColumn);\r\n\r\n result.addItem(columnSet);\r\n }\r\n }\r\n\r\n let addAction = new Adaptive.SubmitAction();\r\n addAction.title = \"Add a column\";\r\n addAction.onExecute = (sender) => {\r\n peer.cardElement.addColumn(new Adaptive.TableColumnDefinition());\r\n\r\n this.columnsChanged(context, true);\r\n };\r\n\r\n let actionSet = new Adaptive.ActionSet();\r\n actionSet.spacing = Adaptive.Spacing.Small;\r\n actionSet.addAction(addAction);\r\n\r\n result.addItem(actionSet);\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class TablePeer extends TypedCardElementPeer {\r\n static readonly firstRowAsHeadersProperty = new BooleanPropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"firstRowAsHeaders\",\r\n \"First row as headers\");\r\n\r\n static readonly cellSpacingProperty = new NumberPropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"cellSpacing\",\r\n \"Cell spacing (in pixels)\");\r\n\r\n static readonly showGridLinesProperty = new BooleanPropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"showGridLines\",\r\n \"Grid lines\");\r\n\r\n static readonly gridStyleProperty = new ContainerStylePropertyEditor(Adaptive.Versions.v1_5, \"gridStyle\", \"Grid style\");\r\n\r\n static readonly horizontalCellContentAlignmentProperty = new EnumPropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n \"Horizontal cell content alignment\",\r\n Adaptive.HorizontalAlignment,\r\n false,\r\n true);\r\n\r\n static readonly verticalCellContentAlignmentProperty = new EnumPropertyEditor(\r\n Adaptive.Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n \"Vertical cell content alignment\",\r\n Adaptive.VerticalAlignment,\r\n false,\r\n true);\r\n\r\n static readonly columnsProperty = new TableColumnsPropertyEditor(Adaptive.Versions.v1_5);\r\n\r\n protected isContainer(): boolean {\r\n return true;\r\n }\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Add a row\",\r\n isPromotable: false,\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n let row = new Adaptive.TableRow();\r\n\r\n this.cardElement.addRow(row);\r\n\r\n const newPeer = CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(this.designerSurface, this, row);\r\n newPeer.insertAfterNeighbor = true;\r\n\r\n this.insertChild(newPeer);\r\n\r\n // TODO: I'm not sure if this call is necessary\r\n // this.updateChildren();\r\n }\r\n })\r\n );\r\n }\r\n\r\n initializeCardElement() {\r\n super.initializeCardElement();\r\n\r\n this.cardElement.addColumn(new Adaptive.TableColumnDefinition());\r\n this.cardElement.addColumn(new Adaptive.TableColumnDefinition());\r\n this.cardElement.addColumn(new Adaptive.TableColumnDefinition());\r\n\r\n this.cardElement.addRow(new Adaptive.TableRow());\r\n this.cardElement.addRow(new Adaptive.TableRow());\r\n this.cardElement.addRow(new Adaptive.TableRow());\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n TablePeer.firstRowAsHeadersProperty);\r\n\r\n propertySheet.add(\r\n \"Columns\",\r\n TablePeer.columnsProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.StyleCategory,\r\n TablePeer.showGridLinesProperty,\r\n TablePeer.gridStyleProperty);\r\n\r\n propertySheet.add(\r\n PropertySheetCategory.LayoutCategory,\r\n TablePeer.cellSpacingProperty,\r\n TablePeer.horizontalCellContentAlignmentProperty,\r\n TablePeer.verticalCellContentAlignmentProperty);\r\n }\r\n}\r\n\r\nexport class CarouselPeer extends ContainerPeer {\r\n // Question: What do we want the default value to be here?\r\n static readonly timerProperty = new CarouselTimerPropertyEditor(Adaptive.Versions.v1_6, \"timer\", \"Timer\", 5000);\r\n static readonly initialPageProperty = new NumberPropertyEditor(Adaptive.Versions.v1_6, \"initialPageIndex\", \"Initial page\", 0);\r\n static readonly orientationProperty = new EnumPropertyEditor(Adaptive.Versions.v1_6, \"carouselOrientation\", \"Orientation\", Adaptive.Orientation);\r\n static readonly heightInPixelsProperty = new NumberPropertyEditor(Adaptive.Versions.v1_6, \"carouselHeight\", \"Height in pixels\");\r\n static readonly loopProperty = new BooleanPropertyEditor(Adaptive.Versions.v1_6, \"carouselLoop\", \"Loop\");\r\n\r\n protected internalAddCommands(context: DesignContext, commands: Array) {\r\n super.internalAddCommands(context, commands);\r\n\r\n commands.push(\r\n new PeerCommand(\r\n {\r\n name: \"Add a page\",\r\n isPromotable: false,\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => {\r\n let page = new Adaptive.CarouselPage();\r\n\r\n (this.cardElement as Adaptive.Carousel).addPage(page);\r\n\r\n this.updateChildren();\r\n }\r\n }\r\n )\r\n );\r\n }\r\n\r\n initializeCardElement() {\r\n super.initializeCardElement();\r\n\r\n (this.cardElement as Adaptive.Carousel).addPage(new Adaptive.CarouselPage());\r\n }\r\n\r\n populatePropertySheet(propertySheet: PropertySheet, defaultCategory: string = PropertySheetCategory.DefaultCategory) {\r\n super.populatePropertySheet(propertySheet, defaultCategory);\r\n\r\n propertySheet.remove(CardElementPeer.isVisibleProperty,\r\n ContainerPeer.bleedProperty, \r\n ContainerPeer.styleProperty);\r\n\r\n propertySheet.add(\r\n defaultCategory,\r\n CarouselPeer.timerProperty,\r\n CarouselPeer.initialPageProperty,\r\n CarouselPeer.orientationProperty,\r\n CarouselPeer.heightInPixelsProperty,\r\n CarouselPeer.loopProperty);\r\n }\r\n\r\n canDrop(peer: DesignerPeer) {\r\n return false;\r\n }\r\n}\r\n\r\nexport class CarouselPagePeer extends ContainerPeer {\r\n private _pageOffset: number = 0;\r\n\r\n isDraggable(): boolean {\r\n return false;\r\n }\r\n\r\n getBoundingRect(): Rect {\r\n const boundingRect = super.getBoundingRect();\r\n\r\n const carousel = this.cardElement.parent as Adaptive.Carousel;\r\n const initialLeft = boundingRect.left;\r\n\r\n if (carousel?.carouselPageContainer) {\r\n const containerClientRect = carousel.carouselPageContainer.getBoundingClientRect();\r\n\r\n boundingRect.left = carousel.renderedElement.offsetLeft + carousel.carouselPageContainer.offsetLeft;\r\n boundingRect.right = boundingRect.left + containerClientRect?.width;\r\n boundingRect.bottom = boundingRect.top + containerClientRect?.height;\r\n }\r\n\r\n this._pageOffset = initialLeft - boundingRect.left;\r\n return boundingRect;\r\n }\r\n\r\n peerInCorrectLocation(currentLocation: IPoint): boolean {\r\n const rect = this.getBoundingRect();\r\n return rect.isInside(currentLocation);\r\n }\r\n\r\n isVisible(): boolean {\r\n const parentCarousel = this.parent as CarouselPeer;\r\n\r\n return this === parentCarousel?.children[(parentCarousel.cardElement as Adaptive.Carousel).currentPageIndex];\r\n }\r\n\r\n bringCardElementIntoView(): boolean {\r\n const carouselPeer = this.parent as CarouselPeer;\r\n\r\n if (carouselPeer && carouselPeer.cardElement) {\r\n this.designerSurface.shouldPersistSelectedElement = true;\r\n\r\n const index = carouselPeer.children.indexOf(this);\r\n (carouselPeer.cardElement as Adaptive.Carousel).slideTo(index);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n canDrop(peer: DesignerPeer) {\r\n return !(this.cardElement as Adaptive.CarouselPage).getForbiddenChildElements().includes(peer.getCardObject().getJsonTypeName());\r\n }\r\n\r\n get pageOffset(): number {\r\n return this._pageOffset;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Constants } from \"adaptivecards-controls\";\r\n\r\nexport class DialogButton {\r\n onClick: (sender: DialogButton) => void;\r\n\r\n constructor(public caption: string) {}\r\n\r\n render(): HTMLElement {\r\n let element = document.createElement(\"button\");\r\n element.className = \"acd-dialog-button\";\r\n element.innerText = this.caption;\r\n element.onclick = (e) => {\r\n this.clicked();\r\n }\r\n\r\n return element;\r\n }\r\n\r\n clicked() {\r\n if (this.onClick) {\r\n this.onClick(this);\r\n }\r\n }\r\n}\r\n\r\nexport abstract class Dialog {\r\n private _overlayElement: HTMLElement;\r\n private _isOpen: boolean = false;\r\n private _originalFocusedElement: HTMLElement;\r\n private _firstFocusableElement: HTMLElement;\r\n private _lastFocusableElement: HTMLElement;\r\n\r\n protected abstract renderContent(): HTMLElement;\r\n\r\n onClose: (sender: Dialog) => void = null;\r\n\r\n readonly closeButton: DialogButton;\r\n buttons?: DialogButton[];\r\n\r\n title: string;\r\n width: string;\r\n height: string;\r\n // flag to prevent dialog close on overlay element click, default it's set to false, for Pi2Card it will be set to true\r\n preventLightDismissal: boolean = false;\r\n\r\n constructor() {\r\n this.closeButton = new DialogButton(\"Close\");\r\n this.closeButton.onClick = (sender) => {\r\n this.close();\r\n }\r\n }\r\n\r\n open() {\r\n if (!this._isOpen) {\r\n this._originalFocusedElement = document.activeElement as HTMLElement;\r\n\r\n this._overlayElement = document.createElement(\"div\");\r\n this._overlayElement.className = \"acd-dialog-overlay\";\r\n this._overlayElement.onclick = (e) => {\r\n // clicks on the overlay window should dismiss the dialog\r\n if (!this.preventLightDismissal) { this.close(); }\r\n };\r\n\r\n let dialogFrameElement = document.createElement(\"div\");\r\n dialogFrameElement.className = \"acd-dialog-frame\";\r\n dialogFrameElement.style.width = this.width;\r\n dialogFrameElement.style.height = this.height;\r\n dialogFrameElement.setAttribute(\"aria-modal\", \"true\");\r\n dialogFrameElement.setAttribute(\"role\", \"dialog\");\r\n dialogFrameElement.setAttribute(\"aria-labelledby\", \"acd-dialog-title-element\");\r\n dialogFrameElement.tabIndex = -1;\r\n\r\n dialogFrameElement.onclick = (e) => {\r\n // disable click bubbling from the frame element -- otherwise it'll get to the overlay, closing the\r\n // dialog unexpectedly\r\n if (!this.preventLightDismissal) {\r\n e.cancelBubble = true;\r\n return false;\r\n }\r\n }\r\n\r\n // keyboard navigation support\r\n dialogFrameElement.onkeydown = (e) => {\r\n switch (e.key) {\r\n case Constants.keys.tab:\r\n if (e.shiftKey && document.activeElement === this._firstFocusableElement) {\r\n // backwards tab on first element. set focus on last\r\n e.preventDefault();\r\n this._lastFocusableElement.focus();\r\n }\r\n else if (!e.shiftKey && document.activeElement === this._lastFocusableElement) {\r\n // forward tab on last element\r\n e.preventDefault();\r\n this._firstFocusableElement.focus();\r\n }\r\n break;\r\n\r\n case Constants.keys.escape:\r\n this.close();\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n break;\r\n }\r\n\r\n return !e.cancelBubble;\r\n };\r\n\r\n let titleBarElement = document.createElement(\"div\");\r\n titleBarElement.className=\"acd-dialog-title-host\";\r\n\r\n let titleElement = document.createElement(\"div\");\r\n titleElement.className = \"acd-dialog-title\";\r\n titleElement.id = \"acd-dialog-title-element\";\r\n titleElement.innerText = this.title;\r\n titleElement.setAttribute(\"role\", \"heading\");\r\n titleElement.setAttribute(\"aria-level\",\"1\");\r\n titleElement.tabIndex = -1;\r\n\r\n let xButton = document.createElement(\"button\");\r\n xButton.className = \"acd-icon acd-dialog-titleBar-button acd-icon-remove\";\r\n xButton.title = \"Close\";\r\n xButton.onclick = (e) => { this.close(); }\r\n\r\n titleBarElement.appendChild(titleElement);\r\n titleBarElement.appendChild(xButton);\r\n\r\n let contentElement = this.renderContent();\r\n contentElement.style.flex = \"1 1 auto\";\r\n\r\n let buttonBarElement = document.createElement(\"div\");\r\n buttonBarElement.className = \"acd-dialog-buttonBar\";\r\n\r\n if (this.buttons?.length > 0) {\r\n for (const button of this.buttons) {\r\n buttonBarElement.appendChild(button.render());\r\n }\r\n }\r\n\r\n buttonBarElement.appendChild(this.closeButton.render());\r\n\r\n dialogFrameElement.appendChild(titleBarElement);\r\n dialogFrameElement.appendChild(contentElement);\r\n dialogFrameElement.appendChild(buttonBarElement);\r\n\r\n this._overlayElement.appendChild(dialogFrameElement);\r\n\r\n document.body.appendChild(this._overlayElement);\r\n\r\n let focusableElements = dialogFrameElement.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex=\"0\"]');\r\n this._firstFocusableElement = focusableElements[0] as HTMLElement;\r\n this._lastFocusableElement = focusableElements[focusableElements.length-1] as HTMLElement;\r\n\r\n this._firstFocusableElement.focus();\r\n\r\n this._isOpen = true;\r\n }\r\n }\r\n\r\n close() {\r\n if (this._isOpen) {\r\n document.body.removeChild(this._overlayElement);\r\n\r\n this._isOpen = false;\r\n\r\n if (this.onClose) {\r\n this.onClose(this);\r\n }\r\n // Removing the focus action on close, it has been handled via onClose method of Dialog consume place.\r\n this._originalFocusedElement.focus();\r\n this._originalFocusedElement = null;\r\n }\r\n }\r\n}\r\n","export class Downloader {\r\n private _data: string;\r\n\r\n private error() {\r\n if (this.onError) {\r\n this.onError(this);\r\n }\r\n }\r\n\r\n private success() {\r\n if (this.onSuccess) {\r\n this.onSuccess(this);\r\n }\r\n }\r\n\r\n onError: (sender: Downloader) => void = null;\r\n onSuccess: (sender: Downloader) => void = null;\r\n\r\n constructor(readonly url: string) {}\r\n\r\n download() {\r\n let request = new XMLHttpRequest();\r\n request.onerror = () => {\r\n this.error();\r\n }\r\n request.onload = () => {\r\n this._data = request.responseText;\r\n\r\n this.success();\r\n };\r\n\r\n try {\r\n request.open(\"GET\", this.url, true);\r\n request.send();\r\n }\r\n catch (e) {\r\n this.error();\r\n }\r\n }\r\n\r\n get data(): string {\r\n return this._data;\r\n }\r\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Constants } from \"adaptivecards-controls\";\r\nimport { IPoint } from \"./miscellaneous\";\r\n\r\nexport const DRAG_THRESHOLD = 10;\r\n\r\nexport abstract class DraggableElement {\r\n private _renderedElement: HTMLElement;\r\n private _isPointerOver: boolean;\r\n private _isPointerDown: boolean;\r\n private _lastClickedPoint: IPoint;\r\n private _dragging: boolean;\r\n\r\n private releasePointerCapture(pointerId: number) {\r\n this.getDragSourceElement().releasePointerCapture(pointerId);\r\n\r\n this._isPointerDown = false;\r\n }\r\n\r\n protected get isPointerOver(): boolean {\r\n return this._isPointerOver;\r\n }\r\n\r\n protected set isPointerOver(value: boolean) {\r\n if (value != this._isPointerOver) {\r\n this._isPointerOver = value;\r\n\r\n this.updateLayout();\r\n }\r\n }\r\n\r\n protected startDrag() {\r\n if (this.isDraggable() && !this.dragging) {\r\n this.dragging = true;\r\n\r\n if (this.onStartDrag) {\r\n this.onStartDrag(this);\r\n }\r\n }\r\n }\r\n\r\n protected pointerDown(e: PointerEvent) {\r\n if (!this._isPointerDown) {\r\n this._isPointerDown = true;\r\n this._lastClickedPoint = { x: e.offsetX, y: e.offsetY };\r\n\r\n this.getDragSourceElement().setPointerCapture(e.pointerId);\r\n }\r\n }\r\n\r\n protected pointerUp(e: PointerEvent) {\r\n if (this._isPointerDown) {\r\n this.releasePointerCapture(e.pointerId);\r\n\r\n this.endDrag();\r\n }\r\n }\r\n\r\n protected pointerMove(e: PointerEvent) {\r\n if (this._isPointerDown) {\r\n if (Math.abs(e.offsetX - this._lastClickedPoint.x) >= DRAG_THRESHOLD || Math.abs(e.offsetY - this._lastClickedPoint.y) >= DRAG_THRESHOLD) {\r\n this.releasePointerCapture(e.pointerId);\r\n\r\n this.startDrag();\r\n }\r\n }\r\n }\r\n\r\n protected click(e: MouseEvent) {\r\n if (this.onClick) {\r\n this.onClick(this);\r\n }\r\n }\r\n\r\n protected doubleClick(e: MouseEvent) {\r\n if (this.onDoubleClick) {\r\n this.onDoubleClick(this);\r\n }\r\n }\r\n\r\n protected internalUpdateCssStyles() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n protected internalUpdateLayout() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n protected getDragSourceElement(): HTMLElement {\r\n return this._renderedElement;\r\n }\r\n\r\n protected abstract internalRender(): HTMLElement;\r\n\r\n onStartDrag: (sender: DraggableElement) => void;\r\n onEndDrag: (sender: DraggableElement) => void;\r\n onClick: (sender: DraggableElement) => void;\r\n onDoubleClick: (sender: DraggableElement) => void;\r\n\r\n isDraggable(): boolean {\r\n return true;\r\n }\r\n\r\n endDrag() {\r\n if (this.dragging) {\r\n this.dragging = false;\r\n\r\n if (this.onEndDrag) {\r\n this.onEndDrag(this);\r\n }\r\n }\r\n }\r\n\r\n updateLayout() {\r\n this.internalUpdateCssStyles();\r\n this.internalUpdateLayout();\r\n }\r\n\r\n render(): HTMLElement {\r\n this._renderedElement = this.internalRender();\r\n\r\n let dragSourceElement = this.getDragSourceElement();\r\n dragSourceElement.onclick = (e: MouseEvent) => { this.click(e); };\r\n dragSourceElement.onkeydown = (e: KeyboardEvent) => {\r\n if (e.key === Constants.keys.enter || e.key === Constants.keys.space) {\r\n e.preventDefault();\r\n\r\n if (this.onClick) {\r\n this.click(null);\r\n }\r\n else if (this.onDoubleClick) {\r\n this.doubleClick(null);\r\n }\r\n }\r\n };\r\n dragSourceElement.ondblclick = (e: MouseEvent) => { this.doubleClick(e); };\r\n\r\n if (this.isDraggable()) {\r\n dragSourceElement.onmousedown = (e: MouseEvent) => { e.preventDefault(); };\r\n dragSourceElement.onpointerenter = () => { this.isPointerOver = true; };\r\n dragSourceElement.onpointerleave = () => { this.isPointerOver = false; };\r\n dragSourceElement.onpointerdown = (e: PointerEvent) => { this.pointerDown(e); };\r\n dragSourceElement.onpointerup = (e: PointerEvent) => { this.pointerUp(e); };\r\n dragSourceElement.onpointermove = (e: PointerEvent) => { this.pointerMove(e); };\r\n }\r\n\r\n return this._renderedElement;\r\n }\r\n\r\n focus() {\r\n if (this._renderedElement) {\r\n this._renderedElement.focus();\r\n }\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this._renderedElement;\r\n }\r\n\r\n get dragging(): boolean {\r\n return this._dragging;\r\n }\r\n\r\n set dragging(value: boolean) {\r\n this._dragging = value;\r\n\r\n this.internalUpdateCssStyles();\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Controls from \"adaptivecards-controls\";\r\nimport { FieldDefinition } from \"./data\";\r\nimport { TreeView } from \"./tree-view\";\r\nimport { DataTreeItem } from \"./data-treeitem\";\r\n\r\nexport class FieldPicker extends Controls.PopupControl {\r\n private _selectedField: FieldDefinition;\r\n private _treeView: TreeView;\r\n\r\n protected renderContent(): HTMLElement {\r\n let element = document.createElement(\"div\");\r\n element.className = \"acd-fieldPicker-host\";\r\n\r\n let treeItem = new DataTreeItem(this.dataStructure);\r\n\r\n this._treeView = new TreeView(treeItem);\r\n\r\n this._treeView.onItemInvoked = (sender) => {\r\n this._selectedField = (sender as DataTreeItem).field;\r\n this.closePopup(false);\r\n };\r\n\r\n element.appendChild(this._treeView.render());\r\n\r\n return element;\r\n }\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n render(rootElementBounds: ClientRect): HTMLElement {\r\n const rootElement = super.render(rootElementBounds);\r\n rootElement.tabIndex = -1;\r\n\r\n return rootElement;\r\n }\r\n\r\n constructor(readonly dataStructure: FieldDefinition) {\r\n super();\r\n }\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n focus() {\r\n if (this._treeView) {\r\n this._treeView.focus();\r\n }\r\n }\r\n\r\n keyDown(e: KeyboardEvent) {\r\n super.keyDown(e);\r\n\r\n // TODO\r\n }\r\n\r\n get selectedField(): FieldDefinition {\r\n return this._selectedField;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport class FullScreenHandler {\r\n private fullScrerenChanged() {\r\n if (this.onFullScreenChanged) {\r\n this.onFullScreenChanged(this.isFullScreen);\r\n }\r\n }\r\n\r\n onFullScreenChanged: (isFullScreen: boolean) => void;\r\n\r\n constructor() {\r\n let untypedBody = document.body;\r\n\r\n if (typeof untypedBody.onfullscreenchange !== \"undefined\") {\r\n untypedBody.onfullscreenchange = () => this.fullScrerenChanged();\r\n }\r\n else if (typeof untypedBody.onwebkitfullscreenchange !== \"undefined\") {\r\n untypedBody.onwebkitfullscreenchange = () => this.fullScrerenChanged();\r\n }\r\n else if (typeof untypedBody.onwebkitfullscreenchange !== \"undefined\") {\r\n untypedBody.onmozfullscreenchange = () => this.fullScrerenChanged();\r\n }\r\n else if (typeof untypedBody.onwebkitfullscreenchange !== \"undefined\") {\r\n untypedBody.MSFullscreenChange = () => this.fullScrerenChanged();\r\n }\r\n }\r\n\r\n enterFullScreen() {\r\n if (!this.isFullScreen) {\r\n let untypedBody = document.body;\r\n\r\n if (untypedBody.requestFullscreen) {\r\n untypedBody.requestFullscreen();\r\n }\r\n else if (untypedBody.webkitRequestFullscreen) {\r\n untypedBody.webkitRequestFullscreen();\r\n }\r\n else if (untypedBody.mozRequestFullScreen) {\r\n untypedBody.mozRequestFullScreen();\r\n }\r\n else if (untypedBody.msRequestFullscreen) {\r\n untypedBody.msRequestFullscreen();\r\n }\r\n else {\r\n alert(\"Your browser doesn't support fullscreen.\");\r\n }\r\n }\r\n }\r\n\r\n exitFullScreen() {\r\n if (this.isFullScreen) {\r\n let untypedDocument = document;\r\n\r\n if (untypedDocument.exitFullscreen) {\r\n untypedDocument.exitFullscreen();\r\n }\r\n else if (untypedDocument.webkitExitFullscreen) {\r\n untypedDocument.webkitExitFullscreen();\r\n }\r\n else if (untypedDocument.mozCancelFullScreen) {\r\n untypedDocument.mozCancelFullScreen();\r\n }\r\n else if (untypedDocument.msExitFullscreen) {\r\n untypedDocument.msExitFullscreen();\r\n }\r\n }\r\n }\r\n\r\n toggleFullScreen() {\r\n if (this.isFullScreen) {\r\n this.exitFullScreen();\r\n }\r\n else {\r\n this.enterFullScreen();\r\n }\r\n }\r\n\r\n get isFullScreen(): boolean {\r\n let untypedDocument = document;\r\n\r\n return untypedDocument.fullscreen || untypedDocument.webkitIsFullScreen || untypedDocument.mozFullScreen;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { Dialog } from \"./dialog\";\r\n\r\nexport class HelpDialog extends Dialog {\r\n private _renderedElement: HTMLElement;\r\n\r\n private _getShortcutRow(shortcut: string, description: string, isHeader: boolean=false) : HTMLElement {\r\n let shortcutText = document.createElement(\"b\");\r\n shortcutText.innerText = shortcut;\r\n let shortcutCell = document.createElement(isHeader ? \"th\" : \"td\");\r\n shortcutCell.style.textAlign = \"left\";\r\n shortcutCell.appendChild(shortcutText);\r\n\r\n let descriptionCell = document.createElement(isHeader ? \"th\" : \"td\");\r\n descriptionCell.style.textAlign = \"left\";\r\n descriptionCell.innerText = description;\r\n\r\n let row = document.createElement(\"tr\");\r\n row.appendChild(shortcutCell);\r\n row.appendChild(descriptionCell);\r\n return row;\r\n }\r\n\r\n protected renderContent(): HTMLElement {\r\n this._renderedElement = document.createElement(\"div\");\r\n\r\n let cardHeading = document.createElement(\"h2\");\r\n cardHeading.innerText = \"Card Payload and Sample Data Editors\";\r\n this._renderedElement.appendChild(cardHeading);\r\n\r\n let keyboardHeading = document.createElement(\"h3\");\r\n keyboardHeading.innerText = \"Keyboard Shortcuts\";\r\n this._renderedElement.appendChild(keyboardHeading);\r\n\r\n let shortcutTable = document.createElement(\"table\");\r\n\r\n let tableCaption = shortcutTable.createCaption();\r\n tableCaption.style.textAlign = \"left\";\r\n tableCaption.innerText = \"These keyboard shortcuts only work when the keyboard focus is within either the card payload or sample data editors\";\r\n\r\n shortcutTable.appendChild(document.createElement(\"br\"));\r\n\r\n shortcutTable.appendChild(this._getShortcutRow(\"Shortcut\", \"Description\", true));\r\n shortcutTable.appendChild(this._getShortcutRow(\"Alt-F1\", \"Show help dialog for editor\"));\r\n shortcutTable.appendChild(this._getShortcutRow(\"Ctrl-M\", \"Toggle behavior of TAB key. By default, pressing TAB will insert a TAB character. When toggled, pressing TAB will navigate to the next focusable item.\"));\r\n\r\n this._renderedElement.appendChild(shortcutTable);\r\n return this._renderedElement;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\n\r\nexport interface IPoint {\r\n\tx: number;\r\n\ty: number;\r\n}\r\n\r\nexport class Rect {\r\n\ttop: number;\r\n\tright: number;\r\n\tbottom: number;\r\n\tleft: number;\r\n\r\n\tconstructor(top: number = 0, right: number = 0, bottom: number = 0, left: number = 0) {\r\n\t\tthis.top = top;\r\n\t\tthis.right = right;\r\n\t\tthis.bottom = bottom;\r\n\t\tthis.left = left;\r\n\t}\r\n\r\n\tunion(otherRect: Rect) {\r\n\t\tthis.top = Math.min(this.top, otherRect.top);\r\n\t\tthis.left = Math.min(this.left, otherRect.left);\r\n\t\tthis.bottom = Math.max(this.bottom, otherRect.bottom);\r\n\t\tthis.right = Math.max(this.right, otherRect.right);\r\n\t}\r\n\r\n\tisInside(point: IPoint): boolean {\r\n\t\treturn point.x >= this.left && point.x <= this.right && point.y >= this.top && point.y <= this.bottom;\r\n\t}\r\n\r\n\tget width(): number {\r\n\t\treturn this.right - this.left;\r\n\t}\r\n\r\n\tget height(): number {\r\n\t\treturn this.bottom - this.top;\r\n\t}\r\n}\r\n\r\nexport class Utils {\r\n\tpublic static isAbsoluteUrl(urlString: string): boolean {\r\n\t\treturn urlString.indexOf('http://') === 0\r\n\t\t|| urlString.indexOf('https://') === 0;\r\n\t}\r\n\r\n\tpublic static joinPaths(...args: string[]) {\r\n\t\treturn args.map(\r\n\t\t\t(part, i) => {\r\n\t\t\t\tif (!part) {\r\n\t\t\t\t\tpart = \"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (i === 0) {\r\n\t\t\t\t\treturn part.trim().replace(/[\\/]*$/g, '')\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn part.trim().replace(/(^[\\/]*|[\\/]*$)/g, '')\r\n\t\t\t\t}\r\n\t\t\t}).filter(x => x.length).join('/')\r\n\t}\r\n\r\n public static adjustPointForScroll(position: IPoint): IPoint {\r\n const firstChild = document.firstElementChild;\r\n return {\r\n x: position.x + firstChild.scrollLeft,\r\n y: position.y + firstChild.scrollTop\r\n };\r\n }\r\n}\r\n\r\nexport var defaultHostConfig = new Adaptive.HostConfig(\r\n {\r\n preExpandSingleShowCardAction: true,\r\n supportsInteractivity: true,\r\n spacing: {\r\n small: 10,\r\n default: 20,\r\n medium: 30,\r\n large: 40,\r\n extraLarge: 50,\r\n padding: 20\r\n },\r\n separator: {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n },\r\n textAlign: {\r\n right: \"right\"\r\n },\r\n imageSizes: {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n },\r\n fontStyles: {\r\n default: {\r\n fontFamily: \"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n },\r\n monospace: {\r\n fontFamily: \"'Courier New', Courier, monospace\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n }\r\n },\r\n containerStyles: {\r\n default: {\r\n backgroundColor: \"#f9f9f9\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n emphasis: {\r\n backgroundColor: \"#08000000\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n accent: {\r\n backgroundColor: \"#C7DEF9\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n good: {\r\n backgroundColor: \"#CCFFCC\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n attention: {\r\n backgroundColor: \"#FFC5B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n warning: {\r\n backgroundColor: \"#FFE2B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n }\r\n },\r\n actions: {\r\n maxActions: 5,\r\n spacing: Adaptive.Spacing.Default,\r\n buttonSpacing: 10,\r\n showCard: {\r\n actionMode: Adaptive.ShowCardActionMode.Inline,\r\n inlineTopMargin: 16\r\n },\r\n actionsOrientation: Adaptive.Orientation.Horizontal,\r\n actionAlignment: Adaptive.ActionAlignment.Left\r\n },\r\n adaptiveCard: {\r\n allowCustomStyle: true\r\n },\r\n imageSet: {\r\n imageSize: Adaptive.Size.Medium,\r\n maxImageHeight: 100\r\n },\r\n factSet: {\r\n title: {\r\n color: Adaptive.TextColor.Default,\r\n size: Adaptive.TextSize.Default,\r\n isSubtle: false,\r\n weight: Adaptive.TextWeight.Bolder,\r\n wrap: true,\r\n maxWidth: 150,\r\n },\r\n value: {\r\n color: Adaptive.TextColor.Default,\r\n size: Adaptive.TextSize.Default,\r\n isSubtle: false,\r\n weight: Adaptive.TextWeight.Default,\r\n wrap: true,\r\n },\r\n spacing: 10\r\n }\r\n }\r\n);\r\n\r\ndefaultHostConfig.cssClassNamePrefix = \"default\";\r\n","import { Dialog } from \"./dialog\";\r\nimport { Pic2Card\t } from \"./pic2card\";\r\nexport class FetchManager {\r\n private pic2cardService = Pic2Card.pic2cardService !== '' ? Pic2Card.pic2cardService : process.env.PIC_TO_CARD_PREDICTION_API;\r\n private headers = {\r\n \"Content-Type\": \"application/json\",\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n };\r\n\r\n async getSampleImages() {\r\n const option = {\r\n method: \"GET\",\r\n headers: this.headers,\r\n };\r\n try {\r\n const sampleImages = await fetch(\r\n this.pic2cardService + \"/get_card_templates\",\r\n option\r\n );\r\n return await sampleImages.json();\r\n } catch (err) {\r\n console.log(err.message);\r\n }\r\n }\r\n\r\n async getPredictedData(imageContent, isTemplateBindingEnabled) {\r\n const options = {\r\n method: \"POST\",\r\n headers: this.headers,\r\n body: JSON.stringify({\r\n image: imageContent.split(\",\")[1],\r\n }),\r\n };\r\n try {\r\n const endPoint = isTemplateBindingEnabled\r\n ? \"/predict_json?format=template\"\r\n : \"/predict_json\";\r\n const picResponse = await fetch(\r\n this.pic2cardService + endPoint,\r\n options\r\n );\r\n return await picResponse.json();\r\n } catch (err) {\r\n console.log(err.message);\r\n }\r\n }\r\n}\r\n\r\nexport class OpenImageDialog extends Dialog {\r\n private _renderedElement: HTMLElement;\r\n private _imageElement: HTMLElement;\r\n private _buttonContainer: HTMLElement;\r\n private _inputTemplate: HTMLElement;\r\n private _uploadedImage: string =\r\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAABaCAYAAABKZyO0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAZqADAAQAAAABAAAAWgAAAADllkhhAAALRElEQVR4Ae2c6ZfVRBDFBwdxFwWVRVlmQHHX4xc/+v/r0aOouLA5uIAKiIIbuN3fYyrmdao7nbxkXshLnXNJ0um1bndVdecNu9bq5T5leVLYLzwq7NnGLl3HLH9pcLeFP4SfhGvC78KOSEq56+rBs8JRgftJ1tZuSAkXhJt9KyNGzD41fEpgdUxS1cAVJZ0V/qm+6ibFWwlHVPWLgveum1bv/Vow6Uze68LffQwnVD5ma7OPhkZY5wMaE+R8L/zb9fjKpuwpVf5KogGc4FUB+4pT7LwzqnNIcr8686CA8gl+YoJOzgid6sOI2a2K3xa4hnJHCTi8XmZG2NhAnx9Wv04KMYI+1zv005mYKTumGr1Gf1P6RwLRyCoLk/MHga3DXkcR+JzLQmerBmIAJsxWj25n8qf+hRSuk9zVAPsZfMtjgUKwNJj6W0F660fbPHINhXBwIiXUytrauYhenq5mbZ8CIezoQ8HBs9OdpKoB9i5b1eSZKzDX4LxulgQx2MdQfgwTpuc5DRCJhYIrIEjoRCDG2933fuTQSe+XVwnBAIFRKPifTgRiiNdDYZ8ySVoDno48XaZribyFmDAaI2tnYV+k3TEke+dk6LMT6ayiTnozVVJoYCKmUMWwbiZihsVH0ZuJmEIVw7qZiBkWH0VvJmIKVQzrZiJmWHwUvfG+vxQvl3DzhNp8RnhEYNJwiMqJLt/Ye/mEq3oHKUMhhn6cEA4GWuIcj0PW54QvhJX5LjQEU8aJ7FtCSIqSCuET7xsCq2klZAjEbErTD2Vq+3nl6+ygMLPNpWR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H8s4zNR5Z5fGiPI5LciU3PxbL4+B2zJQRIo5VvNVRR0xfuvDMKm3NiCnbT+tArIC9v5evxQluaRBtf2xRqqLVLXsqT/5kxXiRwSNe7pGkeafGHCAugxzvBIKg4g7EeB1dNHYfMoexvYOnpL7H4bU5O/qHGG/Hy4aIKGSMwhfFW87AYgebTtZOktCxt0pnpwEQw2bJi8n5EMT7McqPzqD2Ks2bwU7WTpI2I7XMoj8UT/j4jZOJM5sXhTGS4xGDCvjUvMh4vW8s1BsKq/OxMFHPWK/ZptM6wSdPbxdKBW8IYwsGiMywFKEQJZ0MEyPPnm/2jmnC4pivF8LE7eeLlr6+fYMpw/Z6dpZDv8MCK8iIZGZ45k/J94ygWMYVCjOZfdyN8EXwTHmCJNsgck7mWZ5yMfTNRPd8yxWlFx/Pwo3khl4eFeoE8+etsLpyQ3vPpAt1YH3c0g1ImScUDZFsWr2AQsmFsIl9WfBOmpnk7wrF1iXsFM8bwhFhkrs/OfpCivBOC5roB1fwquCtFOo5I8z5PTNlvDTB9mLW9gkhcZZnVa5sPA8IEOP5lDo9YOaOC6eE2LHPlt59J8xJSvEcyxwTDgmpfHMVjvgBx44CiZyYuDFBV/hj/A8+zHyQbivCKvlMqJjLHIVDEKuHGJ8GebYgQLcrKaweiMIncNaIPtALYGPOtU6+VYbzQoUUCuYQQ75QMIFty4Z1De0ZC7HR4/gg4qxQRGC6r8hYlVsZaMMEnPVLAtcu5aYqOyfwMS0pEzFx9aAbHD/bh9jxfLz0/Bs2tBeFuchrPsv800TMvD68J3SEI4ck9iBeJKvkihDJESiAq4LrS5TuykSMq5ZoIk4e575XMGfPFaVbIMCVzSafFxqRofyF/AeKmggOi7OUtAAAAABJRU5ErkJggg==\";\r\n private _predictedCardJSON: predictedCardJSON;\r\n private fetchManager: FetchManager;\r\n private isTemplateOptionChecked: boolean = false;\r\n private allowedImageSize = 2; // In MB\r\n\r\n constructor() {\r\n super();\r\n this.fetchManager = new FetchManager();\r\n }\r\n\r\n private setContent(element: HTMLElement) {\r\n this._renderedElement.appendChild(element);\r\n }\r\n\r\n private removeContent(element: HTMLElement) {\r\n this._renderedElement.removeChild(element);\r\n }\r\n\r\n private renderTitle(): HTMLElement {\r\n const title = document.createElement(\"div\");\r\n title.className = \"acd-image-title\";\r\n title.innerText = \"Upload your own card design\";\r\n return title;\r\n }\r\n\r\n private renderTitleContent(): HTMLElement {\r\n const content = document.createElement(\"div\");\r\n content.className = \"acd-image-title-content\";\r\n content.innerText =\r\n \"Design your card and upload it as a png or jpeg, and watch it magically convert to a functioning Adaptive Card\";\r\n return content;\r\n }\r\n\r\n private renderUploadedImage(): HTMLElement {\r\n this._imageElement = document.createElement(\"img\");\r\n this._imageElement.className = \"acd-image-placeholder\";\r\n this._imageElement.setAttribute(\"src\", this._uploadedImage);\r\n return this._imageElement;\r\n }\r\n\r\n private renderUploadButton(type: string): HTMLElement {\r\n const privacyLink = Pic2Card.privacyLink;\r\n this._buttonContainer = document.createElement(\"div\");\r\n this._buttonContainer.className = \"acd-upload-button-container\";\r\n const fileNote = document.createElement(\"div\");\r\n fileNote.className = \"acd-image-file-note\";\r\n fileNote.innerHTML =\r\n `By using the upload feature you agree to our image usage policy`;\r\n type !== \"file\" &&\r\n this._buttonContainer.appendChild(this.renderCheckbox());\r\n this._buttonContainer.appendChild(\r\n type === \"file\"\r\n ? this.createFileButton()\r\n : this.createActionButton()\r\n );\r\n this._buttonContainer.appendChild(fileNote);\r\n return this._buttonContainer;\r\n }\r\n\r\n private renderCheckbox() {\r\n const checkboxContainer = document.createElement(\"div\");\r\n checkboxContainer.className = \"acd-checkbox-container\";\r\n const inputElement = document.createElement(\"INPUT\");\r\n inputElement.className = \"acd-checkbox-element\";\r\n inputElement.setAttribute(\"id\", \"template-option\");\r\n inputElement.setAttribute(\"type\", \"checkbox\");\r\n inputElement.onclick = () => {\r\n const checkbox = document.getElementById(\r\n \"template-option\"\r\n ) as HTMLInputElement;\r\n this.isTemplateOptionChecked = checkbox.checked ? true : false;\r\n };\r\n inputElement.onfocus = () => {\r\n const customCheckbox = document.getElementById(\r\n \"acd-custom-checkbox-item\"\r\n ) as HTMLInputElement;\r\n customCheckbox.className = \"acd-custom-checkbox acd-custom-checkbox-foucs\"\r\n };\r\n inputElement.addEventListener(\"focusout\", () => {\r\n const customCheckbox = document.getElementById(\r\n \"acd-custom-checkbox-item\"\r\n ) as HTMLInputElement;\r\n customCheckbox.className = \"acd-custom-checkbox\"\r\n });\r\n const customCheckboxElement = (\r\n document.createElement(\"SPAN\")\r\n );\r\n customCheckboxElement.id = \"acd-custom-checkbox-item\";\r\n customCheckboxElement.className = \"acd-custom-checkbox\";\r\n checkboxContainer.appendChild(inputElement);\r\n checkboxContainer.appendChild(customCheckboxElement);\r\n checkboxContainer.appendChild(this.renderLabelText());\r\n return checkboxContainer;\r\n }\r\n\r\n private renderLabelText() {\r\n const labelElement = document.createElement(\"LABEL\");\r\n labelElement.className = \"acd-label-element\";\r\n labelElement.setAttribute(\"for\", \"template-option\");\r\n labelElement.innerHTML =\r\n \"Create Adaptive Card with template bindings and sample data\";\r\n return labelElement;\r\n }\r\n\r\n private checkFileSize(file: File) {\r\n const filesize = parseInt((file.size / 1024 / 1024).toFixed(4)); // MB\r\n return filesize < this.allowedImageSize;\r\n }\r\n\r\n private createFileButton() {\r\n const inputElement = document.createElement(\"INPUT\");\r\n inputElement.className = \"acd-file-type\";\r\n inputElement.setAttribute(\"type\", \"file\");\r\n inputElement.setAttribute(\"button-name\", \"Browse File\");\r\n inputElement.setAttribute(\"accept\", \"image/*\");\r\n inputElement.setAttribute(\"aria-label\", \"Browse File\");\r\n inputElement.onchange = () => {\r\n if (this.checkFileSize(inputElement.files[0])) {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(inputElement.files[0]);\r\n reader.onload = () => this.renderImage(reader.result as string, inputElement.files[0].name);\r\n reader.onerror = (error) => console.log(error);\r\n } else {\r\n this._inputTemplate.removeChild(this._buttonContainer);\r\n this._inputTemplate.appendChild(\r\n this.renderUploadButton(\"file\")\r\n );\r\n this.generateErrorText(\r\n \"Invalid file size. Try image under 2 MB\"\r\n );\r\n this._uploadedImage =\r\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAABaCAYAAABKZyO0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAZqADAAQAAAABAAAAWgAAAADllkhhAAALRElEQVR4Ae2c6ZfVRBDFBwdxFwWVRVlmQHHX4xc/+v/r0aOouLA5uIAKiIIbuN3fYyrmdao7nbxkXshLnXNJ0um1bndVdecNu9bq5T5leVLYLzwq7NnGLl3HLH9pcLeFP4SfhGvC78KOSEq56+rBs8JRgftJ1tZuSAkXhJt9KyNGzD41fEpgdUxS1cAVJZ0V/qm+6ibFWwlHVPWLgveum1bv/Vow6Uze68LffQwnVD5ma7OPhkZY5wMaE+R8L/zb9fjKpuwpVf5KogGc4FUB+4pT7LwzqnNIcr8686CA8gl+YoJOzgid6sOI2a2K3xa4hnJHCTi8XmZG2NhAnx9Wv04KMYI+1zv005mYKTumGr1Gf1P6RwLRyCoLk/MHga3DXkcR+JzLQmerBmIAJsxWj25n8qf+hRSuk9zVAPsZfMtjgUKwNJj6W0F660fbPHINhXBwIiXUytrauYhenq5mbZ8CIezoQ8HBs9OdpKoB9i5b1eSZKzDX4LxulgQx2MdQfgwTpuc5DRCJhYIrIEjoRCDG2933fuTQSe+XVwnBAIFRKPifTgRiiNdDYZ8ySVoDno48XaZribyFmDAaI2tnYV+k3TEke+dk6LMT6ayiTnozVVJoYCKmUMWwbiZihsVH0ZuJmEIVw7qZiBkWH0VvJmIKVQzrZiJmWHwUvfG+vxQvl3DzhNp8RnhEYNJwiMqJLt/Ye/mEq3oHKUMhhn6cEA4GWuIcj0PW54QvhJX5LjQEU8aJ7FtCSIqSCuET7xsCq2klZAjEbErTD2Vq+3nl6+ygMLPNpWRbNjF8CTzcYOSYPIgcvS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U3PxbL4+B2zJQRIo5VvNVRR0xfuvDMKm3NiCnbT+tArIC9v5evxQluaRBtf2xRqqLVLXsqT/5kxXiRwSNe7pGkeafGHCAugxzvBIKg4g7EeB1dNHYfMoexvYOnpL7H4bU5O/qHGG/Hy4aIKGSMwhfFW87AYgebTtZOktCxt0pnpwEQw2bJi8n5EMT7McqPzqD2Ks2bwU7WTpI2I7XMoj8UT/j4jZOJM5sXhTGS4xGDCvjUvMh4vW8s1BsKq/OxMFHPWK/ZptM6wSdPbxdKBW8IYwsGiMywFKEQJZ0MEyPPnm/2jmnC4pivF8LE7eeLlr6+fYMpw/Z6dpZDv8MCK8iIZGZ45k/J94ygWMYVCjOZfdyN8EXwTHmCJNsgck7mWZ5yMfTNRPd8yxWlFx/Pwo3khl4eFeoE8+etsLpyQ3vPpAt1YH3c0g1ImScUDZFsWr2AQsmFsIl9WfBOmpnk7wrF1iXsFM8bwhFhkrs/OfpCivBOC5roB1fwquCtFOo5I8z5PTNlvDTB9mLW9gkhcZZnVa5sPA8IEOP5lDo9YOaOC6eE2LHPlt59J8xJSvEcyxwTDgmpfHMVjvgBx44CiZyYuDFBV/hj/A8+zHyQbivCKvlMqJjLHIVDEKuHGJ8GebYgQLcrKaweiMIncNaIPtALYGPOtU6+VYbzQoUUCuYQQ75QMIFty4Z1De0ZC7HR4/gg4qxQRGC6r8hYlVsZaMMEnPVLAtcu5aYqOyfwMS0pEzFx9aAbHD/bh9jxfLz0/Bs2tBeFuchrPsv800TMvD68J3SEI4ck9iBeJKvkihDJESiAq4LrS5TuykSMq5ZoIk4e575XMGfPFaVbIMCVzSafFxqRofyF/AeKmggOi7OUtAAAAABJRU5ErkJggg==\";\r\n this._imageElement.setAttribute(\"src\", this._uploadedImage);\r\n }\r\n };\r\n\r\n return inputElement;\r\n }\r\n\r\n private generateErrorText(text: string) {\r\n const errorContent = document.createElement(\"div\");\r\n errorContent.setAttribute(\"role\", \"status\");\r\n errorContent.className = \"acd-error-text\";\r\n errorContent.innerText = text;\r\n this._buttonContainer.appendChild(errorContent);\r\n }\r\n\r\n private onCardFailure(spinnerElement: HTMLElement) {\r\n this.removeContent(spinnerElement);\r\n this._inputTemplate.removeChild(this._buttonContainer);\r\n let uploadButton = this.renderUploadButton(\"file\");\r\n this._inputTemplate.appendChild(uploadButton);\r\n this.generateErrorText(\"Failed to generate card for selected Image\");\r\n uploadButton.focus();\r\n }\r\n\r\n createActionButton() {\r\n const uploadButton = document.createElement(\"INPUT\");\r\n uploadButton.className = \"acd-card-button\";\r\n uploadButton.setAttribute(\"type\", \"BUTTON\");\r\n uploadButton.setAttribute(\"button-name\", \"Convert to Adaptive Card\");\r\n uploadButton.setAttribute(\"value\", \"Convert to Adaptive Card\");\r\n uploadButton.onclick = () => {\r\n uploadButton.setAttribute(\"aria-label\", \"Conversion to Adaptive card button pressed. Adaptive Card conversion in Progress\");\r\n let spinnerElement = this.loadSpinner();\r\n this.setContent(spinnerElement);\r\n spinnerElement.focus();\r\n this.fetchManager\r\n .getPredictedData(\r\n this._uploadedImage,\r\n this.isTemplateOptionChecked\r\n )\r\n .then((res) => {\r\n if (!res || res.error) {\r\n this.onCardFailure(spinnerElement);\r\n } else {\r\n this._predictedCardJSON = res.card_json;\r\n this.close();\r\n }\r\n });\r\n };\r\n\r\n return uploadButton;\r\n }\r\n\r\n private loadSpinner() {\r\n let spinnerHostElement = document.createElement(\"div\");\r\n spinnerHostElement.className = \"acd-spinner-host\";\r\n let spinnerElement = document.createElement(\"div\");\r\n spinnerElement.className = \"acd-spinner acd-image-spinner\";\r\n let spinnerText = document.createElement(\"div\");\r\n spinnerText.setAttribute(\"role\", \"status\");\r\n spinnerText.className = \"acd-conversion-text\";\r\n spinnerText.innerText = \"Adaptive Card conversion in progress\";\r\n spinnerHostElement.appendChild(spinnerElement);\r\n spinnerHostElement.appendChild(spinnerText);\r\n return spinnerHostElement;\r\n }\r\n\r\n private renderImage(imageContent: string, imageName: string) {\r\n this._imageElement.setAttribute(\"src\", imageContent);\r\n this._imageElement.setAttribute(\"alt\", imageName);\r\n this._uploadedImage = imageContent;\r\n this._inputTemplate.removeChild(this._buttonContainer);\r\n this._inputTemplate.appendChild(this.renderUploadButton(\"action\"));\r\n }\r\n\r\n private renderUploadControl(): HTMLElement {\r\n this._inputTemplate = document.createElement(\"div\");\r\n this._inputTemplate.className = \"acd-upload-control\";\r\n this._inputTemplate.appendChild(this.renderUploadedImage());\r\n this._inputTemplate.appendChild(this.renderUploadButton(\"file\"));\r\n return this._inputTemplate;\r\n }\r\n\r\n private renderUploadContainer(): HTMLElement {\r\n const uploadTemplate = document.createElement(\"div\");\r\n uploadTemplate.className = \"acd-image-file-container\";\r\n uploadTemplate.appendChild(this.renderUploadControl());\r\n return uploadTemplate;\r\n }\r\n\r\n private renderImageContainer(): HTMLElement {\r\n let template = document.createElement(\"div\");\r\n template.className = \"acd-image-upload-container\";\r\n template.appendChild(this.renderTitle());\r\n template.appendChild(this.renderTitleContent());\r\n template.appendChild(this.renderUploadContainer());\r\n return template;\r\n }\r\n\r\n private renderSampleTemplate() {\r\n let sampleImageTemplate = document.createElement(\"div\");\r\n sampleImageTemplate.id = \"acd-sample-images\";\r\n sampleImageTemplate.tabIndex = 0;\r\n sampleImageTemplate.className = \"acd-sample-image-container\";\r\n sampleImageTemplate.style.flexDirection = \"column\";\r\n let spinnerElement = document.createElement(\"div\");\r\n spinnerElement.className = \"acd-spinner\";\r\n spinnerElement.style.width = \"28px\";\r\n spinnerElement.style.height = \"28px\";\r\n const message = document.createElement(\"div\");\r\n message.className = \"acd-dialog-message\";\r\n message.innerText = \"Loading Sample Images...\";\r\n message.style.marginTop = \"10px\";\r\n sampleImageTemplate.appendChild(spinnerElement);\r\n sampleImageTemplate.appendChild(message);\r\n\r\n this.fetchManager.getSampleImages().then((res) => {\r\n if (res) {\r\n const imageTitle = document.createElement(\"div\");\r\n imageTitle.innerText = \"Choose from our Sample Images\";\r\n imageTitle.className = \"acd-image-title sample-info-text\";\r\n sampleImageTemplate.style.flexDirection = \"row\";\r\n sampleImageTemplate.removeChild(spinnerElement);\r\n sampleImageTemplate.removeChild(message);\r\n sampleImageTemplate.appendChild(imageTitle);\r\n const imageContainer = document.createElement(\"div\");\r\n imageContainer.className = \"acd-sample-list\";\r\n imageContainer.setAttribute(\"role\", \"list\");\r\n res.templates.map((template, index) => {\r\n let sampleImage = new ImageItem(template, index+1);\r\n sampleImage.onClick = (selectedImage: string, imageName: string) => {\r\n this.renderImage(selectedImage, imageName);\r\n };\r\n imageContainer.appendChild(sampleImage.render());\r\n });\r\n sampleImageTemplate.appendChild(imageContainer);\r\n let firstChild = imageContainer.firstElementChild as HTMLElement;\r\n firstChild.focus();\r\n } else {\r\n const errorElement = document.createElement(\"div\");\r\n errorElement.innerText = \"Failed to reach pic2card service\";\r\n errorElement.className = \"acd-image-title error-info\";\r\n errorElement.setAttribute(\"role\", \"status\");\r\n sampleImageTemplate.removeChild(message);\r\n sampleImageTemplate.removeChild(spinnerElement);\r\n sampleImageTemplate.appendChild(errorElement);\r\n }\r\n });\r\n return sampleImageTemplate;\r\n }\r\n\r\n protected renderContent(): HTMLElement {\r\n this._renderedElement = document.createElement(\"div\");\r\n this._renderedElement.className = \"acd-pic2card-container\";\r\n const poweredByContainer = document.createElement(\"div\");\r\n poweredByContainer.className = \"acd-poweredby-title\";\r\n poweredByContainer.innerHTML =\r\n \"Powered By BigThinkCode\";\r\n const container = document.createElement(\"div\");\r\n container.className = \"acd-sample-container\";\r\n\r\n container.appendChild(this.renderImageContainer());\r\n container.appendChild(this.renderSampleTemplate());\r\n this.setContent(poweredByContainer);\r\n this.setContent(container);\r\n\r\n return this._renderedElement;\r\n }\r\n\r\n get predictedCardJSON(): predictedCardJSON {\r\n return this._predictedCardJSON;\r\n }\r\n}\r\n\r\nexport class ImageItem {\r\n constructor(readonly template: string, readonly itemIndex: number) {}\r\n onClick: (template: string, sampleImageName: string) => void;\r\n\r\n render(): HTMLElement {\r\n const sampleImageName = `Sample Image ${this.itemIndex}`;\r\n const imagePlaceholder = (\r\n document.createElement(\"img\")\r\n );\r\n imagePlaceholder.className = \"acd-sample-image\";\r\n imagePlaceholder.tabIndex = 0;\r\n imagePlaceholder.setAttribute(\"role\", \"listitem\");\r\n imagePlaceholder.setAttribute(\"alt\", sampleImageName);\r\n imagePlaceholder.setAttribute(\r\n \"src\",\r\n \"data:image/png;base64,\" + this.template\r\n );\r\n imagePlaceholder.onclick = (event) => {\r\n this.onClick((event.target as HTMLImageElement).src, sampleImageName);\r\n imagePlaceholder.setAttribute(\"alt\", `${sampleImageName} selected`);\r\n };\r\n imagePlaceholder.onfocus = () => {\r\n imagePlaceholder.setAttribute(\"alt\", sampleImageName);\r\n }\r\n imagePlaceholder.onkeydown = (event) => {\r\n if (event.code === \"Enter\") {\r\n this.onClick((event.target as HTMLImageElement).src, sampleImageName);\r\n imagePlaceholder.setAttribute(\"alt\", `${sampleImageName} selected`);\r\n }\r\n }\r\n return imagePlaceholder;\r\n }\r\n}\r\nexport interface predictedCardJSON {\r\n card: {};\r\n data: {};\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport * as monaco from \"monaco-editor\";\r\nimport { Dialog, DialogButton } from \"./dialog\";\r\nimport { CardData } from \"./open-sample-dialog\";\r\nimport { JSONSchemaCard } from \"adaptivecards-templating\";\r\n\r\nexport class OpenJsonSchemaDialog extends Dialog {\r\n private _output: CardData;\r\n private _previewContainer: HTMLElement;\r\n private _previewElement: HTMLElement;\r\n private _editor: monaco.editor.IStandaloneCodeEditor;\r\n\r\n readonly submitButton: DialogButton;\r\n\r\n constructor() {\r\n super();\r\n\r\n this.submitButton = new DialogButton(\"Create\");\r\n this.submitButton.onClick = (sender) => {\r\n this.close();\r\n }\r\n this.buttons = [this.submitButton];\r\n }\r\n\r\n open() {\r\n super.open();\r\n this._editor.layout();\r\n }\r\n\r\n private renderPreview(): HTMLElement {\r\n const renderedElement = document.createElement(\"div\");\r\n renderedElement.className = \"acd-open-code-dialog-preview\";\r\n\r\n const card = new Adaptive.AdaptiveCard();\r\n\r\n if (this.output?.cardPayload) {\r\n try {\r\n const cardData = JSON.parse(this.output.cardPayload);\r\n card.parse(cardData);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else {\r\n card.parse({\r\n \"type\": \"AdaptiveCard\",\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"version\": \"1.0\",\r\n \"body\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"Input JSON Schema to create a card!\",\r\n \"wrap\": true,\r\n \"size\": \"Large\"\r\n }\r\n ]\r\n })\r\n }\r\n\r\n card.render();\r\n card.renderedElement.style.width = \"100%\";\r\n\r\n renderedElement.appendChild(card.renderedElement);\r\n\r\n return renderedElement\r\n }\r\n\r\n private refreshPreview() {\r\n this._previewContainer.removeChild(this._previewElement);\r\n this._previewElement = this.renderPreview();\r\n this._previewContainer.appendChild(this._previewElement);\r\n }\r\n\r\n private renderEditor(): HTMLElement {\r\n const renderedElement = document.createElement(\"div\");\r\n renderedElement.className = \"acd-open-code-dialog-editor\";\r\n\r\n const monaco = window[\"monaco\"];\r\n this._editor = monaco.editor.create(\r\n renderedElement,\r\n {\r\n folding: true,\r\n fontSize: 13.5,\r\n language: 'json',\r\n }\r\n );\r\n this._editor.layout();\r\n\r\n this._editor.onDidChangeModelContent(() => {\r\n try {\r\n const model = this._editor.getValue();\r\n const json = JSON.parse(model);\r\n\r\n const card = JSONSchemaCard(json);\r\n this._output = {\r\n cardPayload: JSON.stringify(card),\r\n };\r\n\r\n this.refreshPreview();\r\n } catch (e) {\r\n console.error(e)\r\n }\r\n });\r\n\r\n return renderedElement\r\n }\r\n\r\n protected renderContent(): HTMLElement {\r\n const renderedElement = document.createElement(\"div\");\r\n renderedElement.className = \"acd-open-code-dialog-container\";\r\n\r\n const editorContainer = document.createElement(\"div\");\r\n editorContainer.className = \"acd-open-code-dialog-editor-container\";\r\n renderedElement.appendChild(editorContainer);\r\n\r\n const editorLabel = document.createElement(\"h3\");\r\n editorLabel.innerText = \"JSON Schema\"\r\n editorContainer.appendChild(editorLabel);\r\n\r\n const editorElement = this.renderEditor();\r\n editorContainer.appendChild(editorElement);\r\n\r\n this._previewContainer = document.createElement(\"div\");\r\n this._previewContainer.className = \"acd-open-code-dialog-preview-container\";\r\n renderedElement.appendChild(this._previewContainer);\r\n\r\n this._previewElement = this.renderPreview()\r\n this._previewContainer.appendChild(this._previewElement)\r\n\r\n\r\n return renderedElement;\r\n }\r\n\r\n get output(): CardData {\r\n return this._output;\r\n }\r\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport * as ACData from \"adaptivecards-templating\";\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { CatalogueEntry, SampleCatalogue } from \"./catalogue\";\r\nimport { Dialog } from \"./dialog\";\r\nimport { Constants } from \"adaptivecards-controls\";\r\n\r\nexport interface CardData {\r\n cardPayload?: string\r\n sampleData?: string,\r\n sampleHostData?: string,\r\n thumbnail?: HTMLElement | (() => HTMLElement)\r\n}\r\n\r\ntype CardDataCallback = (output: CardData) => any;\r\ntype CardDataProvider = (callback?: CardDataCallback) => CardData | void;\r\n\r\ninterface OpenSampleItemProps {\r\n label: string,\r\n onClick?: (ev: MouseEvent) => any,\r\n onKeyEnterEvent?: (ev: KeyboardEvent) => any,\r\n cardData?: CardData | CardDataProvider,\r\n}\r\n\r\nclass OpenSampleItem {\r\n onComplete: CardDataCallback;\r\n onNavigateToNextList?: () => void;\r\n onNavigateToPreviousList?: () => void;\r\n\r\n constructor(readonly props: OpenSampleItemProps) { }\r\n\r\n private static _id = 0;\r\n private static getNewItemId(prefix: string): string {\r\n const newId = prefix + \"-\" + OpenSampleItem._id;\r\n\r\n OpenSampleItem._id++;\r\n\r\n return newId;\r\n }\r\n\r\n render(): HTMLElement {\r\n const newItemId = OpenSampleItem.getNewItemId(\"acd-open-sample-item-title\");\r\n\r\n const element = document.createElement(\"div\");\r\n element.className = \"acd-open-sample-item\";\r\n element.tabIndex = 0;\r\n element.setAttribute(\"aria-labelledBy\", newItemId);\r\n element.setAttribute(\"role\", \"listitem\");\r\n element.onclick = this.props.onClick ?? (\r\n (e) => {\r\n this.onCardSelected();\r\n })\r\n\r\n element.onkeyup = (e: KeyboardEvent) => {\r\n switch (e.key) {\r\n case Constants.keys.enter:\r\n // If onKeyEnterEvent has been specified, we will follow that logic for selecting an OpenSampleItem\r\n if (this.props.onKeyEnterEvent) {\r\n this.props.onKeyEnterEvent(e);\r\n } else {\r\n // If onKeyEnterEvent is not specified, we assume OpenSampleItem should be selected and loaded as usual\r\n this.onCardSelected();\r\n }\r\n break;\r\n case Constants.keys.down:\r\n this.navigateToNextElement(element);\r\n break;\r\n case Constants.keys.up:\r\n this.navigateToPreviousElement(element);\r\n break;\r\n case Constants.keys.right:\r\n this.navigateToNextElement(element);\r\n break;\r\n case Constants.keys.left:\r\n this.navigateToPreviousElement(element);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n const thumbnailHost = document.createElement(\"div\");\r\n thumbnailHost.className = \"acd-open-sample-item-thumbnail\";\r\n\r\n if (this.props.cardData instanceof Function) {\r\n const spinner = document.createElement(\"div\");\r\n spinner.className = \"acd-spinner\";\r\n spinner.style.width = \"28px\";\r\n spinner.style.height = \"28px\";\r\n\r\n thumbnailHost.appendChild(spinner);\r\n\r\n const cardData = this.props.cardData((cardData: CardData) => {\r\n thumbnailHost.removeChild(spinner);\r\n if (cardData.thumbnail instanceof Function) {\r\n thumbnailHost.appendChild(cardData.thumbnail())\r\n } else if (cardData.thumbnail) {\r\n thumbnailHost.appendChild(cardData.thumbnail)\r\n }\r\n })\r\n\r\n if (cardData) {\r\n thumbnailHost.removeChild(spinner);\r\n if (cardData.thumbnail instanceof Function) {\r\n thumbnailHost.appendChild(cardData.thumbnail())\r\n } else if (cardData.thumbnail) {\r\n thumbnailHost.appendChild(cardData.thumbnail)\r\n }\r\n }\r\n } else if (this.props.cardData) {\r\n if (this.props.cardData.thumbnail instanceof Function) {\r\n thumbnailHost.appendChild(this.props.cardData.thumbnail())\r\n } else if (this.props.cardData.thumbnail) {\r\n thumbnailHost.appendChild(this.props.cardData.thumbnail)\r\n }\r\n }\r\n\r\n const displayNameElement = document.createElement(\"div\");\r\n displayNameElement.className = \"acd-open-sample-item-title\";\r\n displayNameElement.id = newItemId;\r\n displayNameElement.innerText = this.props.label;\r\n\r\n element.appendChild(thumbnailHost);\r\n element.appendChild(displayNameElement);\r\n\r\n return element;\r\n }\r\n\r\n navigateToNextElement(element: HTMLElement) {\r\n if (element.nextSibling) {\r\n (element.nextSibling as HTMLElement).focus();\r\n } else {\r\n if (this.onNavigateToNextList) {\r\n this.onNavigateToNextList();\r\n }\r\n }\r\n }\r\n\r\n navigateToPreviousElement(element: HTMLElement) {\r\n if (element.previousSibling) {\r\n (element.previousSibling as HTMLElement).focus();\r\n } else {\r\n if (this.onNavigateToPreviousList) {\r\n this.onNavigateToPreviousList();\r\n }\r\n }\r\n }\r\n\r\n onCardSelected() {\r\n if (this.onComplete) {\r\n if (this.props.cardData instanceof Function) {\r\n const cardData = this.props.cardData(this.onComplete);\r\n if (cardData) {\r\n this.onComplete(cardData);\r\n }\r\n } else if (this.props.cardData) {\r\n this.onComplete(this.props.cardData);\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\nexport interface OpenSampleDialogProps {\r\n handlers?: (OpenSampleItemProps | null)[],\r\n catalogue?: SampleCatalogue,\r\n}\r\n\r\nexport class OpenSampleDialog extends Dialog {\r\n private _listElements: HTMLElement[] = [];\r\n private _output: CardData;\r\n private static _builtinItems: OpenSampleItemProps[] = [\r\n {\r\n label: \"Blank Card\",\r\n cardData: {\r\n cardPayload: JSON.stringify(\r\n {\r\n type: \"AdaptiveCard\",\r\n $schema: \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n version: \"1.0\",\r\n body: [\r\n ]\r\n }\r\n ),\r\n },\r\n },\r\n ];\r\n\r\n constructor(readonly props: OpenSampleDialogProps) {\r\n super();\r\n }\r\n\r\n private renderSection(title: string | null, items: (OpenSampleItemProps | null)[]): HTMLElement {\r\n const renderedElement = document.createElement(\"div\");\r\n\r\n if (title) {\r\n const titleElement = document.createElement(\"div\");\r\n titleElement.className = \"acd-dialog-title\";\r\n titleElement.innerText = title;\r\n titleElement.style.marginTop = \"10px\";\r\n\r\n renderedElement.appendChild(titleElement);\r\n }\r\n\r\n const listElement = document.createElement(\"div\");\r\n listElement.className = \"acd-open-sample-item-container\";\r\n listElement.setAttribute(\"role\", \"list\");\r\n this._listElements.push(listElement);\r\n\r\n for (const item of items) {\r\n if (!item) continue;\r\n const itemElement = new OpenSampleItem(item);\r\n itemElement.onComplete = (output: CardData) => {\r\n this._output = output;\r\n this.close();\r\n }\r\n itemElement.onNavigateToNextList = () => {\r\n // Find the index of the current list\r\n const currentIndex = this._listElements.indexOf(listElement);\r\n // If the next index has a valid list, we want to navigate to the first element\r\n if ((currentIndex !== -1) && (currentIndex + 1 < this._listElements.length) && this._listElements.at(currentIndex + 1)?.firstChild) {\r\n (this._listElements.at(currentIndex + 1).firstChild as HTMLElement).focus();\r\n }\r\n }\r\n itemElement.onNavigateToPreviousList = () => {\r\n // Find the index of the current list\r\n const currentIndex = this._listElements.indexOf(listElement);\r\n // If the previous index has a valid list, we want to navigate to the last element\r\n if ((currentIndex !== -1) && (currentIndex - 1 >= 0) && this._listElements.at(currentIndex - 1)?.lastChild) {\r\n (this._listElements.at(currentIndex - 1).lastChild as HTMLElement).focus();\r\n }\r\n }\r\n\r\n listElement.appendChild(itemElement.render());\r\n }\r\n\r\n renderedElement.appendChild(listElement);\r\n\r\n return renderedElement;\r\n }\r\n\r\n protected renderContent(): HTMLElement {\r\n const renderedElement = document.createElement(\"div\");\r\n renderedElement.style.overflow = \"auto\";\r\n\r\n const featuredSection = this.renderSection(null, OpenSampleDialog._builtinItems.concat(this.props.handlers))\r\n renderedElement.appendChild(featuredSection);\r\n\r\n if (this.props.catalogue) {\r\n const divider = document.createElement(\"hr\");\r\n renderedElement.appendChild(divider);\r\n\r\n this.props.catalogue.onDownloaded = (sender: SampleCatalogue) => {\r\n if (sender.isDownloaded) {\r\n const catalogueSection = this.renderSection(\"Explore\",\r\n this.props.catalogue.entries.map((entry: CatalogueEntry) => {\r\n return {\r\n label: entry.displayName,\r\n cardData: (callback) => {\r\n entry.onDownloaded = (sender: CatalogueEntry) => {\r\n let success: boolean = sender.cardPayloadDownloaded;\r\n\r\n if (success) {\r\n try {\r\n const cardPayload = JSON.parse(sender.cardPayload);\r\n const card = new Adaptive.AdaptiveCard();\r\n const cardData = sender.sampleData ?\r\n new ACData.Template(cardPayload).expand(\r\n {\r\n $root: JSON.parse(sender.sampleData)\r\n }\r\n )\r\n : cardPayload\r\n ;\r\n\r\n card.parse(cardData);\r\n card.render();\r\n card.renderedElement.style.width = \"100%\";\r\n\r\n return callback({\r\n cardPayload: entry.cardPayload,\r\n sampleData: entry.sampleData,\r\n sampleHostData: \"{}\",\r\n thumbnail: card.renderedElement,\r\n });\r\n }\r\n catch (e) {\r\n // Swallow the exception\r\n console.error(\"Unable to load card sample. Error: \" + e);\r\n\r\n success = false;\r\n }\r\n }\r\n };\r\n entry.download();\r\n },\r\n }\r\n })\r\n );\r\n renderedElement.appendChild(catalogueSection);\r\n }\r\n else {\r\n console.error(\"Sender is not downloaded\");\r\n }\r\n };\r\n\r\n\r\n this.props.catalogue.download();\r\n }\r\n\r\n const firstChild = featuredSection.firstElementChild as HTMLElement;\r\n firstChild.focus();\r\n\r\n return renderedElement;\r\n }\r\n\r\n get output(): CardData {\r\n return this._output;\r\n }\r\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport class PeerCommand {\r\n private _renderedElement: HTMLElement;\r\n\r\n protected internalRender(): HTMLElement {\r\n let buttonElement = document.createElement(\"button\");\r\n buttonElement.classList.add(\"acd-peerButton\");\r\n buttonElement.type = \"button\";\r\n buttonElement.setAttribute(\"role\", \"button\");\r\n buttonElement.title = this.toolTip ? this.toolTip : this.name;\r\n buttonElement.setAttribute(\"aria-label\", this.toolTip ?? this.name);\r\n buttonElement.tabIndex = 0;\r\n\r\n if (this.iconClass) {\r\n let iconElement = document.createElement(\"div\");\r\n iconElement.classList.add(\"acd-peerButton-icon\", this.iconClass);\r\n\r\n buttonElement.appendChild(iconElement);\r\n }\r\n\r\n if (this.name && (!this.iconClass || this.alwaysShowName)) {\r\n let nameElement = document.createElement(\"div\");\r\n nameElement.classList.add(\"acd-peerButton-text\");\r\n nameElement.innerText = this.name;\r\n\r\n buttonElement.classList.add(\"variableWidth\");\r\n buttonElement.appendChild(nameElement);\r\n }\r\n else {\r\n buttonElement.classList.add(\"fixedWidth\");\r\n }\r\n\r\n buttonElement.onclick = (e: MouseEvent) => {\r\n if (this.execute) {\r\n this.execute(this, buttonElement);\r\n }\r\n }\r\n buttonElement.onpointerdown = (e: PointerEvent) => { e.cancelBubble = true; };\r\n\r\n return buttonElement;\r\n }\r\n\r\n name: string;\r\n alwaysShowName: boolean = false;\r\n toolTip: string = undefined;\r\n iconClass: string;\r\n isPromotable: boolean = false;\r\n showInPropertySheet: boolean = false;\r\n execute: (command: PeerCommand, clickedElement: HTMLElement) => void;\r\n\r\n constructor(init?: Partial) {\r\n Object.assign(this, init);\r\n }\r\n\r\n render(): HTMLElement {\r\n this._renderedElement = this.internalRender();\r\n\r\n return this._renderedElement;\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this._renderedElement;\r\n }\r\n}\r\n","export class Pic2Card {\r\n\tstatic pic2cardService = \"\";\r\n\tstatic privacyLink = \"../privacy\";\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport interface ILoadSettingResult {\r\n succeeded: boolean;\r\n value?: T;\r\n}\r\n\r\nexport class SettingsManager {\r\n private static _isLocalStorageAvailable: boolean = undefined;\r\n\r\n private static determineIfStorageIsAvailable(type: string): boolean {\r\n try {\r\n var storage = window[type];\r\n let x = '__storage_test__';\r\n\r\n storage.setItem(x, x);\r\n storage.removeItem(x);\r\n\r\n return true;\r\n }\r\n catch(e) {\r\n return e instanceof DOMException && (\r\n // everything except Firefox\r\n e.code === 22 ||\r\n // Firefox\r\n e.code === 1014 ||\r\n // test name field too, because code might not be present\r\n // everything except Firefox\r\n e.name === 'QuotaExceededError' ||\r\n // Firefox\r\n e.name === 'NS_ERROR_DOM_QUOTA_REACHED') &&\r\n // acknowledge QuotaExceededError only if there's something already stored\r\n storage.length !== 0;\r\n }\r\n }\r\n\r\n static trySaveSetting(name: string, value: string) {\r\n if (SettingsManager.isLocalStorageAvailable) {\r\n localStorage.setItem(name, value);\r\n }\r\n }\r\n\r\n static tryLoadStringSetting(name: string): ILoadSettingResult {\r\n if (SettingsManager.isLocalStorageAvailable) {\r\n let returnValue = localStorage.getItem(name);\r\n \r\n return {\r\n succeeded: true,\r\n value: returnValue\r\n };\r\n }\r\n else {\r\n return { succeeded: false };\r\n }\r\n }\r\n \r\n static tryLoadNumberSetting(name: string): ILoadSettingResult {\r\n if (SettingsManager.isLocalStorageAvailable) {\r\n let returnValue = localStorage.getItem(name);\r\n\r\n return {\r\n succeeded: true,\r\n value: returnValue ? parseFloat(returnValue) : undefined\r\n };\r\n }\r\n else {\r\n return { succeeded: false };\r\n }\r\n }\r\n\r\n static tryLoadBooleanSetting(name: string, defaultValue: boolean): ILoadSettingResult {\r\n if (SettingsManager.isLocalStorageAvailable) {\r\n let returnValue = localStorage.getItem(name);\r\n\r\n return {\r\n succeeded: true,\r\n value: returnValue ? returnValue == \"true\" : defaultValue\r\n };\r\n }\r\n else {\r\n return { succeeded: false };\r\n }\r\n }\r\n\r\n static get isLocalStorageAvailable(): boolean {\r\n if (!SettingsManager._isLocalStorageAvailable) {\r\n SettingsManager._isLocalStorageAvailable = SettingsManager.determineIfStorageIsAvailable(\"localStorage\");\r\n }\r\n\r\n return SettingsManager._isLocalStorageAvailable;\r\n }\r\n}\r\n","import * as Adaptive from \"adaptivecards\";\r\n\r\nexport class GlobalSettings {\r\n static enableDataBindingSupport: boolean = false;\r\n static showDataStructureToolbox: boolean = false;\r\n static showSampleDataEditorToolbox: boolean = false;\r\n static showSampleHostDataEditorToolbox: boolean = false;\r\n static showVersionPicker: boolean = false;\r\n static selectedHostContainerControlsTargetVersion: boolean = true;\r\n static showTargetVersionMismatchWarning: boolean = true;\r\n static supportedTargetVersions: Adaptive.Version[] = Adaptive.Versions.getAllDeclaredVersions();\r\n}\r\n","import { Splitter } from \"./splitter\";\r\nimport { Toolbox, ToolboxOrientation } from \"./tool-box\";\r\nimport { SettingsManager } from \"./settings-manager\";\r\n\r\nexport enum SidePanelAlignment {\r\n Top,\r\n Right,\r\n Bottom,\r\n Left\r\n}\r\n\r\nclass ToolboxInfo {\r\n private _splitter: Splitter;\r\n\r\n private resizeEnded() {\r\n if (this.onResizeEnded) {\r\n this.onResizeEnded(this);\r\n }\r\n }\r\n\r\n private resized() {\r\n if (this.onResized) {\r\n this.onResized(this);\r\n }\r\n }\r\n\r\n onToggled: (sender: ToolboxInfo, saveState?: boolean) => void;\r\n onResizeEnded: (sender: ToolboxInfo) => void;\r\n onResized: (sender: ToolboxInfo) => void;\r\n\r\n showSplitter() {\r\n if (this.splitter) {\r\n this.splitter.attachedTo.classList.remove(\"acd-hidden\");\r\n }\r\n }\r\n\r\n hideSplitter() {\r\n if (this.splitter) {\r\n this.splitter.attachedTo.classList.add(\"acd-hidden\");\r\n }\r\n }\r\n\r\n constructor(readonly toolbox: Toolbox) {\r\n toolbox.onToggled = (sender: Toolbox, saveState: boolean = true) => {\r\n if (sender.isExpanded) {\r\n this.showSplitter();\r\n\r\n this.toolbox.renderedElement.classList.remove(\"acd-hidden\");\r\n }\r\n else {\r\n this.hideSplitter();\r\n\r\n this.toolbox.renderedElement.classList.add(\"acd-hidden\");\r\n }\r\n\r\n if (this.onToggled) {\r\n this.onToggled(this, saveState);\r\n }\r\n }\r\n }\r\n\r\n get splitter(): Splitter {\r\n return this._splitter;\r\n }\r\n\r\n set splitter(value: Splitter) {\r\n this._splitter = value;\r\n\r\n this._splitter.onResizeEnded = (sender: Splitter) => {\r\n this.resizeEnded();\r\n }\r\n\r\n this._splitter.onResized = (sender: Splitter) => {\r\n this.resized();\r\n }\r\n }\r\n}\r\n\r\nexport class SidePanel {\r\n private _attachedTo: HTMLElement;\r\n private _alignment: SidePanelAlignment;\r\n private _collapsedTabContainer: HTMLElement;\r\n private _contentHost: HTMLElement;\r\n private _toolboxes: ToolboxInfo[] = [];\r\n private _isRestoring: boolean = false;\r\n\r\n private updateLayout() {\r\n let expandedToolboxCount = 0;\r\n\r\n for (let toolboxInfo of this._toolboxes) {\r\n if (toolboxInfo.toolbox.isExpanded) {\r\n expandedToolboxCount++;\r\n\r\n if (expandedToolboxCount == 1) {\r\n toolboxInfo.hideSplitter();\r\n toolboxInfo.toolbox.stretch = true;\r\n }\r\n else {\r\n toolboxInfo.showSplitter();\r\n toolboxInfo.toolbox.stretch = false;\r\n }\r\n }\r\n }\r\n\r\n if (expandedToolboxCount > 0) {\r\n this._attachedTo.classList.remove(\"acd-hidden\");\r\n }\r\n else {\r\n this._attachedTo.classList.add(\"acd-hidden\");\r\n }\r\n }\r\n\r\n private computeToolboxSize(toolbox: Toolbox) {\r\n let boundingRect = this._attachedTo.getBoundingClientRect();\r\n let toolboxBoundingRect = toolbox.renderedElement.getBoundingClientRect();\r\n\r\n if (this.isVertical) {\r\n toolbox.renderedElement.style.height = (100 / boundingRect.height * toolboxBoundingRect.height) + \"%\";\r\n }\r\n else {\r\n toolbox.renderedElement.style.width = (100 / boundingRect.width * toolboxBoundingRect.width) + \"%\";\r\n }\r\n }\r\n\r\n private resized() {\r\n if (this.onResized) {\r\n this.onResized(this);\r\n }\r\n\r\n this.saveState();\r\n }\r\n\r\n private toolboxResized(toolbox: Toolbox) {\r\n if (this.onToolboxResized) {\r\n this.onToolboxResized(this, toolbox);\r\n }\r\n\r\n this.saveState();\r\n }\r\n\r\n private toolboxExpandedOrCollapsed(toolbox: Toolbox, saveState: boolean = true) {\r\n if (this.onToolboxExpandedOrCollapsed) {\r\n this.onToolboxExpandedOrCollapsed(this, toolbox);\r\n }\r\n\r\n\t\tif (saveState) {\r\n\t\t\tthis.saveState();\r\n\t\t}\r\n }\r\n\r\n private getDimensionSettingName(): string {\r\n return this.id + (this.isVertical ? \"Height\" : \"Width\");\r\n }\r\n\r\n private get isVertical(): boolean {\r\n return this._alignment == SidePanelAlignment.Right || this._alignment == SidePanelAlignment.Left;\r\n }\r\n\r\n onResized: (sender: SidePanel) => void;\r\n onToolboxResized: (sender: SidePanel, toolbox: Toolbox) => void;\r\n onToolboxExpandedOrCollapsed: (sender: SidePanel, toolbox: Toolbox) => void;\r\n\r\n readonly id;\r\n\r\n size?: number;\r\n isResizable: boolean = true;\r\n\r\n addToolbox(toolbox: Toolbox) {\r\n let toolboxInfo = new ToolboxInfo(toolbox);\r\n toolboxInfo.onToggled = (sender: ToolboxInfo, saveState: boolean = true) => {\r\n this.updateLayout();\r\n this.toolboxExpandedOrCollapsed(toolboxInfo.toolbox, saveState);\r\n }\r\n toolboxInfo.onResizeEnded = (sender: ToolboxInfo) => {\r\n this.computeToolboxSize(sender.toolbox);\r\n this.toolboxResized(sender.toolbox);\r\n }\r\n toolboxInfo.onResized = (sender: ToolboxInfo) => {\r\n this.toolboxResized(sender.toolbox);\r\n }\r\n\r\n this._toolboxes.push(toolboxInfo);\r\n }\r\n\r\n attachTo(attachTo: HTMLElement) {\r\n this._attachedTo = attachTo;\r\n this._attachedTo.classList.add(\"acd-sidepanel-parent\");\r\n\r\n this._contentHost = document.createElement(\"div\");\r\n this._contentHost.className = \"acd-sidepanel-host\";\r\n\r\n if (this.isVertical) {\r\n this._contentHost.classList.add(\"acd-sidepanel-host-vertical\");\r\n }\r\n else {\r\n this._contentHost.classList.add(\"acd-sidepanel-host-horizontal\");\r\n }\r\n\r\n for (let i = 0; i < this._toolboxes.length; i++) {\r\n let toolboxInfo = this._toolboxes[i];\r\n toolboxInfo.toolbox.render(\r\n this.isVertical ? ToolboxOrientation.Vertical : ToolboxOrientation.Horizontal,\r\n this._collapsedTabContainer);\r\n\r\n if (i > 0) {\r\n let splitterElement = document.createElement(\"div\");\r\n\r\n if (this.isVertical) {\r\n splitterElement.className = \"acd-horizontal-splitter\";\r\n\r\n toolboxInfo.toolbox.renderedElement.style.height = (100 / this._toolboxes.length) + \"%\";\r\n }\r\n else {\r\n splitterElement.className = \"acd-vertical-splitter\";\r\n\r\n toolboxInfo.toolbox.renderedElement.style.width = (100 / this._toolboxes.length) + \"%\";\r\n }\r\n\r\n toolboxInfo.toolbox.renderedElement.appendChild(splitterElement);\r\n\r\n toolboxInfo.splitter = new Splitter(\r\n splitterElement,\r\n toolboxInfo.toolbox.renderedElement,\r\n !this.isVertical);\r\n }\r\n\r\n this._contentHost.appendChild(toolboxInfo.toolbox.renderedElement);\r\n }\r\n\r\n let splitterElement: HTMLElement = null;\r\n\r\n if (this.isResizable) {\r\n splitterElement = document.createElement(\"div\");\r\n splitterElement.className = this.isVertical ? \"acd-vertical-splitter\" : \"acd-horizontal-splitter\";\r\n\r\n let splitter = new Splitter(\r\n splitterElement,\r\n this._attachedTo,\r\n this.isVertical,\r\n this._alignment == SidePanelAlignment.Left || this._alignment == SidePanelAlignment.Top);\r\n splitter.onResized = (splitter: Splitter) => {\r\n this.resized();\r\n }\r\n }\r\n\r\n this._attachedTo.innerHTML = \"\";\r\n\r\n if (this.isVertical) {\r\n if (this.size) {\r\n this._attachedTo.style.width = this.size + \"px\";\r\n }\r\n\r\n this._attachedTo.classList.add(\"acd-sidepanel-parent-vertical\");\r\n }\r\n else {\r\n if (this.size) {\r\n this._attachedTo.style.height = this.size + \"px\";\r\n }\r\n\r\n this._attachedTo.classList.add(\"acd-sidepanel-parent-horizontal\");\r\n }\r\n\r\n if (this._alignment == SidePanelAlignment.Right || this._alignment == SidePanelAlignment.Bottom) {\r\n if (splitterElement) {\r\n this._attachedTo.appendChild(splitterElement);\r\n }\r\n\r\n this._attachedTo.appendChild(this._contentHost);\r\n }\r\n else {\r\n this._attachedTo.appendChild(this._contentHost);\r\n\r\n if (splitterElement) {\r\n this._attachedTo.appendChild(splitterElement);\r\n }\r\n }\r\n\r\n this.restoreState();\r\n this.updateLayout();\r\n }\r\n\r\n constructor(id: string, alignment: SidePanelAlignment, collapsedTabContainer: HTMLElement) {\r\n this.id = id;\r\n this._alignment = alignment;\r\n this._collapsedTabContainer = collapsedTabContainer;\r\n }\r\n\r\n saveState() {\r\n if (!this._isRestoring) {\r\n SettingsManager.trySaveSetting(\r\n this.getDimensionSettingName(),\r\n this.isVertical ? this._attachedTo.style.width : this._attachedTo.style.height);\r\n\r\n for (let toolboxInfo of this._toolboxes) {\r\n toolboxInfo.toolbox.saveState();\r\n }\r\n }\r\n }\r\n\r\n restoreState() {\r\n if (this._attachedTo && !this._isRestoring) {\r\n this._isRestoring = true;\r\n\r\n try {\r\n let dimensionSetting = SettingsManager.tryLoadStringSetting(this.getDimensionSettingName());\r\n\r\n if (dimensionSetting.succeeded && dimensionSetting.value != undefined && dimensionSetting.value != \"\") {\r\n if (this.isVertical) {\r\n this._attachedTo.style.width = dimensionSetting.value;\r\n }\r\n else {\r\n this._attachedTo.style.height = dimensionSetting.value;\r\n }\r\n }\r\n\r\n for (let toolboxInfo of this._toolboxes) {\r\n toolboxInfo.toolbox.restoreState();\r\n }\r\n\r\n this.updateLayout();\r\n this.resized();\r\n }\r\n finally {\r\n this._isRestoring = false;\r\n }\r\n }\r\n }\r\n\r\n get contentHost(): HTMLElement {\r\n return this._contentHost;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { IPoint } from \"./miscellaneous\";\r\n\r\nexport class Splitter {\r\n private _isVertical: boolean = false;\r\n private _isAttachedAfter: boolean = false;\r\n private _sizedELement: HTMLElement;\r\n private _isPointerDown: boolean;\r\n private _lastClickedOffset: IPoint;\r\n\r\n private resizeEnded() {\r\n if (this.onResizeEnded) {\r\n this.onResizeEnded(this);\r\n }\r\n }\r\n\r\n private pointerDown(e: PointerEvent) {\r\n e.preventDefault();\r\n\r\n this.attachedTo.setPointerCapture(e.pointerId);\r\n\r\n this._lastClickedOffset = { x: e.x, y: e.y };\r\n\r\n this._isPointerDown = true;\r\n }\r\n\r\n private pointerMove(e: PointerEvent) {\r\n if (this._isPointerDown) {\r\n e.preventDefault();\r\n\r\n let sizeApplied = false;\r\n let newSize: number;\r\n\r\n if (this._isVertical) {\r\n if (this._isAttachedAfter) {\r\n newSize = this._sizedELement.getBoundingClientRect().width - (this._lastClickedOffset.x - e.x);\r\n }\r\n else {\r\n newSize = this._sizedELement.getBoundingClientRect().width - (e.x - this._lastClickedOffset.x);\r\n }\r\n\r\n if (newSize >= this.minimum) {\r\n this._sizedELement.style.width = newSize + \"px\";\r\n\r\n sizeApplied = true;\r\n }\r\n }\r\n else {\r\n if (this._isAttachedAfter) {\r\n newSize = this._sizedELement.getBoundingClientRect().height - (this._lastClickedOffset.y - e.y);\r\n }\r\n else {\r\n newSize = this._sizedELement.getBoundingClientRect().height - (e.y - this._lastClickedOffset.y);\r\n }\r\n\r\n if (newSize >= this.minimum) {\r\n this._sizedELement.style.height = newSize + \"px\";\r\n\r\n sizeApplied = true;\r\n }\r\n }\r\n\r\n if (sizeApplied) {\r\n if (this.onResized) {\r\n this.onResized(this);\r\n }\r\n\r\n this._lastClickedOffset = { x: e.x, y: e.y };\r\n }\r\n }\r\n }\r\n\r\n private pointerUp(e: PointerEvent) {\r\n e.preventDefault();\r\n\r\n this.attachedTo.releasePointerCapture(e.pointerId);\r\n\r\n this.resizeEnded();\r\n\r\n this._isPointerDown = false;\r\n }\r\n\r\n onResizeEnded: (sender: Splitter) => void;\r\n onResized: (sender: Splitter) => void;\r\n\r\n readonly attachedTo: HTMLElement;\r\n\r\n minimum: number = 50;\r\n\r\n constructor(\r\n attachedTo: HTMLElement,\r\n sizedElement: HTMLElement,\r\n isVertical: boolean = false,\r\n isAttachedAfter: boolean = false,\r\n minimumSize: number = 140) {\r\n this.attachedTo = attachedTo;\r\n this._sizedELement = sizedElement;\r\n this._isVertical = isVertical;\r\n this._isAttachedAfter = isAttachedAfter;\r\n this.minimum = minimumSize;\r\n\r\n this.attachedTo.onmousedown = (e: MouseEvent) => {e.preventDefault(); };\r\n this.attachedTo.onpointerdown = (e: PointerEvent) => { this.pointerDown(e); };\r\n this.attachedTo.onpointermove = (e: PointerEvent) => { this.pointerMove(e); };\r\n this.attachedTo.onpointerup = (e: PointerEvent) => { this.pointerUp(e); };\r\n }\r\n}\r\n","import { WidgetContainer } from \"./containers\";\r\n\r\nexport class Strings {\r\n static readonly toolboxes = {\r\n toolPalette: {\r\n title: \"CARD ELEMENTS\"\r\n },\r\n cardEditor: {\r\n title: \"CARD PAYLOAD EDITOR\"\r\n },\r\n sampleDataEditor: {\r\n title: \"SAMPLE DATA EDITOR\"\r\n },\r\n sampleHostDataEditor: {\r\n title: \"SAMPLE HOST DATA EDITOR\"\r\n },\r\n propertySheet: {\r\n title: \"ELEMENT PROPERTIES\",\r\n commands: {\r\n bindData: {\r\n displayText: () => \"...\",\r\n accessibleText: (propertyLabel: string) => `Options for ${propertyLabel} Data Binding`\r\n }\r\n }\r\n },\r\n cardStructure: {\r\n title: \"CARD STRUCTURE\"\r\n },\r\n dataStructure: {\r\n title: \"DATA STRUCTURE\"\r\n }\r\n };\r\n static loadingEditor = \"Loading editor...\";\r\n static readonly widgetOverflowWarning = `[Designer] We have adjusted your card to hide overflow elements. Please ensure all card elements are contained within the proper card height per Widgets Board design guidelines. Only Carousel pagination dots can be present in the bottom ${WidgetContainer.widgetPadding}px margin of a widget.`;\r\n}\r\n","import { SettingsManager } from \"./settings-manager\";\r\nimport { Constants } from \"adaptivecards-controls\";\r\n\r\nexport interface IToolboxCommand {\r\n title: string;\r\n iconClass: string;\r\n execute: (sender: IToolboxCommand) => void;\r\n}\r\n\r\nexport enum ToolboxOrientation {\r\n Horizontal,\r\n Vertical\r\n}\r\n\r\nexport class Toolbox {\r\n private _renderedElement: HTMLElement;\r\n private _headerRootElement: HTMLElement;\r\n private _headerIconElement: HTMLElement;\r\n private _expandCollapseButtonElement: HTMLElement;\r\n private _customCommandsHost: HTMLElement;\r\n private _contentHost: HTMLElement;\r\n private _isExpanded: boolean = true;\r\n private _content: HTMLElement;\r\n private _stretch: boolean = false;\r\n private _orientation: ToolboxOrientation;\r\n private _isRestoring: boolean = false;\r\n private _collapsedTabContainer: HTMLElement;\r\n private _isVisible = true;\r\n\r\n private getDimensionSettingName(): string {\r\n return \"Toolbox\" + this.id + (this._orientation == ToolboxOrientation.Vertical ? \"Height\" : \"Width\");\r\n }\r\n\r\n private updateContent() {\r\n if (this._contentHost) {\r\n this._contentHost.innerHTML = \"\";\r\n\r\n if (this._content) {\r\n this._contentHost.appendChild(this._content);\r\n }\r\n }\r\n }\r\n\r\n private toggled(saveState: boolean = true) {\r\n if (this.onToggled) {\r\n this.onToggled(this, saveState);\r\n }\r\n }\r\n\r\n private updateVisibility() {\r\n if (this._collapsedTabContainer) {\r\n if (!this._isVisible) {\r\n this.hideToolbox();\r\n } else {\r\n this._collapsedTabContainer.appendChild(this._headerRootElement);\r\n this.restoreState();\r\n }\r\n this._expandCollapseButtonElement.setAttribute(\"aria-expanded\", this._isExpanded.toString());\r\n }\r\n }\r\n\r\n private hideToolbox() {\r\n if (this.isExpanded) {\r\n this.collapse(false);\r\n }\r\n this._collapsedTabContainer.removeChild(this._headerRootElement);\r\n }\r\n\r\n onToggled: (sender: Toolbox, saveState?: boolean) => void;\r\n\r\n readonly id: string;\r\n readonly title: string;\r\n\r\n commands: Array = null;\r\n\r\n constructor(id: string, title: string) {\r\n this.id = id;\r\n this.title = title;\r\n }\r\n\r\n render(orientation: ToolboxOrientation, collapsedTabContainer: HTMLElement) {\r\n this._orientation = orientation;\r\n this._collapsedTabContainer = collapsedTabContainer;\r\n\r\n this._renderedElement = document.createElement(\"div\");\r\n this._renderedElement.classList.add(\"acd-toolbox\");\r\n this.stretch = this.stretch; // trigger CSS class painting based on defaults\r\n\r\n this._headerRootElement = document.createElement(\"div\");\r\n this._headerRootElement.innerHTML = \"\";\r\n this._headerRootElement.className = \"acd-toolbox-header\";\r\n\r\n let headerContentElement = document.createElement(\"div\");\r\n headerContentElement.className = \"acd-toolbox-header-content\";\r\n\r\n let headerTitleElement = document.createElement(\"span\");\r\n headerTitleElement.className = \"acd-toolbox-header-title\";\r\n headerTitleElement.innerText = this.title;\r\n\r\n headerContentElement.appendChild(headerTitleElement);\r\n\r\n let headerCommandsHostElement = document.createElement(\"span\");\r\n headerCommandsHostElement.className = \"acd-toolbox-header-commandsHost\";\r\n\r\n this._customCommandsHost = document.createElement(\"div\");\r\n this._customCommandsHost.style.display = \"flex\";\r\n\r\n if (this.commands) {\r\n for (let command of this.commands) {\r\n let commandButtonElement = document.createElement(\"div\");\r\n commandButtonElement.className = \"acd-toolbox-header-commandButton\";\r\n commandButtonElement.title = command.title;\r\n commandButtonElement.onclick = (e) => {\r\n command.execute(command);\r\n }\r\n\r\n let commandIconElement = document.createElement(\"div\");\r\n commandIconElement.classList.add(\"acd-icon\", command.iconClass);\r\n\r\n commandButtonElement.appendChild(commandIconElement);\r\n\r\n this._customCommandsHost.appendChild(commandButtonElement);\r\n }\r\n }\r\n\r\n headerCommandsHostElement.appendChild(this._customCommandsHost);\r\n\r\n this._expandCollapseButtonElement = document.createElement(\"span\");\r\n this._expandCollapseButtonElement.className = \"acd-toolbox-header-commandButton\";\r\n this._expandCollapseButtonElement.title = \"Hide \" + this.title;\r\n this._expandCollapseButtonElement.tabIndex = 0;\r\n this._expandCollapseButtonElement.setAttribute(\"role\", \"button\");\r\n this._expandCollapseButtonElement.setAttribute(\"aria-expanded\", \"true\");\r\n this._expandCollapseButtonElement.ariaLabel = this.title;\r\n\r\n this._headerIconElement = document.createElement(\"span\")\r\n this._headerIconElement.classList.add(\"acd-icon\", \"acd-icon-header-expanded\");\r\n\r\n this._expandCollapseButtonElement.appendChild(this._headerIconElement);\r\n\r\n this._expandCollapseButtonElement.onkeydown = (e) => {\r\n if (e.key === Constants.keys.enter || e.key === Constants.keys.space) {\r\n this.toggle();\r\n\r\n e.preventDefault();\r\n this._expandCollapseButtonElement.focus();\r\n \r\n // Add a delay so the focus event has completed\r\n setTimeout(() => { this._expandCollapseButtonElement.setAttribute(\"aria-expanded\", this._isExpanded.toString()); }, 1);\r\n }\r\n\r\n if (e.key === Constants.keys.escape) {\r\n this.collapse();\r\n\r\n e.preventDefault();\r\n this._expandCollapseButtonElement.focus();\r\n \r\n // Add a delay so the focus event has completed\r\n setTimeout(() => { this._expandCollapseButtonElement.setAttribute(\"aria-expanded\", this._isExpanded.toString()); }, 1);\r\n }\r\n }\r\n\r\n this._expandCollapseButtonElement.onclick = (e) => {\r\n this.toggle();\r\n this._expandCollapseButtonElement.setAttribute(\"aria-expanded\", this._isExpanded.toString());\r\n\r\n e.preventDefault();\r\n return true;\r\n }\r\n\r\n headerCommandsHostElement.appendChild(this._expandCollapseButtonElement);\r\n\r\n headerContentElement.appendChild(headerCommandsHostElement);\r\n\r\n this._headerRootElement.appendChild(headerContentElement);\r\n\r\n this._contentHost = document.createElement(\"div\");\r\n this._contentHost.style.overflow = \"auto\";\r\n\r\n this._renderedElement.appendChild(this._headerRootElement);\r\n this._renderedElement.appendChild(this._contentHost);\r\n\r\n if (!this._isVisible) {\r\n this.hideToolbox();\r\n }\r\n\r\n this.updateContent();\r\n }\r\n\r\n collapse(saveState: boolean = true) {\r\n if (this._isExpanded) {\r\n this._headerIconElement.classList.add(\"acd-icon-header-collapsed\");\r\n this._headerIconElement.classList.remove(\"acd-icon-header-expanded\");\r\n this._customCommandsHost.classList.add(\"acd-hidden\");\r\n\r\n if (this._collapsedTabContainer) {\r\n this._renderedElement.removeChild(this._headerRootElement);\r\n this._collapsedTabContainer.appendChild(this._headerRootElement);\r\n }\r\n\r\n this._expandCollapseButtonElement.title = \"Show \" + this.title;\r\n this._isExpanded = false;\r\n\r\n this.toggled(saveState);\r\n }\r\n }\r\n\r\n expand() {\r\n if (!this._isExpanded) {\r\n this._headerIconElement.classList.add(\"acd-icon-header-expanded\");\r\n this._headerIconElement.classList.remove(\"acd-icon-header-collapsed\");\r\n this._customCommandsHost.classList.remove(\"acd-hidden\");\r\n\r\n if (this._collapsedTabContainer) {\r\n this._collapsedTabContainer.removeChild(this._headerRootElement);\r\n this._renderedElement.insertBefore(this._headerRootElement, this._renderedElement.firstChild);\r\n }\r\n\r\n this._expandCollapseButtonElement.title = \"Hide \" + this.title;\r\n this._isExpanded = true;\r\n\r\n this.toggled();\r\n }\r\n }\r\n\r\n toggle() {\r\n if (this.isExpanded) {\r\n this.collapse();\r\n }\r\n else {\r\n this.expand();\r\n }\r\n }\r\n\r\n getHeaderBoundingRect(): ClientRect {\r\n return this._headerRootElement.getBoundingClientRect();\r\n }\r\n\r\n saveState() {\r\n if (!this._isRestoring) {\r\n SettingsManager.trySaveSetting(\"Toolbox\" + this.id + \"IsExpanded\", this.isExpanded.toString());\r\n\r\n SettingsManager.trySaveSetting(\r\n this.getDimensionSettingName(),\r\n this.orientation == ToolboxOrientation.Vertical ? this.renderedElement.style.height : this.renderedElement.style.width);\r\n }\r\n }\r\n\r\n restoreState() {\r\n if (this.renderedElement && !this._isRestoring && this.isVisible) {\r\n this._isRestoring = true;\r\n\r\n try {\r\n let dimensionSetting = SettingsManager.tryLoadStringSetting(this.getDimensionSettingName());\r\n\r\n if (dimensionSetting.succeeded && dimensionSetting.value != undefined && dimensionSetting.value != \"\") {\r\n if (this.orientation == ToolboxOrientation.Vertical) {\r\n this.renderedElement.style.height = dimensionSetting.value;\r\n }\r\n else {\r\n this.renderedElement.style.width = dimensionSetting.value;\r\n }\r\n }\r\n\r\n let isExpandedSetting = SettingsManager.tryLoadBooleanSetting(\"Toolbox\" + this.id + \"IsExpanded\", true);\r\n\r\n if (isExpandedSetting.succeeded && this.isVisible) {\r\n if (isExpandedSetting.value) {\r\n this.expand();\r\n }\r\n else {\r\n this.collapse();\r\n }\r\n this._expandCollapseButtonElement.setAttribute(\"aria-expanded\", this._isExpanded.toString());\r\n }\r\n }\r\n finally {\r\n this._isRestoring = false;\r\n }\r\n }\r\n }\r\n\r\n get orientation(): ToolboxOrientation {\r\n return this._orientation;\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this._renderedElement;\r\n }\r\n\r\n get content(): HTMLElement {\r\n return this._content;\r\n }\r\n\r\n set content(value: HTMLElement) {\r\n this._content = value;\r\n\r\n this.updateContent();\r\n }\r\n\r\n get isExpanded(): boolean {\r\n return this._isExpanded;\r\n }\r\n\r\n get stretch(): boolean {\r\n return this._stretch;\r\n }\r\n\r\n set stretch(value: boolean) {\r\n this._stretch = value;\r\n\r\n if (this._stretch) {\r\n this.renderedElement.classList.add(\"acd-toolbox-stretch\");\r\n this.renderedElement.classList.remove(\"acd-toolbox-no-stretch\");\r\n }\r\n else {\r\n this.renderedElement.classList.add(\"acd-toolbox-no-stretch\");\r\n this.renderedElement.classList.remove(\"acd-toolbox-stretch\");\r\n }\r\n }\r\n\r\n set isVisible(value: boolean) {\r\n if (this._isVisible != value) {\r\n this._isVisible = value;\r\n\r\n this.updateVisibility();\r\n }\r\n }\r\n\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Adaptive from \"adaptivecards\";\r\nimport { DraggableElement } from \"./draggable-element\";\r\nimport { FieldDefinition } from \"./data\";\r\nimport { DesignContext, CardDesignerSurface } from \"./card-designer-surface\";\r\nimport { CardElementPeer, DesignerPeerRegistrationBase } from \"./designer-peers\";\r\n\r\nexport abstract class BasePaletteItem extends DraggableElement {\r\n protected abstract getText(): string;\r\n protected abstract getIconClass(): string;\r\n\r\n protected internalRender(): HTMLElement {\r\n let element = document.createElement(\"div\");\r\n element.className = \"acd-palette-item\";\r\n element.style.display = \"flex\";\r\n element.setAttribute(\"role\", \"button\");\r\n element.tabIndex = 0;\r\n\r\n let iconElement = document.createElement(\"div\");\r\n iconElement.classList.add(\"acd-icon\", \"acd-toolPalette-icon\", this.getIconClass());\r\n iconElement.style.flex = \"0 0 auto\";\r\n\r\n let labelElement = document.createElement(\"div\");\r\n labelElement.className = \"acd-palette-item-label\";\r\n labelElement.style.flex = \"1 1 100%\";\r\n labelElement.innerText = this.getText();\r\n\r\n element.appendChild(iconElement);\r\n element.appendChild(labelElement);\r\n\r\n return element;\r\n }\r\n\r\n renderDragVisual(): HTMLElement {\r\n return this.internalRender();\r\n }\r\n\r\n abstract createPeer(context: DesignContext, designer: CardDesignerSurface): CardElementPeer;\r\n}\r\n\r\nexport class ElementPaletteItem extends BasePaletteItem {\r\n protected getText(): string {\r\n return this.typeRegistration.typeName;\r\n }\r\n\r\n protected getIconClass(): string {\r\n return this.peerRegistration.iconClass;\r\n }\r\n\r\n readonly typeRegistration: Adaptive.ITypeRegistration;\r\n readonly peerRegistration: DesignerPeerRegistrationBase;\r\n\r\n constructor(typeRegistration: Adaptive.ITypeRegistration, peerRegistration: DesignerPeerRegistrationBase) {\r\n super();\r\n\r\n this.typeRegistration = typeRegistration;\r\n this.peerRegistration = peerRegistration;\r\n }\r\n\r\n createPeer(context: DesignContext, designer: CardDesignerSurface): CardElementPeer {\r\n return CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(designer, null, new this.typeRegistration.objectType(), true);\r\n }\r\n}\r\n\r\nexport class DataPaletteItem extends BasePaletteItem {\r\n protected getText(): string {\r\n return this.field.name;\r\n }\r\n\r\n protected getIconClass(): string {\r\n return null;\r\n }\r\n\r\n constructor(readonly field: FieldDefinition) {\r\n super();\r\n }\r\n\r\n createPeer(context: DesignContext, designer: CardDesignerSurface): CardElementPeer {\r\n let element: Adaptive.CardElement;\r\n\r\n if (this.field.isCollection) {\r\n element = new Adaptive.Container();\r\n element.setCustomProperty(\"$data\", \"{\" + this.field.getPath() + \"}\");\r\n }\r\n else {\r\n let textBlock = new Adaptive.TextBlock();\r\n textBlock.text = \"{\" + this.field.getPath() + \"}\";\r\n\r\n element = textBlock;\r\n }\r\n\r\n return CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(designer, null, element, true);\r\n }\r\n}\r\n\r\nexport abstract class CustomPaletteItem extends BasePaletteItem {\r\n readonly category: string;\r\n\r\n protected getIconClass(): string {\r\n return \"acd-icon-customPaletteItem\";\r\n }\r\n\r\n constructor(category: string) {\r\n super();\r\n\r\n this.category = category;\r\n }\r\n}\r\n\r\nexport class SnippetPaletteItem extends CustomPaletteItem {\r\n protected getText(): string {\r\n return this.name;\r\n }\r\n\r\n readonly name: string;\r\n snippet: object;\r\n\r\n constructor(category: string, name: string) {\r\n super(category);\r\n\r\n this.name = name;\r\n }\r\n\r\n createPeer(context: DesignContext, designer: CardDesignerSurface): CardElementPeer {\r\n if (this.snippet) {\r\n let rootElementTypeName = this.snippet[\"type\"];\r\n\r\n if (rootElementTypeName) {\r\n let adaptiveElement = context.hostContainer.elementsRegistry.createInstance(rootElementTypeName, context.targetVersion);\r\n\r\n if (adaptiveElement) {\r\n adaptiveElement.parse(this.snippet);\r\n\r\n return CardDesignerSurface.cardElementPeerRegistry.createPeerInstance(designer, null, adaptiveElement, true);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { DropDown, DropDownItem } from \"adaptivecards-controls\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nexport enum ToolbarElementAlignment {\r\n Left,\r\n Right\r\n}\r\n\r\nexport abstract class ToolbarElement {\r\n private _renderedElement: HTMLElement = undefined;\r\n\r\n protected abstract internalRender(): HTMLElement;\r\n\r\n protected internalUpdateLayout() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n readonly id: string;\r\n\r\n isVisible: boolean = true;\r\n separator: boolean = false;\r\n label: string = null;\r\n alignment: ToolbarElementAlignment = ToolbarElementAlignment.Left;\r\n\r\n constructor(id: string) {\r\n if (!id || id === \"\") {\r\n throw new Error(\"Toolbar elements must have an Id.\");\r\n }\r\n\r\n this.id = id;\r\n }\r\n\r\n updateLayout() {\r\n if (this._renderedElement) {\r\n this.internalUpdateLayout();\r\n }\r\n }\r\n\r\n render(): HTMLElement {\r\n this._renderedElement = this.internalRender();\r\n\r\n this.updateLayout();\r\n\r\n return this._renderedElement;\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this._renderedElement;\r\n }\r\n}\r\n\r\nexport class ToolbarButton extends ToolbarElement {\r\n private _caption: string;\r\n private _displayCaption: boolean = true;\r\n private _iconClass: string = undefined;\r\n private _toolTip: string = undefined;\r\n private _isEnabled: boolean = true;\r\n private _allowToggle: boolean = false;\r\n private _isToggled: boolean = false;\r\n private _isLink: boolean = false;\r\n\r\n protected clicked() {\r\n if (this.isEnabled && this.onClick) {\r\n this.onClick(this);\r\n }\r\n }\r\n\r\n protected internalUpdateLayout() {\r\n this.renderedElement.className = \"acd-toolbar-button\";\r\n\r\n if(!this.isEnabled) {\r\n this.renderedElement.classList.add(\"acd-toolbar-button-disabled\");\r\n this.renderedElement.setAttribute(\"aria-disabled\", \"true\");\r\n this.renderedElement.tabIndex = -1;\r\n }\r\n else {\r\n this.renderedElement.classList.remove(\"acd-toolbar-button-disabled\");\r\n this.renderedElement.removeAttribute(\"aria-disabled\");\r\n this.renderedElement.tabIndex = 0;\r\n }\r\n\r\n if (this.isToggled) {\r\n this.renderedElement.classList.add(\"acd-toolbar-button-toggled\");\r\n }\r\n else {\r\n this.renderedElement.classList.remove(\"acd-toolbar-button-toggled\");\r\n }\r\n\r\n if (this.allowToggle) {\r\n this.renderedElement.setAttribute(\"aria-pressed\", this.isToggled.toString());\r\n }\r\n\r\n if (this.iconClass) {\r\n this.renderedElement.classList.add(this.iconClass);\r\n }\r\n\r\n if (!this.displayCaption) {\r\n this.renderedElement.classList.add(\"acd-toolbar-button-iconOnly\");\r\n this.renderedElement.innerText = \"\";\r\n this.renderedElement.ariaLabel = this.caption;\r\n }\r\n else {\r\n this.renderedElement.innerText = this.caption;\r\n }\r\n\r\n this.renderedElement.title = this.toolTip ? this.toolTip : \"\";\r\n \r\n if (this._isLink) {\r\n this.renderedElement.setAttribute(\"role\", \"link\");\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n let element = document.createElement(\"button\");\r\n element.type = \"button\";\r\n\r\n element.onclick = (e) => {\r\n if (this.allowToggle) {\r\n this.isToggled = !this.isToggled;\r\n }\r\n\r\n this.clicked();\r\n }\r\n\r\n return element;\r\n }\r\n\r\n onClick: (sender: ToolbarButton) => void;\r\n\r\n constructor(\r\n id: string,\r\n caption: string,\r\n iconClass: string,\r\n onClick: (sender: ToolbarButton) => void = null,\r\n isLink: boolean = false) {\r\n super(id);\r\n\r\n this.caption = caption;\r\n this.iconClass = iconClass;\r\n this.onClick = onClick;\r\n this._isLink = isLink;\r\n }\r\n\r\n get allowToggle(): boolean {\r\n return this._allowToggle;\r\n }\r\n\r\n set allowToggle(value: boolean) {\r\n this._allowToggle = value;\r\n\r\n if (!this._allowToggle) {\r\n this.isToggled = false;\r\n }\r\n }\r\n\r\n get isToggled(): boolean {\r\n return this._isToggled;\r\n }\r\n\r\n set isToggled(value: boolean) {\r\n this._isToggled = value;\r\n\r\n this.updateLayout();\r\n }\r\n\r\n get caption(): string {\r\n return this._caption;\r\n }\r\n\r\n set caption(value: string) {\r\n this._caption = value;\r\n\r\n this.updateLayout();\r\n }\r\n\r\n get displayCaption(): boolean {\r\n return this._displayCaption;\r\n }\r\n\r\n set displayCaption(value: boolean) {\r\n this._displayCaption = value;\r\n\r\n this.updateLayout();\r\n }\r\n\r\n get iconClass(): string {\r\n return this._iconClass;\r\n }\r\n\r\n set iconClass(value: string) {\r\n this._iconClass = value;\r\n\r\n this.updateLayout();\r\n }\r\n\r\n get toolTip(): string {\r\n return this._toolTip;\r\n }\r\n\r\n set toolTip(value: string) {\r\n this._toolTip = value;\r\n\r\n this.updateLayout();\r\n }\r\n\r\n get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n set isEnabled(value: boolean) {\r\n this._isEnabled = value;\r\n\r\n this.updateLayout();\r\n }\r\n}\r\n\r\nexport interface IChoicePickerItem {\r\n name: string;\r\n value: string;\r\n}\r\n\r\nexport class ToolbarChoicePicker extends ToolbarElement {\r\n private _dropDown: DropDown;\r\n private _labelledById: string; // id to use for our label element\r\n private _isEnabled: boolean = true;\r\n private _isHidden: boolean = false;\r\n\r\n protected internalRender(): HTMLElement {\r\n this._dropDown = new DropDown();\r\n\r\n for (let choice of this.choices) {\r\n let dropDownItem = new DropDownItem(choice.value, choice.name);\r\n\r\n this._dropDown.items.add(dropDownItem);\r\n }\r\n\r\n this._dropDown.selectedIndex = 0;\r\n this._dropDown.onValueChanged = (sender) => {\r\n if (this.onChanged) {\r\n this.onChanged(this);\r\n }\r\n }\r\n\r\n let pickerElement = document.createElement(\"div\");\r\n\r\n if (this.width && this.width > 0) {\r\n pickerElement.style.width = this.width + \"px\";\r\n }\r\n\r\n // update label ids so we can generate correct aria\r\n if (this.label && !this._labelledById) {\r\n this._labelledById = uuidv4();\r\n this._dropDown.parentLabelId = this._labelledById;\r\n }\r\n\r\n this._dropDown.attach(pickerElement);\r\n\r\n let pickerContainerElement = document.createElement(\"div\");\r\n pickerContainerElement.className = \"acd-toolbar-choicePicker\";\r\n\r\n if (this.label) {\r\n let labelElement = document.createElement(\"div\");\r\n labelElement.className = \"acd-toolbar-label\";\r\n labelElement.innerText = this.label;\r\n labelElement.id = this._labelledById;\r\n\r\n pickerContainerElement.appendChild(labelElement);\r\n }\r\n\r\n pickerContainerElement.appendChild(pickerElement);\r\n\r\n return pickerContainerElement;\r\n }\r\n\r\n protected internalUpdateLayout() {\r\n if (!this.isEnabled) {\r\n this.renderedElement.classList.add(\"acd-toolbar-picker-disabled\");\r\n this.renderedElement.setAttribute(\"aria-disabled\", \"true\");\r\n this._dropDown.isEnabled = false;\r\n } else {\r\n this.renderedElement.classList.remove(\"acd-toolbar-picker-disabled\");\r\n this.renderedElement.removeAttribute(\"aria-disabled\");\r\n this._dropDown.isEnabled = true;\r\n }\r\n\r\n if (this.isHidden) {\r\n this.renderedElement.classList.add(\"acd-toolbar-picker-hidden\");\r\n this.renderedElement.setAttribute(\"aria-disabled\", \"true\");\r\n } else {\r\n this.renderedElement.classList.remove(\"acd-toolbar-picker-hidden\");\r\n this.renderedElement.removeAttribute(\"aria-disabled\");\r\n }\r\n }\r\n\r\n onChanged: (sender: ToolbarChoicePicker) => void;\r\n\r\n label: string = null;\r\n choices: Array = [];\r\n width?: number = null;\r\n\r\n get value(): string {\r\n return this._dropDown.value.key;\r\n }\r\n\r\n get selectedIndex(): number {\r\n return this._dropDown.selectedIndex;\r\n }\r\n\r\n set selectedIndex(value: number) {\r\n this._dropDown.selectedIndex = value;\r\n }\r\n\r\n get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n set isEnabled(value: boolean) {\r\n this._isEnabled = value;\r\n this.updateLayout();\r\n }\r\n\r\n get isHidden(): boolean {\r\n return this._isHidden;\r\n }\r\n\r\n set isHidden(value: boolean) {\r\n this._isHidden = value;\r\n this.updateLayout();\r\n }\r\n}\r\n\r\nexport class Toolbar {\r\n private _elements: Array = [];\r\n private _attachedTo: HTMLElement;\r\n private _alertPanel: HTMLDivElement;\r\n\r\n private createSeparatorElement(): HTMLElement {\r\n let separatorElement = document.createElement(\"div\");\r\n separatorElement.className = \"acd-toolbar-separator\";\r\n\r\n return separatorElement;\r\n }\r\n\r\n private renderElementsInto(\r\n container: HTMLElement,\r\n elements: Array,\r\n separatorPosition: ToolbarElementAlignment) {\r\n for (let i = 0; i < elements.length; i++) {\r\n if (elements[i].separator && separatorPosition == ToolbarElementAlignment.Left && i > 0) {\r\n container.appendChild(this.createSeparatorElement());\r\n }\r\n\r\n container.appendChild(elements[i].render());\r\n\r\n if (elements[i].separator && separatorPosition == ToolbarElementAlignment.Right && i < elements.length - 1) {\r\n container.appendChild(this.createSeparatorElement());\r\n }\r\n }\r\n }\r\n\r\n attachTo(element: HTMLElement) {\r\n this._attachedTo = element;\r\n this._attachedTo.className = \"acd-toolbar\";\r\n this._attachedTo.innerHTML = \"\";\r\n\r\n let leftElements: Array = [];\r\n let rightElements: Array = [];\r\n\r\n for (let element of this._elements) {\r\n if (element.isVisible) {\r\n if (element.alignment == ToolbarElementAlignment.Left) {\r\n leftElements.push(element);\r\n }\r\n else {\r\n rightElements.push(element);\r\n }\r\n }\r\n }\r\n\r\n let leftContainer = document.createElement(\"div\");\r\n leftContainer.className = \"acd-toolbar-content\";\r\n\r\n let rightContainer = document.createElement(\"div\");\r\n rightContainer.className = \"acd-toolbar-content\";\r\n\r\n this.renderElementsInto(\r\n leftContainer,\r\n leftElements,\r\n ToolbarElementAlignment.Left);\r\n this.renderElementsInto(\r\n rightContainer,\r\n rightElements,\r\n ToolbarElementAlignment.Right);\r\n\r\n this._attachedTo.appendChild(leftContainer);\r\n this._attachedTo.appendChild(rightContainer);\r\n\r\n this._alertPanel = document.createElement(\"div\");\r\n this._alertPanel.className = \"screen-reader-only\";\r\n this._attachedTo.appendChild(this._alertPanel);\r\n }\r\n\r\n addElement(element: ToolbarElement) {\r\n this._elements.push(element);\r\n }\r\n\r\n getElementById(elementId: string): ToolbarElement {\r\n for (let element of this._elements) {\r\n if (element.id == elementId) {\r\n return element;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n insertElementAfter(element: ToolbarElement, afterElementId: string) {\r\n for (let i = 0; i < this._elements.length; i++) {\r\n if (this._elements[i].id == afterElementId) {\r\n this._elements.splice(i + 1, 0, element);\r\n\r\n return;\r\n }\r\n }\r\n\r\n // Add as the last element if no element was found with the\r\n // specified id\r\n this._elements.push(element);\r\n }\r\n\r\n insertElementBefore(element: ToolbarElement, beforeElementId: string) {\r\n for (let i = this._elements.length - 1; i >= 0; i--) {\r\n if (this._elements[i].id == beforeElementId) {\r\n this._elements.splice(i, 0, element);\r\n\r\n return;\r\n }\r\n }\r\n\r\n // Insert as first element if no element was found with the\r\n // specified id\r\n this._elements.splice(0, 0, element);\r\n }\r\n\r\n addAlert(alertText: string) {\r\n var alert = document.createElement('div');\r\n alert.innerHTML = alertText;\r\n alert.setAttribute(\"aria-live\", \"polite\");\r\n this._alertPanel.appendChild(alert);\r\n }\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { BaseTreeItem } from \"./base-tree-item\";\r\nimport { Constants } from \"adaptivecards-controls\";\r\n\r\nexport class TreeView {\r\n private _selectedItem: BaseTreeItem = undefined;\r\n\r\n private setupTreeItemEvents(treeItem: BaseTreeItem) {\r\n treeItem.onSelectedChange = (sender: BaseTreeItem) => {\r\n this.selectedItem = sender;\r\n };\r\n treeItem.onItemInvoked = (treeItem: BaseTreeItem) => {\r\n this.itemInvoked(treeItem);\r\n };\r\n\r\n for (let i = 0; i < treeItem.getChildCount(); i++) {\r\n this.setupTreeItemEvents(treeItem.getChildAt(i));\r\n }\r\n }\r\n\r\n private getVisibleTreeItems() : HTMLElement[] | null\r\n {\r\n // get all treeitem nodes in this view\r\n const treeItems = (Array.from(this.rootItem?.renderedElement?.querySelectorAll(\":scope [role='treeitem']\")));\r\n\r\n // filter out any hidden nodes (i.e. collapsed children). `[role='tree']` here is to prevent\r\n // looking outside of the tree.\r\n return treeItems?.filter((el) => !((el.parentElement.closest(\".acd-hidden, [role='tree']\"))?.classList.contains(\"acd-hidden\")));\r\n }\r\n\r\n private static moveFocus(from: HTMLElement, to: HTMLElement): void\r\n {\r\n to.tabIndex = 0;\r\n to.focus();\r\n from.tabIndex = -1;\r\n }\r\n\r\n protected selectedItemChanged() {\r\n if (this.onSelectedItemChanged) {\r\n this.onSelectedItemChanged(this);\r\n }\r\n }\r\n\r\n protected itemInvoked(sender: BaseTreeItem) {\r\n if (this.onItemInvoked) {\r\n this.onItemInvoked(sender);\r\n }\r\n }\r\n\r\n focus() {\r\n this.rootItem?.focus();\r\n }\r\n\r\n render(): HTMLElement {\r\n let treeRoot = document.createElement(\"ul\");\r\n treeRoot.style.paddingLeft = \"0\";\r\n treeRoot.style.listStyleType = \"none\";\r\n treeRoot.className = \"acd-treeView\";\r\n treeRoot.setAttribute(\"role\", \"tree\");\r\n treeRoot.onkeydown = (e: KeyboardEvent) => {\r\n const currentElement = e.target as HTMLElement;\r\n let handled = true;\r\n switch (e.key) {\r\n case Constants.keys.up: {\r\n const treeItems = this.getVisibleTreeItems();\r\n const index = treeItems.findIndex((el) => el === currentElement);\r\n if (index > 0) {\r\n let nextElement = treeItems.at(index - 1);\r\n TreeView.moveFocus(currentElement, nextElement);\r\n }\r\n else {\r\n // on first child of tree root, so pressing up should focus the root\r\n TreeView.moveFocus(currentElement, this.rootItem.renderedElement);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case Constants.keys.down: {\r\n const treeItems = this.getVisibleTreeItems();\r\n const index = treeItems.findIndex((el) => el === currentElement);\r\n if (index + 1 < treeItems.length) {\r\n const nextElement = treeItems.at(index + 1);\r\n TreeView.moveFocus(currentElement, nextElement);\r\n }\r\n\r\n break;\r\n }\r\n\r\n default: {\r\n handled = false;\r\n }\r\n }\r\n\r\n if (handled) {\r\n e.cancelBubble = true;\r\n e.preventDefault();\r\n }\r\n };\r\n\r\n const rootItemElement = this.rootItem.render();\r\n rootItemElement.tabIndex = 0;\r\n treeRoot.appendChild(rootItemElement);\r\n\r\n this.setupTreeItemEvents(this.rootItem);\r\n\r\n return treeRoot;\r\n }\r\n\r\n onSelectedItemChanged: (sender: TreeView) => void;\r\n\r\n onItemInvoked: (item: BaseTreeItem) => void;\r\n\r\n constructor(readonly rootItem: BaseTreeItem) { }\r\n\r\n get selectedItem(): BaseTreeItem {\r\n return this._selectedItem;\r\n }\r\n\r\n set selectedItem(value: BaseTreeItem) {\r\n if (value !== this._selectedItem) {\r\n if (this._selectedItem) {\r\n this._selectedItem.isSelected = false;\r\n }\r\n\r\n this._selectedItem = value;\r\n\r\n if (this._selectedItem) {\r\n this._selectedItem.isSelected = true;\r\n }\r\n\r\n this.selectedItemChanged();\r\n }\r\n }\r\n}\r\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function get() {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function get() {\n return _parse.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function get() {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function get() {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function get() {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function get() {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function get() {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function get() {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function get() {\n return _version.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (let i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n const output = [];\n const length32 = input.length * 32;\n const hexTab = '0123456789abcdef';\n\n for (let i = 0; i < length32; i += 8) {\n const x = input[i >> 5] >>> i % 32 & 0xff;\n const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n const length8 = input.length * 8;\n const output = new Uint32Array(getOutputLength(length8));\n\n for (let i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n const lsw = (x & 0xffff) + (y & 0xffff);\n const msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nvar _default = {\n randomUUID\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\n\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unsafeStringify = unsafeStringify;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.unsafeStringify)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.URL = exports.DNS = void 0;\nexports.default = v35;\n\nvar _stringify = require(\"./stringify.js\");\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _native = _interopRequireDefault(require(\"./native.js\"));\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n if (_native.default.randomUUID && !buf && !options) {\n return _native.default.randomUUID();\n }\n\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nvar _default = version;\nexports.default = _default;","module.exports = __WEBPACK_EXTERNAL_MODULE__407__;","module.exports = __WEBPACK_EXTERNAL_MODULE__952__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(6987);\n"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__407__","__WEBPACK_EXTERNAL_MODULE__952__","__createBinding","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__exportStar","p","prototype","hasOwnProperty","call","value","Calendar","DayCell","Utils","constants_1","inputcontrol_1","selected","onSelected","constructor","date","_isSubdued","_isSelected","render","_element","document","createElement","className","innerText","getDate","toString","tabIndex","onclick","e","onkeydown","key","Constants","keys","enter","focus","isSubdued","classList","add","remove","isSelected","InputControl","generateDayCells","baseDate","_days","inputMonth","getMonth","inputYear","getFullYear","start","Date","end","daysInMonth","startDateDayOfWeek","getDay","CalendarSettings","firstDayOfWeek","addDays","endDateDayOfWeek","lastDayOfWeek","endDate","endMonth","endYear","dayCell","clickedCell","selectedDayCell","onDateChanged","push","done","_selectedDay","_date","initializeSelection","i","length","areDatesEqual","rebuildMiniCalendar","newDate","oldDate","month","clearElement","_miniCalendarElement","row","dayIndex","daysInWeek","cell","getInitialDayName","appendChild","tableCell","timeDelta","getTime","super","cellPadding","cellSpacing","miniCalendarHeader","style","display","_monthYearLabelElement","flex","navButtons","button","addMonths","_rootContainerElement","attach","rootElement","rebuildNeeded","getLongMonthName","CheckBox","utils_1","arguments","_label","_checkboxElement","_spanElement","createId","result","creationIndex","changed","onChange","keyDown","isChecked","labelAttribute","attributes","isCheckedAttribute","_isChecked","id","type","position","checked","onchange","labelElement","htmlFor","label","Collection","_items","onItemAdded","onItemRemoved","index","item","indexOf","splice","KEY_DELETE","KEY_DOWN","KEY_UP","KEY_SPACE","KEY_ESCAPE","KEY_ENTER","KEY_TAB","tab","escape","space","up","down","delete","backspace","left","right","DatePicker","CalendarPopupControl","inputwithpopup_1","calendar_1","PopupControl","owner","_owner","renderContent","element","_calendar","c","closePopup","InputWithPopup","validateRootElement","HTMLDivElement","Error","createPopupControl","getValueAsString","toLocaleDateString","getCssClassName","getButtonIconCssClassName","popup","isOpen","popupControl","DropDown","DropDownPopupControl","DropDownItem","collection_1","click","onClick","_value","setAttribute","onmouseup","cancelBubble","newValue","_renderedItems","_selectedIndex","selectedIndex","items","renderedItem","selectedItemIndex","rootElementBounds","renderedElement","minWidth","width","itemClicked","selectedItem","clickedItem","children","childElement","tagName","toLowerCase","getNamedItem","ariaLabelledByIds","parentLabelId","labelId","join","_parentLabelId","DayOfWeek","_rootElement","uuid_1","_isOpen","_popupElement","firstElementChild","_overlayElement","documentElement","scrollWidth","height","scrollHeight","onfocus","body","getBoundingClientRect","window","addEventListener","rootElementLabel","getAttribute","top","popupElementBounds","availableSpaceBelow","innerHeight","bottom","availableSpaceAbove","availableSpaceRight","innerWidth","availableSpaceLeft","getScrollX","actualPopupHeight","Math","min","maxHeight","getScrollY","actualPopupWidth","maxWidth","wasCancelled","removeChild","onClose","_isEnabled","updateLabel","_labelElement","_placeholderText","updateLayout","removeAttribute","_popupControl","valueChanged","onValueChanged","placeHolderDomItem","v4","_dropDownButtonElement","sender","placeholderText","isEnabled","PopupMenu","RadioButton","groupNameAttribute","name","TextBox","EditBox","SingleLineEditBox","_inputElement","oninput","placeholder","lineCount","maxLength","substr","MultilineEditBox","_textareaElement","rows","_isMultiline","_lineCount","editBoxChanged","recreateEditBox","currentValue","_editBox","_maxLength","_placeholder","editBox","getAttributeValueAsBool","getAttributeValueAsInt","getAttributeValueAsString","isMultiline","Enums","getLongDayName","longDayNames","getShortDayName","shortDayNames","minimalDayNames","monthIndex","longMonthNames","getShortMonthName","shortMonthNames","days","setDate","monthsInYear","Sunday","year","months","newMonth","setMonth","date1","date2","pageXOffset","pageYOffset","attributeName","defaultValue","attribute","n","parseInt","isNaN","_a","_b","trustedHtml","trustedTypes","emptyHTML","innerHTML","__webpack_modules__","__unused_webpack_module","d","clipboard","tiny_emitter","tiny_emitter_default","listen","listen_default","src_select","select_default","command","execCommand","err","actions_cut","target","selectedText","fakeCopyAction","options","fakeElement","isRTL","fontSize","border","padding","margin","yPosition","scrollTop","concat","createFakeElement","container","actions_copy","HTMLInputElement","includes","_typeof","obj","Symbol","iterator","clipboard_typeof","_defineProperties","props","descriptor","_setPrototypeOf","setPrototypeOf","__proto__","_getPrototypeOf","getPrototypeOf","getAttributeValue","suffix","hasAttribute","Clipboard","_Emitter","subClass","superClass","TypeError","_inherits","Constructor","protoProps","staticProps","Derived","hasNativeReflectConstruct","_super","Reflect","construct","sham","Proxy","_isNativeReflectConstruct","Super","NewTarget","apply","self","ReferenceError","_assertThisInitialized","trigger","_this","instance","_classCallCheck","resolveOptions","listenClick","action","defaultAction","defaultTarget","text","defaultText","_this2","listener","delegateTarget","currentTarget","_options$action","nodeType","actions_default","emit","clearSelection","getSelection","removeAllRanges","selector","querySelector","destroy","actions","support","queryCommandSupported","forEach","Element","matches","proto","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","parentNode","__unused_webpack_exports","closest","_delegate","callback","useCapture","listenerFn","removeEventListener","elements","bind","querySelectorAll","Array","map","node","HTMLElement","nodeList","string","String","fn","is","delegate","listenNode","listenNodeList","listenSelector","nodeName","isReadOnly","select","setSelectionRange","selection","range","createRange","selectNodeContents","addRange","E","on","ctx","once","off","_","data","slice","evtArr","len","evts","liveEvents","TinyEmitter","__webpack_module_cache__","moduleId","getter","a","definition","prop","default","adaptiveCardSchema","defaultMicrosoftHosts","containers","WebChatContainer","OutlookContainer","TeamsContainer","VivaConnectionsContainer","CortanaContainer","BotFrameworkContainer","CortanaClassicContainer","FederatedSearchContainer","WidgetContainer","ContainerSize","Small","defaultMicrosoftDeviceEmulations","BaseTreeItem","DraggableElement","needsToBeScrolled","treeViewHostParent","parentElement","clientHeight","setIsSelected","scrollIntoView","_treeItemElement","selectedChanged","getIconClass","getAdditionalText","getAdditionalTextClass","getIndentationLevelIncrement","getDragSourceElement","onSelectedChange","itemInvoked","onItemInvoked","getExpandCollapseAriaText","_isExpanded","getLabelText","handleKeyboardLeftNav","getChildCount","nearestTreeItem","roleAttr","handleKeyboardRightNav","childToFocus","_childContainerElement","internalRender","hasChildren","paddingLeft","listStyleType","_level","handled","preventDefault","alignItems","level","toggle","_expandCollapseElement","visibility","textElement","whiteSpace","textOverflow","overflow","marginRight","iconElement","labelSpan","additionalTextSpan","renderedChildItem","getChildAt","isExpanded","expandedIconClass","collapsedIconClass","expand","collpase","isDraggable","BindingPreviewMode","DesignerPeerCategory","Unknown","Containers","Elements","Inputs","Actions","DesignerPeerRegistry","defaultRegistration","DesignerPeers","DesignerPeerRegistrationBase","reset","clear","findTypeRegistration","sourceType","registerPeer","peerType","category","iconClass","registrationInfo","DesignerPeerRegistration","unregisterPeer","CardElementPeerRegistry","Adaptive","AdaptiveCard","AdaptiveCardPeer","Container","ContainerPeer","ColumnSet","ColumnSetPeer","Column","ColumnPeer","ImageSet","ImageSetPeer","FactSet","FactSetPeer","Table","TablePeer","TableRow","TableRowPeer","TableCell","TableCellPeer","Carousel","CarouselPeer","CarouselPage","CarouselPagePeer","TextBlock","TextBlockPeer","RichTextBlock","RichTextBlockPeer","Image","ImagePeer","Media","MediaPeer","ActionSet","ActionSetPeer","TextInput","TextInputPeer","DateInput","DateInputPeer","TimeInput","TimeInputPeer","ToggleInput","ToggleInputPeer","NumberInput","NumberInputPeer","ChoiceSetInput","ChoiceSetInputPeer","createPeerInstance","designerSurface","parent","cardElement","initializeCardElement","CardElementPeer","ActionPeerRegistry","HttpAction","HttpActionPeer","SubmitAction","SubmitActionPeer","ExecuteAction","ExecuteActionPeer","OpenUrlAction","OpenUrlActionPeer","ShowCardAction","ShowCardActionPeer","ToggleVisibilityAction","ToggleVisibilityActionPeer","ActionPeer","DragHandle","title","zIndex","CardDesignerSurface","updatePeerCommandsLayout","_selectedPeer","peerRect","getBoundingRect","dragHandleRect","_dragHandle","removeButtonRect","_removeCommandElement","_peerCommandsHostElement","canBeRemoved","childElementCount","_designerSurface","contains","after","setSelectedPeer","commands","getCommands","context","onSelectedPeerChanged","peerChanged","peer","updatePropertySheet","renderCard","peerRemoved","_allPeers","_updateCount","generateCardToRender","asPreview","cardToRender","card","inputPayload","toJSON","_serializationContext","hostConfig","outputPayload","Shared","GlobalSettings","enableDataBindingSupport","evaluationContext","template","ACData","Template","bindingPreviewMode","SampleData","$root","sampleData","$host","sampleHostData","dataStructure","dataType","generateSampleData","hostDataStructure","console","log","message","parse","_cardHost","onCardValidated","allValidationEvents","eventCount","getEventAt","validateProperties","validationEvents","isPreviewMode","onExecuteAction","getJsonTypeName","verb","carouselPageId","getRootObject","getItemCount","getItemAt","currentPageId","url","JSON","stringify","alert","renderedCard","fixedHeightCard","hostContainer","requiresOverflowStyling","appendErrorMessage","Strings","widgetOverflowWarning","adjustStyleForBackground","errorElement","getElementById","addPeer","insertAfterNeighbor","isVisible","_persistentSelectedCardElement","_persistentSelectedPeer","onSelectedChanged","onChanged","onPeerRemoved","onPeerAdded","newPeer","onStartDrag","startDrag","onEndDrag","endDrag","addElementsToDesignerSurface","getPeerDOMNeighbor","internalFindDropTarget","pointerPosition","currentPeer","forPeer","lookDeeper","isInside","canDrop","deeperResult","findCardElementPeer","findActionPeer","inlineCardExpanded","registration","cardElementPeerRegistry","parentPeer","insertChild","_rootPeer","removeElementsFromDesignerSurface","_card","setDraggedPeer","_draggedPeer","dragging","_isPreviewMode","_shouldPersistSelectedElement","createSerializationContext","targetVersion","onkeyup","draggedPeer","removeSelected","onpointermove","clientRect","hasPointerCapture","pointerId","setPointerCapture","_dragVisual","pointerEvents","backgroundColor","opacity","boxShadow","boxSizing","getCardObject","cloneNode","adjustedPoint","adjustPointForScroll","x","y","renderedCardObjectRect","tryDrop","onpointerup","releasePointerCapture","cardHost","onInlineCardExpanded","onPreProcessPropertyValue","property","NoPreview","expression","parseInterpolatedString","evaluationResult","tryEvaluateExpression","version","getHostConfig","designMode","onCarouselEvent","getDesignerSurfaceOffset","findDropTarget","findPeer","cardObject","beginUpdate","endUpdate","justifyContent","getCardPayloadAsObject","setCardPayloadAsObject","payload","clearEvents","setCardPayloadAsString","warn","getBoundCardPayloadAsObject","isFullRefresh","onLayoutUpdated","selectedPeer","currentIndex","_dropTarget","neighboringPeer","childCount","peerIndex","getLastPeerInContainer","parentContainer","lastChildPeer","newDropTarget","isPointerOver","pageToClientCoordinates","rootPeer","shouldPersistSelectedElement","actionPeerRegistry","CardDesigner","Designer","DesignContext","internalProcessMarkdown","onProcessMarkdown","outputHtml","didProcess","togglePreview","_togglePreviewButton","toolTip","getCurrentCardEditorPayload","updateCardFromJson","buildTreeView","_treeViewToolbox","content","treeViewToolbox","treeView","TreeView","treeItem","propertySheetHosts","getElementsByClassName","focusableElements","buildDataExplorer","_dataToolbox","DataTreeItem","buildPropertySheet","_propertySheetToolbox","restoreFocusId","_propertySheetCard","findDOMNodeOwner","activeElement","buildPropertySheetCard","wrap","SerializationContext","PaddingDefinition","Spacing","defaultHostConfig","focusTarget","getActionById","addPaletteItem","paletteItem","hostElement","_draggedPaletteItem","_draggedElement","renderDragVisual","adjustedPosition","_currentMousePosition","buildPalette","_isAttached","_toolPaletteToolbox","categorizedTypes","elementsRegistry","schemaVersion","compareTo","peerRegistration","objectType","ElementPaletteItem","onDoubleClick","createPeer","tryAdd","customPaletteItems","categoryList","paletteItemContainer","renderErrorPaneElement","source","CardObject","recreateDesignerSurface","styleSheetLinkElement","getElementsByTagName","rel","isAbsoluteUrl","getCurrentStyleSheet","href","joinPaths","_assetPath","cardArea","getBackgroundColor","initialize","_designerHostElement","renderTo","wasInPreviewMode","isFixedHeight","scheduleUpdateJsonFromCard","logEntries","errorPane","showTargetVersionMismatchWarning","dedupedEntries","entry","s","phase","ValidationPhase","Parse","ToJSON","_startDragPayload","setCardPayload","addToUndoStack","updateSampleData","_sampleHostDataEditorToolbox","_hostContainer","showSampleHostDataEditorToolbox","updateFullLayout","activeHostContainerChanged","_deviceEmulationChoicePicker","isHidden","enableDeviceEmulation","activeDeviceEmulationChanged","_containerSizeChoicePicker","supportsMultipleSizes","_sampleHostData","updateHostDataSizeProperty","containerSize","_containerThemeChoicePicker","supportsMultipleThemes","updateHostDataThemeProperty","colorTheme","onActiveHostContainerChanged","deviceEmulation","setProperty","removeProperty","targetVersionChanged","cardPayload","onTargetVersionChanged","updateToolboxLayout","toolbox","hostPanelRect","jsonEditorHeaderRect","getHeaderBoundingRect","updateJsonEditorsLayout","_isMonacoEditorLoaded","jsonEditorsPaneRect","_jsonEditorsPanel","contentHost","_cardEditorToolbox","_cardEditor","layout","_sampleDataEditorToolbox","_sampleDataEditor","_sampleHostDataEditor","scheduleLayoutUpdate","cardPayloadChanged","onCardPayloadChanged","beginCardEditorUpdate","_cardEditorUpdateCounter","endCardEditorUpdate","setValue","setSampleDataPayload","setSampleHostDataPayload","updateJsonFromCard","_cardPreventUpdate","_jsonPreventUpdate","clearTimeout","_jsonUpdateTimer","setTimeout","getValue","defaultPayload","getCurrentSampleDataEditorPayload","getCurrentSampleHostDataEditorPayload","currentEditorPayload","scheduleUpdateCardFromJson","_cardUpdateTimer","isEdgeHTML","_isEdgeHTML","navigator","userAgent","_updateLayoutTimer","prepareToolbar","showVersionPicker","_versionChoicePicker","ToolbarChoicePicker","ToolbarCommands","VersionPicker","alignment","ToolbarElementAlignment","Right","separator","supportedTargetVersions","choices","toolbar","addElement","_newCardButton","ToolbarButton","NewCard","dialog","OpenSampleDialog","catalogue","_sampleCatalogue","handlers","close","launchJsonSchemaPopup","onKeyEnterEvent","cardData","thumbnail","Pic2Card","pic2cardService","launchImagePopup","closeButton","caption","newCardButton","output","sampleDataPayload","FieldDefinition","deriveFrom","sampleHostDataPayload","widgetSize","updateContainerSizeChoicePicker","hostTheme","updateContainerThemeChoicePicker","open","_hostContainers","_hostContainerChoicePicker","HostAppPicker","supportsTheme","some","supportsSize","ContainerThemePicker","themes","HostContainer","supportedContainerThemes","ContainerSizePicker","sizes","supportedContainerSizes","_deviceEmulations","DeviceEmulationPicker","_undoButton","Undo","undo","_redoButton","Redo","redo","_copyJSONButton","CopyJSON","TogglePreview","allowToggle","_helpButton","Help","showHelp","_fullScreenHandler","FullScreenHandler","onFullScreenChanged","isFullScreen","_fullScreenButton","OpenJsonSchemaDialog","preventLightDismissal","submitButton","OpenImageDialog","predictedCardJSON","loadNotification","onResize","_sampleData","updateSampleHostData","size","at","theme","updateToolbar","canUndo","canRedo","doAdd","_undoStack","undoPayloadsToDiscard","_undoStackIndex","MAX_UNDO_STACK_SIZE","handlePointerUp","handlePointerMove","isPointerOverDesigner","peerDropped","clientCoordinates","hostContainers","deviceEmulations","_bindingPreviewMode","SampleCatalogue","_targetVersion","Versions","latest","_preventRecursiveSetTargetVersion","Toolbar","lockDataStructure","enableFullJsonRoundTrip","allowPreProcessingPropertyValues","setTabIndexAtCardRoot","monacoModuleLoaded","monaco","monacoConfiguration","schemas","uri","schema","fileMatch","validate","allowComments","languages","json","jsonDefaults","setDiagnosticsOptions","editor","folding","language","minimap","enabled","onDidChangeModelContent","attachTo","DefaultContainer","flexDirection","getBoundCard","addAlert","toolPaletteHost","Toolbox","toolboxes","toolPalette","toolPalettePanel","SidePanel","SidePanelAlignment","Left","addToolbox","isResizable","cardEditor","loadingEditor","Bottom","onResized","onToolboxResized","onToolboxExpandedOrCollapsed","showSampleDataEditorToolbox","sampleDataEditor","sampleHostDataEditor","propertySheetHost","propertySheet","propertySheetPanel","treeViewHost","cardStructure","treeViewPanel","showDataStructureToolbox","dataExplorerHost","createAndAddSampleHostDataEditorToolbox","clearUndoStack","setCard","getCard","helpDialog","HelpDialog","newCard","$schema","_dataStructure","_hostDataStructure","selectedHostContainerControlsTargetVersion","_deviceEmulation","propertySheetToolbox","jsonEditorToolbox","toolPaletteToolbox","dataToolbox","assetPath","_customPeletteItems","sampleCatalogueUrl","CatalogueEntry","downloadCompleted","_cardPayloadDownloaded","_sampleDataDownloaded","onDownloaded","displayName","cardPayloadUrl","sampleDataUrl","cardId","_cardId","download","cardPayloadDownloadComplete","sampleDataDownloadComplete","cardPayloadDownloaded","payloadDownloader","Downloader","onSuccess","_cardPayload","onError","sampleDataDownloaded","sampleDataDownloader","downloaded","_isDownloaded","input","entries","isArray","_entries","parseString","isDownloaded","downloader","_url","otherTestPayload","defaultTemplatePayload","defaultDataPayload","SingleThemeHostContainer","frame","HostConfig","leftSide","topLeft","middleLeft","bottomLeft","rightSide","header","searchBox","magnifyingGlass","searchBoxMiddle","microphone","MultiThemeHostContainer","hostConfigLight","hostConfigDark","v1_2","styleSheet","actionsRegistry","unregister","v1_4","ColorTheme","_elementsRegistry","CardObjectRegistry","_actionsRegistry","supportsActionBar","GlobalRegistry","populateWithDefaultElements","populateWithDefaultActions","useMarkdownInRadioButtonAndCheckbox","useAdvancedCardBottomTruncation","useAdvancedTextBlockTruncation","setElementRegistry","setActionRegistry","parseElement","anchorClicked","anchor","v1_0","values","cssFileName","lightBackground","darkBackground","_colorTheme","Light","_cssFileName","_hostConfigLight","_hostConfigDark","_lightBackground","_darkBackground","ToastContainer","register","parsePadding","uniformPadding","parseEnum","None","rtl","actionArray","actionResources","createInstance","setParent","rootCard","getRootElement","exec","actionId","execute","_styleSheet","SkypeContainer","hexagonOuter","hexagonInner","botLogo","outerFrame","innerFrame","botNameAndTime","v1_5","TimelineContainer","cardContainer","vcContainer","v1_6","_containerSize","removePaddingFromContainersWithBackgroundImage","_outerFrame","headerText","textContent","moreButton","applyWidgetOverflowStyling","cardElementsWrapper","addCardElementsWrapper","carouselElements","currentCarousel","carouselRect","wrapperRect","paginationTop","paginationBottom","widgetPadding","marginBottom","from","child","backgroundImage","buildChildList","_children","properties","field","valueType","currentField","shouldUseIndexerSyntax","DataType","ValueTypeData","sampleValue","ArrayData","ObjectData","getChildFields","qualifyFieldName","fieldName","fieldIsLeaf","isCollection","defaultSampleValue","_sampleValue","itemType","fields","fieldDefinition","asExpression","getPath","asLeaf","path","forceIndexerSyntax","qualifiedName","_displayName","DesignerPeerTreeItem","computeLevel","getTreeItemText","onParentChanged","bringCardElementIntoView","DesignerPeerInplaceEditor","CardElementPeerInplaceEditor","_iconClass","PropertySheetCategory","displayCategoryName","entriesToRender","isVersionLessOrEqual","designContext","DefaultCategory","addItem","getEntryAt","LayoutCategory","StyleCategory","SelectionAction","InlineAction","Validation","Refresh","PropertySheet","displayCategoryNames","_categories","categoryName","addActionProperties","excludeProperties","iconUrlProperty","styleProperty","modeProperty","actionPeer","subPropertySheet","populatePropertySheet","SubPropertySheetEntry","PropertySheetContext","_target","PropertySheetEntry","spacing","CustomPropertySheetEntry","onRender","SingleInputPropertyEditor","getPropertyValue","propertyName","setPropertyValue","getAdditionalCommands","leftColumn","SizeAndUnit","SizeUnit","Pixel","verticalContentAlignment","VerticalAlignment","Center","rightColumn","columnSet","addColumn","horizontalAlignment","HorizontalAlignment","generateUniqueId","createInput","labelledBy","causesPropertySheetRefresh","additionalCommands","commandColumn","actionSet","tooltip","altText","expanded","state","onExecute","addAction","BaseStringPropertyEditor","placeHolder","allowBinding","StringPropertyEditor","bindData","displayText","accessibleText","clickedElement","fieldPicker","FieldPicker","selectedField","StringArrayPropertyEditor","rawValue","rawValues","split","NumberPropertyEditor","parseFloat","_input","ObjectPropertyEditor","CustomCardObjectPropertyEditor","getCustomProperty","setCustomProperty","BooleanPropertyEditor","v","NotSetValue","ChoicePropertyEditor","isCompact","isNullable","Choice","choice","ContainerStylePropertyEditor","currentStyle","NullableBooleanPropertyEditor","ColumnWidthPropertyEditor","unit","Weight","HeightPropertyEditor","processedValue","SizeAndUnitPropertyEditor","physicalSize","sizeUnit","CarouselTimerPropertyEditor","parsedValue","minAutoplayDelay","carousel","errors","tooLittleTimeDelay","ActionPropertyEditor","actionType","typeName","excludeAction","forbiddenActionTypes","CompoundPropertyEditor","initializeProperty","EnumPropertyEditor","valueAsInt","enumType","NameValuePairPropertyEditor","collectionChanged","nameValuePairs","refreshPropertySheet","collectionPropertyName","nameValuePair","createCollectionItem","collection","pair","namePropertyName","valuePropertyName","messageTextBlock","messageIfEmpty","textInput","namePropertyLabel","nameColumn","valuePropertyLabel","valueColumn","removeAction","iconUrl","removeColumn","addButtonTitle","InnerStructPropertyEditor","innerPropertiesList","collectionItems","innerProperties","newItem","innerPropertiesDefaults","Medium","newColumn","DesignerPeer","closeInplaceEditor","applyChanges","_inplaceEditor","_inplaceEditorOverlay","tryOpenInplaceEditor","createInplaceEditor","cardObjectBoundingRect","getCardObjectBoundingRect","peerBoundingRect","topPadding","inplaceEditorHost","floor","ceil","paddingTop","renderedInplaceEditor","onblur","doubleClick","isContainer","getToolTip","internalAddCommands","internalUpdateCssStyles","peerAdded","internalUpdateLayout","updateAriaProperties","CardElementContainer","internalGetTreeItemText","_insertAfterNeighbor","_parentCarouselPagePeer","_parent","_cardObject","isTreeItemExpandedByDefault","updateChildren","defaultCategory","insertionPoint","promoteParentCommands","parentCommands","isPromotable","onlyFromCard","removeChildren","internalRemove","neighbor","processChildren","onPopulatePropertySheet","showInPropertySheet","updateParentCarouselPagePeer","parentCarouselPagePeer","idProperty","designSurfaceOffset","actionBoundingRect","Rect","isEnabledProperty","titleProperty","tooltipProperty","roleProperty","ActionMode","Primary","Secondary","ActionStyle","Default","Positive","Destructive","v1_1","ActionRole","TypedActionPeer","ignoreInputValidationProperty","methodProperty","urlProperty","method","bodyProperty","headersProperty","v1_3","HttpHeader","BaseSubmitActionPeer","dataProperty","associatedInputsProperty","disabledUnlessAssociatedInputsChangeProperty","verbProperty","insertElementAfter","newElement","insertItemAfter","findCardElementChild","findActionChild","existingPeer","indexOfAction","itemCount","getActionCount","getActionAt","parentCanContainElement","insertAfter","targetChild","rect","insertItemBefore","returnRect","cardElementBoundingRect","hasVisibleSeparator","separatorBoundingRect","separatorElement","max","peerInCorrectLocation","pageOffset","dataContextProperty","whenProperty","isVisibleProperty","spacingProperty","separatorProperty","horizontalAlignmentProperty","heightProperty","TypedCardElementPeer","availableActions","typeRegistration","PeerCommand","alwaysShowName","popupMenu","Controls","menuItem","langProperty","fallbackTextProperty","speakProperty","refreshProperty","refresh","minHeightProperty","verticalContentAlignmentProperty","rtlProperty","backgroundImageProperty","selectActionProperty","selectAction","RefreshDefinition","widthProperty","pixelWidthProperty","weightProperty","bleedProperty","column","columnCount","JsonTypeName","FillMode","newImage","addImage","ImageSizeProperty","ImageSize","isParentImageSet","altTextProperty","sizeProperty","pixelHeightProperty","backgroundColorProperty","Size","ImageStyle","selectedMediaType","posterUrlProperty","sourcesProperty","captionSourcesProperty","MediaSource","CaptionSource","facts","array","Fact","factsProperty","InputPeer","labelProperty","isRequiredProperty","errorMessageProperty","placeholderProperty","isMultilineProperty","inlineActionProperty","inlineAction","maxLengthProperty","defaultValueProperty","regexProperty","InputTextStyle","minProperty","maxProperty","valueOnProperty","valueOffProperty","wrapProperty","isMultiselectProperty","choicesProperty","TextBlockPeerInplaceEditor","_renderedElement","applyStylesTo","textProperty","maxLinesProperty","fontTypeProperty","colorProperty","subtleProperty","FontType","TextSize","TextWeight","TextColor","asString","infoTextBlock","Large","textRun","TextRun","addInline","horizontalCellContentAlignmentProperty","verticalCellContentAlignmentProperty","addRow","TableColumnDefinition","firstRowAsHeadersProperty","columnsProperty","showGridLinesProperty","gridStyleProperty","cellSpacingProperty","columnsChanged","getColumnCount","columnDefinition","getColumnAt","widthInput","widthColumn","unitInput","unitColumn","removeActionColumn","page","addPage","timerProperty","initialPageProperty","orientationProperty","heightInPixelsProperty","loopProperty","Orientation","_pageOffset","boundingRect","initialLeft","carouselPageContainer","containerClientRect","offsetLeft","currentLocation","parentCarousel","currentPageIndex","carouselPeer","slideTo","getForbiddenChildElements","DialogButton","clicked","_originalFocusedElement","dialogFrameElement","shiftKey","_firstFocusableElement","_lastFocusableElement","titleBarElement","titleElement","xButton","contentElement","buttonBarElement","buttons","error","success","request","XMLHttpRequest","onerror","onload","_data","responseText","send","DRAG_THRESHOLD","_isPointerDown","_isPointerOver","pointerDown","_lastClickedPoint","offsetX","offsetY","pointerUp","pointerMove","abs","dragSourceElement","ondblclick","onmousedown","onpointerenter","onpointerleave","onpointerdown","_dragging","_treeView","_selectedField","fullScrerenChanged","untypedBody","onfullscreenchange","onwebkitfullscreenchange","onmozfullscreenchange","MSFullscreenChange","enterFullScreen","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","exitFullScreen","untypedDocument","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","toggleFullScreen","fullscreen","webkitIsFullScreen","mozFullScreen","Dialog","_getShortcutRow","shortcut","description","isHeader","shortcutText","shortcutCell","textAlign","descriptionCell","cardHeading","keyboardHeading","shortcutTable","tableCaption","createCaption","union","otherRect","point","urlString","args","part","trim","replace","filter","firstChild","scrollLeft","preExpandSingleShowCardAction","supportsInteractivity","small","medium","large","extraLarge","lineThickness","lineColor","imageSizes","fontStyles","fontFamily","fontSizes","fontWeights","lighter","bolder","monospace","containerStyles","foregroundColors","subtle","accent","attention","good","warning","emphasis","dark","light","maxActions","buttonSpacing","showCard","actionMode","ShowCardActionMode","Inline","inlineTopMargin","actionsOrientation","Horizontal","actionAlignment","ActionAlignment","adaptiveCard","allowCustomStyle","imageSet","imageSize","maxImageHeight","factSet","color","isSubtle","weight","Bolder","FetchManager","headers","getSampleImages","option","sampleImages","fetch","getPredictedData","imageContent","isTemplateBindingEnabled","image","endPoint","picResponse","_uploadedImage","isTemplateOptionChecked","allowedImageSize","fetchManager","setContent","removeContent","renderTitle","renderTitleContent","renderUploadedImage","_imageElement","renderUploadButton","privacyLink","_buttonContainer","fileNote","renderCheckbox","createFileButton","createActionButton","checkboxContainer","inputElement","checkbox","customCheckboxElement","renderLabelText","checkFileSize","file","toFixed","files","reader","FileReader","readAsDataURL","renderImage","_inputTemplate","generateErrorText","errorContent","onCardFailure","spinnerElement","uploadButton","loadSpinner","then","res","_predictedCardJSON","card_json","spinnerHostElement","spinnerText","imageName","renderUploadControl","renderUploadContainer","uploadTemplate","renderImageContainer","renderSampleTemplate","sampleImageTemplate","marginTop","imageTitle","imageContainer","templates","sampleImage","ImageItem","selectedImage","poweredByContainer","itemIndex","sampleImageName","imagePlaceholder","event","src","code","_editor","renderPreview","refreshPreview","_previewContainer","_previewElement","renderEditor","model","JSONSchemaCard","_output","editorContainer","editorLabel","editorElement","OpenSampleItem","getNewItemId","prefix","newId","_id","newItemId","onCardSelected","navigateToNextElement","navigateToPreviousElement","thumbnailHost","Function","spinner","displayNameElement","nextSibling","onNavigateToNextList","previousSibling","onNavigateToPreviousList","onComplete","_listElements","renderSection","listElement","itemElement","lastChild","featuredSection","_builtinItems","divider","catalogueSection","buttonElement","nameElement","init","assign","SettingsManager","determineIfStorageIsAvailable","storage","setItem","removeItem","DOMException","trySaveSetting","isLocalStorageAvailable","localStorage","tryLoadStringSetting","succeeded","getItem","tryLoadNumberSetting","returnValue","tryLoadBooleanSetting","_isLocalStorageAvailable","getAllDeclaredVersions","ToolboxInfo","resizeEnded","onResizeEnded","resized","showSplitter","splitter","attachedTo","hideSplitter","onToggled","saveState","_splitter","expandedToolboxCount","toolboxInfo","_toolboxes","stretch","_attachedTo","computeToolboxSize","toolboxBoundingRect","isVertical","toolboxResized","toolboxExpandedOrCollapsed","getDimensionSettingName","_alignment","_contentHost","ToolboxOrientation","Vertical","_collapsedTabContainer","splitterElement","Splitter","Top","restoreState","collapsedTabContainer","_isRestoring","dimensionSetting","_lastClickedOffset","newSize","sizeApplied","_isVertical","_isAttachedAfter","_sizedELement","minimum","sizedElement","isAttachedAfter","minimumSize","propertyLabel","_orientation","updateContent","_content","toggled","updateVisibility","_isVisible","_headerRootElement","hideToolbox","_expandCollapseButtonElement","collapse","_stretch","orientation","headerContentElement","headerTitleElement","headerCommandsHostElement","_customCommandsHost","commandButtonElement","commandIconElement","ariaLabel","_headerIconElement","insertBefore","isExpandedSetting","BasePaletteItem","getText","designer","textBlock","CustomPaletteItem","snippet","rootElementTypeName","adaptiveElement","ToolbarElement","isToggled","displayCaption","_isLink","isLink","_displayCaption","_toolTip","_allowToggle","_isToggled","_caption","_isHidden","_dropDown","dropDownItem","pickerElement","_labelledById","pickerContainerElement","_elements","createSeparatorElement","renderElementsInto","separatorPosition","leftElements","rightElements","leftContainer","rightContainer","_alertPanel","elementId","afterElementId","insertElementBefore","beforeElementId","alertText","setupTreeItemEvents","getVisibleTreeItems","treeItems","rootItem","el","moveFocus","to","selectedItemChanged","onSelectedItemChanged","treeRoot","currentElement","findIndex","nextElement","rootItemElement","_selectedItem","_nil","_parse","_stringify","_v","_v2","_v3","_v4","_validate","_version","_interopRequireDefault","getOutputLength","inputLength8","safeAdd","lsw","md5cmn","q","b","t","num","cnt","md5ff","md5gg","md5hh","md5ii","bytes","msg","unescape","encodeURIComponent","Uint8Array","charCodeAt","length32","hexTab","hex","charAt","md5ToHexEncodedArray","olda","oldb","oldc","oldd","wordsToMd5","length8","Uint32Array","bytesToWords","_default","randomUUID","crypto","uuid","arr","getRandomValues","rnds8","f","z","ROTL","K","H","l","N","M","j","pow","W","T","unsafeStringify","byteToHex","offset","_rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","buf","clockseq","seedBytes","random","rng","msecs","now","nsecs","dt","tl","tmh","_md","URL","DNS","hashfunc","generateUUID","namespace","_namespace","str","stringToBytes","set","_native","rnds","_sha","_regex","test","__webpack_require__","cachedModule"],"sourceRoot":""}