@processmaker/screen-builder 2.99.3 → 3.0.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.
Files changed (48) hide show
  1. package/dist/vue-form-builder.css +1 -1
  2. package/dist/vue-form-builder.es.js +9091 -7132
  3. package/dist/vue-form-builder.es.js.map +1 -1
  4. package/dist/vue-form-builder.umd.js +53 -53
  5. package/dist/vue-form-builder.umd.js.map +1 -1
  6. package/package.json +2 -1
  7. package/src/App.vue +14 -2
  8. package/src/DataProvider.js +42 -1
  9. package/src/VariableDataTypeProperties.js +1 -1
  10. package/src/components/ClipboardButton.vue +77 -0
  11. package/src/components/CssIcon.vue +21 -0
  12. package/src/components/ScreenTemplateCard.vue +257 -0
  13. package/src/components/ScreenTemplates.vue +216 -0
  14. package/src/components/ScreenToolbar.vue +24 -2
  15. package/src/components/SelectUserGroup.vue +274 -0
  16. package/src/components/TabsBar.vue +47 -1
  17. package/src/components/accordions.js +7 -1
  18. package/src/components/editor/loop.vue +22 -1
  19. package/src/components/editor/multi-column.vue +22 -2
  20. package/src/components/editor/pagesDropdown.vue +20 -2
  21. package/src/components/index.js +7 -1
  22. package/src/components/inspector/collection-data-source.vue +200 -0
  23. package/src/components/inspector/collection-display-mode.vue +87 -0
  24. package/src/components/inspector/collection-records-list.vue +156 -0
  25. package/src/components/inspector/column-setup.vue +123 -7
  26. package/src/components/inspector/encrypted-config.vue +78 -0
  27. package/src/components/inspector/index.js +4 -0
  28. package/src/components/inspector/page-select.vue +1 -0
  29. package/src/components/renderer/file-upload.vue +136 -3
  30. package/src/components/renderer/form-collection-record-control.vue +248 -0
  31. package/src/components/renderer/form-collection-view-control.vue +236 -0
  32. package/src/components/renderer/form-masked-input.vue +194 -9
  33. package/src/components/renderer/form-record-list.vue +271 -69
  34. package/src/components/renderer/index.js +2 -0
  35. package/src/components/screen-renderer.vue +2 -0
  36. package/src/components/task.vue +2 -1
  37. package/src/components/vue-form-builder.vue +156 -22
  38. package/src/components/vue-form-renderer.vue +10 -2
  39. package/src/form-builder-controls.js +168 -21
  40. package/src/global-properties.js +8 -0
  41. package/src/main.js +60 -1
  42. package/src/mixins/Clipboard.js +153 -0
  43. package/src/mixins/ScreenBase.js +7 -1
  44. package/src/mixins/index.js +1 -0
  45. package/src/store/modules/ClipboardManager.js +79 -0
  46. package/src/store/modules/clipboardModule.js +210 -0
  47. package/src/stories/ClipboardButton.stories.js +66 -0
  48. package/src/stories/PagesDropdown.stories.js +11 -8
@@ -11,6 +11,8 @@ import FileUpload from './components/renderer/file-upload';
11
11
  import FileDownload from './components/renderer/file-download';
12
12
  import FormListTable from './components/renderer/form-list-table';
13
13
  import FormAnalyticsChart from "./components/renderer/form-analytics-chart";
14
+ import FormCollectionRecordControl from './components/renderer/form-collection-record-control.vue';
15
+ import FormCollectionViewControl from './components/renderer/form-collection-view-control.vue';
14
16
  import {DataTypeProperty, DataFormatProperty, DataTypeDateTimeProperty} from './VariableDataTypeProperties';
