@mapomodule/uikit 1.0.0-alpha.4 → 1.0.0-alpha.40

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 (80) hide show
  1. package/CHANGELOG.md +730 -0
  2. package/components/ConfirmDialog.vue +12 -16
  3. package/components/Detail/Detail.vue +406 -272
  4. package/components/Detail/DetailLangSwitch.vue +7 -2
  5. package/components/DropArea.vue +63 -56
  6. package/components/Form/Form.vue +218 -0
  7. package/components/Form/FormField.vue +213 -0
  8. package/components/Form/FormGroup.vue +146 -0
  9. package/components/Form/FormTabs.vue +188 -0
  10. package/components/Form/defaults.js +91 -0
  11. package/components/Form/fields/ColorField.vue +79 -0
  12. package/components/{fields → Form/fields}/DateField.vue +20 -11
  13. package/components/Form/fields/EnhancedMediaField.vue +224 -0
  14. package/components/Form/fields/FileField.vue +125 -0
  15. package/components/Form/fields/FksField.vue +88 -0
  16. package/components/Form/fields/MediaField.vue +159 -0
  17. package/components/Form/fields/MediaM2mField.vue +149 -0
  18. package/components/Form/fields/Repeater.vue +593 -0
  19. package/components/Form/fields/SeoPreview.vue +89 -0
  20. package/components/Form/fields/wygEditor/defaults.js +25 -0
  21. package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/events.js +0 -0
  22. package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/mapomedia.plugin.js +7 -6
  23. package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/script.injector.js +0 -0
  24. package/components/Form/fields/wygEditor/wygEditor.vue +285 -0
  25. package/components/LangSwitcher.vue +44 -0
  26. package/components/List/List.vue +119 -42
  27. package/components/List/ListActions.vue +60 -21
  28. package/components/List/ListFilters.vue +166 -114
  29. package/components/List/ListHead.vue +30 -12
  30. package/components/List/ListQuickEdit.vue +130 -61
  31. package/components/List/ListTable.vue +292 -80
  32. package/components/Login.vue +17 -7
  33. package/components/LogoutButton.vue +42 -28
  34. package/components/MediaManager/MediaBreadcrumbs.vue +45 -0
  35. package/components/MediaManager/MediaEditor.vue +282 -121
  36. package/components/MediaManager/MediaFolders.vue +169 -116
  37. package/components/MediaManager/MediaGallery.vue +151 -146
  38. package/components/MediaManager/MediaManager.vue +117 -159
  39. package/components/MediaManager/MediaManagerDialog.vue +36 -31
  40. package/components/MediaManager/MediaPreview.vue +203 -0
  41. package/components/MediaManager/MediaUploader.vue +55 -43
  42. package/components/SnackBar.vue +5 -7
  43. package/components/ThemeToggle.vue +13 -0
  44. package/components/layout/Sidebar/Sidebar.vue +61 -30
  45. package/components/layout/Sidebar/SidebarList.vue +19 -15
  46. package/components/layout/Sidebar/SidebarListItem.vue +111 -39
  47. package/components/layout/Sidebar/SidebarProfile.vue +42 -0
  48. package/components/layout/Sidebar/SidebarTitle.vue +45 -0
  49. package/components/layout/Topbar/Topbar.vue +11 -42
  50. package/components/layout/routebuilder.js +3 -3
  51. package/defaults/i18n.js +37 -0
  52. package/defaults/vuetify.js +34 -0
  53. package/layouts/default.vue +33 -18
  54. package/layouts/empty.vue +10 -0
  55. package/module.js +7 -5
  56. package/package.json +6 -4
  57. package/pages/index.vue +19 -18
  58. package/static/{favicon.ico → mapo/favicon.ico} +0 -0
  59. package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +7 -0
  60. package/static/mapo/tinymce-skins/mapo-dark/content.min.css +7 -0
  61. package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +7 -0
  62. package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +7 -0
  63. package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +7 -0
  64. package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +7 -0
  65. package/static/mapo/tinymce-skins/mapo-light/content.min.css +7 -0
  66. package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +7 -0
  67. package/static/mapo/tinymce-skins/mapo-light/skin.min.css +7 -0
  68. package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +7 -0
  69. package/translations/en-US.js +134 -0
  70. package/translations/it-IT.js +136 -0
  71. package/components/Detail/DetailField.vue +0 -129
  72. package/components/Detail/defaults.js +0 -50
  73. package/components/fields/M2mField.vue +0 -95
  74. package/components/fields/MediaField.vue +0 -195
  75. package/components/fields/MediaM2mField.vue +0 -238
  76. package/components/fields/TinyMce/TinyMce.vue +0 -177
  77. package/components/fields/TinyMce/defaults.js +0 -55
  78. package/components/layout/Sidebar/SidebarFooter.vue +0 -75
  79. package/defaults.js +0 -29
  80. package/layouts/error.vue +0 -45
