@bimdata/bcf-components 2.0.0 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,15 +46,15 @@ const EXTENSION_LIST_FIELDS = Object.freeze({
46
46
  });
47
47
  const DEFAULT_PRIORITY_COLOR = "D8D8D8";
48
48
  const DEFAULT_STATUS_COLOR = "D8D8D8";
49
- const VIEWPOINT_TYPE_FIELD = "originating_system";
50
- const VIEWPOINT_MODELS_FIELD = "authoring_tool_id";
49
+ const VIEWPOINT_TYPE_FIELD$1 = "originating_system";
50
+ const VIEWPOINT_MODELS_FIELD$1 = "authoring_tool_id";
51
51
  const VIEWPOINT_TYPES = Object.freeze({
52
52
  V3D: "ifc3d",
53
53
  V2D: "ifc2d",
54
54
  DWG: "dwg",
55
55
  PLAN: "plan"
56
56
  });
57
- const VIEWPOINT_CONFIG = Object.freeze({
57
+ const VIEWPOINT_CONFIG$1 = Object.freeze({
58
58
  [VIEWPOINT_TYPES.V3D]: {
59
59
  order: 1,
60
60
  window: "3d",
@@ -88,10 +88,10 @@ var config = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
88
88
  EXTENSION_LIST_FIELDS,
89
89
  EXTENSION_TYPES,
90
90
  EXTENSION_WITH_COLOR,
91
- VIEWPOINT_CONFIG,
92
- VIEWPOINT_MODELS_FIELD,
91
+ VIEWPOINT_CONFIG: VIEWPOINT_CONFIG$1,
92
+ VIEWPOINT_MODELS_FIELD: VIEWPOINT_MODELS_FIELD$1,
93
93
  VIEWPOINT_TYPES,
94
- VIEWPOINT_TYPE_FIELD
94
+ VIEWPOINT_TYPE_FIELD: VIEWPOINT_TYPE_FIELD$1
95
95
  }, Symbol.toStringTag, { value: "Module" }));
96
96
  let apiClient = null;
97
97
  function setApiClient(client) {
@@ -111,11 +111,11 @@ function deserialize$1(date) {
111
111
  return date.toISOString().split("T")[0].split("-").reverse().join("/");
112
112
  }
113
113
  function deserializeShort(date) {
114
- const a2 = date.toISOString().split("T")[0].split("-").reverse();
115
- a2[2] = a2[2].slice(-2);
116
- return a2.join("/");
114
+ const d2 = date.toISOString().split("T")[0].split("-").reverse();
115
+ d2[2] = d2[2].slice(-2);
116
+ return d2.join("/");
117
117
  }
118
- function validate(date) {
118
+ function validateDueDate(date) {
119
119
  if (!date) {
120
120
  return true;
121
121
  }
@@ -1299,6 +1299,9 @@ function useService() {
1299
1299
  deleteExtension
1300
1300
  };
1301
1301
  }
1302
+ function getAvailableExtensions(type, detailedExtensions) {
1303
+ return detailedExtensions[EXTENSION_LIST_FIELDS[type]];
1304
+ }
1302
1305
  const r$9 = Object.freeze({ bisque: "ffe4c4", orange: "ffa500", coral: "ff7f50", red: "ff3d1e", maroon: "800000", khaki: "f0e68c", tan: "d2b48c", peru: "cd853f", sienna: "a0522d", brown: "a52a2a", greenyellow: "adff2f", yellowgreen: "9acd32", forestgreen: "00af50", green: "008000", darkgreen: "006400", lightcyan: "e0ffff", skyblue: "87ceeb", steelblue: "4682b4", blue: "0000ff", darkblue: "00008b", mistyrose: "ffe4e1", hotpink: "ff69b4", magenta: "ff00ff", purple: "800080", indigo: "4b0082", whitesmoke: "f5f5f5", silver: "c0c0c0", darkgray: "a9a9a9", grey: "7a7a7a", black: "000000" }), a$8 = ["bisque", "khaki", "greenyellow", "lightcyan", "mistyrose", "whitesmoke"];
1303
1306
  Object.entries(r$9).filter(([r2]) => !a$8.includes(r2));
1304
1307
  var e$9 = Object.freeze(["default", "primary", "secondary", "high", "success", "granite"]), o$9 = { props: { text: { type: String } } };
@@ -1497,7 +1500,7 @@ var render$j = function() {
1497
1500
  var _vm = this;
1498
1501
  var _h = _vm.$createElement;
1499
1502
  var _c = _vm._self._c || _h;
1500
- return _c("div", { staticClass: "setting-card" }, [_c("div", { staticClass: "setting-card__header", on: { "click": _vm.toggle } }, [_c("div", { staticClass: "setting-card__header__text" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.title." + _vm.extensionType)) + " ")]), _c("div", { staticClass: "setting-card__header__icons" }, [_vm.availableExtensions ? _c("div", { staticClass: "count" }, [_vm._v(" " + _vm._s(_vm.availableExtensions.length) + " ")]) : _vm._e(), _c("BIMDataIcon", { attrs: { "name": "chevron", "size": "xxs", "rotate": _vm.isOpen ? 90 : 0 } })], 1)]), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isOpen, expression: "isOpen" }] }, [_c("div", { staticClass: "setting-card__subheader" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.text." + _vm.extensionType)) + " "), _c("BIMDataButton", { attrs: { "fill": "", "radius": "" }, on: { "click": _vm.toggleAddExtension } }, [_c("BIMDataIcon", { attrs: { "margin": "0 6px 0 0", "name": "plus", "size": "xxxs", "fill": "" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.addButton")) + " ")])], 1)], 1), _c("transition", { attrs: { "name": "slide-fade-up" } }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isOpenAddExtension, expression: "isOpenAddExtension" }], staticClass: "setting-card__add-form" }, [_c("BIMDataInput", { ref: "input", attrs: { "placeholder": _vm.$t("BcfComponents.SettingCard.input." + _vm.extensionType) }, on: { "keyup": function($event) {
1503
+ return _c("div", { staticClass: "setting-card" }, [_c("div", { staticClass: "setting-card__header", on: { "click": _vm.toggle } }, [_c("div", { staticClass: "setting-card__header__text" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.title." + _vm.extensionType)) + " ")]), _c("div", { staticClass: "setting-card__header__icons" }, [_vm.availableExtensions ? _c("div", { staticClass: "count" }, [_vm._v(" " + _vm._s(_vm.availableExtensions.length) + " ")]) : _vm._e(), _c("BIMDataIcon", { attrs: { "name": "chevron", "size": "xxs", "rotate": _vm.isOpen ? 90 : 0 } })], 1)]), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isOpen, expression: "isOpen" }] }, [_c("div", { staticClass: "setting-card__subheader" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.text." + _vm.extensionType)) + " "), _c("BIMDataButton", { attrs: { "fill": "", "radius": "" }, on: { "click": _vm.toggleForm } }, [_c("BIMDataIcon", { attrs: { "margin": "0 6px 0 0", "name": "plus", "size": "xxxs", "fill": "" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.addButton")) + " ")])], 1)], 1), _c("transition", { attrs: { "name": "slide-fade-up" } }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.isOpenForm, expression: "isOpenForm" }], staticClass: "setting-card__form" }, [_c("BIMDataInput", { ref: "input", attrs: { "placeholder": _vm.$t("BcfComponents.SettingCard.input." + _vm.extensionType) }, on: { "keyup": function($event) {
1501
1504
  if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
1502
1505
  return null;
1503
1506
  }
@@ -1505,8 +1508,8 @@ var render$j = function() {
1505
1508
  return _vm.addExtension.apply(null, arguments);
1506
1509
  } }, model: { value: _vm.name, callback: function($$v) {
1507
1510
  _vm.name = $$v;
1508
- }, expression: "name" } }), _c("div", { staticClass: "actions" }, [_c("BIMDataButton", { attrs: { "ghost": "", "radius": "" }, on: { "click": _vm.closeAddExtension } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.cancelButton")) + " ")]), _c("BIMDataButton", { attrs: { "color": "primary", "fill": "", "radius": "" }, on: { "click": _vm.addExtension } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.validateButton")) + " ")])], 1)], 1)]), _c("ul", { staticClass: "setting-card__content bimdata-list" }, _vm._l(_vm.availableExtensions, function(extension) {
1509
- return _c("SettingCardItem", { key: extension.id, attrs: { "project": _vm.project, "extension": extension, "extensionType": _vm.extensionType }, on: { "update-extension": function($event) {
1511
+ }, expression: "name" } }), _c("div", { staticClass: "actions" }, [_c("BIMDataButton", { attrs: { "ghost": "", "radius": "" }, on: { "click": _vm.closeForm } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.cancelButton")) + " ")]), _c("BIMDataButton", { attrs: { "color": "primary", "fill": "", "radius": "" }, on: { "click": _vm.addExtension } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.SettingCard.validateButton")) + " ")])], 1)], 1)]), _c("ul", { staticClass: "setting-card__content bimdata-list" }, _vm._l(_vm.availableExtensions, function(extension) {
1512
+ return _c("SettingCardItem", { key: extension.id, attrs: { "project": _vm.project, "extensionType": _vm.extensionType, "extension": extension }, on: { "update-extension": function($event) {
1510
1513
  return _vm.$emit("update-extension", $event);
1511
1514
  }, "delete-extension": function($event) {
1512
1515
  return _vm.$emit("delete-extension", $event);
@@ -1527,12 +1530,12 @@ const __vue2_script$j = {
1527
1530
  type: Object,
1528
1531
  required: true
1529
1532
  },
1530
- extensionType: {
1531
- type: String,
1533
+ detailedExtensions: {
1534
+ type: Object,
1532
1535
  required: true
1533
1536
  },
1534
- availableExtensions: {
1535
- type: Array,
1537
+ extensionType: {
1538
+ type: String,
1536
1539
  required: true
1537
1540
  }
1538
1541
  },
@@ -1542,43 +1545,47 @@ const __vue2_script$j = {
1542
1545
  "delete-extension"
1543
1546
  ],
1544
1547
  setup(props, { emit }) {
1548
+ const availableExtensions = computed(() => getAvailableExtensions(props.extensionType, props.detailedExtensions));
1545
1549
  const input = ref(null);
1546
1550
  const name = ref("");
1547
1551
  const isOpen = ref(false);
1548
1552
  const close = () => isOpen.value = false;
1549
1553
  const toggle = () => isOpen.value = !isOpen.value;
1550
- const isOpenAddExtension = ref(false);
1551
- const closeAddExtension = () => {
1554
+ const isOpenForm = ref(false);
1555
+ const closeForm = () => {
1552
1556
  name.value = "";
1553
- isOpenAddExtension.value = false;
1557
+ isOpenForm.value = false;
1554
1558
  };
1555
- const toggleAddExtension = () => {
1556
- isOpenAddExtension.value = !isOpenAddExtension.value;
1559
+ const toggleForm = () => {
1560
+ isOpenForm.value = !isOpenForm.value;
1561
+ if (isOpenForm.value) {
1562
+ setTimeout(() => input.value.focus(), 50);
1563
+ }
1557
1564
  };
1558
- watch(isOpenAddExtension, () => setTimeout(() => isOpenAddExtension.value && input.value.focus(), 50));
1559
1565
  const addExtension = async () => {
1560
1566
  emit("create-extension", {
1561
1567
  project: props.project,
1562
1568
  extensionType: props.extensionType,
1563
1569
  data: { value: name.value }
1564
1570
  });
1565
- closeAddExtension();
1571
+ closeForm();
1566
1572
  };
1567
1573
  return {
1574
+ availableExtensions,
1568
1575
  input,
1569
1576
  isOpen,
1570
- isOpenAddExtension,
1577
+ isOpenForm,
1571
1578
  name,
1572
1579
  addExtension,
1573
1580
  close,
1574
- closeAddExtension,
1581
+ closeForm,
1575
1582
  toggle,
1576
- toggleAddExtension
1583
+ toggleForm
1577
1584
  };
1578
1585
  }
1579
1586
  };
1580
1587
  const __cssModules$j = {};
1581
- var __component__$j = /* @__PURE__ */ normalizeComponent(__vue2_script$j, render$j, staticRenderFns$j, false, __vue2_injectStyles$j, "6e8123c6", null, null);
1588
+ var __component__$j = /* @__PURE__ */ normalizeComponent(__vue2_script$j, render$j, staticRenderFns$j, false, __vue2_injectStyles$j, "4a7000e3", null, null);
1582
1589
  function __vue2_injectStyles$j(context) {
1583
1590
  for (let o2 in __cssModules$j) {
1584
1591
  this[o2] = __cssModules$j[o2];
@@ -1591,10 +1598,12 @@ var render$i = function() {
1591
1598
  var _vm = this;
1592
1599
  var _h = _vm.$createElement;
1593
1600
  var _c = _vm._self._c || _h;
1594
- return _c("div", { staticClass: "bcf-settings" }, [_c("div", { staticClass: "bcf-settings__header" }, [_c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfSettings.title")) + " ")]), _c("BIMDataButton", { attrs: { "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
1601
+ return _c("div", { staticClass: "bcf-settings" }, [_c("div", { staticClass: "bcf-settings__header" }, [_vm.uiConfig.backButton ? _c("BIMDataButton", { attrs: { "color": "granite", "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
1602
+ return _vm.$emit("back");
1603
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "arrow", "size": "xxs" } })], 1) : _vm._e(), _c("span", { staticClass: "bcf-settings__header__title" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfSettings.title")) + " ")]), _vm.uiConfig.closeButton ? _c("BIMDataButton", { attrs: { "color": "granite", "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
1595
1604
  return _vm.$emit("close");
1596
- } } }, [_c("BIMDataIcon", { attrs: { "name": "close", "size": "xxs" } })], 1)], 1), _c("div", { staticClass: "bcf-settings__content" }, [_c("div", { staticClass: "bcf-settings__content__text" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfSettings.text")) + " ")]), _vm._l(_vm.EXTENSION_TYPES, function(t2) {
1597
- return _c("SettingCard", { attrs: { "project": _vm.project, "extensionType": t2, "availableExtensions": _vm.detailedExtensions[_vm.EXTENSION_LIST_FIELDS[t2]] }, on: { "create-extension": _vm.createExt, "update-extension": _vm.updateExt, "delete-extension": _vm.deleteExt } });
1605
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "close", "size": "xxs" } })], 1) : _vm._e()], 1), _c("div", { staticClass: "bcf-settings__content" }, [_c("div", { staticClass: "bcf-settings__content__text" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfSettings.text")) + " ")]), _vm._l(_vm.EXTENSION_TYPES, function(t2) {
1606
+ return _c("SettingCard", { attrs: { "project": _vm.project, "detailedExtensions": _vm.detailedExtensions, "extensionType": t2 }, on: { "create-extension": _vm.createExt, "update-extension": _vm.updateExt, "delete-extension": _vm.deleteExt } });
1598
1607
  })], 2)]);
1599
1608
  };
1600
1609
  var staticRenderFns$i = [];
@@ -1606,6 +1615,13 @@ const __vue2_script$i = {
1606
1615
  SettingCard
1607
1616
  },
1608
1617
  props: {
1618
+ uiConfig: {
1619
+ type: Object,
1620
+ default: () => ({
1621
+ backButton: false,
1622
+ closeButton: false
1623
+ })
1624
+ },
1609
1625
  project: {
1610
1626
  type: Object,
1611
1627
  required: true
@@ -1616,10 +1632,11 @@ const __vue2_script$i = {
1616
1632
  }
1617
1633
  },
1618
1634
  emits: [
1635
+ "back",
1636
+ "close",
1619
1637
  "extension-created",
1620
1638
  "extension-updated",
1621
- "extension-deleted",
1622
- "close"
1639
+ "extension-deleted"
1623
1640
  ],
1624
1641
  setup(props, { emit }) {
1625
1642
  const {
@@ -1640,7 +1657,6 @@ const __vue2_script$i = {
1640
1657
  emit("extension-deleted", event.extension);
1641
1658
  };
1642
1659
  return {
1643
- EXTENSION_LIST_FIELDS,
1644
1660
  EXTENSION_TYPES,
1645
1661
  createExt,
1646
1662
  updateExt,
@@ -1649,7 +1665,7 @@ const __vue2_script$i = {
1649
1665
  }
1650
1666
  };
1651
1667
  const __cssModules$i = {};
1652
- var __component__$i = /* @__PURE__ */ normalizeComponent(__vue2_script$i, render$i, staticRenderFns$i, false, __vue2_injectStyles$i, "2687ba4b", null, null);
1668
+ var __component__$i = /* @__PURE__ */ normalizeComponent(__vue2_script$i, render$i, staticRenderFns$i, false, __vue2_injectStyles$i, "84f2adee", null, null);
1653
1669
  function __vue2_injectStyles$i(context) {
1654
1670
  for (let o2 in __cssModules$i) {
1655
1671
  this[o2] = __cssModules$i[o2];
@@ -1889,9 +1905,9 @@ var render$h = function() {
1889
1905
  var _vm = this;
1890
1906
  var _h = _vm.$createElement;
1891
1907
  var _c = _vm._self._c || _h;
1892
- return _c("div", { staticClass: "bcf-statistics" }, [_c("div", { staticClass: "bcf-statistics__content" }, [_c("BIMDataSimplePieChart", { staticClass: "bcf-statistics__content__chart", attrs: { "barsData": _vm.barsData, "placeholder": true, "placeholderStrokeWidth": 10, "graphDrawTime": 2.5 } }), _c("div", { staticClass: "bcf-statistics__content__legend" }, [_c("div", { staticClass: "bcf-statistics__content__legend__title" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfStatistics.extension." + _vm.extensionType + "Title")) + " ")]), _c("BIMDataPaginatedList", { attrs: { "list": _vm.barsData, "perPage": 6, "first": false, "last": false, "numberDataElements": false, "backgroundColor": "transparent" }, scopedSlots: _vm._u([{ key: "element", fn: function(ref2) {
1893
- var barData = ref2.element;
1894
- return [_c("div", { staticClass: "bcf-statistics__content__legend__item" }, [_c("span", { staticClass: "bcf-statistics__content__legend__item__mark", style: { borderColor: barData.color } }), _c("span", { staticClass: "bcf-statistics__content__legend__item__percent" }, [_vm._v(" " + _vm._s(barData.percentage.toFixed(0)) + " % ")]), _c("span", { staticClass: "bcf-statistics__content__legend__item__text" }, [_vm._v(" " + _vm._s(barData.label && _vm.$t("BcfComponents.BcfStatistics.extension." + _vm.extensionType)) + " " + _vm._s(barData.label || _vm.$t("BcfComponents.BcfStatistics.extension." + _vm.extensionType + "NotDefined")) + " "), _c("span", { staticClass: "total" }, [_vm._v(" (" + _vm._s(barData.total) + ") ")])])])];
1908
+ return _c("div", { staticClass: "bcf-statistics" }, [_c("div", { staticClass: "bcf-statistics__content" }, [_c("BIMDataSimplePieChart", { staticClass: "bcf-statistics__content__chart", attrs: { "barsData": _vm.chartData, "placeholder": true, "placeholderStrokeWidth": 10, "graphDrawTime": 2.5 } }), _c("div", { staticClass: "bcf-statistics__content__legend" }, [_c("div", { staticClass: "bcf-statistics__content__legend__title" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfStatistics.extension." + _vm.extensionType + "Title")) + " ")]), _c("BIMDataPaginatedList", { attrs: { "list": _vm.chartData, "perPage": 6, "first": false, "last": false, "numberDataElements": false, "backgroundColor": "transparent" }, scopedSlots: _vm._u([{ key: "element", fn: function(ref2) {
1909
+ var data = ref2.element;
1910
+ return [_c("div", { staticClass: "bcf-statistics__content__legend__item" }, [_c("span", { staticClass: "bcf-statistics__content__legend__item__mark", style: { borderColor: data.color } }), _c("span", { staticClass: "bcf-statistics__content__legend__item__percent" }, [_vm._v(" " + _vm._s(data.percentage.toFixed(0)) + " % ")]), _c("span", { staticClass: "bcf-statistics__content__legend__item__text" }, [_vm._v(" " + _vm._s(data.label && _vm.$t("BcfComponents.BcfStatistics.extension." + _vm.extensionType)) + " " + _vm._s(data.label || _vm.$t("BcfComponents.BcfStatistics.extension." + _vm.extensionType + "NotDefined")) + " "), _c("span", { staticClass: "count" }, [_vm._v(" (" + _vm._s(data.count) + ") ")])])])];
1895
1911
  } }]) })], 1)], 1)]);
1896
1912
  };
1897
1913
  var staticRenderFns$h = [];
@@ -1902,47 +1918,43 @@ const __vue2_script$h = {
1902
1918
  BIMDataSimplePieChart: o$7
1903
1919
  },
1904
1920
  props: {
1905
- bcfTopics: {
1906
- type: Array,
1921
+ detailedExtensions: {
1922
+ type: Object,
1907
1923
  required: true
1908
1924
  },
1909
1925
  extensionType: {
1910
1926
  type: String
1911
1927
  },
1912
- availableExtensions: {
1928
+ topics: {
1913
1929
  type: Array,
1914
1930
  required: true
1915
1931
  }
1916
1932
  },
1917
1933
  setup(props) {
1918
- const barsData = computed(() => {
1919
- if (props.bcfTopics.length === 0) {
1934
+ const chartData = computed(() => {
1935
+ if (props.topics.length === 0)
1920
1936
  return [];
1921
- }
1922
1937
  const extField = EXTENSION_FIELDS[props.extensionType];
1923
- const displayedExtensions = [...props.availableExtensions];
1938
+ const displayedExtensions = getAvailableExtensions(props.extensionType, props.detailedExtensions);
1924
1939
  displayedExtensions.push({ [extField]: void 0 });
1925
1940
  return displayedExtensions.map((extension) => {
1926
- const barData = {};
1927
- if (extension.color !== void 0) {
1928
- barData.color = `#${extension.color}`;
1929
- } else {
1930
- barData.color = `#${DEFAULT_PRIORITY_COLOR}`;
1931
- }
1932
- const topicCount = props.bcfTopics.filter((topic) => topic[extField] === extension[extField]).length;
1933
- barData.percentage = topicCount * 100 / props.bcfTopics.length;
1934
- barData.label = extension[extField];
1935
- barData.total = topicCount;
1936
- return barData;
1937
- }).sort((a2, b2) => parseInt(a2.percentage) > parseInt(b2.percentage) ? -1 : 1);
1941
+ var _a;
1942
+ const topicCount = props.topics.filter((topic) => topic[extField] === extension[extField]).length;
1943
+ return {
1944
+ label: extension[extField],
1945
+ color: `#${(_a = extension.color) != null ? _a : DEFAULT_PRIORITY_COLOR}`,
1946
+ count: topicCount,
1947
+ percentage: topicCount * 100 / props.topics.length
1948
+ };
1949
+ }).sort((a2, b2) => b2.percentage - a2.percentage);
1938
1950
  });
1939
1951
  return {
1940
- barsData
1952
+ chartData
1941
1953
  };
1942
1954
  }
1943
1955
  };
1944
1956
  const __cssModules$h = {};
1945
- var __component__$h = /* @__PURE__ */ normalizeComponent(__vue2_script$h, render$h, staticRenderFns$h, false, __vue2_injectStyles$h, "08cce8e2", null, null);
1957
+ var __component__$h = /* @__PURE__ */ normalizeComponent(__vue2_script$h, render$h, staticRenderFns$h, false, __vue2_injectStyles$h, "208d58fe", null, null);
1946
1958
  function __vue2_injectStyles$h(context) {
1947
1959
  for (let o2 in __cssModules$h) {
1948
1960
  this[o2] = __cssModules$h[o2];
@@ -2036,11 +2048,11 @@ var render$f = function() {
2036
2048
  return _c("div", { staticClass: "bcf-topic-card" }, [_c("div", { staticClass: "bcf-topic-card__header" }, [_c("div", { staticClass: "bcf-topic-card__header__infos flex" }, [_c("div", { staticClass: "bcf-topic-card__header__infos__index flex items-center justify-center", style: {
2037
2049
  "background-color": "#" + _vm.priorityColor,
2038
2050
  color: _vm.adjustTextColor("#" + _vm.priorityColor, "#ffffff", "var(--color-text)")
2039
- } }, [_vm._v(" " + _vm._s(_vm.bcfTopic.index) + " ")]), _c("div", { staticClass: "bcf-topic-card__header__infos__title flex items-center m-l-12" }, [_c("BIMDataTextbox", { attrs: { "maxWidth": "100% - 48px", "text": _vm.bcfTopic.title } })], 1)]), _c("div", { staticClass: "bcf-topic-card__header__img flex items-center justify-center" }, [_vm.bcfTopic.topic_status ? _c("div", { staticClass: "bcf-topic-card__header__img__status flex p-6", style: {
2051
+ } }, [_vm._v(" " + _vm._s(_vm.topic.index) + " ")]), _c("div", { staticClass: "bcf-topic-card__header__infos__title flex items-center m-l-12" }, [_c("BIMDataTextbox", { attrs: { "maxWidth": "100% - 48px", "text": _vm.topic.title } })], 1)]), _c("div", { staticClass: "bcf-topic-card__header__img flex items-center justify-center" }, [_vm.topic.topic_status ? _c("div", { staticClass: "bcf-topic-card__header__img__status flex p-6", style: {
2040
2052
  "background-color": "#" + _vm.statusColor,
2041
2053
  color: _vm.adjustTextColor("#" + _vm.statusColor, "#ffffff", "var(--color-text)")
2042
- } }, [_c("BIMDataIcon", { attrs: { "name": "information", "fill": "", "color": "default" } }), _c("span", { staticClass: "m-l-6" }, [_vm._v(_vm._s(_vm.bcfTopic.topic_status))])], 1) : _vm._e(), _c("div", { staticClass: "bcf-topic-card__header__img__date p-6" }, [_vm._v(" " + _vm._s(_vm.$d(_vm.bcfTopic.creation_date, "short")) + " ")]), _vm.viewpointsWithSnapshot.length > 0 ? _c("img", { attrs: { "src": _vm.viewpointsWithSnapshot[0].snapshot.snapshot_data, "alt": "ViewPoint", "loading": "lazy" } }) : _c("BcfTopicDefaultImage", { staticClass: "default-img" })], 1)]), _c("div", { staticClass: "bcf-topic-card__content p-12" }, [_c("div", { staticClass: "bcf-topic-card__content__priority" }, [_c("strong", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicCard.priority")) + " ")]), _c("span", { style: { color: "#" + _vm.priorityColor } }, [_vm._v(" " + _vm._s(_vm.bcfTopic.priority || _vm.$t("BcfComponents.BcfTopicCard.noPriority")) + " ")])]), _c("div", [_c("strong", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicCard.assignedTo")) + " ")]), _c("span", [_vm._v(" " + _vm._s(_vm.bcfTopic.assigned_to || _vm.$t("BcfComponents.BcfTopicCard.notSpecified")) + " ")])]), _c("div", { staticClass: "flex justify-around m-t-12" }, [_c("div", { staticClass: "flex items-center" }, [_c("BIMDataIcon", { attrs: { "name": "model3d", "fill": "", "color": "default", "size": "xs", "margin": "0 6px 0 0" } }), _vm.topicObjects.length > 0 ? _c("span", { staticClass: "m-r-6" }, [_vm._v(" " + _vm._s(_vm.topicObjects.length) + " ")]) : _vm._e(), _c("span", [_vm._v(" " + _vm._s(_vm.topicObjects.length > 0 ? _vm.$t("BcfComponents.BcfTopicCard.elements") : _vm.$t("BcfComponents.BcfTopicCard.noElements")) + " ")])], 1), _c("BIMDataButton", { attrs: { "width": "48%", "color": "primary", "fill": "", "radius": "" }, on: { "click": function($event) {
2043
- return _vm.$emit("open-bcf-topic", _vm.bcfTopic);
2054
+ } }, [_c("BIMDataIcon", { attrs: { "name": "information", "fill": "", "color": "default" } }), _c("span", { staticClass: "m-l-6" }, [_vm._v(_vm._s(_vm.topic.topic_status))])], 1) : _vm._e(), _c("div", { staticClass: "bcf-topic-card__header__img__date p-6" }, [_vm._v(" " + _vm._s(_vm.$d(_vm.topic.creation_date, "short")) + " ")]), _vm.viewpointsWithSnapshot.length > 0 ? _c("img", { attrs: { "src": _vm.viewpointsWithSnapshot[0].snapshot.snapshot_data, "alt": "ViewPoint", "loading": "lazy" } }) : _c("BcfTopicDefaultImage", { staticClass: "default-img" })], 1)]), _c("div", { staticClass: "bcf-topic-card__content p-12" }, [_c("div", { staticClass: "bcf-topic-card__content__priority" }, [_c("strong", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicCard.priority")) + " ")]), _c("span", { style: { color: "#" + _vm.priorityColor } }, [_vm._v(" " + _vm._s(_vm.topic.priority || _vm.$t("BcfComponents.BcfTopicCard.noPriority")) + " ")])]), _c("div", [_c("strong", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicCard.assignedTo")) + " ")]), _c("span", [_vm._v(" " + _vm._s(_vm.topic.assigned_to || _vm.$t("BcfComponents.BcfTopicCard.notSpecified")) + " ")])]), _c("div", { staticClass: "flex justify-around m-t-12" }, [_c("div", { staticClass: "flex items-center" }, [_c("BIMDataIcon", { attrs: { "name": "model3d", "fill": "", "color": "default", "size": "xs", "margin": "0 6px 0 0" } }), _vm.topicObjects.length > 0 ? _c("span", { staticClass: "m-r-6" }, [_vm._v(" " + _vm._s(_vm.topicObjects.length) + " ")]) : _vm._e(), _c("span", [_vm._v(" " + _vm._s(_vm.topicObjects.length > 0 ? _vm.$t("BcfComponents.BcfTopicCard.elements") : _vm.$t("BcfComponents.BcfTopicCard.noElements")) + " ")])], 1), _c("BIMDataButton", { attrs: { "width": "48%", "color": "primary", "fill": "", "radius": "" }, on: { "click": function($event) {
2055
+ return _vm.$emit("open-topic", _vm.topic);
2044
2056
  } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicCard.see")) + " ")])], 1)])]);
2045
2057
  };
2046
2058
  var staticRenderFns$f = [];
@@ -2053,27 +2065,27 @@ const __vue2_script$f = {
2053
2065
  BIMDataTextbox: l$3
2054
2066
  },
2055
2067
  props: {
2056
- bcfTopic: {
2068
+ detailedExtensions: {
2057
2069
  type: Object,
2058
2070
  required: true
2059
2071
  },
2060
- detailedExtensions: {
2072
+ topic: {
2061
2073
  type: Object,
2062
2074
  required: true
2063
2075
  }
2064
2076
  },
2065
2077
  emits: [
2066
- "open-bcf-topic"
2078
+ "open-topic"
2067
2079
  ],
2068
2080
  setup(props, { emit }) {
2069
2081
  const viewpointsWithSnapshot = computed(() => {
2070
- return props.bcfTopic.viewpoints.filter((viewpoint) => Boolean(viewpoint.snapshot));
2082
+ return props.topic.viewpoints.filter((viewpoint) => Boolean(viewpoint.snapshot));
2071
2083
  });
2072
- const priorityColor = computed(() => getPriorityColor(props.bcfTopic, props.detailedExtensions));
2073
- const statusColor = computed(() => getStatusColor(props.bcfTopic, props.detailedExtensions));
2084
+ const priorityColor = computed(() => getPriorityColor(props.topic, props.detailedExtensions));
2085
+ const statusColor = computed(() => getStatusColor(props.topic, props.detailedExtensions));
2074
2086
  const topicObjects = computed(() => {
2075
2087
  var _a, _b;
2076
- const components2 = (_b = (_a = props.bcfTopic.viewpoints) == null ? void 0 : _a[0]) == null ? void 0 : _b.components;
2088
+ const components2 = (_b = (_a = props.topic.viewpoints) == null ? void 0 : _a[0]) == null ? void 0 : _b.components;
2077
2089
  return (components2 == null ? void 0 : components2.selection) || [];
2078
2090
  });
2079
2091
  return {
@@ -2086,7 +2098,7 @@ const __vue2_script$f = {
2086
2098
  }
2087
2099
  };
2088
2100
  const __cssModules$f = {};
2089
- var __component__$f = /* @__PURE__ */ normalizeComponent(__vue2_script$f, render$f, staticRenderFns$f, false, __vue2_injectStyles$f, "6474e4d2", null, null);
2101
+ var __component__$f = /* @__PURE__ */ normalizeComponent(__vue2_script$f, render$f, staticRenderFns$f, false, __vue2_injectStyles$f, "2c575fa0", null, null);
2090
2102
  function __vue2_injectStyles$f(context) {
2091
2103
  for (let o2 in __cssModules$f) {
2092
2104
  this[o2] = __cssModules$f[o2];
@@ -2118,7 +2130,7 @@ var render$d = function() {
2118
2130
  var _h = _vm.$createElement;
2119
2131
  var _c = _vm._self._c || _h;
2120
2132
  return _c("div", { staticClass: "bcf-topic-creation-card" }, [_c("BcfTopicCreationCardImage"), _c("div", { staticClass: "bcf-topic-creation-card__text" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicCreationCard.text")) + " ")]), _c("BIMDataButton", { attrs: { "width": "48px", "height": "48px", "color": "default", "fill": "", "radius": "", "icon": "" }, on: { "click": function($event) {
2121
- return _vm.$emit("create-bcf-topic");
2133
+ return _vm.$emit("create-topic");
2122
2134
  } } }, [_c("BIMDataIcon", { attrs: { "name": "plus", "size": "m", "fill": "", "color": "default" } })], 1)], 1);
2123
2135
  };
2124
2136
  var staticRenderFns$d = [];
@@ -2129,10 +2141,10 @@ const __vue2_script$d = {
2129
2141
  BIMDataButton: c$5,
2130
2142
  BIMDataIcon: v$2
2131
2143
  },
2132
- emits: ["create-bcf-topic"]
2144
+ emits: ["create-topic"]
2133
2145
  };
2134
2146
  const __cssModules$d = {};
2135
- var __component__$d = /* @__PURE__ */ normalizeComponent(__vue2_script$d, render$d, staticRenderFns$d, false, __vue2_injectStyles$d, "b5e56a58", null, null);
2147
+ var __component__$d = /* @__PURE__ */ normalizeComponent(__vue2_script$d, render$d, staticRenderFns$d, false, __vue2_injectStyles$d, "3657ee44", null, null);
2136
2148
  function __vue2_injectStyles$d(context) {
2137
2149
  for (let o2 in __cssModules$d) {
2138
2150
  this[o2] = __cssModules$d[o2];
@@ -2817,7 +2829,7 @@ var render$c = function() {
2817
2829
  return _c("div", { key: viewpoint.guid || i2, staticClass: "image-preview", class: { single: _vm.viewpoints.length === 1 } }, [viewpoint.snapshot.snapshot_data ? _c("img", { attrs: { "src": viewpoint.snapshot.snapshot_data } }) : _vm._e(), _c("BIMDataButton", { staticClass: "btn-delete", attrs: { "fill": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
2818
2830
  return _vm.deleteViewpoint(viewpoint);
2819
2831
  } } }, [_c("BIMDataIcon", { attrs: { "name": "delete", "size": "xs", "fill": "", "color": "high" } })], 1)], 1);
2820
- }), 0), _c("BIMDataButton", { staticClass: "btn-upload", attrs: { "disabled": _vm.viewpoints.length >= 4, "width": "100%", "color": "primary", "fill": "", "radius": "" } }, [_c("label", { attrs: { "for": "files" } }, [_c("BIMDataIcon", { attrs: { "name": "camera", "size": "xs", "margin": "0 6px 0 0" } }), _vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.addPictureButton")) + " ")], 1), _c("input", { attrs: { "disabled": _vm.viewpoints.length >= 4, "hidden": "", "id": "files", "type": "file", "multiple": "", "accept": "image/png, image/jpeg" }, on: { "change": _vm.addImage } })])] : [_c("div", { staticClass: "bcf-topic-images__upload" }, [_c("span", { staticClass: "icon" }, [_c("BIMDataIcon", { attrs: { "name": "unarchive", "size": "m" } })], 1), _c("BIMDataButton", { staticClass: "btn-upload", attrs: { "color": "primary", "outline": "", "radius": "" } }, [_c("label", { attrs: { "for": "files" } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.dragDropImageText")) + " ")]), _c("input", { attrs: { "hidden": "", "id": "files", "type": "file", "multiple": "", "accept": "image/png, image/jpeg" }, on: { "change": _vm.addImage } })])], 1)]], 2);
2832
+ }), 0), _c("BIMDataButton", { staticClass: "btn-upload", attrs: { "disabled": _vm.viewpoints.length >= 4, "width": "100%", "color": "primary", "fill": "", "radius": "" } }, [_c("label", { attrs: { "for": "files" } }, [_c("BIMDataIcon", { attrs: { "name": "camera", "size": "xs", "margin": "0 6px 0 0" } }), _vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.addPictureButton")) + " ")], 1), _c("input", { attrs: { "disabled": _vm.viewpoints.length >= 4, "hidden": "", "id": "files", "type": "file", "multiple": "", "accept": "image/png, image/jpeg" }, on: { "change": _vm.createViewpoints } })])] : [_c("div", { staticClass: "bcf-topic-images__upload" }, [_c("span", { staticClass: "icon" }, [_c("BIMDataIcon", { attrs: { "name": "unarchive", "size": "m" } })], 1), _c("BIMDataButton", { staticClass: "btn-upload", attrs: { "color": "primary", "outline": "", "radius": "" } }, [_c("label", { attrs: { "for": "files" } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.dragDropImageText")) + " ")]), _c("input", { attrs: { "hidden": "", "id": "files", "type": "file", "multiple": "", "accept": "image/png, image/jpeg" }, on: { "change": _vm.createViewpoints } })])], 1)]], 2);
2821
2833
  };
2822
2834
  var staticRenderFns$c = [];
2823
2835
  var BcfTopicImages_scss_vue_type_style_index_0_from__2Fhome_2Frunner_2FactionsRunner_2F_work_2FbcfComponents_2FbcfComponents_2Fsrc_2Fcomponents_2FbcfTopicForm_2FbcfTopicImages_2FBcfTopicImages_vue_src_scoped_true_lang = "";
@@ -2837,7 +2849,7 @@ const __vue2_script$c = {
2837
2849
  "delete-viewpoint"
2838
2850
  ],
2839
2851
  setup(_, { emit }) {
2840
- const addImage = (event) => {
2852
+ const createViewpoints = (event) => {
2841
2853
  [...event.target.files].forEach((file) => {
2842
2854
  const reader = new FileReader();
2843
2855
  reader.addEventListener("load", () => {
@@ -2856,13 +2868,13 @@ const __vue2_script$c = {
2856
2868
  emit("delete-viewpoint", viewpoint);
2857
2869
  };
2858
2870
  return {
2859
- addImage,
2871
+ createViewpoints,
2860
2872
  deleteViewpoint: deleteViewpoint2
2861
2873
  };
2862
2874
  }
2863
2875
  };
2864
2876
  const __cssModules$c = {};
2865
- var __component__$c = /* @__PURE__ */ normalizeComponent(__vue2_script$c, render$c, staticRenderFns$c, false, __vue2_injectStyles$c, "46dea43b", null, null);
2877
+ var __component__$c = /* @__PURE__ */ normalizeComponent(__vue2_script$c, render$c, staticRenderFns$c, false, __vue2_injectStyles$c, "7ac6ebcf", null, null);
2866
2878
  function __vue2_injectStyles$c(context) {
2867
2879
  for (let o2 in __cssModules$c) {
2868
2880
  this[o2] = __cssModules$c[o2];
@@ -2899,17 +2911,16 @@ const __vue2_script$b = {
2899
2911
  "delete-viewpoint"
2900
2912
  ],
2901
2913
  setup(_, { emit }) {
2902
- const getViewers = inject("getViewers", () => {
2903
- });
2914
+ const getViewers = inject("getViewers", () => ({}));
2904
2915
  const createViewpoints = async () => {
2905
2916
  Object.entries(getViewers()).forEach(([id, viewers]) => {
2906
- const [type, config2] = Object.entries(VIEWPOINT_CONFIG).find(([, c2]) => c2.plugin === id);
2917
+ const [type, config2] = Object.entries(VIEWPOINT_CONFIG$1).find(([, c2]) => c2.plugin === id);
2907
2918
  viewers.forEach(async (viewer) => {
2908
2919
  const viewpoint = await viewer.getViewpoint();
2909
2920
  const { order } = config2 != null ? config2 : {};
2910
2921
  viewpoint.order = order;
2911
- viewpoint[VIEWPOINT_TYPE_FIELD] = type;
2912
- viewpoint[VIEWPOINT_MODELS_FIELD] = viewer.getLoadedModels().map((m) => m.id).join(",");
2922
+ viewpoint[VIEWPOINT_TYPE_FIELD$1] = type;
2923
+ viewpoint[VIEWPOINT_MODELS_FIELD$1] = viewer.getLoadedModels().map((m) => m.id).join(",");
2913
2924
  emit("add-viewpoint", viewpoint);
2914
2925
  });
2915
2926
  });
@@ -2924,7 +2935,7 @@ const __vue2_script$b = {
2924
2935
  }
2925
2936
  };
2926
2937
  const __cssModules$b = {};
2927
- var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "0bd88982", null, null);
2938
+ var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "f3714336", null, null);
2928
2939
  function __vue2_injectStyles$b(context) {
2929
2940
  for (let o2 in __cssModules$b) {
2930
2941
  this[o2] = __cssModules$b[o2];
@@ -2937,11 +2948,15 @@ var render$a = function() {
2937
2948
  var _vm = this;
2938
2949
  var _h = _vm.$createElement;
2939
2950
  var _c = _vm._self._c || _h;
2940
- return _c("div", { staticClass: "bcf-topic-form" }, [_c("div", { staticClass: "bcf-topic-form__content" }, [_c("div", { staticClass: "bcf-topic-form__content__head" }, [_c("div", { staticClass: "bcf-topic-form__content__head__index" }, [_vm._v(" " + _vm._s(_vm.isCreation ? _vm.nextIndex : _vm.bcfTopic.index) + " ")]), _c("div", { staticClass: "bcf-topic-form__content__head__date" }, [_vm._v(" " + _vm._s(_vm.$d(_vm.isCreation ? new Date() : _vm.bcfTopic.creation_date, "short")) + " ")])]), _vm.viewerMode ? [_c("BcfTopicSnapshots", { attrs: { "viewpoints": _vm.viewpointsToDisplay }, on: { "add-viewpoint": _vm.addViewpoint, "delete-viewpoint": _vm.delViewpoint } }), _c("div", { staticClass: "bcf-topic-form__content__actions" }, [_c("BIMDataButton", { attrs: { "fill": "", "radius": "", "disabled": !_vm.objectsEditMode }, on: { "click": function($event) {
2941
- return _vm.$emit("edit-objects", _vm.bcfTopic);
2942
- } } }, [_c("BIMDataIcon", { attrs: { "name": "plus", "size": "xxxs", "margin": "0 6px 0 0" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.addObjectButton")) + " ")]), _vm.bcfTopicObjects ? _c("span", { staticClass: "count-objects" }, [_vm._v(" " + _vm._s(_vm.bcfTopicObjects.selection.length) + " ")]) : _vm._e()], 1), _c("BIMDataTooltip", { attrs: { "disabled": _vm.viewpointsToDisplay.length > 0, "text": _vm.$t("BcfComponents.BcfTopicForm.annotationButtonTooltip"), "color": "granite-light" } }, [_c("BIMDataButton", { attrs: { "width": "100%", "color": "primary", "fill": "", "radius": "", "disabled": !_vm.annotationsEditMode || _vm.viewpointsToDisplay.length === 0 }, on: { "click": function($event) {
2943
- return _vm.$emit("edit-annotations", _vm.bcfTopic);
2944
- } } }, [_c("BIMDataIcon", { attrs: { "name": "plus", "size": "xxxs", "margin": "0 6px 0 0" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.addAnnotationButton")) + " ")]), _vm.bcfTopicAnnotations ? _c("span", { staticClass: "count-annotations" }, [_vm._v(" " + _vm._s(_vm.bcfTopicAnnotations.length) + " ")]) : _vm._e()], 1)], 1)], 1)] : [_c("BcfTopicImages", { attrs: { "viewpoints": _vm.viewpointsToDisplay }, on: { "add-viewpoint": _vm.addViewpoint, "delete-viewpoint": _vm.delViewpoint } })], _c("div", { staticClass: "bcf-topic-form__content__body" }, [_c("BIMDataInput", { attrs: { "placeholder": _vm.$t("BcfComponents.BcfTopicForm.titlePlaceholder"), "error": _vm.hasErrorTitle, "errorMessage": _vm.$t("BcfComponents.BcfTopicForm.titleErrorMessage") }, on: { "keyup": function($event) {
2951
+ return _c("div", { staticClass: "bcf-topic-form" }, [_c("div", { staticClass: "bcf-topic-form__header" }, [_vm.uiConfig.backButton ? _c("BIMDataButton", { attrs: { "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
2952
+ return _vm.$emit("back");
2953
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "arrow", "size": "xxs", "fill": "", "color": "granite-light" } })], 1) : _vm._e(), _c("div", { staticClass: "bcf-topic-form__header__title" }, [_vm.isCreation ? [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.createTitle")) + " ")] : [_c("BIMDataTextbox", { attrs: { "maxWidth": "250px", "text": _vm.topic.title } })]], 2), _vm.uiConfig.closeButton ? _c("BIMDataButton", { attrs: { "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
2954
+ return _vm.$emit("close");
2955
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "close", "size": "xxs", "fill": "", "color": "granite-light" } })], 1) : _vm._e()], 1), _c("div", { staticClass: "bcf-topic-form__content" }, [_c("div", { staticClass: "bcf-topic-form__content__head" }, [_c("div", { staticClass: "bcf-topic-form__content__head__index" }, [_vm._v(" " + _vm._s(_vm.isCreation ? _vm.nextIndex : _vm.topic.index) + " ")]), _c("div", { staticClass: "bcf-topic-form__content__head__date" }, [_vm._v(" " + _vm._s(_vm.$d(_vm.isCreation ? new Date() : _vm.topic.creation_date, "short")) + " ")])]), _vm.uiConfig.viewerMode ? [_c("BcfTopicSnapshots", { attrs: { "viewpoints": _vm.viewpointsToDisplay }, on: { "add-viewpoint": _vm.addViewpoint, "delete-viewpoint": _vm.delViewpoint } }), _c("div", { staticClass: "bcf-topic-form__content__actions" }, [_c("BIMDataButton", { attrs: { "fill": "", "radius": "", "disabled": !_vm.objectsEditEnabled }, on: { "click": function($event) {
2956
+ return _vm.$emit("edit-topic-objects", _vm.topic);
2957
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "plus", "size": "xxxs", "margin": "0 6px 0 0" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.addObjectButton")) + " ")]), _vm.topicObjects ? _c("span", { staticClass: "count-objects" }, [_vm._v(" " + _vm._s(_vm.topicObjects.selection.length) + " ")]) : _vm._e()], 1), _c("BIMDataTooltip", { attrs: { "disabled": _vm.viewpointsToDisplay.length > 0, "text": _vm.$t("BcfComponents.BcfTopicForm.annotationButtonTooltip"), "color": "granite-light" } }, [_c("BIMDataButton", { attrs: { "width": "100%", "color": "primary", "fill": "", "radius": "", "disabled": !_vm.annotationsEditEnabled || _vm.viewpointsToDisplay.length === 0 }, on: { "click": function($event) {
2958
+ return _vm.$emit("edit-topic-annotations", _vm.topic);
2959
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "plus", "size": "xxxs", "margin": "0 6px 0 0" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.addAnnotationButton")) + " ")]), _vm.topicAnnotations ? _c("span", { staticClass: "count-annotations" }, [_vm._v(" " + _vm._s(_vm.topicAnnotations.length) + " ")]) : _vm._e()], 1)], 1)], 1)] : [_c("BcfTopicImages", { attrs: { "viewpoints": _vm.viewpointsToDisplay }, on: { "add-viewpoint": _vm.addViewpoint, "delete-viewpoint": _vm.delViewpoint } })], _c("div", { staticClass: "bcf-topic-form__content__body" }, [_c("BIMDataInput", { attrs: { "placeholder": _vm.$t("BcfComponents.BcfTopicForm.titlePlaceholder"), "error": _vm.hasErrorTitle, "errorMessage": _vm.$t("BcfComponents.BcfTopicForm.titleErrorMessage") }, on: { "keyup": function($event) {
2945
2960
  if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
2946
2961
  return null;
2947
2962
  }
@@ -2966,14 +2981,14 @@ var render$a = function() {
2966
2981
  }, expression: "topicDescription" } }), _c("BIMDataSelect", { attrs: { "width": "100%", "multi": true, "label": _vm.$t("BcfComponents.BcfTopicForm.labelsLabel"), "options": _vm.extensions.topic_label }, model: { value: _vm.topicLabels, callback: function($$v) {
2967
2982
  _vm.topicLabels = $$v;
2968
2983
  }, expression: "topicLabels" } })], 1)], 2), _c("div", { staticClass: "bcf-topic-form__footer" }, [_c("BIMDataButton", { attrs: { "disabled": !_vm.topicTitle, "width": "100%", "color": "primary", "fill": "", "radius": "" }, on: { "click": _vm.submit } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm." + (_vm.isCreation ? "createButton" : "updateButton"))) + " ")])], 1), _vm.loading ? _c("div", { staticClass: "bcf-topic-form__loader" }, [_c("BIMDataLoading")], 1) : _vm._e(), _vm.isOpenModal ? _c("BIMDataSafeZoneModal", { scopedSlots: _vm._u([{ key: "text", fn: function() {
2969
- return [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.modalText", { name: _vm.bcfTopic.title })) + " ")];
2984
+ return [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.modalText", { name: _vm.topic.title })) + " ")];
2970
2985
  }, proxy: true }, { key: "actions", fn: function() {
2971
2986
  return [_c("BIMDataButton", { staticClass: "m-r-12", attrs: { "color": "high", "fill": "", "radius": "" }, on: { "click": function($event) {
2972
2987
  return _vm.$emit("close");
2973
2988
  } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.cancelButton")) + " ")]), _c("BIMDataButton", { attrs: { "color": "primary", "outline": "", "radius": "" }, on: { "click": function($event) {
2974
2989
  _vm.isOpenModal = false;
2975
2990
  } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicForm.continueButton")) + " ")])];
2976
- }, proxy: true }], null, false, 3660211068) }) : _vm._e()], 1);
2991
+ }, proxy: true }], null, false, 4000888699) }) : _vm._e()], 1);
2977
2992
  };
2978
2993
  var staticRenderFns$a = [];
2979
2994
  var BcfTopicForm_scss_vue_type_style_index_0_from__2Fhome_2Frunner_2FactionsRunner_2F_work_2FbcfComponents_2FbcfComponents_2Fsrc_2Fcomponents_2FbcfTopicForm_2FBcfTopicForm_vue_src_scoped_true_lang = "";
@@ -2992,15 +3007,19 @@ const __vue2_script$a = {
2992
3007
  BIMDataTooltip: l$2
2993
3008
  },
2994
3009
  props: {
2995
- viewerMode: {
2996
- type: Boolean,
2997
- default: false
3010
+ uiConfig: {
3011
+ type: Object,
3012
+ default: () => ({
3013
+ viewerMode: false,
3014
+ backButton: false,
3015
+ closeButton: false
3016
+ })
2998
3017
  },
2999
- objectsEditMode: {
3018
+ objectsEditEnabled: {
3000
3019
  type: Boolean,
3001
3020
  default: false
3002
3021
  },
3003
- annotationsEditMode: {
3022
+ annotationsEditEnabled: {
3004
3023
  type: Boolean,
3005
3024
  default: false
3006
3025
  },
@@ -3012,31 +3031,32 @@ const __vue2_script$a = {
3012
3031
  type: Object,
3013
3032
  reuiqred: true
3014
3033
  },
3015
- bcfTopics: {
3034
+ topics: {
3016
3035
  type: Array,
3017
3036
  required: true
3018
3037
  },
3019
- bcfTopic: {
3038
+ topic: {
3020
3039
  type: Object
3021
3040
  },
3022
- bcfTopicModels: {
3041
+ topicModels: {
3023
3042
  type: Array,
3024
3043
  default: () => []
3025
3044
  },
3026
- bcfTopicObjects: {
3045
+ topicObjects: {
3027
3046
  type: Object
3028
3047
  },
3029
- bcfTopicAnnotations: {
3048
+ topicAnnotations: {
3030
3049
  type: Array
3031
3050
  }
3032
3051
  },
3033
3052
  emits: [
3034
- "bcf-topic-created",
3035
- "bcf-topic-updated",
3053
+ "back",
3036
3054
  "close",
3037
- "edit-annotations",
3038
- "edit-objects",
3055
+ "edit-topic-annotations",
3056
+ "edit-topic-objects",
3057
+ "topic-created",
3039
3058
  "topic-create-error",
3059
+ "topic-updated",
3040
3060
  "topic-update-error"
3041
3061
  ],
3042
3062
  setup(props, { emit }) {
@@ -3046,8 +3066,8 @@ const __vue2_script$a = {
3046
3066
  createViewpoint: createViewpoint2,
3047
3067
  deleteViewpoint: deleteViewpoint2
3048
3068
  } = useService();
3049
- const isCreation = computed(() => !props.bcfTopic);
3050
- const nextIndex = computed(() => Math.max(0, ...props.bcfTopics.map((t2) => t2.index)) + 1);
3069
+ const isCreation = computed(() => !props.topic);
3070
+ const nextIndex = computed(() => Math.max(0, ...props.topics.map((t2) => t2.index)) + 1);
3051
3071
  const topicTitle = ref("");
3052
3072
  const topicType = ref(null);
3053
3073
  const topicPriority = ref(null);
@@ -3066,7 +3086,7 @@ const __vue2_script$a = {
3066
3086
  const isOpenModal = ref(false);
3067
3087
  const hasErrorTitle = ref(false);
3068
3088
  const hasErrorDate = ref(false);
3069
- watch(() => props.bcfTopic, (topic) => {
3089
+ watch(() => props.topic, (topic) => {
3070
3090
  if (!isCreation.value) {
3071
3091
  topicTitle.value = topic.title || "";
3072
3092
  topicType.value = topic.topic_type || null;
@@ -3116,7 +3136,7 @@ const __vue2_script$a = {
3116
3136
  hasErrorTitle.value = true;
3117
3137
  return;
3118
3138
  }
3119
- if (!validate(topicDueDate.value) && topicDueDate.value !== deserialize$1(props.bcfTopic.due_date)) {
3139
+ if (topicDueDate.value !== deserialize$1(props.topic.due_date) && !validateDueDate(topicDueDate.value)) {
3120
3140
  hasErrorDate.value = true;
3121
3141
  return;
3122
3142
  }
@@ -3129,13 +3149,13 @@ const __vue2_script$a = {
3129
3149
  return ((_a2 = v1.order) != null ? _a2 : Infinity) - ((_b2 = v2.order) != null ? _b2 : Infinity);
3130
3150
  });
3131
3151
  }
3132
- if (props.bcfTopicObjects) {
3152
+ if (props.topicObjects) {
3133
3153
  if (viewpointsToUpdate.value.length > 0 || viewpointsToCreate.value.length > 0) {
3134
3154
  [
3135
3155
  ...viewpointsToUpdate.value,
3136
3156
  ...viewpointsToCreate.value
3137
3157
  ].forEach((viewpoint) => {
3138
- Object.assign(viewpoint, props.bcfTopicObjects);
3158
+ Object.assign(viewpoint, props.topicObjects);
3139
3159
  if (!viewpoint.components) {
3140
3160
  viewpoint.components = {};
3141
3161
  }
@@ -3156,19 +3176,19 @@ const __vue2_script$a = {
3156
3176
  });
3157
3177
  } else {
3158
3178
  viewpointsToCreate.value.push({
3159
- components: props.bcfTopicObjects
3179
+ components: props.topicObjects
3160
3180
  });
3161
3181
  }
3162
3182
  }
3163
- if (props.bcfTopicAnnotations) {
3183
+ if (props.topicAnnotations) {
3164
3184
  [
3165
3185
  ...viewpointsToUpdate.value,
3166
3186
  ...viewpointsToCreate.value
3167
- ].forEach((viewpoint) => viewpoint.pins = props.bcfTopicAnnotations);
3187
+ ].forEach((viewpoint) => viewpoint.pins = props.topicAnnotations);
3168
3188
  }
3169
3189
  const data = {
3170
- guid: (_a = props.bcfTopic) == null ? void 0 : _a.guid,
3171
- models: ((_b = props.bcfTopic) == null ? void 0 : _b.models) || props.models,
3190
+ guid: (_a = props.topic) == null ? void 0 : _a.guid,
3191
+ models: ((_b = props.topic) == null ? void 0 : _b.models) || props.topicModels,
3172
3192
  title: topicTitle.value,
3173
3193
  topic_type: topicType.value,
3174
3194
  priority: topicPriority.value,
@@ -3189,13 +3209,13 @@ const __vue2_script$a = {
3189
3209
  await Promise.all(viewpointsToCreate.value.map((viewpoint) => createViewpoint2(props.project, newTopic, viewpoint)));
3190
3210
  await Promise.all(viewpointsToDelete.value.map((viewpoint) => deleteViewpoint2(props.project, newTopic, viewpoint)));
3191
3211
  if (isCreation.value) {
3192
- emit("bcf-topic-created", newTopic);
3212
+ emit("topic-created", newTopic);
3193
3213
  reset();
3194
3214
  } else {
3195
- emit("bcf-topic-updated", newTopic);
3215
+ emit("topic-updated", newTopic);
3196
3216
  }
3197
3217
  } catch (error) {
3198
- emit(isCreation.value ? "topic-create-error" : "topic-update-error");
3218
+ emit(isCreation.value ? "topic-create-error" : "topic-update-error", error);
3199
3219
  } finally {
3200
3220
  loading.value = false;
3201
3221
  }
@@ -3224,7 +3244,7 @@ const __vue2_script$a = {
3224
3244
  }
3225
3245
  };
3226
3246
  const __cssModules$a = {};
3227
- var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "6cd2b994", null, null);
3247
+ var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "4f444265", null, null);
3228
3248
  function __vue2_injectStyles$a(context) {
3229
3249
  for (let o2 in __cssModules$a) {
3230
3250
  this[o2] = __cssModules$a[o2];
@@ -3273,7 +3293,7 @@ const __vue2_script$9 = {
3273
3293
  }
3274
3294
  };
3275
3295
  const __cssModules$9 = {};
3276
- var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "e5e255f0", null, null);
3296
+ var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "42c97e31", null, null);
3277
3297
  function __vue2_injectStyles$9(context) {
3278
3298
  for (let o2 in __cssModules$9) {
3279
3299
  this[o2] = __cssModules$9[o2];
@@ -3308,7 +3328,7 @@ const __vue2_script$8 = {
3308
3328
  type: Object,
3309
3329
  required: true
3310
3330
  },
3311
- bcfTopic: {
3331
+ topic: {
3312
3332
  type: Object,
3313
3333
  required: true
3314
3334
  },
@@ -3338,15 +3358,15 @@ const __vue2_script$8 = {
3338
3358
  text.value = props.comment.comment;
3339
3359
  };
3340
3360
  const submitUpdate = async () => {
3341
- if (props.comment.comment !== text.value) {
3342
- try {
3361
+ try {
3362
+ if (props.comment.comment !== text.value) {
3343
3363
  loading.value = true;
3344
- const newComment = await updateComment2(props.project, props.bcfTopic, props.comment, { comment: text.value });
3364
+ const newComment = await updateComment2(props.project, props.topic, props.comment, { comment: text.value });
3345
3365
  emit("comment-updated", newComment);
3346
- isEditing.value = false;
3347
- } finally {
3348
- loading.value = false;
3349
3366
  }
3367
+ isEditing.value = false;
3368
+ } finally {
3369
+ loading.value = false;
3350
3370
  }
3351
3371
  };
3352
3372
  const isDeleting = ref(false);
@@ -3357,7 +3377,7 @@ const __vue2_script$8 = {
3357
3377
  const submitDelete = async () => {
3358
3378
  try {
3359
3379
  loading.value = true;
3360
- await deleteComment2(props.project, props.bcfTopic, props.comment);
3380
+ await deleteComment2(props.project, props.topic, props.comment);
3361
3381
  emit("comment-deleted", props.comment);
3362
3382
  isDeleting.value = false;
3363
3383
  } finally {
@@ -3365,11 +3385,11 @@ const __vue2_script$8 = {
3365
3385
  }
3366
3386
  };
3367
3387
  return {
3368
- text,
3369
3388
  isDeleting,
3370
3389
  isEditing,
3371
3390
  loading,
3372
3391
  showMenu,
3392
+ text,
3373
3393
  cancelUpdate,
3374
3394
  closeMenu,
3375
3395
  onOpenDelete,
@@ -3381,7 +3401,7 @@ const __vue2_script$8 = {
3381
3401
  }
3382
3402
  };
3383
3403
  const __cssModules$8 = {};
3384
- var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "47f184d0", null, null);
3404
+ var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "19b40c5a", null, null);
3385
3405
  function __vue2_injectStyles$8(context) {
3386
3406
  for (let o2 in __cssModules$8) {
3387
3407
  this[o2] = __cssModules$8[o2];
@@ -3400,8 +3420,8 @@ var render$7 = function() {
3400
3420
  _vm.text = $$v;
3401
3421
  }, expression: "text" } }), _c("div", { staticClass: "flex items-center justify-end" }, [_c("BIMDataButton", { staticClass: "m-r-6", attrs: { "color": "primary", "ghost": "", "radius": "" }, on: { "click": function($event) {
3402
3422
  _vm.isOpen = false;
3403
- } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicComments.cancelButton")) + " ")]), _c("BIMDataButton", { attrs: { "color": "primary", "fill": "", "radius": "", "width": "135px" }, on: { "click": _vm.publishComment } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicComments.publishButton")) + " ")])], 1)], 1)]), _c("div", { staticClass: "bcf-topic-comments__list m-t-18" }, [_c("p", { staticClass: "color-granite" }, [_vm._v(" " + _vm._s((_vm.bcfTopic.comments ? _vm.bcfTopic.comments.length : 0) + " " + _vm.$t("BcfComponents.BcfTopicComments.commentsText")) + " ")]), _vm.bcfTopic.comments && _vm.bcfTopic.comments.length ? _c("div", _vm._l(_vm.bcfTopic.comments, function(comment) {
3404
- return _c("TopicComment", { key: comment.guid, attrs: { "project": _vm.project, "bcfTopic": _vm.bcfTopic, "comment": comment }, on: { "comment-updated": function($event) {
3423
+ } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicComments.cancelButton")) + " ")]), _c("BIMDataButton", { attrs: { "color": "primary", "fill": "", "radius": "", "width": "135px" }, on: { "click": _vm.submitComment } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicComments.publishButton")) + " ")])], 1)], 1)]), _c("div", { staticClass: "bcf-topic-comments__list m-t-18" }, [_c("p", { staticClass: "color-granite" }, [_vm._v(" " + _vm._s((_vm.topic.comments ? _vm.topic.comments.length : 0) + " " + _vm.$t("BcfComponents.BcfTopicComments.commentsText")) + " ")]), _vm.topic.comments && _vm.topic.comments.length ? _c("div", _vm._l(_vm.topic.comments, function(comment) {
3424
+ return _c("TopicComment", { key: comment.guid, attrs: { "project": _vm.project, "topic": _vm.topic, "comment": comment }, on: { "comment-updated": function($event) {
3405
3425
  return _vm.$emit("comment-updated", $event);
3406
3426
  }, "comment-deleted": function($event) {
3407
3427
  return _vm.$emit("comment-deleted", $event);
@@ -3422,7 +3442,7 @@ const __vue2_script$7 = {
3422
3442
  type: Object,
3423
3443
  required: true
3424
3444
  },
3425
- bcfTopic: {
3445
+ topic: {
3426
3446
  type: Object,
3427
3447
  required: true
3428
3448
  }
@@ -3439,10 +3459,10 @@ const __vue2_script$7 = {
3439
3459
  const input = ref(null);
3440
3460
  const text = ref("");
3441
3461
  watch(isOpen, () => setTimeout(() => isOpen.value && input.value.focus(), 50));
3442
- const publishComment = async () => {
3462
+ const submitComment = async () => {
3443
3463
  try {
3444
3464
  loading.value = true;
3445
- const newComment = await createComment2(props.project, props.bcfTopic, { comment: text.value });
3465
+ const newComment = await createComment2(props.project, props.topic, { comment: text.value });
3446
3466
  emit("comment-created", newComment);
3447
3467
  isOpen.value = false;
3448
3468
  text.value = "";
@@ -3455,12 +3475,12 @@ const __vue2_script$7 = {
3455
3475
  isOpen,
3456
3476
  loading,
3457
3477
  text,
3458
- publishComment
3478
+ submitComment
3459
3479
  };
3460
3480
  }
3461
3481
  };
3462
3482
  const __cssModules$7 = {};
3463
- var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "561aa0f8", null, null);
3483
+ var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "6a37333c", null, null);
3464
3484
  function __vue2_injectStyles$7(context) {
3465
3485
  for (let o2 in __cssModules$7) {
3466
3486
  this[o2] = __cssModules$7[o2];
@@ -3998,11 +4018,13 @@ var render$6 = function() {
3998
4018
  var _vm = this;
3999
4019
  var _h = _vm.$createElement;
4000
4020
  var _c = _vm._self._c || _h;
4001
- return _c("div", { staticClass: "bcf-topic-viewpoints", class: { empty: _vm.viewpoints.length === 0 } }, [_vm.bcfTopic.topic_status ? _c("div", { staticClass: "status-badge", style: {
4021
+ return _c("div", { staticClass: "bcf-topic-viewpoints", class: { empty: _vm.viewpoints.length === 0 } }, [_vm.topic.topic_status ? _c("div", { staticClass: "status-badge", style: {
4002
4022
  backgroundColor: "#" + _vm.statusColor,
4003
4023
  color: _vm.adjustTextColor("#" + _vm.statusColor, "#FFF", "#2F374A")
4004
- } }, [_c("BIMDataIcon", { attrs: { "name": "information", "fill": "", "color": "default" } }), _c("span", [_vm._v(_vm._s(_vm.bcfTopic.topic_status))])], 1) : _vm._e(), _vm.viewpoints.length > 0 ? [_c("BIMDataCarousel", { attrs: { "sliderPadding": 0 } }, _vm._l(_vm.viewpoints, function(viewpoint) {
4005
- return _c("div", { key: viewpoint.guid, staticClass: "snapshot-preview" }, [viewpoint.snapshot.snapshot_data ? _c("img", { attrs: { "src": viewpoint.snapshot.snapshot_data } }) : _vm._e(), viewpoint.icon ? _c("BIMDataIcon", { staticClass: "icon", attrs: { "name": viewpoint.icon, "size": "xl" } }) : _vm._e()], 1);
4024
+ } }, [_c("BIMDataIcon", { attrs: { "name": "information", "fill": "", "color": "default" } }), _c("span", [_vm._v(_vm._s(_vm.topic.topic_status))])], 1) : _vm._e(), _vm.viewpoints.length > 0 ? [_c("BIMDataCarousel", { attrs: { "sliderPadding": 0 } }, _vm._l(_vm.viewpoints, function(viewpoint) {
4025
+ return _c("div", { key: viewpoint.guid, staticClass: "snapshot-preview" }, [viewpoint.snapshot.snapshot_data ? _c("img", { attrs: { "src": viewpoint.snapshot.snapshot_data }, on: { "click": function($event) {
4026
+ return _vm.$emit("view-topic-viewpoint", viewpoint);
4027
+ } } }) : _vm._e(), viewpoint.icon ? _c("BIMDataIcon", { staticClass: "icon", attrs: { "name": viewpoint.icon, "size": "xl" } }) : _vm._e()], 1);
4006
4028
  }), 0)] : [_c("BcfTopicDefaultImage", { staticClass: "default-image" })]], 2);
4007
4029
  };
4008
4030
  var staticRenderFns$6 = [];
@@ -4018,19 +4040,22 @@ const __vue2_script$6 = {
4018
4040
  type: Object,
4019
4041
  required: true
4020
4042
  },
4021
- bcfTopic: {
4043
+ topic: {
4022
4044
  type: Object,
4023
4045
  required: true
4024
4046
  }
4025
4047
  },
4048
+ emits: [
4049
+ "view-topic-viewpoint"
4050
+ ],
4026
4051
  setup(props) {
4027
- const viewpoints = computed(() => props.bcfTopic.viewpoints.filter((viewpoint) => viewpoint.snapshot).map((viewpoint) => {
4052
+ const viewpoints = computed(() => props.topic.viewpoints.filter((viewpoint) => viewpoint.snapshot).map((viewpoint) => {
4028
4053
  var _a;
4029
4054
  return __spreadProps(__spreadValues({}, viewpoint), {
4030
4055
  icon: (_a = getViewpointConfig(viewpoint)) == null ? void 0 : _a.icon
4031
4056
  });
4032
4057
  }));
4033
- const statusColor = computed(() => getStatusColor(props.bcfTopic, props.detailedExtensions));
4058
+ const statusColor = computed(() => getStatusColor(props.topic, props.detailedExtensions));
4034
4059
  return {
4035
4060
  statusColor,
4036
4061
  viewpoints,
@@ -4039,7 +4064,7 @@ const __vue2_script$6 = {
4039
4064
  }
4040
4065
  };
4041
4066
  const __cssModules$6 = {};
4042
- var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "6ca0f1b6", null, null);
4067
+ var __component__$6 = /* @__PURE__ */ normalizeComponent(__vue2_script$6, render$6, staticRenderFns$6, false, __vue2_injectStyles$6, "e77b6dd4", null, null);
4043
4068
  function __vue2_injectStyles$6(context) {
4044
4069
  for (let o2 in __cssModules$6) {
4045
4070
  this[o2] = __cssModules$6[o2];
@@ -4052,34 +4077,36 @@ var render$5 = function() {
4052
4077
  var _vm = this;
4053
4078
  var _h = _vm.$createElement;
4054
4079
  var _c = _vm._self._c || _h;
4055
- return _c("div", { staticClass: "bcf-topic-overview" }, [_c("div", { staticClass: "bcf-topic-overview__header" }, [_vm.uiConfig.backButton ? [_c("BIMDataButton", { attrs: { "ripple": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4080
+ return _c("div", { staticClass: "bcf-topic-overview" }, [_c("div", { staticClass: "bcf-topic-overview__header" }, [_vm.uiConfig.backButton ? _c("BIMDataButton", { attrs: { "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4056
4081
  return _vm.$emit("back");
4057
- } } }, [_c("BIMDataIcon", { attrs: { "name": "arrow", "size": "xxs" } })], 1)] : _vm._e(), _c("div", { staticClass: "bcf-topic-overview__header__title" }, [_c("BIMDataTextbox", { attrs: { "maxWidth": "250px", "text": _vm.bcfTopic.title } })], 1), _c("div", { staticClass: "bcf-topic-overview__header__actions" }, [_c("BIMDataButton", { attrs: { "ripple": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4058
- return _vm.$emit("edit-bcf-topic", _vm.bcfTopic);
4059
- } } }, [_c("BIMDataIcon", { attrs: { "name": "edit", "size": "xxs" } })], 1), _c("BIMDataButton", { attrs: { "ripple": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4082
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "arrow", "size": "xxs", "fill": "", "color": "granite-light" } })], 1) : _vm._e(), _c("div", { staticClass: "bcf-topic-overview__header__title" }, [_c("BIMDataTextbox", { attrs: { "maxWidth": "250px", "text": _vm.topic.title } })], 1), _c("div", { staticClass: "bcf-topic-overview__header__actions" }, [_vm.uiConfig.editButton ? _c("BIMDataButton", { attrs: { "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4083
+ return _vm.$emit("edit-topic", _vm.topic);
4084
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "edit", "size": "xxs" } })], 1) : _vm._e(), _vm.uiConfig.deleteButton ? _c("BIMDataButton", { attrs: { "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4060
4085
  _vm.showDeleteModal = true;
4061
- } } }, [_c("BIMDataIcon", { attrs: { "name": "delete", "size": "xxs" } })], 1), _vm.uiConfig.closeButton ? [_c("BIMDataButton", { attrs: { "ripple": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4086
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "delete", "size": "xxs" } })], 1) : _vm._e(), _vm.uiConfig.closeButton ? _c("BIMDataButton", { attrs: { "ghost": "", "rounded": "", "icon": "" }, on: { "click": function($event) {
4062
4087
  return _vm.$emit("close");
4063
- } } }, [_c("BIMDataIcon", { attrs: { "name": "close", "size": "xxs", "fill": "", "color": "granite-light" } })], 1)] : _vm._e()], 2)], 2), _c("div", { staticClass: "bcf-topic-overview__content" }, [_c("div", { staticClass: "bcf-topic-overview__content__head" }, [_c("div", { staticClass: "bcf-topic-overview__content__head__index", style: {
4088
+ } } }, [_c("BIMDataIcon", { attrs: { "name": "close", "size": "xxs", "fill": "", "color": "granite-light" } })], 1) : _vm._e()], 1)], 1), _c("div", { staticClass: "bcf-topic-overview__content" }, [_c("div", { staticClass: "bcf-topic-overview__content__head" }, [_c("div", { staticClass: "bcf-topic-overview__content__head__index", style: {
4064
4089
  backgroundColor: "#" + _vm.priorityColor,
4065
4090
  color: _vm.adjustTextColor("#" + _vm.priorityColor, "#FFF", "#2F374A")
4066
- } }, [_vm._v(" " + _vm._s(_vm.bcfTopic.index) + " ")]), _c("div", { staticClass: "bcf-topic-overview__content__head__date" }, [_vm._v(" " + _vm._s(_vm.$d(_vm.bcfTopic.creation_date, "short")) + " ")])]), _c("BcfTopicViewpoints", { attrs: { "detailedExtensions": _vm.detailedExtensions, "bcfTopic": _vm.bcfTopic } }), _vm.viewerMode ? _c("BIMDataButton", { attrs: { "width": "100%", "fill": "", "radius": "", "disabled": _vm.topicObjects.length === 0 }, on: { "click": function($event) {
4067
- return _vm.$emit("view-components", _vm.bcfTopic);
4091
+ } }, [_vm._v(" " + _vm._s(_vm.topic.index) + " ")]), _c("div", { staticClass: "bcf-topic-overview__content__head__date" }, [_vm._v(" " + _vm._s(_vm.$d(_vm.topic.creation_date, "short")) + " ")])]), _c("BcfTopicViewpoints", { attrs: { "detailedExtensions": _vm.detailedExtensions, "topic": _vm.topic }, on: { "view-topic-viewpoint": function($event) {
4092
+ return _vm.$emit("view-topic-viewpoint", $event);
4093
+ } } }), _vm.uiConfig.viewerMode ? _c("BIMDataButton", { attrs: { "width": "100%", "fill": "", "radius": "", "disabled": _vm.topicObjects.length === 0 }, on: { "click": function($event) {
4094
+ return _vm.$emit("view-topic-components", _vm.topic);
4068
4095
  } } }, [_c("BIMDataIcon", { attrs: { "name": "model3d", "size": "xs", "margin": "0 6px 0 0" } }), _vm.topicObjects.length > 0 ? [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.elements", { count: _vm.topicObjects.length })) + " ")] : [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.noElements")) + " ")]], 2) : _c("BIMDataButton", { attrs: { "width": "100%", "color": "primary", "fill": "", "radius": "" }, on: { "click": function($event) {
4069
- return _vm.$emit("view-bcf-topic", _vm.bcfTopic);
4070
- } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.openViewer")) + " ")]), _c("div", { staticClass: "bcf-topic-overview__content__card" }, [!_vm.viewerMode ? _c("div", { staticClass: "title" }, [_c("BIMDataIcon", { attrs: { "name": "model3d", "size": "xs" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.elements", { count: _vm.topicObjects.length })) + " ")])], 1) : _vm._e(), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.type")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.topic_type ? _vm.bcfTopic.topic_type : _vm.$t("BcfComponents.BcfTopicOverview.noTypeSpecified")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.description")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.description ? _vm.bcfTopic.description : _vm.$t("BcfComponents.BcfTopicOverview.noDescriptionProvided")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.assignedTo")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.assigned_to ? _vm.bcfTopic.assigned_to : _vm.$t("BcfComponents.BcfTopicOverview.notAssigned")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.dueDate")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.due_date ? _vm.$d(_vm.bcfTopic.due_date, "short") : _vm.$t("BcfComponents.BcfTopicOverview.noDueDate")) + " ")])])]), _c("div", { staticClass: "bcf-topic-overview__content__card" }, [_c("div", { staticClass: "title" }, [_c("BIMDataIcon", { attrs: { "name": "bcf" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.informations")) + " ")])], 1), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.status")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.topic_status || _vm.$t("BcfComponents.BcfTopicOverview.noStatusSpecified")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.stage")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.stage || _vm.$t("BcfComponents.BcfTopicOverview.noStageProvided")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.priority")) + " ")]), _c("span", { staticClass: "value", style: { color: "#" + _vm.priorityColor } }, [_vm._v(" " + _vm._s(_vm.bcfTopic.priority || _vm.$t("BcfComponents.BcfTopicOverview.priorityNotDefined")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" Auteur : ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.creation_author) + " ")])]), _c("div", { staticClass: "line m-t-12" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.tags")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topicLabels.length ? _vm.topicLabels.join(", ") : _vm.$t("BcfComponents.BcfTopicOverview.noTags")) + " ")])])]), _c("BcfTopicComments", { attrs: { "project": _vm.project, "bcfTopic": _vm.bcfTopic }, on: { "comment-created": function($event) {
4096
+ return _vm.$emit("view-topic", _vm.topic);
4097
+ } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.openViewer")) + " ")]), _c("div", { staticClass: "bcf-topic-overview__content__card" }, [!_vm.uiConfig.viewerMode ? _c("div", { staticClass: "title" }, [_c("BIMDataIcon", { attrs: { "name": "model3d", "size": "xs" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.elements", { count: _vm.topicObjects.length })) + " ")])], 1) : _vm._e(), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.type")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topic.topic_type ? _vm.topic.topic_type : _vm.$t("BcfComponents.BcfTopicOverview.noTypeSpecified")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.description")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topic.description ? _vm.topic.description : _vm.$t("BcfComponents.BcfTopicOverview.noDescriptionProvided")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.assignedTo")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topic.assigned_to ? _vm.topic.assigned_to : _vm.$t("BcfComponents.BcfTopicOverview.notAssigned")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.dueDate")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topic.due_date ? _vm.$d(_vm.topic.due_date, "short") : _vm.$t("BcfComponents.BcfTopicOverview.noDueDate")) + " ")])])]), _c("div", { staticClass: "bcf-topic-overview__content__card" }, [_c("div", { staticClass: "title" }, [_c("BIMDataIcon", { attrs: { "name": "bcf" } }), _c("span", [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.informations")) + " ")])], 1), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.status")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topic.topic_status || _vm.$t("BcfComponents.BcfTopicOverview.noStatusSpecified")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.stage")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topic.stage || _vm.$t("BcfComponents.BcfTopicOverview.noStageProvided")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.priority")) + " ")]), _c("span", { staticClass: "value", style: { color: "#" + _vm.priorityColor } }, [_vm._v(" " + _vm._s(_vm.topic.priority || _vm.$t("BcfComponents.BcfTopicOverview.priorityNotDefined")) + " ")])]), _c("div", { staticClass: "line" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.author")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topic.creation_author) + " ")])]), _c("div", { staticClass: "line m-t-12" }, [_c("span", { staticClass: "label" }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.tags")) + " ")]), _c("span", { staticClass: "value" }, [_vm._v(" " + _vm._s(_vm.topicLabels.length ? _vm.topicLabels.join(", ") : _vm.$t("BcfComponents.BcfTopicOverview.noTags")) + " ")])])]), _c("BcfTopicComments", { attrs: { "project": _vm.project, "topic": _vm.topic }, on: { "comment-created": function($event) {
4071
4098
  return _vm.$emit("comment-created", $event);
4072
4099
  }, "comment-updated": function($event) {
4073
4100
  return _vm.$emit("comment-updated", $event);
4074
4101
  }, "comment-deleted": function($event) {
4075
4102
  return _vm.$emit("comment-deleted", $event);
4076
4103
  } } })], 1), _vm.showDeleteModal ? _c("BIMDataSafeZoneModal", { staticClass: "delete-modal", scopedSlots: _vm._u([{ key: "text", fn: function() {
4077
- return [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.deleteText", { name: _vm.bcfTopic.title })) + " ")];
4104
+ return [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.deleteText", { name: _vm.topic.title })) + " ")];
4078
4105
  }, proxy: true }, { key: "actions", fn: function() {
4079
4106
  return [_c("BIMDataButton", { staticClass: "m-r-12", attrs: { "color": "high", "fill": "", "radius": "" }, on: { "click": _vm.removeTopic } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.deleteBcfButton")) + " ")]), _c("BIMDataButton", { attrs: { "color": "primary", "outline": "", "radius": "" }, on: { "click": function($event) {
4080
4107
  _vm.showDeleteModal = false;
4081
4108
  } } }, [_vm._v(" " + _vm._s(_vm.$t("BcfComponents.BcfTopicOverview.keepBcfButton")) + " ")])];
4082
- }, proxy: true }], null, false, 2806232332) }) : _vm._e(), _vm.loading ? _c("div", [_c("BIMDataLoading")], 1) : _vm._e()], 1);
4109
+ }, proxy: true }], null, false, 3477156939) }) : _vm._e(), _vm.loading ? _c("div", [_c("BIMDataLoading")], 1) : _vm._e()], 1);
4083
4110
  };
4084
4111
  var staticRenderFns$5 = [];
4085
4112
  var BcfTopicOverview_scss_vue_type_style_index_0_from__2Fhome_2Frunner_2FactionsRunner_2F_work_2FbcfComponents_2FbcfComponents_2Fsrc_2Fcomponents_2FbcfTopicOverview_2FBcfTopicOverview_vue_src_scoped_true_lang = "";
@@ -4095,9 +4122,15 @@ const __vue2_script$5 = {
4095
4122
  BIMDataTextbox: l$3
4096
4123
  },
4097
4124
  props: {
4098
- viewerMode: {
4099
- type: Boolean,
4100
- default: false
4125
+ uiConfig: {
4126
+ type: Object,
4127
+ default: () => ({
4128
+ viewerMode: false,
4129
+ backButton: false,
4130
+ closeButton: false,
4131
+ editButton: false,
4132
+ deleteButton: false
4133
+ })
4101
4134
  },
4102
4135
  project: {
4103
4136
  type: Object,
@@ -4107,54 +4140,42 @@ const __vue2_script$5 = {
4107
4140
  type: Object,
4108
4141
  required: true
4109
4142
  },
4110
- bcfTopic: {
4143
+ topic: {
4111
4144
  type: Object,
4112
4145
  required: true
4113
- },
4114
- uiConfig: {
4115
- type: Object,
4116
- default: () => ({ backButton: false, closeButton: false })
4117
4146
  }
4118
4147
  },
4119
4148
  emits: [
4120
4149
  "back",
4121
- "bcf-topic-deleted",
4122
4150
  "close",
4123
4151
  "comment-created",
4124
4152
  "comment-deleted",
4125
4153
  "comment-updated",
4126
- "edit-bcf-topic",
4154
+ "edit-topic",
4155
+ "topic-deleted",
4127
4156
  "topic-delete-error",
4128
- "view-bcf-topic",
4129
- "view-components"
4157
+ "view-topic",
4158
+ "view-topic-components",
4159
+ "view-topic-viewpoint"
4130
4160
  ],
4131
4161
  setup(props, { emit }) {
4132
4162
  const { deleteTopic: deleteTopic2 } = useService();
4133
4163
  const loading = ref(false);
4134
4164
  const showDeleteModal = ref(false);
4135
- const priorityColor = computed(() => getPriorityColor(props.bcfTopic, props.detailedExtensions));
4165
+ const priorityColor = computed(() => getPriorityColor(props.topic, props.detailedExtensions));
4136
4166
  const topicObjects = computed(() => {
4137
- var _a, _b;
4138
- const components2 = (_b = (_a = props.bcfTopic.viewpoints) == null ? void 0 : _a[0]) == null ? void 0 : _b.components;
4139
- return (components2 == null ? void 0 : components2.selection) || [];
4140
- });
4141
- const topicLabels = computed(() => {
4142
- var _a;
4143
- if ((_a = props.bcfTopic.labels) == null ? void 0 : _a.length) {
4144
- return Array.from(props.bcfTopic.labels).sort();
4145
- } else {
4146
- return [];
4147
- }
4167
+ var _a, _b, _c;
4168
+ return ((_c = (_b = (_a = props.topic.viewpoints) == null ? void 0 : _a[0]) == null ? void 0 : _b.components) == null ? void 0 : _c.selection) || [];
4148
4169
  });
4170
+ const topicLabels = computed(() => Array.from(props.topic.labels || []).sort());
4149
4171
  const removeTopic = async () => {
4150
4172
  try {
4151
4173
  showDeleteModal.value = false;
4152
4174
  loading.value = true;
4153
- await deleteTopic2(props.project, props.bcfTopic);
4154
- emit("bcf-topic-deleted", props.bcfTopic);
4155
- emit("close");
4175
+ await deleteTopic2(props.project, props.topic);
4176
+ emit("topic-deleted", props.topic);
4156
4177
  } catch (error) {
4157
- emit("topic-delete-error");
4178
+ emit("topic-delete-error", error);
4158
4179
  } finally {
4159
4180
  loading.value = false;
4160
4181
  }
@@ -4171,7 +4192,7 @@ const __vue2_script$5 = {
4171
4192
  }
4172
4193
  };
4173
4194
  const __cssModules$5 = {};
4174
- var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "b15c7908", null, null);
4195
+ var __component__$5 = /* @__PURE__ */ normalizeComponent(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, "30237372", null, null);
4175
4196
  function __vue2_injectStyles$5(context) {
4176
4197
  for (let o2 in __cssModules$5) {
4177
4198
  this[o2] = __cssModules$5[o2];
@@ -4366,7 +4387,7 @@ var render$4 = function() {
4366
4387
  var _h = _vm.$createElement;
4367
4388
  var _c = _vm._self._c || _h;
4368
4389
  return _c("div", { staticClass: "bcf-topic-actions-cell" }, [_c("BIMDataButton", { attrs: { "color": "primary", "outline": "", "radius": "", "icon": "" }, on: { "click": function($event) {
4369
- return _vm.$emit("open-bcf-topic", _vm.bcfTopic);
4390
+ return _vm.$emit("open-topic", _vm.topic);
4370
4391
  } } }, [_c("BIMDataIcon", { attrs: { "name": "show", "size": "xs" } })], 1)], 1);
4371
4392
  };
4372
4393
  var staticRenderFns$4 = [];
@@ -4376,17 +4397,17 @@ const __vue2_script$4 = {
4376
4397
  BIMDataButton: c$5
4377
4398
  },
4378
4399
  props: {
4379
- bcfTopic: {
4400
+ topic: {
4380
4401
  type: Object,
4381
4402
  required: true
4382
4403
  }
4383
4404
  },
4384
4405
  emits: [
4385
- "open-bcf-topic"
4406
+ "open-topic"
4386
4407
  ]
4387
4408
  };
4388
4409
  const __cssModules$4 = {};
4389
- var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "490491b3", null, null);
4410
+ var __component__$4 = /* @__PURE__ */ normalizeComponent(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, "c3107ece", null, null);
4390
4411
  function __vue2_injectStyles$4(context) {
4391
4412
  for (let o2 in __cssModules$4) {
4392
4413
  this[o2] = __cssModules$4[o2];
@@ -4399,30 +4420,30 @@ var render$3 = function() {
4399
4420
  var _vm = this;
4400
4421
  var _h = _vm.$createElement;
4401
4422
  var _c = _vm._self._c || _h;
4402
- return _c("div", { staticClass: "bcf-topic-index-cell" }, [_c("span", { staticClass: "left-stripe", style: { backgroundColor: "#" + _vm.priorityColor } }), _c("span", { staticClass: "index" }, [_vm._v(" " + _vm._s(_vm.bcfTopic.index) + " ")])]);
4423
+ return _c("div", { staticClass: "bcf-topic-index-cell" }, [_c("span", { staticClass: "left-stripe", style: { backgroundColor: "#" + _vm.priorityColor } }), _c("span", { staticClass: "index" }, [_vm._v(" " + _vm._s(_vm.topic.index) + " ")])]);
4403
4424
  };
4404
4425
  var staticRenderFns$3 = [];
4405
4426
  var BcfTopicIndexCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4406
4427
  const __vue2_script$3 = {
4407
4428
  props: {
4408
- bcfTopic: {
4429
+ detailedExtensions: {
4409
4430
  type: Object,
4410
4431
  required: true
4411
4432
  },
4412
- detailedExtensions: {
4433
+ topic: {
4413
4434
  type: Object,
4414
4435
  required: true
4415
4436
  }
4416
4437
  },
4417
4438
  setup(props) {
4418
- const priorityColor = computed(() => getPriorityColor(props.bcfTopic, props.detailedExtensions));
4439
+ const priorityColor = computed(() => getPriorityColor(props.topic, props.detailedExtensions));
4419
4440
  return {
4420
4441
  priorityColor
4421
4442
  };
4422
4443
  }
4423
4444
  };
4424
4445
  const __cssModules$3 = {};
4425
- var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "73373bfa", null, null);
4446
+ var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, "6837d03b", null, null);
4426
4447
  function __vue2_injectStyles$3(context) {
4427
4448
  for (let o2 in __cssModules$3) {
4428
4449
  this[o2] = __cssModules$3[o2];
@@ -4435,30 +4456,30 @@ var render$2 = function() {
4435
4456
  var _vm = this;
4436
4457
  var _h = _vm.$createElement;
4437
4458
  var _c = _vm._self._c || _h;
4438
- return _c("span", { staticClass: "bcf-topic-priority-cell", style: { color: "#" + _vm.priorityColor } }, [_vm._v(" " + _vm._s(_vm.bcfTopic.priority || _vm.$t("BcfComponents.BcfTopicPriorityCell.noPriority")) + " ")]);
4459
+ return _c("span", { staticClass: "bcf-topic-priority-cell", style: { color: "#" + _vm.priorityColor } }, [_vm._v(" " + _vm._s(_vm.topic.priority || _vm.$t("BcfComponents.BcfTopicPriorityCell.noPriority")) + " ")]);
4439
4460
  };
4440
4461
  var staticRenderFns$2 = [];
4441
4462
  var BcfTopicPriorityCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4442
4463
  const __vue2_script$2 = {
4443
4464
  props: {
4444
- bcfTopic: {
4465
+ detailedExtensions: {
4445
4466
  type: Object,
4446
4467
  required: true
4447
4468
  },
4448
- detailedExtensions: {
4469
+ topic: {
4449
4470
  type: Object,
4450
4471
  required: true
4451
4472
  }
4452
4473
  },
4453
4474
  setup(props) {
4454
- const priorityColor = computed(() => getPriorityColor(props.bcfTopic, props.detailedExtensions));
4475
+ const priorityColor = computed(() => getPriorityColor(props.topic, props.detailedExtensions));
4455
4476
  return {
4456
4477
  priorityColor
4457
4478
  };
4458
4479
  }
4459
4480
  };
4460
4481
  const __cssModules$2 = {};
4461
- var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, "7be782b8", null, null);
4482
+ var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, "905e2396", null, null);
4462
4483
  function __vue2_injectStyles$2(context) {
4463
4484
  for (let o2 in __cssModules$2) {
4464
4485
  this[o2] = __cssModules$2[o2];
@@ -4474,23 +4495,23 @@ var render$1 = function() {
4474
4495
  return _c("span", { staticClass: "bcf-topic-status-cell", style: {
4475
4496
  backgroundColor: "#" + _vm.statusColor,
4476
4497
  color: _vm.adjustTextColor(_vm.statusColor, "#ffffff", "var(--color-text)")
4477
- } }, [_vm._v(" " + _vm._s(_vm.bcfTopic.topic_status) + " ")]);
4498
+ } }, [_vm._v(" " + _vm._s(_vm.topic.topic_status) + " ")]);
4478
4499
  };
4479
4500
  var staticRenderFns$1 = [];
4480
4501
  var BcfTopicStatusCell_vue_vue_type_style_index_0_scoped_true_lang = "";
4481
4502
  const __vue2_script$1 = {
4482
4503
  props: {
4483
- bcfTopic: {
4504
+ detailedExtensions: {
4484
4505
  type: Object,
4485
4506
  required: true
4486
4507
  },
4487
- detailedExtensions: {
4508
+ topic: {
4488
4509
  type: Object,
4489
4510
  required: true
4490
4511
  }
4491
4512
  },
4492
4513
  setup(props) {
4493
- const statusColor = computed(() => getStatusColor(props.bcfTopic, props.detailedExtensions));
4514
+ const statusColor = computed(() => getStatusColor(props.topic, props.detailedExtensions));
4494
4515
  return {
4495
4516
  statusColor,
4496
4517
  adjustTextColor
@@ -4498,7 +4519,7 @@ const __vue2_script$1 = {
4498
4519
  }
4499
4520
  };
4500
4521
  const __cssModules$1 = {};
4501
- var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "a51b4af6", null, null);
4522
+ var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "16e3da68", null, null);
4502
4523
  function __vue2_injectStyles$1(context) {
4503
4524
  for (let o2 in __cssModules$1) {
4504
4525
  this[o2] = __cssModules$1[o2];
@@ -4513,30 +4534,30 @@ var render = function() {
4513
4534
  var _c = _vm._self._c || _h;
4514
4535
  return _c("BIMDataTable", { staticClass: "bcf-topics-table", attrs: { "tableLayout": "fixed", "columns": _vm.displayedColumns.map(function(col) {
4515
4536
  return Object.assign({}, col, { label: col.label || _vm.$t("BcfComponents.BcfTopicsTable.headers." + col.id) });
4516
- }), "rows": _vm.bcfTopics, "rowKey": "guid", "paginated": _vm.paginated, "perPage": _vm.perPage, "rowHeight": 42 }, scopedSlots: _vm._u([{ key: "cell-index", fn: function(ref2) {
4517
- var bcfTopic = ref2.row;
4518
- return [_c("BcfTopicIndexCell", { attrs: { "bcfTopic": bcfTopic, "detailedExtensions": _vm.detailedExtensions } })];
4537
+ }), "rows": _vm.topics, "rowKey": "guid", "paginated": _vm.paginated, "perPage": _vm.perPage, "rowHeight": 42 }, scopedSlots: _vm._u([{ key: "cell-index", fn: function(ref2) {
4538
+ var topic = ref2.row;
4539
+ return [_c("BcfTopicIndexCell", { attrs: { "detailedExtensions": _vm.detailedExtensions, "topic": topic } })];
4519
4540
  } }, { key: "cell-priority", fn: function(ref2) {
4520
- var bcfTopic = ref2.row;
4521
- return [_c("BcfTopicPriorityCell", { attrs: { "bcfTopic": bcfTopic, "detailedExtensions": _vm.detailedExtensions } })];
4541
+ var topic = ref2.row;
4542
+ return [_c("BcfTopicPriorityCell", { attrs: { "detailedExtensions": _vm.detailedExtensions, "topic": topic } })];
4522
4543
  } }, { key: "cell-status", fn: function(ref2) {
4523
- var bcfTopic = ref2.row;
4524
- return [bcfTopic.topic_status ? _c("BcfTopicStatusCell", { attrs: { "bcfTopic": bcfTopic, "detailedExtensions": _vm.detailedExtensions } }) : _vm._e()];
4544
+ var topic = ref2.row;
4545
+ return [topic.topic_status ? _c("BcfTopicStatusCell", { attrs: { "detailedExtensions": _vm.detailedExtensions, "topic": topic } }) : _vm._e()];
4525
4546
  } }, { key: "cell-title", fn: function(ref2) {
4526
- var bcfTopic = ref2.row;
4527
- return [_c("BIMDataTextbox", { attrs: { "maxWidth": "100%", "text": bcfTopic.title } })];
4547
+ var topic = ref2.row;
4548
+ return [_c("BIMDataTextbox", { attrs: { "maxWidth": "100%", "text": topic.title } })];
4528
4549
  } }, { key: "cell-creator", fn: function(ref2) {
4529
4550
  var ref_row = ref2.row;
4530
4551
  var creator = ref_row.creator;
4531
4552
  var creation_author = ref_row.creation_author;
4532
4553
  return [_c("BIMDataTooltip", { attrs: { "text": creation_author } }, [_c("UserAvatar", { staticStyle: { "margin": "auto" }, attrs: { "user": creator || {}, "size": 30, "color": "silver-light" } })], 1)];
4533
4554
  } }, { key: "cell-date", fn: function(ref2) {
4534
- var bcfTopic = ref2.row;
4535
- return [_vm._v(" " + _vm._s(_vm.deserializeShort(bcfTopic.creation_date)) + " ")];
4555
+ var topic = ref2.row;
4556
+ return [_vm._v(" " + _vm._s(_vm.deserializeShort(topic.creation_date)) + " ")];
4536
4557
  } }, { key: "cell-actions", fn: function(ref2) {
4537
- var bcfTopic = ref2.row;
4538
- return [_c("BcfTopicActionsCell", { attrs: { "bcfTopic": bcfTopic }, on: { "open-bcf-topic": function($event) {
4539
- return _vm.$emit("open-bcf-topic", $event);
4558
+ var topic = ref2.row;
4559
+ return [_c("BcfTopicActionsCell", { attrs: { "topic": topic }, on: { "open-topic": function($event) {
4560
+ return _vm.$emit("open-topic", $event);
4540
4561
  } } })];
4541
4562
  } }]) });
4542
4563
  };
@@ -4553,14 +4574,14 @@ const __vue2_script = {
4553
4574
  UserAvatar
4554
4575
  },
4555
4576
  props: {
4556
- bcfTopics: {
4557
- type: Array,
4558
- required: true
4559
- },
4560
4577
  detailedExtensions: {
4561
4578
  type: Object,
4562
4579
  required: true
4563
4580
  },
4581
+ topics: {
4582
+ type: Array,
4583
+ required: true
4584
+ },
4564
4585
  paginated: {
4565
4586
  type: Boolean,
4566
4587
  default: false
@@ -4574,7 +4595,7 @@ const __vue2_script = {
4574
4595
  }
4575
4596
  },
4576
4597
  emits: [
4577
- "open-bcf-topic"
4598
+ "open-topic"
4578
4599
  ],
4579
4600
  setup(props) {
4580
4601
  const displayedColumns = computed(() => props.columns && props.columns.length > 0 ? columnsDef.filter((c2) => props.columns.includes(c2.id)) : columnsDef);