15
17
  import {
16
18
  FormInput,
@@ -43,7 +45,7 @@ import {
43
45
  buttonTypeEvent,
44
46
  tooltipProperty,
45
47
  LoadingSubmitButtonProperty,
46
- LabelSubmitButtonProperty
48
+ LabelSubmitButtonProperty,
47
49
  } from './form-control-common-properties';
48
50
 
49
51
  export default [
@@ -54,7 +56,7 @@ export default [
54
56
  rendererBinding: 'FormHtmlEditor',
55
57
  control: {
56
58
  popoverContent: "Use a Rich Text Editor to add HTML-formatted",
57
- order: 1.0,
59
+ order: 2.0,
58
60
  group: 'Content Fields',
59
61
  label: 'Rich Text',
60
62
  component: 'FormHtmlViewer',
@@ -96,7 +98,7 @@ export default [
96
98
  rendererBinding: 'FormMaskedInput',
97
99
  control: {
98
100
  popoverContent: "Collect a string of text and format it as one of several data types",
99
- order: 1.0,
101
+ order: 2.0,
100
102
  group: 'Input Fields',
101
103
  label: 'Line Input',
102
104
  component: 'FormInput',
@@ -127,6 +129,7 @@ export default [
127
129
  ],
128
130
  },
129
131
  },
132
+
130
133
  {
131
134
  editorComponent: FormTextArea,
132
135
  editorBinding: 'FormTextArea',
@@ -134,7 +137,7 @@ export default [
134
137
  rendererBinding: 'FormTextArea',
135
138
  control: {
136
139
  popoverContent: "Collect a multi-line string of text, to allow for extensive, richly formatted responses",
137
- order: 4.0,
140
+ order: 5.0,
138
141
  group: 'Input Fields',
139
142
  label: 'Textarea',
140
143
  component: 'FormTextArea',
@@ -192,7 +195,7 @@ export default [
192
195
  rendererBinding: 'FormSelectList',
193
196
  control: {
194
197
  popoverContent: "Collect options from a list, as radio butttons or dropdowns",
195
- order: 2.0,
198
+ order: 3.0,
196
199
  group: 'Input Fields',
197
200
  label: 'Select List',
198
201
  component: 'FormSelectList',
@@ -247,7 +250,7 @@ export default [
247
250
  rendererBinding: 'FormCheckbox',
248
251
  control: {
249
252
  popoverContent: "Add a checkbox or toggle for true/false responses",
250
- order: 6.0,
253
+ order: 7.0,
251
254
  group: 'Input Fields',
252
255
  label: 'Checkbox',
253
256
  component: 'FormCheckbox',
@@ -289,7 +292,7 @@ export default [
289
292
  rendererBinding: 'FormDatePicker',
290
293
  control: {
291
294
  popoverContent: "Collect a date or date/time",
292
- order: 5.0,
295
+ order: 6.0,
293
296
  group: 'Input Fields',
294
297
  label: 'Date Picker',
295
298
  component: 'FormDatePicker',
@@ -343,7 +346,7 @@ export default [
343
346
  rendererBinding: 'FormButton',
344
347
  control: {
345
348
  popoverContent: "Add special buttons that link between subpages within this Form",
346
- order: 1.0,
349
+ order: 2.0,
347
350
  group: 'Navigation',
348
351
  label: 'Page Navigation',
349
352
  component: 'FormButton',
@@ -378,7 +381,7 @@ export default [
378
381
  rendererBinding: 'FormMultiColumn',
379
382
  control: {
380
383
  popoverContent: "Organize and group your content in columns",
381
- order: 2.0,
384
+ order: 3.0,
382
385
  group: 'Content Fields',
383
386
  label: 'Multicolumn / Table',
384
387
  component: 'FormMultiColumn',
@@ -423,7 +426,7 @@ export default [
423
426
  rendererBinding: 'FormLoop',
424
427
  control: {
425
428
  popoverContent: "Add a repeatable section of content",
426
- order: 5.0,
429
+ order: 6.0,
427
430
  group: 'Content Fields',
428
431
  label: 'Loop',
429
432
  component: 'FormLoop',
@@ -459,7 +462,7 @@ export default [
459
462
  rendererBinding: 'FormRecordList',
460
463
  control: {
461
464
  popoverContent: "Format content in a table structure and allow for adding rows",
462
- order: 4.0,
465
+ order: 5.0,
463
466
  group: 'Content Fields',
464
467
  label: 'Record List',
465
468
  component: 'FormRecordList',
@@ -486,6 +489,14 @@ export default [
486
489
  helper: 'The label describes this record list',
487
490
  },
488
491
  },
492
+ {
493
+ type: 'collectionDataSource',
494
+ field: 'source',
495
+ config: {
496
+ label: 'Source of Record List',
497
+ helper: 'A record list can display the data of a defined variable or a collection'
498
+ }
499
+ },
489
500
  {
490
501
  type: 'FormCheckbox',
491
502
  field: 'editable',
@@ -493,6 +504,7 @@ export default [
493
504
  label: 'Editable?',
494
505
  helper: 'Should records be editable/removable and can new records be added',
495
506
  },
507
+ if: 'hideControl'
496
508
  },
497
509
  {
498
510
  type: 'ColumnSetup',
@@ -502,6 +514,40 @@ export default [
502
514
  helper: 'List of columns to display in the record list',
503
515
  },
504
516
  },
517
+ {
518
+ type: 'FormMultiselect',
519
+ field: 'paginationOption',
520
+ config: {
521
+ icon: 'fas',
522
+ label: 'Pagination',
523
+ options: [
524
+ {
525
+ content:'No Pagination (show all)' ,
526
+ value: 0,
527
+ },
528
+ {
529
+ content: '5 items per page',
530
+ value: 5,
531
+ },
532
+ {
533
+ content: '10 items per page',
534
+ value: 10,
535
+ },
536
+ {
537
+ content: '15 items per page',
538
+ value: 15,
539
+ },
540
+ {
541
+ content: '25 items per page',
542
+ value: 25,
543
+ },
544
+ {
545
+ content: '50 items per page',
546
+ value: 50,
547
+ },
548
+ ],
549
+ },
550
+ },
505
551
  {
506
552
  type: 'PageSelect',
507
553
  field: 'form',
@@ -509,6 +555,7 @@ export default [
509
555
  label: 'Record Form',
510
556
  helper: 'The form to use for adding/editing records',
511
557
  },
558
+ if: 'hideControl'
512
559
  },
513
560
  colorProperty,
514
561
  bgcolorProperty,
@@ -522,7 +569,7 @@ export default [
522
569
  rendererBinding: 'FormImage',
523
570
  control: {
524
571
  popoverContent: "Upload an image to your screen",
525
- order: 3.0,
572
+ order: 4.0,
526
573
  group: 'Content Fields',
527
574
  label: 'Image',
528
575
  component: 'FormImage',
@@ -589,7 +636,7 @@ export default [
589
636
  rendererBinding: 'FormAvatar',
590
637
  control: {
591
638
  popoverContent: "User avatar",
592
- order: 3.0,
639
+ order: 4.0,
593
640
  group: 'Dashboards',
594
641
  label: 'User Avatar',
595
642
  component: 'FormAvatar',
@@ -633,7 +680,7 @@ export default [
633
680
  rendererBinding: 'FormButton',
634
681
  control: {
635
682
  popoverContent: "Add an action to submit your form or update a field",
636
- order: 3.0,
683
+ order: 4.0,
637
684
  group: 'Input Fields',
638
685
  label: 'Submit Button',
639
686
  component: 'FormButton',
@@ -694,7 +741,7 @@ export default [
694
741
  rendererBinding: 'FormNestedScreen',
695
742
  control: {
696
743
  popoverContent: "Add and reuse another Form within this Form",
697
- order: 6.0,
744
+ order: 7.0,
698
745
  group: 'Content Fields',
699
746
  label: 'Nested Screen',
700
747
  component: 'FormNestedScreen',
@@ -729,7 +776,7 @@ export default [
729
776
  control: {
730
777
  group: "Files",
731
778
  popoverContent: "Collect files uploaded into the Form",
732
- order: 1.0,
779
+ order: 2.0,
733
780
  label: 'File Upload',
734
781
  component: 'FileUpload',
735
782
  'editor-component': 'FileUpload',
@@ -781,7 +828,7 @@ export default [
781
828
  builderBinding: 'FileDownload',
782
829
  control: {
783
830
  popoverContent: "Offer a File download",
784
- order: 2.0,
831
+ order: 3.0,
785
832
  group: "Files",
786
833
  label: 'File Download',
787
834
  component: 'FileDownload',
@@ -817,7 +864,7 @@ export default [
817
864
  builderBinding: 'BFormComponent',
818
865
  control: {
819
866
  popoverContent: "Add one of several Bootstrap Vue components",
820
- order: 1.0,
867
+ order: 2.0,
821
868
  group: 'Advanced',
822
869
  label: 'Bootstrap Component',
823
870
  component: 'BFormComponent',
@@ -871,7 +918,7 @@ export default [
871
918
  builderBinding: 'BWrapperComponent',
872
919
  control: {
873
920
  popoverContent: "Wrap an existing subpage within this Form into a Bootstrap Vue component",
874
- order: 2.0,
921
+ order: 3.0,
875
922
  group: 'Advanced',
876
923
  label: 'Bootstrap Wrapper',
877
924
  component: 'BWrapperComponent',
@@ -970,7 +1017,7 @@ export default [
970
1017
  rendererBinding: "FormAnalyticsChart",
971
1018
  control: {
972
1019
  popoverContent: "Add a chart from the Analytics Reports",
973
- order: 6.0,
1020
+ order: 7.0,
974
1021
  group: 'Dashboards',
975
1022
  label: "Analytics Chart",
976
1023
  component: "FormAnalyticsChart",
@@ -1001,7 +1048,7 @@ export default [
1001
1048
  control: {
1002
1049
  popoverContent: "Add a URL where this link should redirect",
1003
1050
  group: 'Content Fields',
1004
- order: 6.0,
1051
+ order: 7.0,
1005
1052
  label: "Link URL",
1006
1053
  component: "LinkButton",
1007
1054
  "editor-component": "LinkButton",
@@ -1032,5 +1079,105 @@ export default [
1032
1079
  buttonVariantStyleProperty
1033
1080
  ]
1034
1081
  }
1082
+ },
1083
+ {
1084
+ control: {
1085
+ popoverContent: "Drag and paste copied elements to your desired location.",
1086
+ order: 1.0,
1087
+ group: 'Clipboard',
1088
+ label: 'Drag & Paste',
1089
+ component: "Clipboard",
1090
+ config: {
1091
+ icon: 'fa fa-clipboard',
1092
+ },
1093
+ inspector: [],
1094
+ },
1095
+ },
1096
+ {
1097
+ editorComponent: FormCollectionRecordControl,
1098
+ editorBinding: 'FormCollectionRecordControl',
1099
+ rendererComponent: FormCollectionRecordControl,
1100
+ rendererBinding: 'FormCollectionRecordControl',
1101
+ control: {
1102
+ popoverContent: "Create a Collection Record Control",
1103
+ order: 7.0,
1104
+ group: 'Content Fields',
1105
+ label: 'Collection Record Control',
1106
+ component: 'FormCollectionRecordControl',
1107
+ 'editor-component': 'FormCollectionRecordControl',
1108
+ 'editor-control': 'FormCollectionRecordControl',
1109
+ config: {
1110
+ name: 'Collection Record Control',
1111
+ icon: 'fas fa-database',
1112
+ label: 'Collection Record Control',
1113
+ },
1114
+ inspector: [
1115
+ {
1116
+ type: "collectionRecordsList",
1117
+ field: "collection",
1118
+ config: {
1119
+ label: 'Collection Name',
1120
+ helper: 'Select a collection',
1121
+ value: '',
1122
+ }
1123
+ },
1124
+ {
1125
+ type: 'FormInput',
1126
+ field: 'record',
1127
+ config: {
1128
+ label: 'Record ID',
1129
+ helper: 'Supports Mustache Variable and the Collection Record',
1130
+ value: '',
1131
+ },
1132
+ },
1133
+ {
1134
+ type: "collectionDisplayMode",
1135
+ field: "collectionmode",
1136
+ config: {
1137
+ label: "Mode",
1138
+ }
1139
+ },
1140
+ ],
1141
+ },
1142
+ },
1143
+ {
1144
+ editorComponent: FormCollectionViewControl,
1145
+ editorBinding: 'FormCollectionViewControl',
1146
+ rendererComponent: FormCollectionViewControl,
1147
+ rendererBinding: 'FormCollectionViewControl',
1148
+ control: {
1149
+ popoverContent: "Create a Collection View Control",
1150
+ order: 7.0,
1151
+ group: 'Content Fields',
1152
+ label: 'Collection Record View',
1153
+ component: 'FormCollectionViewControl',
1154
+ 'editor-component': 'FormCollectionViewControl',
1155
+ 'editor-control': 'FormCollectionViewControl',
1156
+ config: {
1157
+ name: 'Collection View Control',
1158
+ icon: 'fas fa-database',
1159
+ label: 'Collection View Control',
1160
+ },
1161
+ inspector: [
1162
+ {
1163
+ type: "collectionRecordsList",
1164
+ field: "collection",
1165
+ config: {
1166
+ label: 'Collection Name',
1167
+ helper: 'Select a collection',
1168
+ value: '',
1169
+ }
1170
+ },
1171
+ {
1172
+ type: 'FormInput',
1173
+ field: 'record',
1174
+ config: {
1175
+ label: 'Record ID',
1176
+ helper: 'Supports Mustache Variable and the Collection Record',
1177
+ value: '',
1178
+ },
1179
+ }
1180
+ ],
1181
+ },
1035
1182
  }
1036
1183
  ];
@@ -57,6 +57,14 @@ export default [
57
57
  validation: 'regex: [0-9]*',
58
58
  },
59
59
  },
60
+ {
61
+ type: 'EncryptedConfig',
62
+ field: 'encryptedConfig',
63
+ config: {
64
+ label: 'Encrypted',
65
+ helper: '',
66
+ },
67
+ },
60
68
  ],
61
69
  },
62
70
  ];
package/src/main.js CHANGED
@@ -15,6 +15,7 @@ import { LRUCache } from "lru-cache";
15
15
  import VueFormElements from "@processmaker/vue-form-elements";
16
16
  import undoRedoModule from "@/store/modules/undoRedoModule";
17
17
  import globalErrorsModule from "@/store/modules/globalErrorsModule";
18
+ import clipboardModule from "@/store/modules/clipboardModule";
18
19
  import ScreenBuilder from "@/components";
19
20
  import TestComponents from "../tests/components";
20
21
 
@@ -52,7 +53,8 @@ Vue.component("PmqlInput", {
52
53
  const store = new Vuex.Store({
53
54
  modules: {
54
55
  globalErrorsModule,
55
- undoRedoModule
56
+ undoRedoModule,
57
+ clipboardModule
56
58
  }
57
59
  });
58
60
 
@@ -114,6 +116,35 @@ window.exampleScreens = [
114
116
  status: "ACTIVE"
115
117
  }
116
118
  ];
119
+
120
+ const exampleUsers = [
121
+ {
122
+ id: 1,
123
+ username: 'admin',
124
+ status: 'ACTIVE',
125
+ fullname: 'Administrator',
126
+ },
127
+ {
128
+ id: 2,
129
+ username: 'jdavis',
130
+ status: 'INACTIVE',
131
+ fullname: 'Jonathan Davis',
132
+ }
133
+ ];
134
+
135
+ const exampleGroups = [
136
+ {
137
+ id: 1,
138
+ name: 'Super Users',
139
+ status: 'ACTIVE',
140
+ },
141
+ {
142
+ id: 2,
143
+ name: 'Metalheads',
144
+ status: 'INACTIVE',
145
+ }
146
+ ];
147
+
117
148
  // get cache config from header
118
149
  const cacheEnabled = document.head.querySelector(
119
150
  "meta[name='screen-cache-enabled']"
@@ -179,6 +210,28 @@ window.ProcessMaker = {
179
210
  ]
180
211
  }
181
212
  });
213
+ } else if (url === "users") {
214
+ resolve({
215
+ data: {
216
+ data: exampleUsers
217
+ }
218
+ });
219
+ } else if (url === "groups") {
220
+ resolve({
221
+ data: {
222
+ data: exampleGroups
223
+ }
224
+ });
225
+ } else if (url.substr(0, 6) === "users/") {
226
+ const index = url.substr(6, 1);
227
+ resolve({
228
+ data: exampleUsers[index - 1]
229
+ });
230
+ } else if (url.substr(0, 7) === "groups/") {
231
+ const index = url.substr(7, 1);
232
+ resolve({
233
+ data: exampleGroups[index - 1]
234
+ });
182
235
  } else {
183
236
  window.axios
184
237
  .get(url, params)
@@ -202,6 +255,12 @@ window.ProcessMaker = {
202
255
  }
203
256
  });
204
257
  break;
258
+ case "/api/1.0/encrypted_data/encryptText":
259
+ resolve("62abf17e-d1a6-4f68-a382-ed63872d29b0");
260
+ break;
261
+ case "/api/1.0/encrypted_data/decryptText":
262
+ resolve("Secret Value");
263
+ break;
205
264
  default:
206
265
  window.axios
207
266
  .post(url, body)
@@ -0,0 +1,153 @@
1
+ import { v4 as uuidv4 } from 'uuid';
2
+ import _ from "lodash";
3
+
4
+ const clipboardComponentName = "Clipboard";
5
+
6
+ export default {
7
+ data() {
8
+ return {
9
+ showClipboard: false,
10
+ };
11
+ },
12
+ methods: {
13
+ /**
14
+ * Adds a deep-cloned item to the clipboard, ensuring the original item is unmodified.
15
+ *
16
+ * @param {Object} item - The item to add to the clipboard.
17
+ * @returns {void}
18
+ */
19
+ addToClipboard(item) {
20
+ const duplicate = _.cloneDeep(item); // Create a deep copy of the item
21
+ this.$store.dispatch("clipboardModule/addToClipboard", duplicate); // Dispatch action to add item to the Vuex store
22
+ this.$root.$emit('update-clipboard');
23
+ },
24
+
25
+ /**
26
+ * Removes the specified item from the clipboard.
27
+ *
28
+ * @param {Object} item - The item to remove from the clipboard.
29
+ * @returns {void}
30
+ */
31
+ removeFromClipboard(item) {
32
+ this.$store.dispatch("clipboardModule/removeFromClipboard", item); // Dispatch action to remove item from the Vuex store
33
+ this.$root.$emit('update-clipboard');
34
+ },
35
+
36
+ /**
37
+ * Checks if the specified item is currently in the clipboard.
38
+ *
39
+ * @param {Object} item - The item to check.
40
+ * @returns {Boolean} - Returns true if the item is in the clipboard, otherwise false.
41
+ */
42
+ isInClipboard(item) {
43
+ return this.$store.getters["clipboardModule/isInClipboard"](item); // Use Vuex getter to check if item exists in the clipboard
44
+ },
45
+
46
+ /**
47
+ * Generate a unique UUID for the specified item.
48
+ */
49
+ generateUUID() {
50
+ return uuidv4(); // Generate a unique identifier using UUID v4
51
+ },
52
+
53
+ /**
54
+ * Add a UUID to each element in the screen configuration.
55
+ *
56
+ * @param array screenConfig
57
+ */
58
+ addUuidToElements(screenConfig) {
59
+ const replaceInPage = (page) => {
60
+ page.items.forEach((item, index) => {
61
+ if (!item.uuid) {
62
+ item.uuid = this.generateUUID();
63
+ }
64
+ if (item.items) {
65
+ replaceInPage(item);
66
+ }
67
+ });
68
+ }
69
+
70
+ screenConfig.forEach((item) => replaceInPage(item));
71
+ },
72
+
73
+ /**
74
+ * Setup or update UUID for the item and its children.
75
+ *
76
+ * @param {*} item Control item in the screen configuration
77
+ */
78
+ updateUuids(item) {
79
+ item.uuid = this.generateUUID();
80
+ if (item.items) {
81
+ item.items.forEach(item => {
82
+ if (item instanceof Array) {
83
+ // multi-column each item in the column
84
+ item.forEach(this.updateUuids)
85
+ } else {
86
+ // loop through children
87
+ this.updateUuids(item);
88
+ }
89
+ })
90
+ }
91
+ },
92
+
93
+ /**
94
+ * Find { component: "Clipboard" } and replace with the clipboard content.
95
+ */
96
+ replaceClipboardContent(screenConfig) {
97
+ if (
98
+ !screenConfig
99
+ || screenConfig instanceof Array === false
100
+ ) {
101
+ throw new Error("Expected a screen configuration array");
102
+ }
103
+
104
+ const replaceInPage = (page) => {
105
+ page.items.forEach((item, index) => {
106
+ if (item.component === clipboardComponentName) {
107
+ // clone clipboard content to avoid modifying the original
108
+ const clipboardContent = _.cloneDeep(this.$store.getters["clipboardModule/clipboardItems"]);
109
+ // replace uuids in clipboard content
110
+ clipboardContent.forEach(this.updateUuids);
111
+ page.items.splice(index, 1, ...clipboardContent);
112
+ }
113
+ if (item.items) {
114
+ replaceInPage(item);
115
+ }
116
+ });
117
+ }
118
+ screenConfig.forEach((item) => replaceInPage(item));
119
+ },
120
+
121
+ /**
122
+ * Clear the clipboard
123
+ */
124
+ async clearClipboard() {
125
+ const confirm = await this.$bvModal.msgBoxConfirm(
126
+ this.$t("Deleting the clipboard will permanently remove all information, and you will need to copy all components again."),
127
+ {
128
+ title: this.$t("Are you sure you want to clear clipboard?"),
129
+ size: "md",
130
+ buttonSize: "sm",
131
+ okVariant: "primary py-2 px-4",
132
+ cancelVariant: "outline-secondary py-2 px-4",
133
+ okTitle: this.$t("Confirm"),
134
+ cancelTitle: this.$t("Cancel"),
135
+ footerClass: "p-2 border-0",
136
+ hideHeaderClose: true,
137
+ centered: true,
138
+ }
139
+ );
140
+ if (confirm) {
141
+ this.$store.dispatch("clipboardModule/clearClipboard");
142
+ this.$root.$emit('update-clipboard');
143
+ }
144
+ },
145
+
146
+ /**
147
+ * Close Clipboard
148
+ */
149
+ closeClipboard() {
150
+ this.showClipboard = false;
151
+ },
152
+ },
153
+ };
@@ -43,6 +43,12 @@ export default {
43
43
  _initialPage: {
44
44
  default: 0,
45
45
  },
46
+ taskdraft: Object
47
+ },
48
+ mounted() {
49
+ if(this.taskdraft){
50
+ this.$root.$emit("taskdraft-input", this.taskdraft);
51
+ }
46
52
  },
47
53
  computed: {
48
54
  ...mapState("globalErrorsModule", {
@@ -164,7 +170,7 @@ export default {
164
170
  // if the form is not valid the data is not emitted
165
171
  return;
166
172
  }
167
- this.$emit('submit', this.vdata, loading, buttonInfo);
173
+ this.$emit('submit', this.vdata, loading, buttonInfo);;
168
174
  },
169
175
  resetValue(safeDotName, variableName) {
170
176
  this.setValue(safeDotName, null);
@@ -18,3 +18,4 @@ export { default as testing } from "./testing";
18
18
  export { ValidationMsg, validators } from "./ValidationRules";
19
19
  export { default as VisibilityRule } from "./VisibilityRule";
20
20
  export { default as watchers } from "./watchers";
21
+ export { default as Clipboard } from "./Clipboard";