PluginProbe
The Innovative Form Builder – IvyForms / 0.8
The Innovative Form Builder – IvyForms v0.8
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.8, at frontend/src/composables/registerLiteComponents.ts

152 lines 6.3 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 IvyTemplateCard from '@/views/_components/card/IvyTemplateCard.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 import IvyNotificationBanner from '@/views/_components/banners/IvyNotificationBanner.vue'
69 import IvyNotificationActionsBanner from '@/views/_components/banners/IvyNotificationActionsBanner.vue'
70
71 /**
72 * Register all Lite components to a registry object
73 *
74 * @param componentsRegistry - The registry object to populate
75 * @param registerGlobal - Optional Vue app instance to register components globally (admin only)
76 */
77 export function registerLiteComponents(
78 componentsRegistry: Record<string, Component>,
79 registerGlobal?: { component: (name: string, component: Component) => void },
80 ): void {
81 const components = {
82 IvyFormItem,
83 IvyTextInput,
84 IvyIcon,
85 IvyNumberInput,
86 IvyPhoneInput,
87 IvySelectInput,
88 IvySelectOption,
89 IvyTextNumberInput,
90 IvyComingSoonInput,
91 IvyButtonAction,
92 IvyButtonOption,
93 IvyIndicatorButton,
94 IvyTemplateCard,
95 IvyDivider,
96 IvyScrollbar,
97 IvyCheckbox,
98 IvyCheckboxGroup,
99 IvyRadio,
100 IvyRadioGroup,
101 IvyToggle,
102 IvyChoiceItem,
103 IvyChoiceList,
104 IvyFilter,
105 IvyFilterItems,
106 IvyDropdown,
107 IvyDropdownItem,
108 IvyDropdownMenu,
109 IvyMenu,
110 IvyMenuAccordion,
111 IvyHeaderButton,
112 IvyModal,
113 IvyDialog,
114 IvyShortDialog,
115 IvyAlert,
116 IvyNotification,
117 IvyTooltip,
118 IvyTable,
119 IvyTabs,
120 IvyCollapse,
121 IvyCollapseItem,
122 IvySkeleton,
123 IvySkeletonItem,
124 IvyPagination,
125 IvyEditor,
126 IvyDatePicker,
127 IvyTimePicker,
128 IvyPopover,
129 IvyPlaceholdersPopover,
130 IvyContextMenu,
131 IvyContextMenuActions,
132 IvyLink,
133 IvyLogo,
134 IvySearch,
135 IvyThemeSwitch,
136 ComingSoonBadge,
137 Recaptcha,
138 IvyNotificationBanner,
139 IvyNotificationActionsBanner,
140 }
141
142 // Register each component
143 Object.entries(components).forEach(([name, component]) => {
144 componentsRegistry[name] = component
145
146 // Also register globally to Vue app if provided (admin only)
147 if (registerGlobal) {
148 registerGlobal.component(name, component)
149 }
150 })
151 }
152