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

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