@@ -15,27 +15,26 @@
15
15
  </v-dialog>
16
16
  </div>
17
17
  </template>
18
- <script>
19
18
 
19
+ <script>
20
20
  /**
21
- * This component is embedded in the default layout.
21
+ * This component is embedded in the default layout.
22
22
  * It's a dynamic dialog which is used to ask the user for confirmation before performing an operation.<br>
23
23
  * For example: `Do you really want to delete the content 'abcd'?` <br><br>
24
24
  * It can be globally accessed with [this.$mapo.$confirm](/core/#confirm)
25
- *
26
- */
25
+ *
26
+ */
27
27
  export default {
28
28
  name: "ConfirmDialog",
29
29
  data() {
30
30
  return {
31
31
  response: null,
32
32
  dialog: false,
33
- optionsBk: null,
34
33
  options: {
35
- title: this.title,
36
- question: this.question,
37
- dismissButton: this.dismissButton,
38
- approveButton: this.approveButton,
34
+ title: this.title || this.$t("mapo.confirm"),
35
+ question: this.question || this.$t("mapo.confirmDialog.areYouSure"),
36
+ dismissButton: this.dismissButton || { text: this.$t("mapo.cancel"), attrs: { text: true } },
37
+ approveButton: this.approveButton || { text: this.$t("mapo.ok"), attrs: { color: "primary", text: true } },
39
38
  attrs: { ...this.$attrs }
40
39
  },
41
40
  on: {
@@ -56,35 +55,31 @@ export default {
56
55
  // The text in the body of the dialog.
57
56
  question: {
58
57
  type: String,
59
- default: "Are you sure of what you are doing?"
60
58
  },
61
59
  // The title of the dialog.
62
60
  title: {
63
61
  type: String,
64
- default: "Confirm"
65
62
  },
66
63
  // The text plus props passed to the dismiss Button.
67
64
  dismissButton: {
68
65
  // `{ text: String, attrs: Object }`
69
66
  type: Object,
70
- default: () => ({ text: "Cancel", attrs: { text: true } })
71
67
  },
72
68
  // The text plus props passed to the approve Button.
73
69
  approveButton: {
74
70
  // `{ text: String, attrs: Object }`
75
71
  type: Object,
76
- default: () => ({ text: "Ok", attrs: { color: "primary", text: true } })
77
72
  }
78
73
  },
79
74
  computed: {
80
75
  approveTxt() {
81
- return this.options.approveButton?.text || "Ok";
76
+ return this.options.approveButton?.text || this.$t("mapo.ok");
82
77
  },
83
78
  approveAttrs() {
84
79
  return this.options.approveButton?.attrs || {};
85
80
  },
86
81
  dismissTxt() {
87
- return this.options.dismissButton?.text || "Cancel";
82
+ return this.options.dismissButton?.text || this.$t("mapo.cancel");
88
83
  },
89
84
  dismissAttrs() {
90
85
  return this.options.dismissButton?.attrs || {};
@@ -145,7 +140,8 @@ export default {
145
140
  this.resolve(this.response);
146
141
  }
147
142
  this.dialog = false;
148
- this.options = { ...this.optionsBk };
143
+ this.response = false;
144
+ setTimeout(() => this.options = { ...this.optionsBk }, 300);
149
145
  }
150
146
  }
151
147
  };