open-index/open-npm huggingface dataset:
npm package: @floriannoever/bc-controladdin-helper
Description: Helper for invoking AL events for a controladdin from JS/TS
Author: Florian Noever
Latest version: 1.0.5

# BC ControlAddIn Helper
Helper for invoking AL events or making JS/TS functions available for AL ControlAddIns to call.

## How to use the package
1. Install via `npm install --save @floriannoever/bc-controladdin-helper`
2. Import the ALHelper class `import ALHelper from '@floriannoever/bc-controladdin-helper';`
3. Use the available function as mentioned below

## How to Call Functions from AL code
The template supports making functions public to be callable from the BC ControlAddIn. For this you need to follow these steps:
1. Have a function that you want to make accessible for AL Code:
    ```javascript
    function someGlobalFunction() {
        window.alert('Hello from the control add-in!');
    }
    ```
2. Make that function accessible using the `ALHelper` class:
    ```javascript
    ALHelper.makeFunctionAccessible(someGlobalFunction);
    ```
3. In the ControlAddIn of your BC Project, define the Function *(Note that first letter is capital)*:
    ```c#
    controladdin "PTE MyControlAddIn"
    {
        Scripts = './addins/myproject.js';

        procedure SomeGlobalFunction();
    }
    ```
4. Call the procedure like you would normally do using the ControlAddIn

## How to call an AL Event from React
The template supports calling Events that are defined in the ControlAddIn file in the BC Project. For this you need to follow these steps:
1. Add the event you want to the ControlAddIn in your BC Project:
    ```c#
    controladdin "PTE MyControlAddIn"
    {
        Scripts = './addins/myproject.js';

        event OnControlReady(Message: Text; CurrDateTime: Text);
    }
    ```
2. Invoke the event in your Project:
    ```javascript
    const datetime = new Date(Date.now());
    ALHelper.invokeEvent('OnControlReady', 'Control Ready Event. Time: ', datetime.toLocaleTimeString());

    // or skipping event if BC Environment is busy (operation is running)
    ALHelper.invokeEventSkipBusy('OnControlReady', 'Control Ready Event. Time: ', datetime.toLocaleTimeString());
    ```
    *Note that the First parameter of the `invokeEvent` function is the name of the Event in your BC Project. All other parameters are the variables you want to call the event in BC with `invokeEvent('name', param1, param2)`. If you have your data in form of an array just use the spread operator `invokeEvent('name', ...yourarray)`*
npm package: @florianpat/lando-core
Description: The libraries that power all of Lando.
Author: Florian Patruck @florianPat
Latest version: 3.26.3-1florianPat.13

# Flos Lando Core

These are the core libraries that power flos version of Lando with seamless compose integration.

Thanks to the upstream [lando-core](https://github.com/lando/core)!