Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Maven Build
run: mvn clean install -P quick-build
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Maven Build
run: mvn clean install -P unit-tests
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Install ttyd (prebuilt)
run: |
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Install ttyd (prebuilt)
run: |
Expand Down Expand Up @@ -326,7 +326,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Install ttyd (prebuilt)
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Maven Build
run: mvn clean install -P unit-tests -U
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Maven Build
run: mvn clean install -P quick-build
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Install ttyd (prebuilt)
run: |
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Install ttyd (prebuilt)
run: |
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
node-version: 22.x

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Install ttyd (prebuilt)
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
run: npm install -g npm@latest

- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: "Configure Git"
run: |
Expand Down Expand Up @@ -349,7 +349,7 @@ jobs:


- name: Install TypeScript and esbuild
run: npm install -g typescript esbuild
run: npm install -g typescript@5.9.3 esbuild

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ angular.module('forms', ['blimpKit', 'platformView', 'platformLocale', 'platform
})).constant('Dialogs', new DialogHub()).controller('FormController', ($scope, $http, Dialogs, LocaleService, ViewParameters) => {
$scope._is_view = ViewParameters.get().container !== undefined;
$scope._stepIndicators = {};
${dollar}scope._setDeepModel = (path, value) => {
const keys = path.split('.');
let current = $scope.model;

keys.forEach((key, index) => {
if (index === keys.length - 1) {
current[key] = value;
} else {
if (current[key] === null || current[key] === undefined) {
current[key] = {};
} else if (typeof current[key] !== 'object') {
throw new Error(`${key} is not an object! Cannot set inner keys.`);
}
current = current[key];
}
});
};
${dollar}scope._selectFromDocuments = (modelKey, multiple, uploadEnabled) => {
Dialogs.showWindow({id: 'documentStorage', params: { readOnly: !uploadEnabled, multiple: multiple, topic: '${projectName}.doc.select' } });
const docSelectListener = Dialogs.addMessageListener({
Expand All @@ -39,13 +56,13 @@ angular.module('forms', ['blimpKit', 'platformView', 'platformLocale', 'platform
}
});
};
$scope.forms = {
${dollar}scope.forms = {
form: {}
};
#if($metadata.url)
$scope._submit = () => {
${dollar}scope._submit = () => {
const payload = {};
angular.forEach($scope.forms.form, (control, name) => {
angular.forEach(${dollar}scope.forms.form, (control, name) => {
if (name[0] === '$') return;
payload[name] = control.$modelValue;
});
Expand Down Expand Up @@ -79,7 +96,7 @@ angular.module('forms', ['blimpKit', 'platformView', 'platformLocale', 'platform
};
#end

$scope.model = {};
${dollar}scope.model = {};
#macro(formWidgets $elements)
#foreach($element in $elements)
#if($element.controlId == "stepIndicator" && $element.staticData)
Expand All @@ -103,44 +120,44 @@ angular.module('forms', ['blimpKit', 'platformView', 'platformLocale', 'platform
);
});
#elseif($element.controlId == "input-number")
$scope.model.$element.model = 0;
${dollar}scope._setDeepModel('$element.model', 0);
#elseif($element.controlId == "input-checkbox")
$scope.model.$element.model = false;
${dollar}scope._setDeepModel('$element.model', false);
#elseif($element.controlId == "input-radio")
#set ($hasDefault = false)
#if ($element.staticOptions)
#foreach($radio in $element.staticOptions)
#if ($radio.isDefault == true)
#set ($hasDefault = true)
$scope.model.$element.model = '$radio.value';
${dollar}scope._setDeepModel('$element.model', '$radio.value');
#break
#end
#end
#end
#if (!$hasDefault)
$scope.model.$element.model = '';
${dollar}scope._setDeepModel('$element.model', '');
#end
#elseif($element.controlId == "input-select")
#set ($hasDefault = false)
#if ($element.staticOptions)
#foreach($select in $element.staticOptions)
#if ($select.isDefault == true)
#set ($hasDefault = true)
$scope.model.$element.model = '$select.value';
${dollar}scope._setDeepModel('$element.model', '$select.value');
#break
#end
#end
#end
#if (!$hasDefault)
$scope.model.$element.model = '';
${dollar}scope._setDeepModel('$element.model', '');
#end
#elseif($element.controlId == "input-color")
$scope.model.$element.model = '#ffbe6f';
${dollar}scope._setDeepModel('$element.model', '#ffbe6f');
#elseif($element.controlId == "paragraph")
#if($element.model && $element.text)
$scope.model.$element.model = `$element.text`;
${dollar}scope._setDeepModel('$element.model', `$element.text`);
#elseif($element.model)
$scope.model.$element.model = null;
${dollar}scope._setDeepModel('$element.model', null);
#end
#end
#if($element.children)
Expand All @@ -158,15 +175,15 @@ $code
${dollar}http.get(`$feed.url`).then(response => {
#if($feed.func)
#if($feed.name == 'model')
Object.assign($scope.model, ${feed.func}(response.data));
Object.assign(${dollar}scope.model, ${feed.func}(response.data));
#else
$scope.$feed.name = ${feed.func}(response.data);
${dollar}scope.$feed.name = ${feed.func}(response.data);
#end
#else
#if($feed.name == 'model')
Object.assign($scope.model, response.data);
Object.assign(${dollar}scope.model, response.data);
#else
$scope.$feed.name = response.data;
${dollar}scope.$feed.name = response.data;
#end
#end
}, error => {
Expand Down
Loading