@processmaker/modeler 1.49.0 → 1.51.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/modeler",
3
- "version": "1.49.0",
3
+ "version": "1.51.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve --mode development",
6
6
  "test:unit": "vue-cli-service test:unit",
@@ -43,8 +43,8 @@
43
43
  "@fortawesome/free-brands-svg-icons": "^6.4.2",
44
44
  "@fortawesome/free-solid-svg-icons": "^5.11.2",
45
45
  "@fortawesome/vue-fontawesome": "^0.1.8",
46
- "@processmaker/screen-builder": "2.87.0",
47
- "@processmaker/vue-form-elements": "0.53.0",
46
+ "@processmaker/screen-builder": "2.89.0",
47
+ "@processmaker/vue-form-elements": "0.55.0",
48
48
  "@processmaker/vue-multiselect": "2.3.0",
49
49
  "bootstrap": "^4.3.1",
50
50
  "bootstrap-vue": "^2.0.4",
@@ -81,7 +81,7 @@
81
81
  "@cypress/code-coverage": "^3.12.10",
82
82
  "@faker-js/faker": "^8.1.0",
83
83
  "@panter/vue-i18next": "^0.15.2",
84
- "@processmaker/processmaker-bpmn-moddle": "0.15.0",
84
+ "@processmaker/processmaker-bpmn-moddle": "0.16.0",
85
85
  "@types/jest": "^24.9.1",
86
86
  "@vue/babel-preset-app": "^5.0.4",
87
87
  "@vue/cli-plugin-babel": "~5.0.0",
@@ -9391,6 +9391,12 @@ const vG = fG.exports, dG = Rc(), WL = 100, mG = {
9391
9391
  countWithoutFilter: null
9392
9392
  };
9393
9393
  },
9394
+ mounted() {
9395
+ this.$root.$on("selectListOptionsUpdated", this.onSelectListOptionsUpdated);
9396
+ },
9397
+ beforeDestroy() {
9398
+ this.$root.$off("selectListOptionsUpdated", this.onSelectListOptionsUpdated);
9399
+ },
9394
9400
  computed: {
9395
9401
  selectListOptionsWithSelected() {
9396
9402
  return this.selectedOption && !this.selectListOptions.some((O) => O.value === this.selectedOption.value) ? [this.selectedOption, ...this.selectListOptions] : this.selectListOptions;
@@ -9464,9 +9470,38 @@ const vG = fG.exports, dG = Rc(), WL = 100, mG = {
9464
9470
  handler() {
9465
9471
  this.isCollection && this.value && !this.selectListOptions.some((O) => O.value === this.value) && this.loadIndividualRecord();
9466
9472
  }
9473
+ },
9474
+ value: {
9475
+ deep: !0,
9476
+ handler(O) {
9477
+ O && typeof O == "object" && this.isMultiSelectDisabled() && this.updateOption(O);
9478
+ }
9467
9479
  }
9468
9480
  },
9469
9481
  methods: {
9482
+ /**
9483
+ * Checks if multi-select is disabled.
9484
+ *
9485
+ * @return {boolean} Returns true if multi-select is disabled, false otherwise.
9486
+ */
9487
+ isMultiSelectDisabled() {
9488
+ return this.options.allowMultiSelect === !1;
9489
+ },
9490
+ /**
9491
+ * Updates the specified option with the provided updated value.
9492
+ *
9493
+ * @param {Object} updatedValue - The updated value of the option.
9494
+ */
9495
+ updateOption(O) {
9496
+ const g = this.selectListOptions.findIndex((w) => w.id === O.id);
9497
+ g !== -1 && this.$set(this.selectListOptions, g, O);
9498
+ },
9499
+ /**
9500
+ * If the value is an object, it updates the selected option if necessary.
9501
+ */
9502
+ onSelectListOptionsUpdated() {
9503
+ this.value && typeof this.value == "object" && this.isMultiSelectDisabled() && this.updateOption(this.value);
9504
+ },
9470
9505
  renderPmql(O) {
9471
9506
  if (typeof O < "u" && O !== "" && O !== null) {
9472
9507
  const g = this.makeProxyData();
@@ -9504,7 +9539,7 @@ const vG = fG.exports, dG = Rc(), WL = 100, mG = {
9504
9539
  w,
9505
9540
  Z
9506
9541
  ), Ot = $ ? vn.get(ze.data, $) : ze.data, Tt = this.transformOptions(Ot);
9507
- return this.$root.$emit("selectListOptionsUpdated", Tt), this.selectListOptions = Tt, !0;
9542
+ return this.selectListOptions = Tt, this.$root.$emit("selectListOptionsUpdated", Tt), !0;
9508
9543
  } catch (ze) {
9509
9544
  return console.warn(ze), !1;
9510
9545
  }