robobyte-front-builder 1.0.16 → 1.0.17

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robobyte-front-builder",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "RoboByte low-code UI builder, Report builder, and navigation extension system",
5
5
  "main": "src/lib/index.js",
6
6
  "files": [
@@ -44,20 +44,24 @@
44
44
  */
45
45
 
46
46
  import { useMemo } from 'react'
47
+ import { ModuleRegistry } from 'ag-grid-community'
48
+ import { AllEnterpriseModule, LicenseManager } from 'ag-grid-enterprise'
47
49
  import { NavigationExtensionProvider } from '../navigation/NavigationExtensionContext'
48
50
  import { configureRoboByte } from '../../services/config'
49
51
  import { AuthContext } from '../../context/AuthContext'
50
52
 
51
53
  /**
52
- * @param {string} [baseURL] Root API server URL (with trailing slash)
53
- * @param {string} [apiURL] /api prefix URL (with trailing slash)
54
- * @param {object} [user] Current user from the host auth context
55
- * @param {string} [accessToken] Current Bearer token from the host auth context
56
- * @param {Object[]} [navExtensions] Static nav items to inject into the sidebar
57
- * @param {Object} [endpoints] Full-URL overrides for each endpoint group+name.
58
- * Shape: { [group]: { [name]: fullURL } }
59
- * e.g. { ReportBuilder: { GenericGet: 'https://api.example.com/api/ReportBuilder/GenericGet' } }
60
- * When provided, the package uses these URLs instead of its own defaults.
54
+ * @param {string} [baseURL] Root API server URL (with trailing slash)
55
+ * @param {string} [apiURL] /api prefix URL (with trailing slash)
56
+ * @param {object} [user] Current user from the host auth context
57
+ * @param {string} [accessToken] Current Bearer token from the host auth context
58
+ * @param {Object[]} [navExtensions] Static nav items to inject into the sidebar
59
+ * @param {Object} [endpoints] Full-URL overrides for each endpoint group+name.
60
+ * Shape: { [group]: { [name]: fullURL } }
61
+ * @param {string} [agGridLicenseKey] AG Grid Enterprise license key.
62
+ * Pass your key here the provider calls
63
+ * LicenseManager.setLicenseKey() and registers
64
+ * AllEnterpriseModule automatically.
61
65
  * @param {ReactNode} children
62
66
  */
63
67
  const RoboByteFrontBuilderProvider = ({
@@ -68,6 +72,7 @@ const RoboByteFrontBuilderProvider = ({
68
72
  accessToken = null,
69
73
  navExtensions = [],
70
74
  endpoints = null,
75
+ agGridLicenseKey = null,
71
76
  }) => {
72
77
  // Apply URL + endpoint config synchronously before any child renders.
73
78
  useMemo(() => {
@@ -76,6 +81,14 @@ const RoboByteFrontBuilderProvider = ({
76
81
  }
77
82
  }, [baseURL, apiURL, endpoints])
78
83
 
84
+ // Set up AG Grid Enterprise once — safe to call multiple times (idempotent).
85
+ useMemo(() => {
86
+ if (agGridLicenseKey) {
87
+ LicenseManager.setLicenseKey(agGridLicenseKey)
88
+ }
89
+ ModuleRegistry.registerModules([AllEnterpriseModule])
90
+ }, [agGridLicenseKey])
91
+
79
92
  // Auth context value — comes entirely from the host. No logic here.
80
93
  const authValue = useMemo(
81
94
  () => ({ user, accessToken }),
package/src/pages/_app.js CHANGED
@@ -46,14 +46,6 @@ import {useContext, useEffect} from "react";
46
46
  import { NavigationExtensionProvider } from 'src/lib/navigation/NavigationExtensionContext'
47
47
 
48
48
  const clientSideEmotionCache = createEmotionCache()
49
- import { AllEnterpriseModule, LicenseManager} from "ag-grid-enterprise";
50
-
51
- LicenseManager.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-064521}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{RoboByte}_is_granted_a_{Multiple_Applications}_Developer_License_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_need_to_be_licensed_in_addition_to_the_ones_working_with_{AG_Grid}_Enterprise___This_key_has_not_been_granted_a_Deployment_License_Add-on___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{4_August_2025}____[v3]_[01]_MTc1NDI2MjAwMDAwMA==3b122b26308a216244f31e0932146fec");
52
- import {ModuleRegistry} from "ag-grid-community";
53
-
54
- ModuleRegistry. registerModules([
55
- AllEnterpriseModule,
56
- ]);
57
49
  // ** Pace Loader
58
50
  if (themeConfig.routingLoader) {
59
51
  Router.events.on('routeChangeStart', () => {