pui9-components 1.17.3 → 2.0.7

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 (43) hide show
  1. package/dist/pui9-components.common.js +75007 -52512
  2. package/dist/pui9-components.css +9 -2
  3. package/package-lock.json +6651 -6827
  4. package/package.json +22 -26
  5. package/src/components/PuiCauDialog.vue +192 -0
  6. package/src/components/PuiCheckbox.vue +25 -4
  7. package/src/components/PuiCodeEditor.vue +2 -1
  8. package/src/components/PuiDateField.vue +653 -614
  9. package/src/components/PuiField.vue +1 -1
  10. package/src/components/PuiFileUpload.vue +275 -0
  11. package/src/components/PuiFileUploadGroup.vue +241 -0
  12. package/src/components/PuiFilter.vue +54 -52
  13. package/src/components/PuiFilterGroup.vue +179 -179
  14. package/src/components/PuiFilterRule.vue +481 -162
  15. package/src/components/PuiFormFooter.vue +5 -38
  16. package/src/components/PuiFormTooltip.vue +50 -0
  17. package/src/components/PuiMasterDetail.vue +18 -11
  18. package/src/components/PuiModalDialog.vue +4 -1
  19. package/src/components/PuiModalDialogForm.vue +5 -1
  20. package/src/components/PuiMultiSelect.vue +383 -280
  21. package/src/components/PuiNumberField.vue +216 -285
  22. package/src/components/PuiRichTextEditor.vue +43 -44
  23. package/src/components/PuiSelect.vue +382 -355
  24. package/src/components/PuiSelectDetailDialog.vue +10 -3
  25. package/src/components/PuiSelectorList.vue +169 -0
  26. package/src/components/PuiSort.vue +98 -0
  27. package/src/components/PuiSpinnerField.vue +101 -121
  28. package/src/components/PuiTextField.vue +374 -258
  29. package/src/index.js +8 -0
  30. package/src/main.js +1 -0
  31. package/src/mixins/PuiFormComponentMixin.js +2 -8
  32. package/src/mixins/PuiSortMixin.js +136 -0
  33. package/src/mixins/PuiUtilsNumberMixin.js +15 -5
  34. package/src/plugins/vuetify.js +2 -1
  35. package/src/utils.js +10 -0
  36. package/dist/demo.html +0 -10
  37. package/dist/pui9-components.common.js.map +0 -1
  38. package/dist/pui9-components.umd.js +0 -86432
  39. package/dist/pui9-components.umd.js.map +0 -1
  40. package/dist/pui9-components.umd.min.js +0 -308
  41. package/dist/pui9-components.umd.min.js.map +0 -1
  42. package/src/mixins/PuiFilterMixin.js +0 -157
  43. package/src/mixins/PuiMultiSelectMixin.js +0 -106
@@ -4,7 +4,7 @@
4
4
  <label>{{ this.label }}</label>
5
5
  <label class="richtexteditor-label-required" v-if="required">*</label>
6
6
  </div>
7
- <tinymce-editor v-bind:id="id" v-model="data" :plugins="plugins" :toolbar="toolbar" v-bind:ref="id" @onBlur="checkContent"></tinymce-editor>
7
+ <textarea v-model="data" :id="id" :ref="id"></textarea>
8
8
  <v-text-field v-if="required" v-model="data" :rules="getRules" style="display: none"></v-text-field>
9
9
  <div class="richtexteditor-error-message">
10
10
  <label class="richtexteditor-label-error">{{ $t('pui9.error.field_required') }}</label>
@@ -13,13 +13,12 @@
13
13
  </template>
14
14
 
15
15
  <script>
16
- import Editor from '@tinymce/tinymce-vue';
16
+ import { Jodit } from 'jodit';
17
+ import 'jodit/build/jodit.min.css';
17
18
 
18
19
  export default {
19
20
  name: 'PuiRichTextEditor',
20
- components: {
21
- 'tinymce-editor': Editor
22
- },
21
+ components: {},
23
22
  props: {
24
23
  id: {
25
24
  type: String,
@@ -40,8 +39,17 @@ export default {
40
39
  validationErrors: {
41
40
  type: Boolean,
42
41
  default: false
42
+ },
43
+ height: {
44
+ type: Number,
45
+ default: 480
43
46
  }
44
47
  },
48
+ data() {
49
+ return {
50
+ data: this.value
51
+ };
52
+ },
45
53
  computed: {
46
54
  externalValue() {
47
55
  return this.value;
@@ -54,24 +62,12 @@ export default {
54
62
  return rules;
55
63
  }
56
64
  },
57
- data() {
58
- return {
59
- plugins: [
60
- 'advlist autolink lists link image charmap preview hr anchor pagebreak',
61
- 'searchreplace wordcount visualblocks visualchars code fullscreen',
62
- 'insertdatetime nonbreaking save table directionality',
63
- 'emoticons template paste textpattern imagetools codesample toc'
64
- ],
65
- toolbar: [
66
- 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image'
67
- ],
68
- data: this.value
69
- };
70
- },
71
- mounted() {
72
- this.loadData();
73
- },
74
65
  watch: {
66
+ value(v) {
67
+ this.data = v;
68
+ this.editor.value = v;
69
+ console.log(11)
70
+ },
75
71
  data() {
76
72
  this.checkContent();
77
73
  this.$emit('input', this.data);
@@ -83,35 +79,38 @@ export default {
83
79
  this.checkContent();
84
80
  }
85
81
  },
82
+ mounted() {
83
+ //Jodit.plugins.add(plugin.name, plugin.callback);
84
+ this.editor = new Jodit(this.$refs[this.id], {
85
+ // width: 800,
86
+ height: this.height,
87
+ // language: 'es' // tooltips
88
+ });
89
+ this.editor.value = this.data;
90
+ this.editor.events.on('change', newValue => this.$emit('input', newValue))
91
+ },
92
+ beforeDestroy() {
93
+ this.editor.destruct();
94
+ },
86
95
  methods: {
87
96
  hasLabel() {
88
97
  return this.label !== undefined;
89
98
  },
90
- createEditor() {
91
- Editor.init({
92
- selector: '#editor',
93
- plugins: 'image',
94
- toolbar: ['undo redo | styleselect | bold italic | link image', 'alignleft aligncenter alignright']
95
- });
96
- },
97
- loadData() {
98
- this.data = this.$refs[this.id].value;
99
- this.$emit('input', this.data);
100
- },
101
99
  checkContent() {
102
- var errorMsg = this.$el.getElementsByClassName('richtexteditor-error-message');
103
- var newsContainer = this.$el.getElementsByClassName('tox-tinymce');
100
+ var errorMsg = this.$el.getElementsByClassName('richtexteditor-error-message');
104
101
 
105
- if (this.required) {
106
- if (this.data === null || this.data === '') {
107
- errorMsg[0].style.display = 'block';
108
- newsContainer[0].classList.add('richtexteditor-error-tinymce');
109
- } else {
110
- errorMsg[0].style.display = 'none';
111
- newsContainer[0].classList.remove('richtexteditor-error-tinymce');
112
- }
102
+ if(this.data == '<p><br></p>') {
103
+ this.data = null;
113
104
  }
114
- }
105
+
106
+ if (this.required) {
107
+ if (this.data === null || this.data === '') {
108
+ errorMsg[0].style.display = 'block';
109
+ } else {
110
+ errorMsg[0].style.display = 'none';
111
+ }
112
+ }
113
+ }
115
114
  }
116
115
  };
117
116
  </script>