PluginProbe
The Innovative Form Builder – IvyForms / 0.6
The Innovative Form Builder – IvyForms v0.6
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / composables / registerLiteComponents.ts

registerLiteComponents.ts in The Innovative Form Builder – IvyForms 0.6, at frontend/src/composables/registerLiteComponents.ts

148 lines 6.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Register all Lite components to window.IvyForms.components
3 *
4 * This makes all Lite components available to the Pro plugin and other extenders.
5 * Pro plugin cannot import components directly because they are in separate bundles.
6 * Instead, they access components through the global window.IvyForms.components registry.
7 */
8
9 import type { Component } from 'vue'
10
11 // Import all Lite components
12 import IvyFormItem from '@/views/_components/form/IvyFormItem.vue'
13 import IvyTextInput from '@/views/_components/input/IvyTextInput.vue'
14 import IvyIcon from '@/views/_components/icon/IvyIcon.vue'
15 import IvyNumberInput from '@/views/_components/input/IvyNumberInput.vue'
16 import IvyPhoneInput from '@/views/_components/input/IvyPhoneInput.vue'
17 import IvySelectInput from '@/views/_components/input/IvySelectInput.vue'
18 import IvySelectOption from '@/views/_components/input/IvySelectOption.vue'
19 import IvyTextNumberInput from '@/views/_components/input/IvyTextNumberInput.vue'
20 import IvyComingSoonInput from '@/views/_components/input/IvyComingSoonInput.vue'
21 import IvyButtonAction from '@/views/_components/button/IvyButtonAction.vue'
22 import IvyButtonOption from '@/views/_components/button/IvyButtonOption.vue'
23 import IvyIndicatorButton from '@/views/_components/button/IvyIndicatorButton.vue'
24 import IvyCard from '@/views/_components/card/IvyCard.vue'
25 import IvyDivider from '@/views/_components/divider/IvyDivider.vue'
26 import IvyScrollbar from '@/views/_components/scrollbar/IvyScrollbar.vue'
27 import IvyCheckbox from '@/views/_components/checkbox/IvyCheckbox.vue'
28 import IvyCheckboxGroup from '@/views/_components/checkbox/IvyCheckboxGroup.vue'
29 import IvyRadio from '@/views/_components/radio/IvyRadio.vue'
30 import IvyRadioGroup from '@/views/_components/radio/IvyRadioGroup.vue'
31 import IvyToggle from '@/views/_components/toggle/IvyToggle.vue'
32 import IvyChoiceItem from '@/views/_components/choice/IvyChoiceItem.vue'
33 import IvyChoiceList from '@/views/_components/choice/IvyChoiceList.vue'
34 import IvyFilter from '@/views/_components/filter/IvyFilter.vue'
35 import IvyFilterItems from '@/views/_components/filter/IvyFilterItems.vue'
36 import IvyDropdown from '@/views/_components/dropdown/IvyDropdown.vue'
37 import IvyDropdownItem from '@/views/_components/dropdown/IvyDropdownItem.vue'
38 import IvyDropdownMenu from '@/views/_components/dropdown/IvyDropdownMenu.vue'
39 import IvyMenu from '@/views/_components/menu/IvyMenu.vue'
40 import IvyMenuAccordion from '@/views/_components/menu/IvyMenuAccordion.vue'
41 import IvyHeaderButton from '@/views/_components/menu/IvyHeaderButton.vue'
42 import IvyModal from '@/views/_components/modal/IvyModal.vue'
43 import IvyDialog from '@/views/_components/dialog/IvyDialog.vue'
44 import IvyShortDialog from '@/views/_components/sub-dialog/IvyShortDialog.vue'
45 import IvyAlert from '@/views/_components/alert/IvyAlert.vue'
46 import IvyNotification from '@/views/_components/notification/IvyNotification.vue'
47 import IvyTooltip from '@/views/_components/tooltip/IvyTooltip.vue'
48 import IvyTable from '@/views/_components/table/IvyTable.vue'
49 import IvyTabs from '@/views/_components/tabs/IvyTabs.vue'
50 import IvyCollapse from '@/views/_components/collapse/IvyCollapse.vue'
51 import IvyCollapseItem from '@/views/_components/collapse/IvyCollapseItem.vue'
52 import IvySkeleton from '@/views/_components/skeleton/IvySkeleton.vue'
53 import IvySkeletonItem from '@/views/_components/skeleton/IvySkeletonItem.vue'
54 import IvyPagination from '@/views/_components/pagination/IvyPagination.vue'
55 import IvyEditor from '@/views/_components/html-editor/IvyEditor.vue'
56 import IvyDatePicker from '@/views/_components/datepicker/IvyDatePicker.vue'
57 import IvyTimePicker from '@/views/_components/timepicker/IvyTimePicker.vue'
58 import IvyPopover from '@/views/_components/popover/IvyPopover.vue'
59 import IvyPlaceholdersPopover from '@/views/_components/popover/IvyPlaceholdersPopover.vue'
60 import IvyContextMenu from '@/views/_components/context-menu/IvyContextMenu.vue'
61 import IvyContextMenuActions from '@/views/_components/context-menu/IvyContextMenuActions.vue'
62 import IvyLink from '@/views/_components/link/IvyLink.vue'
63 import IvyLogo from '@/views/_components/logo/IvyLogo.vue'
64 import IvySearch from '@/views/_components/search/IvySearch.vue'
65 import IvyThemeSwitch from '@/views/_components/theme-switch/IvyThemeSwitch.vue'
66 import ComingSoonBadge from '@/views/_components/badges/ComingSoonBadge.vue'
67 import Recaptcha from '@/views/_components/recaptcha/Recaptcha.vue'
68
69 /**
70 * Register all Lite components to a registry object
71 *
72 * @param componentsRegistry - The registry object to populate
73 * @param registerGlobal - Optional Vue app instance to register components globally (admin only)
74 */
75 export function registerLiteComponents(
76 componentsRegistry: Record<string, Component>,
77 registerGlobal?: { component: (name: string, component: Component) => void },
78 ): void {
79 const components = {
80 IvyFormItem,
81 IvyTextInput,
82 IvyIcon,
83 IvyNumberInput,
84 IvyPhoneInput,
85 IvySelectInput,
86 IvySelectOption,
87 IvyTextNumberInput,
88 IvyComingSoonInput,
89 IvyButtonAction,
90 IvyButtonOption,
91 IvyIndicatorButton,
92 IvyCard,
93 IvyDivider,
94 IvyScrollbar,
95 IvyCheckbox,
96 IvyCheckboxGroup,
97 IvyRadio,
98 IvyRadioGroup,
99 IvyToggle,
100 IvyChoiceItem,
101 IvyChoiceList,
102 IvyFilter,
103 IvyFilterItems,
104 IvyDropdown,
105 IvyDropdownItem,
106 IvyDropdownMenu,
107 IvyMenu,
108 IvyMenuAccordion,
109 IvyHeaderButton,
110 IvyModal,
111 IvyDialog,
112 IvyShortDialog,
113 IvyAlert,
114 IvyNotification,
115 IvyTooltip,
116 IvyTable,
117 IvyTabs,
118 IvyCollapse,
119 IvyCollapseItem,
120 IvySkeleton,
121 IvySkeletonItem,
122 IvyPagination,
123 IvyEditor,
124 IvyDatePicker,
125 IvyTimePicker,
126 IvyPopover,
127 IvyPlaceholdersPopover,
128 IvyContextMenu,
129 IvyContextMenuActions,
130 IvyLink,
131 IvyLogo,
132 IvySearch,
133 IvyThemeSwitch,
134 ComingSoonBadge,
135 Recaptcha,
136 }
137
138 // Register each component
139 Object.entries(components).forEach(([name, component]) => {
140 componentsRegistry[name] = component
141
142 // Also register globally to Vue app if provided (admin only)
143 if (registerGlobal) {
144 registerGlobal.component(name, component)
145 }
146 })
147 }
148