pui9-components 2.0.8 → 3.0.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.
Files changed (67) hide show
  1. package/dist/pui9-components.common.js +5300 -22115
  2. package/dist/pui9-components.css +3 -6
  3. package/package-lock.json +1 -141
  4. package/package.json +1 -5
  5. package/src/App.vue +0 -117
  6. package/src/components/PuiAutocomplete.vue +0 -196
  7. package/src/components/PuiCauDialog.vue +0 -192
  8. package/src/components/PuiCheckbox.vue +0 -126
  9. package/src/components/PuiCodeEditor.vue +0 -124
  10. package/src/components/PuiDateField.vue +0 -1043
  11. package/src/components/PuiField.vue +0 -30
  12. package/src/components/PuiFieldSet.vue +0 -27
  13. package/src/components/PuiFileUpload.vue +0 -275
  14. package/src/components/PuiFileUploadGroup.vue +0 -241
  15. package/src/components/PuiFilter.vue +0 -104
  16. package/src/components/PuiFilterGroup.vue +0 -291
  17. package/src/components/PuiFilterRule.vue +0 -683
  18. package/src/components/PuiFormFooter.vue +0 -48
  19. package/src/components/PuiFormFooterBtns.vue +0 -118
  20. package/src/components/PuiFormHeader.vue +0 -25
  21. package/src/components/PuiFormLoading.vue +0 -14
  22. package/src/components/PuiFormMiniAudit.vue +0 -53
  23. package/src/components/PuiFormTooltip.vue +0 -50
  24. package/src/components/PuiMasterDetail.vue +0 -103
  25. package/src/components/PuiModalDialog.vue +0 -91
  26. package/src/components/PuiModalDialogForm.vue +0 -209
  27. package/src/components/PuiMultiSelect.vue +0 -636
  28. package/src/components/PuiNumberField.vue +0 -434
  29. package/src/components/PuiPasswordField.vue +0 -105
  30. package/src/components/PuiRadioGroup.vue +0 -105
  31. package/src/components/PuiRichTextEditor.vue +0 -116
  32. package/src/components/PuiSelect.vue +0 -1675
  33. package/src/components/PuiSelectDetailDialog.vue +0 -113
  34. package/src/components/PuiSelectTextService.vue +0 -61
  35. package/src/components/PuiSelectorList.vue +0 -169
  36. package/src/components/PuiSort.vue +0 -98
  37. package/src/components/PuiSpinnerField.vue +0 -464
  38. package/src/components/PuiSwitch.vue +0 -104
  39. package/src/components/PuiTextArea.vue +0 -204
  40. package/src/components/PuiTextField.vue +0 -389
  41. package/src/dateTimeUtils.js +0 -78
  42. package/src/index.js +0 -89
  43. package/src/main.js +0 -34
  44. package/src/mixins/PuiFormComponentMixin.js +0 -77
  45. package/src/mixins/PuiSortMixin.js +0 -136
  46. package/src/mixins/PuiUtilsNumberMixin.js +0 -29
  47. package/src/plugins/vuetify.js +0 -33
  48. package/src/tests/TestAutocomplete.vue +0 -138
  49. package/src/tests/TestCodeEditor.vue +0 -48
  50. package/src/tests/TestField.vue +0 -22
  51. package/src/tests/TestFieldSet.vue +0 -30
  52. package/src/tests/TestInputCheckbox.vue +0 -53
  53. package/src/tests/TestInputDate.vue +0 -146
  54. package/src/tests/TestInputNumber.vue +0 -77
  55. package/src/tests/TestInputRadioGroup.vue +0 -86
  56. package/src/tests/TestInputSpinner.vue +0 -77
  57. package/src/tests/TestInputSwitch.vue +0 -52
  58. package/src/tests/TestInputText.vue +0 -120
  59. package/src/tests/TestInputTextArea.vue +0 -73
  60. package/src/tests/TestMultiSelect.vue +0 -127
  61. package/src/tests/TestPuiForm.vue +0 -68
  62. package/src/tests/TestRichTextEditor.vue +0 -54
  63. package/src/tests/unit/PuiCheckbox.spec.js +0 -86
  64. package/src/tests/unit/PuiTextArea.spec.js +0 -62
  65. package/src/tests/unit/PuiTextField.spec.js +0 -119
  66. package/src/tests/unit/index.js +0 -5
  67. package/src/utils.js +0 -158
