pui9-components 2.0.7 → 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 +5403 -22189
  2. package/dist/pui9-components.css +3 -6
  3. package/package-lock.json +635 -774
  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
package/src/index.js DELETED
@@ -1,89 +0,0 @@
1
- import PuiAutocomplete from './components/PuiAutocomplete';
2
- import PuiCauDialog from './components/PuiCauDialog';
3
- import PuiCheckbox from './components/PuiCheckbox';
4
- import PuiCodeEditor from './components/PuiCodeEditor';
5
- import PuiDateField from './components/PuiDateField';
6
- import PuiField from './components/PuiField';
7
- import PuiFieldSet from './components/PuiFieldSet';
8
- import PuiFileUpload from './components/PuiFileUpload';
9
- import PuiFileUploadGroup from './components/PuiFileUploadGroup';
10
- import PuiFilter from './components/PuiFilter';
11
- import PuiFilterGroup from './components/PuiFilterGroup';
12
- import PuiFilterRule from './components/PuiFilterRule';
13
- import PuiFormTooltip from './components/PuiFormTooltip';
14
- import PuiMultiSelect from './components/PuiMultiSelect';
15
- import PuiNumberField from './components/PuiNumberField';
16
- import PuiPasswordField from './components/PuiPasswordField';
17
- import PuiRadioGroup from './components/PuiRadioGroup';
18
- import PuiRichTextEditor from './components/PuiRichTextEditor';
19
- import PuiSpinnerField from './components/PuiSpinnerField';
20
- import PuiSwitch from './components/PuiSwitch';
21
- import PuiTextArea from './components/PuiTextArea';
22
- import PuiTextField from './components/PuiTextField';
23
- import PuiFormFooter from './components/PuiFormFooter';
24
- import PuiFormFooterBtns from './components/PuiFormFooterBtns';
25
- import PuiFormHeader from './components/PuiFormHeader';
26
- import PuiFormLoading from './components/PuiFormLoading';
27
- import PuiFormMiniAudit from './components/PuiFormMiniAudit';
28
- import PuiMasterDetail from './components/PuiMasterDetail';
29
- import PuiModalDialog from './components/PuiModalDialog';
30
- import PuiModalDialogForm from './components/PuiModalDialogForm';
31
- import PuiSelect from './components/PuiSelect';
32
- import PuiSelectDetailDialog from './components/PuiSelectDetailDialog';
33
-
34
- import VueInfiniteLoading from 'vue-infinite-loading';
35
- import VueDraggable from 'vuedraggable';
36
- import moment from 'moment';
37
-
38
- import DateTimeUtils from './dateTimeUtils';
39
- import Utils from './utils';
40
-
41
- const Components = {
42
- PuiAutocomplete,
43
- PuiCheckbox,
44
- PuiCauDialog,
45
- PuiCodeEditor,
46
- PuiDateField,
47
- PuiField,
48
- PuiFieldSet,
49
- PuiFilter,
50
- PuiFileUpload,
51
- PuiFileUploadGroup,
52
- PuiFilterGroup,
53
- PuiFilterRule,
54
- PuiFormTooltip,
55
- PuiMultiSelect,
56
- PuiNumberField,
57
- PuiPasswordField,
58
- PuiRadioGroup,
59
- PuiRichTextEditor,
60
- PuiSpinnerField,
61
- PuiSwitch,
62
- PuiTextArea,
63
- PuiTextField,
64
- PuiFormFooter,
65
- PuiFormFooterBtns,
66
- PuiFormHeader,
67
- PuiFormLoading,
68
- PuiFormMiniAudit,
69
- PuiMasterDetail,
70
- PuiModalDialog,
71
- PuiModalDialogForm,
72
- PuiSelect,
73
- PuiSelectDetailDialog
74
- };
75
-
76
- export default {
77
- install(Vue) {
78
- Object.keys(Components).forEach(name => {
79
- Vue.component(name, Components[name]);
80
- });
81
-
82
- Vue.component('infinite-loading', VueInfiniteLoading);
83
- Vue.component('draggable', VueDraggable);
84
-
85
- Object.defineProperty(Vue.prototype, '$moment', { value: moment });
86
- Object.defineProperty(Vue.prototype, '$dateTimeUtils', { value: DateTimeUtils });
87
- Object.defineProperty(Vue.prototype, '$puiUtils', { value: Utils });
88
- }
89
- };
package/src/main.js DELETED
@@ -1,34 +0,0 @@
1
- import Vue from 'vue';
2
- import Vuex from 'vuex';
3
- import VueI18n from 'vue-i18n';
4
- import vuetify from './plugins/vuetify';
5
- import App from './App.vue';
6
-
7
- import '@fortawesome/fontawesome-pro/css/all.css';
8
- import 'vuetify/dist/vuetify.min.css';
9
-
10
- import '../../pui9-styles/pui9.css';
11
-
12
- import storeObj from '../../pui9-store';
13
-
14
- import enPuiTranslations from '../../pui9-translations/translations/en.json';
15
- import esPuiTranslations from '../../pui9-translations/translations/es.json';
16
-
17
- Vue.config.productionTip = false;
18
-
19
- Vue.use(Vuex);
20
- Vue.use(VueI18n);
21
-
22
- const store = new Vuex.Store(storeObj);
23
- const i18n = new VueI18n({
24
- locale: 'es',
25
- fallbackLocale: 'en',
26
- messages: { en: enPuiTranslations, es: esPuiTranslations }
27
- });
28
-
29
- new Vue({
30
- vuetify,
31
- store,
32
- i18n,
33
- render: (h) => h(App)
34
- }).$mount('#app');
@@ -1,77 +0,0 @@
1
- import * as sanitizeHtml from 'sanitize-html';
2
-
3
- export default {
4
- props: {
5
- noeditable: {
6
- type: Boolean,
7
- default: false
8
- },
9
- required: {
10
- type: Boolean,
11
- default: false
12
- },
13
- label: {
14
- type: String
15
- },
16
- toplabel: {
17
- type: Boolean,
18
- default: false
19
- },
20
- disabled: {
21
- type: Boolean,
22
- default: false
23
- }
24
- },
25
- data() {
26
- return {
27
- initialValue: '',
28
- internalModel: '',
29
- firstLazyLoad: false,
30
- internalError: false
31
- };
32
- },
33
- computed: {
34
- isMobile() {
35
- return this.$store.getters.isMobile;
36
- },
37
- isEdited() {
38
- if (this.noeditable || this.disabled || this.readonly) {
39
- return false;
40
- } else {
41
- try {
42
- return this.initialValue.toString() !== this.internalModel.toString();
43
- } catch (e) {
44
- return this.initialValue !== this.internalModel;
45
- }
46
- }
47
- },
48
- getLabel() {
49
- return this.$props.label;
50
- },
51
- allProps() {
52
- const propsWithoutLabel = { ...this.$props };
53
- delete propsWithoutLabel.label;
54
- return { ...this.$attrs, ...propsWithoutLabel };
55
- },
56
- getLocale() {
57
- return (this.$store && this.$store.getters && this.$store.getters.getUserLanguage) || null;
58
- },
59
- getPlaceholder() {
60
- return this.placeholder;
61
- },
62
- hasLabel() {
63
- if (this.label && this.label.length > 0) {
64
- return true;
65
- }
66
- return false;
67
- },
68
- requiredMessage() {
69
- return this.$t('pui9.error.field_required');
70
- }
71
- },
72
- methods: {
73
- sanitizePuiFormHtmlText(dirtyText) {
74
- return sanitizeHtml(dirtyText);
75
- }
76
- }
77
- };
@@ -1,136 +0,0 @@
1
- export default {
2
- props: {
3
- columns: {
4
- type: Array
5
- },
6
- currentRules: {
7
- type: Array
8
- },
9
- modelName: {
10
- type: String,
11
- required: true
12
- }
13
- },
14
- data() {
15
- return {
16
- availableColumns: [],
17
- height: 50,
18
- grouped: false,
19
- sortingTypes: [
20
- {
21
- text: 'puidatatables.ascendent',
22
- value: 'asc'
23
- },
24
- {
25
- text: 'puidatatables.descendent',
26
- value: 'desc'
27
- }
28
- ],
29
- rules: [],
30
- colNames: []
31
- };
32
- },
33
- created: function () {
34
- this.rules = this.currentRules;
35
- for (let n of this.columns) {
36
- this.availableColumns.push(n.name);
37
- this.colNames.push(n.name);
38
- }
39
- for (let col of this.currentRules) {
40
- this.onRuleNameChanged(col.column);
41
- }
42
- this.translateSortingTypes();
43
- },
44
-
45
- watch: {
46
- colNames(val) {
47
- var size = 50;
48
- if (val.length > 0) {
49
- this.height = val.length * size;
50
- } else {
51
- this.height = size;
52
- }
53
- if (this.height > 250) {
54
- this.height = 280;
55
- }
56
- }
57
- },
58
- computed: {
59
- showAddBtn() {
60
- if (this.columns.length > this.rules.length) {
61
- return true;
62
- }
63
- return false;
64
- },
65
- getTitleRemove() {
66
- return this.$t('puidatatables.removeBtnTitle');
67
- },
68
- heightPanel() {
69
- return this.height + 'px';
70
- }
71
- },
72
- methods: {
73
- getAvailableColumns(index) {
74
- const availableColumns = this.availableColumns;
75
- const columnNameSelected = this.rules[index].column;
76
- const columnsAvailableForTheSelect = this.colNames.filter((column) => {
77
- return availableColumns.includes(column) || column === columnNameSelected;
78
- });
79
-
80
- return columnsAvailableForTheSelect;
81
- },
82
- removeSelectsFocus() {
83
- for (let i = 0, length = this.rules.length; i < length; i++) {
84
- this.$refs[`${i}-column`][0].$el.classList.remove('v-input--is-focused');
85
- this.$refs[`${i}-sortType`][0].$el.classList.remove('v-input--is-focused');
86
- }
87
- },
88
- removeRule(index) {
89
- this.availableColumns.push(this.rules[index].column);
90
- this.rules.splice(index, 1);
91
- if (this.rules.length === 0) {
92
- this.columns
93
- .sort((a, b) => (a.title < b.title ? -1 : a.title > b.title ? 1 : 0))
94
- .forEach((column) => {
95
- this.availableColumns.push(column.removeRule);
96
- });
97
- this.addRule();
98
- }
99
- },
100
- addRule() {
101
- this.rules.push({ column: '', direction: 'asc' });
102
- },
103
- translateSortingTypes() {
104
- for (var i = 0, length = this.sortingTypes.length; i < length; i++) {
105
- this.sortingTypes[i].text = this.$t(this.sortingTypes[i].text);
106
- }
107
- },
108
- onRuleNameChanged(value) {
109
- //quitamos de las disponibles la nueva columna
110
- this.removeColumnFromAvailable(value);
111
- //a contiunación añadimos a disponibles la columna que se ha cambiado
112
- const rulesColNames = this.rules.map((rule) => {
113
- return rule.column;
114
- });
115
- this.colNames
116
- .sort((a, b) => (a.title < b.title ? -1 : a.title > b.title ? 1 : 0))
117
- .forEach((column) => {
118
- if (rulesColNames.includes(column) === false && this.availableColumns.includes(column) === false) {
119
- this.availableColumns.push(column);
120
- }
121
- });
122
- },
123
- removeColumnFromAvailable(columnName) {
124
- for (let i = 0, length = this.availableColumns.length; i < length; i++) {
125
- const column = this.availableColumns[i];
126
- if (column === columnName) {
127
- this.availableColumns.splice(i, 1);
128
- break;
129
- }
130
- }
131
- },
132
- setIndex(index) {
133
- this.index = index;
134
- }
135
- }
136
- };
@@ -1,29 +0,0 @@
1
- export default {
2
- methods: {
3
- checkInteger(val) {
4
- const regexp = /(^[0-9]*$)|(^-[0-9]+$)/;
5
- return regexp.test(val);
6
- },
7
- checkFloat(val) {
8
- const regexp = /^[-]?\d*(\.\d+)?$/;
9
- return regexp.test(val);
10
- },
11
- truncateDecimal(number, decimals) {
12
- // Limit the number of decimal places to prevent floating point errors
13
- // a alguien le pareció bien la idea de poner por defecto 999 y hemos tumbado una máquina de AWS dividiendo Infinity's
14
-
15
- if (decimals > 20) {
16
- decimals = 20;
17
- }
18
-
19
- let pow = Math.pow(10, decimals);
20
- let multiplied = number * pow;
21
- let rounded = Math.round(multiplied);
22
- let truncated = rounded / pow;
23
-
24
- return truncated;
25
-
26
- // return Math.trunc(number * Math.pow(10, decimals)) / Math.pow(10, decimals);
27
- }
28
- }
29
- };
@@ -1,33 +0,0 @@
1
- import Vue from 'vue';
2
- import Vuetify from 'vuetify'
3
- import 'vuetify/dist/vuetify.min.css'
4
- import colors from 'vuetify/es5/util/colors';
5
- import es from 'vuetify/es5/locale/es';
6
- import ca from 'vuetify/es5/locale/ca';
7
- import en from 'vuetify/es5/locale/en';
8
- import fr from 'vuetify/es5/locale/fr';
9
-
10
- Vue.use(Vuetify);
11
-
12
- const opts = {
13
- theme: {
14
- light: true,
15
- themes: {
16
- light: {
17
- primary: '#199af2',
18
- secondary: '#e56208',
19
- accent: colors.orange.darken1,
20
- error: colors.red.darken1
21
- }
22
- }
23
- },
24
- icons: {
25
- iconfont: 'fa'
26
- },
27
- lang: {
28
- locales: { en, es, ca, fr },
29
- current: 'es'
30
- }
31
- };
32
-
33
- export default new Vuetify(opts);
@@ -1,138 +0,0 @@
1
- <template>
2
- <v-container>
3
- <v-flex xs12>
4
- <v-card class="pa-4 mt-4">
5
- <h2 class="mb-4">Autocomplete simple</h2>
6
- <pui-autocomplete :label="label" toplabel :required="required">
7
- <v-autocomplete
8
- id="autocomplete1"
9
- attach="autocomplete1"
10
- ref="autocomplete1"
11
- class="pui-autocomplete-select--simple"
12
- v-model="model1.car"
13
- :items="items"
14
- :item-text="item => item.name"
15
- :required="required"
16
- :disabled="disabled"
17
- :rules="[value => !!value || 'Campo obligatorio']"
18
- :return-object="false"
19
- clearable
20
- />
21
- </pui-autocomplete>
22
- <span>{{ model1.car }}</span>
23
- <h2 class="mb-4">Autocomplete multiple con slots</h2>
24
- <pui-autocomplete :label="label" toplabel :required="required">
25
- <v-autocomplete
26
- id="autocomplete2"
27
- attach="autocomplete2"
28
- ref="autocomplete2"
29
- class="pui-autocomplete-select--simple"
30
- v-model="model2"
31
- :items="items"
32
- :item-text="item => item.name"
33
- :required="required"
34
- :disabled="disabled"
35
- :rules="[value => !!value || 'Campo obligatorio']"
36
- multiple
37
- return-object
38
- clearable
39
- >
40
- <template slot="item" slot-scope="data">
41
- <pui-autocomplete-slot-item :data="data" property="name"></pui-autocomplete-slot-item>
42
- </template>
43
- <template slot="selection" slot-scope="{ selected, parent, item }">
44
- <pui-autocomplete-slot-multiple-selection
45
- :selected="selected"
46
- :parent="parent"
47
- :item="item"
48
- property="name"
49
- ></pui-autocomplete-slot-multiple-selection>
50
- </template>
51
- </v-autocomplete>
52
- </pui-autocomplete>
53
- <span>{{ model2 }}</span>
54
- </v-card>
55
- </v-flex>
56
- </v-container>
57
- </template>
58
-
59
- <script>
60
- import PuiAutocomplete from '@/components/Autocomplete/PuiAutocomplete';
61
- import PuiAutocompleteSlotItem from '@/components/Autocomplete/PuiAutocompleteSlotItem';
62
- import PuiAutocompleteSlotMultipleSelection from '@/components/Autocomplete/PuiAutocompleteSlotMultipleSelection';
63
-
64
- export default {
65
- components: {
66
- PuiAutocomplete,
67
- PuiAutocompleteSlotItem,
68
- PuiAutocompleteSlotMultipleSelection
69
- },
70
- data() {
71
- return {
72
- required: true,
73
- disabled: false,
74
- label: 'Car',
75
- model1: {
76
- car: null
77
- },
78
- model2: [],
79
- items: [
80
- { id: 1, name: 'Ford' },
81
- { id: 2, name: 'Mercedes' },
82
- { id: 3, name: 'BMW' }
83
- ]
84
- };
85
- },
86
- created() {
87
- this.lazyLoadTest();
88
- },
89
- methods: {
90
- lazyLoadTest() {
91
- setTimeout(() => {
92
- this.model1.car = 2;
93
- }, 3000);
94
- }
95
- }
96
- /*created() {
97
- this.debounceSearchCars = debounce(() => {
98
- this.carsItems = [];
99
- this.carsPagination.page = 1;
100
- this.fetchCars();
101
- }, 700);
102
-
103
- this.fetchCars();
104
- },
105
- methods: {
106
- async fetchCars() {
107
- try {
108
- this.carsPagination.loading = true;
109
- const params = this.carsPagination;
110
- const queryFields = clienteQueryFields;
111
- const queryText = this.clienteTextSearch;
112
- const body = generateCarsPagination(queryText, { params, queryFields });
113
- const filter = this.amasFilter;
114
-
115
- // prettier-ignore
116
- const { data: { data, totalPages } } = await pui9api.requestFactory.postRequest('/cliente/list', { ...body, filter });
117
-
118
- this.carsItems = [...this.carsItems, ...data];
119
- this.carsPagination.totalPages = totalPages;
120
- } catch (error) {
121
- console.error(error);
122
- } finally {
123
- this.carsPagination.loading = false;
124
- }
125
- },
126
-
127
- async loadMoreCars() {
128
- const { page, totalPages } = this.carsPagination;
129
- if (page >= totalPages) {
130
- return;
131
- }
132
-
133
- this.carsPagination.page++;
134
- this.fetchCars();
135
- }
136
- }*/
137
- };
138
- </script>
@@ -1,48 +0,0 @@
1
- <template>
2
- <v-container>
3
- <v-flex xs12>
4
- <v-card class="pa-4 mt-4">
5
- <h2 class="mb-4">Code Editor</h2>
6
- <pui-code-editor mode="javascript" :label="label" v-model="model1"></pui-code-editor>
7
- </v-card>
8
- <v-card class="pa-4 mt-4">
9
- <h2 class="mb-4">Code Editor in Form</h2>
10
-
11
- <v-form ref="form" v-model="valid" lazy-validation v-if="modelLoaded">
12
- <pui-code-editor mode="css" :label="label" v-model="model1" required :validationErrors="formValidationErrors"></pui-code-editor>
13
- <v-btn depressed color="secondary" class="elevation-0" @click.native="save(false)">
14
- Save
15
- </v-btn>
16
- </v-form>
17
- </v-card>
18
- </v-flex>
19
- </v-container>
20
- </template>
21
-
22
- <script>
23
- import PuiCodeEditor from '@/components/PuiCodeEditor';
24
-
25
- export default {
26
- name: 'TestCodeEditor',
27
- components: { PuiCodeEditor },
28
- data() {
29
- return {
30
- label: 'Etiqueta editor de código',
31
- model1: 'Este texto se está editando con el componente PuiCodeEditor',
32
- valid: true,
33
- modelLoaded: true,
34
- formValidationErrors: false
35
- };
36
- },
37
- methods: {
38
- save() {
39
- this.formValidationErrors = false;
40
- if (this.$refs.form && this.$refs.form.validate && !this.$refs.form.validate()) {
41
- this.formValidationErrors = true;
42
- console.log('Hay errores de validación en el formulario');
43
- return;
44
- }
45
- }
46
- }
47
- };
48
- </script>
@@ -1,22 +0,0 @@
1
- <template>
2
- <v-container>
3
- <v-card class="pa-4 mt-4">
4
- <h2 class="mb-4">Campo etiqueta/valor</h2>
5
- <pui-field label="Etiqueta" v-model="model0"></pui-field>
6
- </v-card>
7
- </v-container>
8
- </template>
9
-
10
- <script>
11
- import PuiField from '@/components/PuiField';
12
-
13
- export default {
14
- name: 'TestField',
15
- components: { PuiField },
16
- data() {
17
- return {
18
- model0: 'Este es el valor del PuiField'
19
- };
20
- }
21
- };
22
- </script>
@@ -1,30 +0,0 @@
1
- <template>
2
- <v-container>
3
- <v-card class="pa-4 mt-4">
4
- <h2 class="mb-4">Cuadro de agrupación sin etiqueta</h2>
5
- <pui-field-set>
6
- {{ content }}
7
- </pui-field-set>
8
- </v-card>
9
- <v-card class="pa-4 mt-4">
10
- <h2 class="mb-4">Cuadro de agrupación con etiqueta y sombreado</h2>
11
- <pui-field-set title="Etiqueta" highlighted>
12
- {{ content }}
13
- </pui-field-set>
14
- </v-card>
15
- </v-container>
16
- </template>
17
-
18
- <script>
19
- import PuiFieldSet from '@/components/PuiFieldSet';
20
-
21
- export default {
22
- name: 'TestPuiFieldSet',
23
- components: { PuiFieldSet },
24
- data() {
25
- return {
26
- content: 'Aquí va el contenido del fieldset'
27
- };
28
- }
29
- };
30
- </script>
@@ -1,53 +0,0 @@
1
- <template>
2
- <v-container>
3
- <v-flex xs12>
4
- <v-card class="pa-4 mt-4">
5
- <h2 class="mb-4">Selectores</h2>
6
- <!-- Checkbox simple-->
7
- <pui-checkbox label="Checkbox simple" v-model="model60"></pui-checkbox>
8
- <!-- Checkbox no seleccionado-->
9
- <pui-checkbox label="Checkbox no seleccionado" v-model="model61"></pui-checkbox>
10
- <!-- Checkbox obligatorio seleccionado-->
11
- <pui-checkbox label="Checkbox obligatorio seleccionado" v-model="model62" required></pui-checkbox>
12
- <!-- Checkbox obligatorio seleccionado-->
13
- <pui-checkbox label="Checkbox desactivado" v-model="model63" disabled></pui-checkbox>
14
- <!-- Checkbox obligatorio seleccionado-->
15
- <pui-checkbox label="Checkbox desactivado seleccionado" v-model="model64" disabled></pui-checkbox>
16
- <!-- Checkbox devolviendo 1 o 0-->
17
- <pui-checkbox label="Checkbox devolviendo 1 ó 0" v-model="model65" true-value="1" false-value="0"></pui-checkbox>
18
- </v-card>
19
- </v-flex>
20
- </v-container>
21
- </template>
22
-
23
- <script>
24
- import PuiCheckbox from '@/components/PuiCheckbox';
25
-
26
- export default {
27
- name: 'TestInputCheckbox',
28
- components: { PuiCheckbox },
29
- data() {
30
- return {
31
- model60: true,
32
- model61: false,
33
- model62: false,
34
- model63: false,
35
- model64: true,
36
- model65: true,
37
- errorMessage: 'Mensaje de error del input',
38
- message:
39
- 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s.'
40
- };
41
- },
42
- methods: {
43
- printModel(modelName, value) {
44
- console.log(modelName, value);
45
- }
46
- },
47
- created() {
48
- for (let i = 1; i <= 100; i++) {
49
- this.$watch(() => this[`model${i}`], this.printModel.bind(this, `Model${i}`));
50
- }
51
- }
52
- };
53
- </script>