@conduction/nextcloud-vue 0.1.0-beta.1 → 0.1.0-beta.2

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 (54) hide show
  1. package/README.md +226 -0
  2. package/dist/nextcloud-vue.cjs.js +7039 -2409
  3. package/dist/nextcloud-vue.cjs.js.map +1 -1
  4. package/dist/nextcloud-vue.css +237 -52
  5. package/dist/nextcloud-vue.esm.js +7012 -2386
  6. package/dist/nextcloud-vue.esm.js.map +1 -1
  7. package/package.json +2 -4
  8. package/src/components/CnActionsBar/CnActionsBar.vue +225 -0
  9. package/src/components/CnActionsBar/index.js +1 -0
  10. package/src/components/CnCopyDialog/CnCopyDialog.vue +250 -0
  11. package/src/components/CnCopyDialog/index.js +1 -0
  12. package/src/components/CnDataTable/CnDataTable.vue +0 -5
  13. package/src/components/CnDeleteDialog/CnDeleteDialog.vue +170 -0
  14. package/src/components/CnDeleteDialog/index.js +1 -0
  15. package/src/components/CnFormDialog/CnFormDialog.vue +629 -0
  16. package/src/components/CnFormDialog/index.js +1 -0
  17. package/src/components/CnIcon/CnIcon.vue +89 -0
  18. package/src/components/CnIcon/index.js +1 -0
  19. package/src/components/CnIndexPage/CnIndexPage.vue +434 -300
  20. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +484 -0
  21. package/src/components/CnIndexSidebar/index.js +1 -0
  22. package/src/components/CnPageHeader/CnPageHeader.vue +57 -0
  23. package/src/components/CnPageHeader/index.js +1 -0
  24. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +792 -0
  25. package/src/components/CnRegisterMapping/index.js +1 -0
  26. package/src/components/index.js +8 -4
  27. package/src/constants/metadata.js +30 -0
  28. package/src/css/actions-bar.css +48 -0
  29. package/src/css/badge.css +4 -4
  30. package/src/css/card.css +23 -23
  31. package/src/css/detail.css +13 -13
  32. package/src/css/index-page.css +32 -0
  33. package/src/css/index-sidebar.css +187 -0
  34. package/src/css/index.css +4 -0
  35. package/src/css/layout.css +14 -14
  36. package/src/css/page-header.css +33 -0
  37. package/src/css/pagination.css +12 -12
  38. package/src/css/table.css +21 -22
  39. package/src/css/utilities.css +2 -2
  40. package/src/index.js +11 -8
  41. package/src/store/plugins/index.js +1 -0
  42. package/src/store/plugins/registerMapping.js +185 -0
  43. package/src/store/useObjectStore.js +122 -61
  44. package/src/utils/headers.js +7 -1
  45. package/src/utils/index.js +1 -1
  46. package/src/utils/schema.js +133 -1
  47. package/src/components/CnDetailViewLayout/CnDetailViewLayout.vue +0 -88
  48. package/src/components/CnDetailViewLayout/index.js +0 -1
  49. package/src/components/CnEmptyState/CnEmptyState.vue +0 -78
  50. package/src/components/CnEmptyState/index.js +0 -1
  51. package/src/components/CnListViewLayout/CnListViewLayout.vue +0 -80
  52. package/src/components/CnListViewLayout/index.js +0 -1
  53. package/src/components/CnViewModeToggle/CnViewModeToggle.vue +0 -77
  54. package/src/components/CnViewModeToggle/index.js +0 -1
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <component :is="resolvedComponent" :size="size" />
3
+ </template>
4
+
5
+ <script>
6
+ import HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue'
7
+
8
+ /**
9
+ * Mutable icon registry.
10
+ *
11
+ * Pre-populated with HelpCircleOutline (the default fallback).
12
+ * Apps extend this at boot via registerIcons() — import only the
13
+ * icons you need, keeping bundles small.
14
+ *
15
+ * @example
16
+ * import { registerIcons } from '@conduction/nextcloud-vue'
17
+ * import Sword from 'vue-material-design-icons/Sword.vue'
18
+ * registerIcons({ Sword })
19
+ */
20
+ const _registry = {
21
+ HelpCircleOutline,
22
+ }
23
+
24
+ /**
25
+ * Register one or more MDI icon components for use with CnIcon.
26
+ *
27
+ * Call this in your app's main.js before mounting the Vue instance.
28
+ * Each key must be the PascalCase icon name matching the
29
+ * vue-material-design-icons file name (e.g. "Sword" for Sword.vue).
30
+ *
31
+ * @param {Record<string, import('vue').Component>} icons
32
+ *
33
+ * @example
34
+ * import { registerIcons } from '@conduction/nextcloud-vue'
35
+ * import Sword from 'vue-material-design-icons/Sword.vue'
36
+ * import MagicStaff from 'vue-material-design-icons/MagicStaff.vue'
37
+ * registerIcons({ Sword, MagicStaff })
38
+ */
39
+ export function registerIcons(icons) {
40
+ Object.assign(_registry, icons)
41
+ }
42
+
43
+ /**
44
+ * Read-only reference to the current icon registry.
45
+ * Useful for checking which icons are available.
46
+ *
47
+ * @type {Record<string, import('vue').Component>}
48
+ */
49
+ export const ICON_MAP = _registry
50
+
51
+ /**
52
+ * CnIcon — Renders a Material Design Icon by PascalCase name.
53
+ *
54
+ * Looks up the name in the shared registry. If not found, renders
55
+ * the fallback icon (HelpCircleOutline by default).
56
+ *
57
+ * @example
58
+ * <CnIcon name="AccountGroup" :size="24" />
59
+ *
60
+ * @see https://pictogrammers.com/library/mdi/
61
+ */
62
+ export default {
63
+ name: 'CnIcon',
64
+
65
+ props: {
66
+ /** MDI icon name in PascalCase (e.g. "AccountGroup") */
67
+ name: {
68
+ type: String,
69
+ required: true,
70
+ },
71
+ /** Icon pixel size */
72
+ size: {
73
+ type: Number,
74
+ default: 20,
75
+ },
76
+ /** Fallback icon name if `name` is not found in the registry */
77
+ fallback: {
78
+ type: String,
79
+ default: 'HelpCircleOutline',
80
+ },
81
+ },
82
+
83
+ computed: {
84
+ resolvedComponent() {
85
+ return _registry[this.name] || _registry[this.fallback] || HelpCircleOutline
86
+ },
87
+ },
88
+ }
89
+ </script>
@@ -0,0 +1 @@
1
+ export { default as CnIcon, ICON_MAP, registerIcons } from './CnIcon.vue'