Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking/tdr 9/handlebars 4 upgrade #78

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft
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
18 changes: 0 additions & 18 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,6 @@ const Handlebars = require('handlebars');

const production = process.env.NODE_ENV === 'production';

/**
* Support of handlebars 1.3.0
* TODO remove once migrated to hbs >= 3.0.0
*/
const originalVisitor = Handlebars.Visitor;
Handlebars.Visitor = function () {
return originalVisitor.call(this);
};
Handlebars.Visitor.prototype = Object.create(originalVisitor.prototype);
Handlebars.Visitor.prototype.accept = function () {
try {
originalVisitor.prototype.accept.apply(this, arguments);
} catch (e) {
// ignore
}
};
/* --------------------------------------------------------- */

const globPath = p => p.replace(/\\/g, '/');
const inputs = glob.sync(globPath(path.join(srcDir, '**', '*.js')));

Expand Down
145 changes: 46 additions & 99 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"@oat-sa/prettier-config": "^0.1.1",
"@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
"@oat-sa/tao-calculator": "^0.6.2",
"@oat-sa/tao-core-libs": "^0.5.3",
"@oat-sa/tao-core-sdk": "^2.0.1",
"@oat-sa/tao-core-libs": "oat-sa/tao-core-libs-fe#breaking/TDR-9/handlebars-4-upgrade",
"@oat-sa/tao-core-sdk": "oat-sa/tao-core-sdk-fe#breaking/TDR-9/handlebars-4-upgrade",
"@oat-sa/tao-core-shared-libs": "^1.4.1",
"@oat-sa/tao-qunit-testrunner": "^2.0.0",
"async": "^0.2.10",
Expand All @@ -66,7 +66,7 @@
"fs-extra": "^11.1.1",
"gamp": "^0.2.1",
"glob": "^8.1.0",
"handlebars": "1.3.0",
"handlebars": "4.7.8",
"interactjs": "1.3.4",
"jquery": "1.9.1",
"jquery-mockjax": "^2.5.0",
Expand Down
20 changes: 9 additions & 11 deletions src/datalist/tpl/list.tpl
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{{#each list}}
{{#each list as |row|}}
<tr data-id="{{id}}">
{{#if ../selectable}}
{{#if @root.selectable}}
<td class="checkboxes"><input type="checkbox" name="cb[{{id}}]" value="1" /></td>
{{/if}}
<td class="label">{{label}}</td>
{{#if ../actions}}
{{#if @root.actions}}
<td class="actions">
{{#each ../../actions}}
{{#with ../../line}}
{{#unless ../hidden}}
{{#with ../../this}}
<button class="btn-info small" data-control="{{id}}"{{#if title}} title="{{title}}"{{/if}}>
{{#if icon}}<span class="icon icon-{{icon}}"></span>{{/if}}
{{label}}
{{#each @root.actions as |action|}}
{{#with row.line}}
{{#unless action.hidden}}
<button class="btn-info small" data-control="{{action.id}}"{{#if action.title}} title="{{action.title}}"{{/if}}>
{{#if action.icon}}<span class="icon icon-{{action.icon}}"></span>{{/if}}
{{action.label}}
</button>
{{/with}}
{{/unless}}
{{/with}}
{{/each}}
Expand Down
Loading
Loading