Skip to content

Commit

Permalink
Mendix 10.12
Browse files Browse the repository at this point in the history
  • Loading branch information
mgroeneweg committed Jul 2, 2024
1 parent d33d836 commit 62e1315
Show file tree
Hide file tree
Showing 298 changed files with 18,120 additions and 28,810 deletions.
26,425 changes: 4,570 additions & 21,855 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "documentlayoutwidget",
"widgetName": "DocumentLayoutWidget",
"version": "1.1.0",
"version": "1.2.0",
"description": "Document layout widget",
"copyright": "2023 Aiden",
"author": "Marcel Groeneweg",
Expand All @@ -25,17 +25,21 @@
"release": "pluggable-widgets-tools release:web"
},
"devDependencies": {
"@mendix/pluggable-widgets-tools": "^9.24.0"
},
"dependencies": {
"classnames": "^2.2.6"
"@mendix/pluggable-widgets-tools": "^10.12.0"
},
"dependencies": {},
"resolutions": {
"react": "18.2.0",
"react-native": "0.70.7"
"react-native": "0.72.7",
"react-dom": "18.2.0",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0"
},
"overrides": {
"react": "18.2.0",
"react-native": "0.70.7"
"react-native": "0.72.7",
"react-dom": "18.2.0",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0"
}
}
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="DocumentLayoutWidget" version="1.1.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="DocumentLayoutWidget" version="1.2.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="DocumentLayoutWidget.xml"/>
</widgetFiles>
Expand Down
Binary file added test/.mendix-cache/backup/AppBackup.mpr
Binary file not shown.
Binary file modified test/TestDocLayoutWidget.mpr
Binary file not shown.
79 changes: 79 additions & 0 deletions test/javascriptsource/datawidgets/actions/Export_To_Excel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";
import { utils, writeFileXLSX } from './xlsx-export-tools.js';

// BEGIN EXTRA CODE
// END EXTRA CODE

/**
* @param {string} datagridName
* @param {string} fileName
* @param {string} sheetName
* @param {boolean} includeColumnHeaders
* @param {Big} chunkSize - The number of items fetched and exported per request.
* @returns {Promise.<boolean>}
*/
export async function Export_To_Excel(datagridName, fileName, sheetName, includeColumnHeaders, chunkSize) {
// BEGIN USER CODE
if (!fileName || !datagridName || !sheetName) {
return false;
}

return new Promise((resolve, reject) => {
const stream =
window[window.DATAGRID_DATA_EXPORT][datagridName].create();

let worksheet;
let headers;
const streamOptions = { limit: chunkSize };
stream.process((msg) => {
if (!msg) {
return;
}

switch (msg.type) {
case "columns":
headers = msg.payload.map(column => column.name);
if (includeColumnHeaders) {
worksheet = utils.aoa_to_sheet([headers]);
}
break;
case "data":
if (worksheet === undefined) {
worksheet = utils.aoa_to_sheet(msg.payload)
} else {
utils.sheet_add_aoa(worksheet, msg.payload, { origin: -1 });
}
break;
case "end":
if (worksheet) {
// Set character width for each column
// https://docs.sheetjs.com/docs/csf/sheet#worksheet-object
worksheet["!cols"] = headers.map(header => ({
wch: header.length + 10
}));
const workbook = utils.book_new();
utils.book_append_sheet(workbook, worksheet, sheetName === "" ? "Data" : sheetName);
writeFileXLSX(workbook, `${fileName}.xlsx`);
resolve(true);
} else {
resolve(false);
}
break;
case "aborted":
resolve(false);
break;
}
}, streamOptions);

stream.start();
});
// END USER CODE
}
26 changes: 26 additions & 0 deletions test/javascriptsource/datawidgets/actions/Reset_All_Filters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import { Big } from "big.js";
import "mx-global";

// BEGIN EXTRA CODE
// END EXTRA CODE

/**
* @param {string} targetName - Name of the widget for which filters should be reset. Valid targets are: Data grid 2, Gallery. You can find filter name in widget settings in the "Common" group (Properties>Common>Name).
* @param {boolean} setToDefault - Set to default value. If true, filter will be set to its default value, otherwise it will be set to empty.
* @returns {Promise.<void>}
*/
export async function Reset_All_Filters(targetName, setToDefault) {
// BEGIN USER CODE
const plugin = window["com.mendix.widgets.web.plugin.externalEvents"];
if (plugin) {
plugin.emit(targetName, "reset.filters", setToDefault);
}
// END USER CODE
}
26 changes: 26 additions & 0 deletions test/javascriptsource/datawidgets/actions/Reset_Filter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";

// BEGIN EXTRA CODE
// END EXTRA CODE

/**
* @param {string} targetName - Name of the filter to reset. Valid targets are: Number filter, Date filter, Text filter, Drop-down filter. You can find filter name in widget settings in the "Common" group (Properties>Common>Name).
* @param {boolean} setToDefault - Set to default value. If true, filter will be set to its default value, otherwise it will be set to empty.
* @returns {Promise.<void>}
*/
export async function Reset_Filter(targetName, setToDefault) {
// BEGIN USER CODE
const plugin = window["com.mendix.widgets.web.plugin.externalEvents"];
if (plugin) {
plugin.emit(targetName, "reset.value", setToDefault);
}
// END USER CODE
}
34 changes: 34 additions & 0 deletions test/javascriptsource/datawidgets/actions/Set_Filter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";

// BEGIN EXTRA CODE
// END EXTRA CODE

/**
* @param {string} targetName - Name of the filter to set. Valid targets are: Number filter, Date filter, Text filter, Drop-down filter. You can find filter name in widget settings in the "Common" group (Properties>Common>Name).
* @param {boolean} useDefaultValue - Determine the use of default value provided by the filter component itself.
If true, "Value" section will be ignored
* @param {"DataWidgets.Filter_Operators.contains"|"DataWidgets.Filter_Operators.startsWith"|"DataWidgets.Filter_Operators.endsWith"|"DataWidgets.Filter_Operators.between"|"DataWidgets.Filter_Operators.greater"|"DataWidgets.Filter_Operators.greaterEqual"|"DataWidgets.Filter_Operators.equal"|"DataWidgets.Filter_Operators.notEqual"|"DataWidgets.Filter_Operators.smaller"|"DataWidgets.Filter_Operators.smallerEqual"|"DataWidgets.Filter_Operators.empty"|"DataWidgets.Filter_Operators.notEmpty"} operators - Selected operators value. If filter has operators, this value will be applied.
* @param {string} stringValue - Value set for dropdown filter or text filter. Choose empty if not use.
* @param {Big} numberValue - Number value for number filter. Choose empty if not use.
* @param {Date} dateTimeValue - Date time value for date filter, can also be use as "start date". Choose empty if not use.
* @param {Date} dateTimeValue_2 - End date time value for range filter. Choose empty if not use.
* @returns {Promise.<void>}
*/
export async function Set_Filter(targetName, useDefaultValue, operators, stringValue, numberValue, dateTimeValue, dateTimeValue_2) {
// BEGIN USER CODE
const plugin = window["com.mendix.widgets.web.plugin.externalEvents"];
if (plugin) {
plugin.emit(targetName, "set.value", useDefaultValue, {
operators, stringValue, numberValue, dateTimeValue, dateTimeValue2: dateTimeValue_2
});
}
// END USER CODE
}

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions test/javascriptsource/documentgeneration/service/.prettierrc

This file was deleted.

This file was deleted.

Loading

0 comments on commit 62e1315

Please sign in to comment.