@@ -1,209 +0,0 @@
1
- <template>
2
- <v-layout wrap v-if="showDialog">
3
- <v-flex xs10 md8 lg6 xl4>
4
- <div class="text-center">
5
- <v-dialog
6
- :id="`${dialogName}-modal-container`"
7
- persistent
8
- v-model="showDialog"
9
- :width="widthDialog"
10
- :content-class="getDialogClasses"
11
- v-bind="allProps"
12
- >
13
- <v-card class="pa-2">
14
- <v-card-title class="pl-3 headline lighten-2" primary-title>{{ titleText }}</v-card-title>
15
- <v-card-text>
16
- <pui-form-header v-if="componentHeader && modalData.headerPk" showHeader>
17
- <component :is="componentHeader" :modelPk="modalData.headerPk" />
18
- </pui-form-header>
19
- <v-form action ref="validateForm" class="px-4" @submit.prevent>
20
- <slot name="message" v-bind:modalData="modalData"></slot>
21
- </v-form>
22
- </v-card-text>
23
- <v-card-actions ref="actions">
24
- <v-spacer></v-spacer>
25
- <v-btn v-if="!disableCancel" :id="`${dialogName}-btn-cancel`" depressed @click="cancel()" :disabled="loading">{{
26
- buttonCancel
27
- }}</v-btn>
28
- <v-btn v-if="!disableOk" color="primary" :id="`${dialogName}-btn-ok`" depressed @click="ok()" :loading="loading" :disabled="loading">{{
29
- buttonOk
30
- }}</v-btn>
31
- </v-card-actions>
32
- </v-card>
33
- </v-dialog>
34
- </div>
35
- </v-flex>
36
- </v-layout>
37
- </template>
38
-
39
- <script>
40
- export default {
41
- name: 'PuiModalDialogForm',
42
- props: {
43
- value: {
44
- type: Object
45
- },
46
- titleText: {
47
- type: String,
48
- required: true
49
- },
50
- modelName: {
51
- type: String,
52
- required: true
53
- },
54
- dialogName: {
55
- type: String,
56
- required: true
57
- },
58
- dialogClasses: {
59
- type: String,
60
- default: ''
61
- },
62
- overflow: {
63
- type: Boolean,
64
- default: true
65
- },
66
- okText: {
67
- type: String
68
- },
69
- cancelText: {
70
- type: String
71
- },
72
- disableCancel: {
73
- type: Boolean,
74
- default: false
75
- },
76
- disableOk: {
77
- type: Boolean,
78
- default: false
79
- },
80
- widthDialog: {
81
- type: [String, Number],
82
- default: 'unset'
83
- },
84
- onShow: {
85
- type: Function,
86
- default: null
87
- },
88
- componentHeaderName: {
89
- type: String
90
- },
91
- showDialogProp: {
92
- type: Boolean,
93
- default: false
94
- },
95
- onOk: {
96
- type: Function,
97
- default: null
98
- },
99
- onCancel: {
100
- type: Function,
101
- default: null
102
- }
103
- },
104
- data() {
105
- return {
106
- modalData: {},
107
- componentHeader: null,
108
- headerPk: {},
109
- showDialog: false,
110
- loading: false
111
- };
112
- },
113
- methods: {
114
- ok() {
115
- if (this.disableCancel || (!this.loading && this.$refs.validateForm !== undefined && this.$refs.validateForm.validate())) {
116
- if (this.onOk) {
117
- this.loading = true;
118
- // onOk Function handles show/hide dialog on return value
119
- const returnOnOk = this.onOk(this.modalData);
120
- if (returnOnOk !== undefined) {
121
- returnOnOk.then((value) => {
122
- this.showDialog = !value;
123
- this.loading = false;
124
- });
125
- } else {
126
- this.loading = false;
127
- }
128
- } else {
129
- if (this.modalData.isAction) {
130
- this.$puiEvents.$emit(`onPui-action-running-ended-${this.modelName}`);
131
- }
132
- this.showDialog = false;
133
- }
134
- }
135
- },
136
- cancel() {
137
- if (this.onCancel) {
138
- // onCancel Function handles show/hide dialog on return value
139
- const returnOnCancel = this.onCancel(this.modalData);
140
- if (returnOnCancel !== undefined) this.showDialog = !returnOnCancel;
141
- } else {
142
- this.showDialog = false;
143
- }
144
- if (this.modalData.isAction) {
145
- this.$puiEvents.$emit(`onPui-action-running-ended-${this.modelName}`);
146
- }
147
- this.modalData = {};
148
- },
149
- loaderDynamicHeader() {
150
- if (this.headerPk && this.componentHeaderName) {
151
- this.componentHeader = this.componentHeaderName;
152
- }
153
- }
154
- },
155
- computed: {
156
- getOverflow() {
157
- return this.overflow ? '' : 'pui-modal-dialog-overflow-off';
158
- },
159
- buttonOk() {
160
- return this.okText || this.$t('pui9.accept');
161
- },
162
- buttonCancel() {
163
- return this.cancelText || this.$t('pui9.cancel');
164
- },
165
- getDialogClasses() {
166
- return this.dialogClasses + ' ' + this.getOverflow;
167
- },
168
- allProps() {
169
- return { ...this.$attrs, ...this.$props };
170
- }
171
- },
172
- mounted() {
173
- this.loaderDynamicHeader();
174
- this.$puiEvents.$on(`pui-modalDialogForm-${this.dialogName}-${this.modelName}-show`, (data) => {
175
- // Clean posible oldData
176
- this.modalData = {};
177
- for (const key in data) {
178
- if (Object.prototype.hasOwnProperty.call(data, key)) {
179
- // For make the container of the data reactive we use $set vue function
180
- this.$set(this.modalData, key, data[key]);
181
- }
182
- }
183
- // If not loaded from action, disable action events for transfer data, disable styles action button...
184
- this.modalData.isAction = data.isAction ? data.isAction : false;
185
- if (data.showDialog === undefined || data.showDialog === true) this.showDialog = true;
186
- this.onShow && this.onShow(this.modalData);
187
- });
188
- },
189
- destroyed() {
190
- this.$puiEvents.$off(`pui-modalDialogForm-${this.dialogName}-${this.modelName}-show`);
191
- },
192
- watch: {
193
- // If some data change from the modalData $emit it in case that they need on the parent component
194
- modalData: {
195
- handler(newValue) {
196
- if (newValue.showDialog !== undefined) {
197
- this.showDialog = newValue.showDialog;
198
- }
199
- this.$emit('input', newValue);
200
- },
201
- deep: true
202
- },
203
- showDialogProp(newValue) {
204
- this.loading = false;
205
- this.showDialog = newValue;
206
- }
207
- }
208
- };
209
- </script>