@processmaker/modeler 1.43.6 → 1.43.8

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.43.6",
3
+ "version": "1.43.8",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve --mode development",
6
6
  "test:unit": "vue-cli-service test:unit",
@@ -40,8 +40,8 @@
40
40
  "@babel/plugin-proposal-private-methods": "^7.12.1",
41
41
  "@fortawesome/fontawesome-free": "^5.11.2",
42
42
  "@fortawesome/fontawesome-svg-core": "^1.2.25",
43
- "@fortawesome/free-solid-svg-icons": "^5.11.2",
44
43
  "@fortawesome/free-brands-svg-icons": "^6.4.2",
44
+ "@fortawesome/free-solid-svg-icons": "^5.11.2",
45
45
  "@fortawesome/vue-fontawesome": "^0.1.8",
46
46
  "@processmaker/screen-builder": "2.70.0",
47
47
  "@processmaker/vue-form-elements": "0.45.0",
@@ -78,7 +78,7 @@
78
78
  "devDependencies": {
79
79
  "@babel/core": "^7.12.16",
80
80
  "@babel/eslint-parser": "^7.12.16",
81
- "@cypress/code-coverage": "^3.11.0",
81
+ "@cypress/code-coverage": "^3.12.10",
82
82
  "@faker-js/faker": "^8.1.0",
83
83
  "@panter/vue-i18next": "^0.15.2",
84
84
  "@processmaker/processmaker-bpmn-moddle": "0.14.1",
@@ -99,9 +99,9 @@
99
99
  "bpmnlint-loader": "^0.1.4",
100
100
  "circular-dependency-plugin": "^5.2.2",
101
101
  "copy-webpack-plugin": "^5.1.1",
102
- "cypress": "10.11.0",
102
+ "cypress": "^13.5.1",
103
103
  "eslint": "^7.32.0",
104
- "eslint-plugin-cypress": "^2.12.1",
104
+ "eslint-plugin-cypress": "^2.15.1",
105
105
  "eslint-plugin-jest": "^27.2.3",
106
106
  "eslint-plugin-vue": "^8.0.3",
107
107
  "husky": "^4.3.5",
@@ -3,6 +3,8 @@
3
3
  <button
4
4
  id="aiAssetButton"
5
5
  :class="['btn py-0 px-2 ai-btn', showPopover ? 'ai-btn-open' : 'ai-btn-closed']"
6
+ :title="$t('AI Asset Generator')"
7
+ v-b-tooltip.hover.viewport.d50="{ customClass: 'no-pointer-events' }"
6
8
  @click="showPopover = !showPopover"
7
9
  >
8
10
  <inline-svg :src="proceC2Icon" class="my-auto ai-icon" />
@@ -46,6 +48,7 @@ export default {
46
48
  },
47
49
  methods: {
48
50
  onGenerateAssets() {
51
+ this.showPopover = false;
49
52
  this.$emit('onGenerateAssets');
50
53
  },
51
54
  },
@@ -1907,6 +1907,9 @@ export default {
1907
1907
  generateAssets() {
1908
1908
  this.getNonce();
1909
1909
 
1910
+ // Show Generating message
1911
+ this.loadingAI = true;
1912
+
1910
1913
  this.fetchHistory();
1911
1914
 
1912
1915
  const params = {
@@ -1918,8 +1921,12 @@ export default {
1918
1921
  const url = '/package-ai/generateProcessArtifacts';
1919
1922
 
1920
1923
  window.ProcessMaker.apiClient.post(url, params)
1921
- .then(() => {
1922
- // Response
1924
+ .then((response) => {
1925
+ if (response.data) {
1926
+ if (response.data?.error) {
1927
+ this.assetFail = true;
1928
+ }
1929
+ }
1923
1930
  })
1924
1931
  .catch((error) => {
1925
1932
  const errorMsg = error.response?.data?.message || error.message;
@@ -1994,6 +2001,17 @@ export default {
1994
2001
  },
1995
2002
  );
1996
2003
  },
2004
+ subscribeToErrors() {
2005
+ const channel = `ProcessMaker.Models.User.${window.ProcessMaker?.modeler?.process?.user_id}`;
2006
+ const streamProgressEvent = '.ProcessMaker\\Package\\PackageAi\\Events\\GenerateArtifactsErrorEvent';
2007
+ window.Echo.private(channel).listen(
2008
+ streamProgressEvent,
2009
+ () => {
2010
+ // Output error
2011
+ this.assetFail = true;
2012
+ },
2013
+ );
2014
+ },
1997
2015
  onStopAssetGeneration() {
1998
2016
  if (this.currentNonce) {
1999
2017
  this.cancelledJobs.push(this.currentNonce);
@@ -2203,6 +2221,7 @@ export default {
2203
2221
  this.promptSessionId = this.getPromptSessionForUser();
2204
2222
  this.fetchHistory();
2205
2223
  this.subscribeToProgress();
2224
+ this.subscribeToErrors();
2206
2225
  },
2207
2226
  };
2208
2227
  </script>