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

158 lines 6.6 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 IvyRating from '@/views/_components/input/IvyRating.vue'
22 import IvyButtonAction from '@/views/_components/button/IvyButtonAction.vue'
23 import IvyButtonOption from '@/views/_components/button/IvyButtonOption.vue'
24 import IvyIndicatorButton from '@/views/_components/button/IvyIndicatorButton.vue'
25 import IvyTemplateCard from '@/views/_components/card/IvyTemplateCard.vue'
26 import IvyDivider from '@/views/_components/divider/IvyDivider.vue'
27 import IvyScrollbar from '@/views/_components/scrollbar/IvyScrollbar.vue'
28 import IvyCheckbox from '@/views/_components/checkbox/IvyCheckbox.vue'
29 import IvyCheckboxGroup from '@/views/_components/checkbox/IvyCheckboxGroup.vue'
30 import IvyRadio from '@/views/_components/radio/IvyRadio.vue'
31 import IvyRadioGroup from '@/views/_components/radio/IvyRadioGroup.vue'
32 import IvyToggle from '@/views/_components/toggle/IvyToggle.vue'
33 import IvyChoiceItem from '@/views/_components/choice/IvyChoiceItem.vue'
34 import IvyChoiceList from '@/views/_components/choice/IvyChoiceList.vue'
35 import IvyFilter from '@/views/_components/filter/IvyFilter.vue'
36 import IvyFilterItems from '@/views/_components/filter/IvyFilterItems.vue'
37 import IvyDropdown from '@/views/_components/dropdown/IvyDropdown.vue'
38 import IvyDropdownItem from '@/views/_components/dropdown/IvyDropdownItem.vue'
39 import IvyDropdownMenu from '@/views/_components/dropdown/IvyDropdownMenu.vue'
40 import IvyMenu from '@/views/_components/menu/IvyMenu.vue'
41 import IvyMenuAccordion from '@/views/_components/menu/IvyMenuAccordion.vue'
42 import IvyHeaderButton from '@/views/_components/menu/IvyHeaderButton.vue'
43 import IvyModal from '@/views/_components/modal/IvyModal.vue'
44 import IvyDialog from '@/views/_components/dialog/IvyDialog.vue'
45 import IvyShortDialog from '@/views/_components/sub-dialog/IvyShortDialog.vue'
46 import ProUpgradeDialog from '@/views/_components/dialog/ProUpgradeDialog.vue'
47 import IvyAlert from '@/views/_components/alert/IvyAlert.vue'
48 import IvyNotification from '@/views/_components/notification/IvyNotification.vue'
49 import IvyTooltip from '@/views/_components/tooltip/IvyTooltip.vue'
50 import IvyTable from '@/views/_components/table/IvyTable.vue'
51 import IvyTabs from '@/views/_components/tabs/IvyTabs.vue'
52 import IvyCollapse from '@/views/_components/collapse/IvyCollapse.vue'
53 import IvyCollapseItem from '@/views/_components/collapse/IvyCollapseItem.vue'
54 import IvySkeleton from '@/views/_components/skeleton/IvySkeleton.vue'
55 import IvySkeletonItem from '@/views/_components/skeleton/IvySkeletonItem.vue'
56 import IvyPagination from '@/views/_components/pagination/IvyPagination.vue'
57 import IvyEditor from '@/views/_components/html-editor/IvyEditor.vue'
58 import IvyDatePicker from '@/views/_components/datepicker/IvyDatePicker.vue'
59 import IvyTimePicker from '@/views/_components/timepicker/IvyTimePicker.vue'
60 import IvyPopover from '@/views/_components/popover/IvyPopover.vue'
61 import IvyPlaceholdersPopover from '@/views/_components/popover/IvyPlaceholdersPopover.vue'
62 import IvyContextMenu from '@/views/_components/context-menu/IvyContextMenu.vue'
63 import IvyContextMenuActions from '@/views/_components/context-menu/IvyContextMenuActions.vue'
64 import IvyLink from '@/views/_components/link/IvyLink.vue'
65 import IvyLogo from '@/views/_components/logo/IvyLogo.vue'
66 import IvySearch from '@/views/_components/search/IvySearch.vue'
67 import IvyThemeSwitch from '@/views/_components/theme-switch/IvyThemeSwitch.vue'
68 import ComingSoonBadge from '@/views/_components/badges/ComingSoonBadge.vue'
69 import Recaptcha from '@/views/_components/recaptcha/Recaptcha.vue'
70 import IvyNotificationBanner from '@/views/_components/banners/IvyNotificationBanner.vue'
71 import IvyNotificationActionsBanner from '@/views/_components/banners/IvyNotificationActionsBanner.vue'
72 import PageEmptyState from '@/views/admin/parts/PageEmptyState.vue'
73
74 /**
75 * Register all Lite components to a registry object
76 *
77 * @param componentsRegistry - The registry object to populate
78 * @param registerGlobal - Optional Vue app instance to register components globally (admin only)
79 */
80 export function registerLiteComponents(
81 componentsRegistry: Record<string, Component>,
82 registerGlobal?: { component: (name: string, component: Component) => void },
83 ): void {
84 const components = {
85 IvyFormItem,
86 IvyTextInput,
87 IvyIcon,
88 IvyNumberInput,
89 IvyPhoneInput,
90 IvySelectInput,
91 IvySelectOption,
92 IvyTextNumberInput,
93 IvyComingSoonInput,
94 IvyRating,
95 IvyButtonAction,
96 IvyButtonOption,
97 IvyIndicatorButton,
98 IvyTemplateCard,
99 IvyDivider,
100 IvyScrollbar,
101 IvyCheckbox,
102 IvyCheckboxGroup,
103 IvyRadio,
104 IvyRadioGroup,
105 IvyToggle,
106 IvyChoiceItem,
107 IvyChoiceList,
108 IvyFilter,
109 IvyFilterItems,
110 IvyDropdown,
111 IvyDropdownItem,
112 IvyDropdownMenu,
113 IvyMenu,
114 IvyMenuAccordion,
115 IvyHeaderButton,
116 IvyModal,
117 IvyDialog,
118 IvyShortDialog,
119 ProUpgradeDialog,
120 IvyAlert,
121 IvyNotification,
122 IvyTooltip,
123 IvyTable,
124 IvyTabs,
125 IvyCollapse,
126 IvyCollapseItem,
127 IvySkeleton,
128 IvySkeletonItem,
129 IvyPagination,
130 IvyEditor,
131 IvyDatePicker,
132 IvyTimePicker,
133 IvyPopover,
134 IvyPlaceholdersPopover,
135 IvyContextMenu,
136 IvyContextMenuActions,
137 IvyLink,
138 IvyLogo,
139 IvySearch,
140 IvyThemeSwitch,
141 ComingSoonBadge,
142 Recaptcha,
143 IvyNotificationBanner,
144 IvyNotificationActionsBanner,
145 PageEmptyState,
146 }
147
148 // Register each component
149 Object.entries(components).forEach(([name, component]) => {
150 componentsRegistry[name] = component
151
152 // Also register globally to Vue app if provided (admin only)
153 if (registerGlobal) {
154 registerGlobal.component(name, component)
155 }
156 })
157 }
158