# JRE-Client-Side
[Guide Followed](https://www.freecodecamp.org/news/how-to-create-and-publish-your-first-npm-package/)

# Change Log

## **_1.1.12_**
8/27/2025
- Added type `button` to delete file button in `JRE-Files.js` to fix a bug with it submitting the form when a file is deleted

## **_1.1.11_**
8/18/2025
- Added the ability to add a prefix to images in `JRE-Files.js`. You can add a prefix with `Options.ImagePrefix`

## **_1.1.10_**
7/28/2025
- Added the ability to compress images and also convert HEIC files in `JRE-Files.js`. Images are not compressed by default. You can enable it with `Options.CompressImages`
- Changed `LoadScripts` to be `LoadScriptsAsync`in `JRE.js` so that it is clearer that it needs to be awaited. Also optimized and added more logging

## **_1.1.9_**
3/26/2025
- Modified `JRE-TableNav.js` to skip cells that have hidden or disabled inputs

## **_1.1.8_**
2/11/2025
- Added `AjaxPatch` to `JRE.js` to allow for PATCH requests

## **_1.1.7_**
1/16/2025
- Added CSS to hide tooltips when printing

## **_1.1.6_**
7/31/2024
- Added the ability to skip rows and columns in `JRE-TableNav.js`
- Made `JRE-TableNav.js` an extension method of jQuery
  - Example of skipping rows and columns with classes `WeeklyTotalRow` and `PTE-Greyed-Out`
    ```javascript
    $("#TimecardsTable").tableNav(new ArrowKeyOptions({skipWithClasses: ["WeeklyTotalRow", "PTE-Greyed-Out"]}));
    ```
- Added `alphanumeric` type for stupidtable sorting

- ## **_1.1.5_**
7/24/2024
- Bug fix for `ObjectsEqual` function

## **_1.1.4_**
3/27/2024
- Added SetErrorPageStorage function
- Added ObjectsEqual function that checks if an object is equal to another
- Added DownloadFileFromFetch function that takes the response object from a fetch request and then downloads the file to the user's browser
- Added a `required` CSS class for labels that adds a red asterisk after the label
   
## **_1.1.3_**
3/2/2024
- Added FetchGetZipFile method to download a zip file from a controller
   - Had to use Fetch instead of AJAX due to blob/error handling
   - Used just like the other GET,POST,PUT,DELETE methods

## **_1.1.0_**
1/5/2024
- Added early version of JRE-PDF for embedding PDFs into web pages
   - More documentation and improvements coming soon but main functionality should stay the same
- Replaced deprecated document.ready calls

## **_1.0.16_**
12/18/2023
- Should be a fix for sometimes getting an error when calling ClearLocalCache on mobile
 
## **_1.0.15_**
12/11/2023
- Added customized pdf.js library with HTML viewer for embedded PDF editing/filling

## **_1.0.14_**
12/7/2023
- Changed GoToError to be ProcessError so that it is clearer what is doing (not just redirecting to an error)
   - Kept GoToError but marked it as deprecated so intellisense will warn you. Will remove eventually
- Fixes to JRE-Speech to work on iOS/iPadOS

## **_1.0.13_**
11/15/2023
- Commented LoadStyleSheet calls in JRE-Files and JRE-Speech
- Added null check to GoToError

## **_1.0.12_**
10/30/2023
- Changed dynamic loading of scripts to point to lib instead of a CDN
- Added ClearLocalCache function to JRE.js. This required a ClearLocalCache function in the CommonController

## **_1.0.11_**
10/10/2023
- Added custom "date" type for stupidtable sorting
   - To use the date type, just set the attribute data-sort="date" on the th
- Added JRE-TableNav.js to allow for navigating through a table using the arrow keys similar to excel
   - To enable it on a table
     ``` javascript
     $('#MyTable input, #MyTable textarea').on("keydown", function (e) {
         DetectArrowKey(e);
     });
     ```
 
## **_1.0.10_**
10/10/2023
- Modified table sorting on load to allow for sorting tables that do not have an id attribute defined

## **_1.0.9_**
9/28/2023
- Bug fix

## **_1.0.8_**
9/28/2023
- JRE-Files.js
  - Changed constructor to take an object to allow for multiple optional params
  - Added ability to define whether it takes multiple files or not
  - Added custom label
  - Added custom file size limit
  - Added loading of BS Icons stylesheet for you if it is not already found
  - Improved styling
  - Removed old code and comments
	
- JRE.js
  - Added showing of toasts on page load so you dont have to do this manually (supports adding toasts to layout file)
  - Modified PostBtnEnable to hide all .postSpinner to support calling it in GoToError
    - Should not cause issues as only one should be spinning at a time
    - Could also use the postBtnFilter param if you need to filter down to a specific spinner
  - Added AJAX methods for PUT and DELETE
  - Modified LoadScript to check if the script is already references in the page before loading it
  - Added LoadStyleSheet similar to LoadScript
  - Added the following toast helper functions
    - ShowSuccessToast
    - ShowErrorToast
    - SetSuccessToastStorage
    - SetErrorToastStorage

- JRE-Speech.js
  - Added speech-to-text functionality
  - Just need to add "jre-speech" class to controls where you want speech-to-text
  - Basic Examples:
    ``` html
    <input class="jre-speech" />
    <textarea class="jre-speech"></textarea>
    ```
		