@oat-sa/tao-core-ui 1.63.0 → 1.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionbar.js +2 -109
- package/dist/animable/absorbable/absorbable.js +2 -109
- package/dist/animable/pulsable/pulsable.js +2 -109
- package/dist/badge/badge.js +2 -109
- package/dist/breadcrumbs.js +2 -109
- package/dist/bulkActionPopup.js +2 -108
- package/dist/button.js +2 -110
- package/dist/cascadingComboBox.js +2 -108
- package/dist/class/selector.js +2 -108
- package/dist/component/windowed.js +2 -108
- package/dist/component.js +2 -109
- package/dist/contextualPopup.js +2 -109
- package/dist/dashboard.js +2 -108
- package/dist/datalist.js +2 -108
- package/dist/datatable.js +3 -108
- package/dist/dateRange/dateRange.js +2 -108
- package/dist/datetime/picker.js +2 -108
- package/dist/deleter.js +2 -108
- package/dist/destination/selector.js +2 -108
- package/dist/dialog/confirmDelete.js +2 -108
- package/dist/dialog.js +2 -108
- package/dist/documentViewer/providers/pdfViewer/fallback/viewer.js +2 -110
- package/dist/documentViewer/providers/pdfViewer/pdfjs/findBar.js +2 -109
- package/dist/documentViewer/providers/pdfViewer/pdfjs/pageView.js +2 -110
- package/dist/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +2 -109
- package/dist/documentViewer/providers/pdfViewer/pdfjs/viewer.js +2 -109
- package/dist/documentViewer/providers/pdfViewer.js +2 -109
- package/dist/documentViewer.js +2 -109
- package/dist/dropdown.js +2 -109
- package/dist/dynamicComponent.js +2 -109
- package/dist/feedback.js +2 -109
- package/dist/figure/FigureStateActive.js +25 -113
- package/dist/filter.js +2 -108
- package/dist/form/dropdownForm.js +2 -108
- package/dist/form/form.js +2 -109
- package/dist/form/validator/renderer.js +2 -109
- package/dist/form/widget/providers/checkBox.js +2 -108
- package/dist/form/widget/providers/comboBox.js +2 -110
- package/dist/form/widget/providers/hidden.js +2 -110
- package/dist/form/widget/providers/hiddenBox.js +2 -108
- package/dist/form/widget/providers/radioBox.js +2 -110
- package/dist/form/widget/providers/textArea.js +2 -110
- package/dist/form/widget/widget.js +2 -108
- package/dist/generis/form/form.js +2 -108
- package/dist/generis/validator/validator.js +2 -109
- package/dist/generis/widget/checkBox/checkBox.js +2 -108
- package/dist/generis/widget/comboBox/comboBox.js +2 -109
- package/dist/generis/widget/hiddenBox/hiddenBox.js +2 -109
- package/dist/generis/widget/textBox/textBox.js +2 -109
- package/dist/generis/widget/widget.js +2 -108
- package/dist/groupedComboBox.js +2 -108
- package/dist/itemButtonList.js +2 -110
- package/dist/listbox.js +2 -108
- package/dist/loadingButton/loadingButton.js +2 -109
- package/dist/lock.js +2 -108
- package/dist/login/login.js +2 -108
- package/dist/maths/calculator/basicCalculator.js +2 -109
- package/dist/maths/calculator/core/board.js +2 -108
- package/dist/maths/calculator/core/expression.js +2 -109
- package/dist/maths/calculator/core/labels.js +2 -109
- package/dist/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +2 -109
- package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +2 -109
- package/dist/maths/calculator/scientificCalculator.js +2 -108
- package/dist/mediaEditor/mediaEditorComponent.js +2 -109
- package/dist/mediaEditor/plugins/mediaAlignment/helper.js +49 -2
- package/dist/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +2 -110
- package/dist/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +2 -109
- package/dist/mediaplayer/players/html5.js +2 -110
- package/dist/mediaplayer/players/youtube.js +2 -110
- package/dist/mediaplayer.js +2 -109
- package/dist/mediasizer.js +2 -109
- package/dist/pageSizeSelector.js +2 -109
- package/dist/pagination/providers/pages.js +2 -109
- package/dist/pagination/providers/simple.js +2 -110
- package/dist/propertySelector/propertySelector.js +2 -110
- package/dist/report.js +2 -109
- package/dist/resource/filters.js +2 -108
- package/dist/resource/list.js +29 -119
- package/dist/resource/selector.js +2 -108
- package/dist/resource/tree.js +29 -119
- package/dist/resourcemgr/fileBrowser.js +478 -585
- package/dist/resourcemgr/fileSelector.js +2 -108
- package/dist/resourcemgr.js +2 -109
- package/dist/searchModal/advancedSearch.js +2 -109
- package/dist/searchModal.js +16 -107
- package/dist/switch/switch.js +2 -108
- package/dist/tabs.js +2 -109
- package/dist/taskQueue/status.js +2 -108
- package/dist/taskQueue/table.js +2 -108
- package/dist/taskQueueButton/taskable.js +2 -108
- package/dist/taskQueueButton/treeButton.js +2 -109
- package/dist/tooltip.js +2 -109
- package/dist/tristateCheckboxGroup.js +2 -108
- package/dist/uploader.js +2 -108
- package/package.json +2 -2
- package/scss/inc/_feedback.scss +4 -0
- package/src/css/basic.css +4 -0
- package/src/css/basic.css.map +1 -1
- package/src/figure/FigureStateActive.js +15 -5
- package/src/mediaEditor/plugins/mediaAlignment/helper.js +48 -0
- package/scss/.DS_Store +0 -0
- package/scss/ckeditor/.DS_Store +0 -0
- package/scss/ckeditor/skins/.DS_Store +0 -0
- package/scss/ckeditor/skins/tao/.DS_Store +0 -0
- package/scss/ckeditor/skins/tao/scss/.DS_Store +0 -0
- package/scss/font/.DS_Store +0 -0
- package/scss/inc/.DS_Store +0 -0
package/dist/actionbar.js
CHANGED
|
@@ -1,117 +1,10 @@
|
|
|
1
|
-
define(['jquery', 'lodash', 'ui/component', 'handlebars', '
|
|
1
|
+
define(['jquery', 'lodash', 'ui/component', 'handlebars', 'lib/handlebars/helpers'], function ($$1, _, component, Handlebars, Helpers0) { 'use strict';
|
|
2
2
|
|
|
3
3
|
$$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;
|
|
4
4
|
_ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
|
|
5
5
|
component = component && Object.prototype.hasOwnProperty.call(component, 'default') ? component['default'] : component;
|
|
6
6
|
Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
|
|
7
|
-
|
|
8
|
-
DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This program is free software; you can redistribute it and/or
|
|
12
|
-
* modify it under the terms of the GNU General Public License
|
|
13
|
-
* as published by the Free Software Foundation; under version 2
|
|
14
|
-
* of the License (non-upgradable).
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU General Public License
|
|
22
|
-
* along with this program; if not, write to the Free Software
|
|
23
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
function Helpers0 (hb) {
|
|
30
|
-
//register a i18n helper
|
|
31
|
-
hb.registerHelper('__', function (key) {
|
|
32
|
-
return __(key);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Register dompurify helper
|
|
37
|
-
*
|
|
38
|
-
* https://github.com/cure53/DOMPurify
|
|
39
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
40
|
-
* to make output safe for template systems
|
|
41
|
-
*/
|
|
42
|
-
hb.registerHelper('dompurify', function (context) {
|
|
43
|
-
return DOMPurify.sanitize(context);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Register join helper
|
|
48
|
-
*
|
|
49
|
-
* Example :
|
|
50
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
51
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
52
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
53
|
-
*/
|
|
54
|
-
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
55
|
-
var fragments = [];
|
|
56
|
-
keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
|
|
57
|
-
fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
|
|
58
|
-
wrapper = typeof wrapper === 'string' ? wrapper : '"';
|
|
59
|
-
_.forIn(arr, function (value, key) {
|
|
60
|
-
var fragment = '';
|
|
61
|
-
if (value !== null || value !== undefined) {
|
|
62
|
-
if (typeof value === 'boolean') {
|
|
63
|
-
value = value ? 'true' : 'false';
|
|
64
|
-
} else if (typeof value === 'object') {
|
|
65
|
-
value = _.values(value).join(' ');
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
value = '';
|
|
69
|
-
}
|
|
70
|
-
if (keyValueGlue !== undefined) {
|
|
71
|
-
fragment += key + keyValueGlue;
|
|
72
|
-
}
|
|
73
|
-
fragment += wrapper + value + wrapper;
|
|
74
|
-
fragments.push(fragment);
|
|
75
|
-
});
|
|
76
|
-
return fragments.join(fragmentGlue);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
//register a classic "for loop" helper
|
|
80
|
-
//it also adds a local variable "i" as the index in each iteration loop
|
|
81
|
-
hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
|
|
82
|
-
var ret = '';
|
|
83
|
-
startIndex = parseInt(startIndex);
|
|
84
|
-
stopIndex = parseInt(stopIndex);
|
|
85
|
-
increment = parseInt(increment);
|
|
86
|
-
for (var i = startIndex; i < stopIndex; i += increment) {
|
|
87
|
-
ret += options.fn(_.extend({}, this, {
|
|
88
|
-
i: i
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
return ret;
|
|
92
|
-
});
|
|
93
|
-
hb.registerHelper('equal', function (var1, var2, options) {
|
|
94
|
-
if (var1 == var2) {
|
|
95
|
-
return options.fn(this);
|
|
96
|
-
} else {
|
|
97
|
-
return options.inverse(this);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// register a "get property" helper
|
|
102
|
-
// it gets the named property from the provided context
|
|
103
|
-
hb.registerHelper('property', function (name, context) {
|
|
104
|
-
return context[name] || '';
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// register an 'includes' helper
|
|
108
|
-
// it checks if value is in array
|
|
109
|
-
hb.registerHelper('includes', function (haystack, needle, options) {
|
|
110
|
-
if (_.contains(haystack, needle)) {
|
|
111
|
-
return options.fn(this);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
7
|
+
Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;
|
|
115
8
|
|
|
116
9
|
if (!Helpers0.__initialized) {
|
|
117
10
|
Helpers0(Handlebars);
|
|
@@ -1,117 +1,10 @@
|
|
|
1
|
-
define(['lodash', 'ui/component', 'ui/component/alignable', 'handlebars', '
|
|
1
|
+
define(['lodash', 'ui/component', 'ui/component/alignable', 'handlebars', 'lib/handlebars/helpers', 'css!ui/animable/absorbable/css/absorb.css'], function (_, componentFactory, makeAlignable, Handlebars, Helpers0, absorb_css) { 'use strict';
|
|
2
2
|
|
|
3
3
|
_ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
|
|
4
4
|
componentFactory = componentFactory && Object.prototype.hasOwnProperty.call(componentFactory, 'default') ? componentFactory['default'] : componentFactory;
|
|
5
5
|
makeAlignable = makeAlignable && Object.prototype.hasOwnProperty.call(makeAlignable, 'default') ? makeAlignable['default'] : makeAlignable;
|
|
6
6
|
Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
|
|
7
|
-
|
|
8
|
-
DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This program is free software; you can redistribute it and/or
|
|
12
|
-
* modify it under the terms of the GNU General Public License
|
|
13
|
-
* as published by the Free Software Foundation; under version 2
|
|
14
|
-
* of the License (non-upgradable).
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU General Public License
|
|
22
|
-
* along with this program; if not, write to the Free Software
|
|
23
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
function Helpers0 (hb) {
|
|
30
|
-
//register a i18n helper
|
|
31
|
-
hb.registerHelper('__', function (key) {
|
|
32
|
-
return __(key);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Register dompurify helper
|
|
37
|
-
*
|
|
38
|
-
* https://github.com/cure53/DOMPurify
|
|
39
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
40
|
-
* to make output safe for template systems
|
|
41
|
-
*/
|
|
42
|
-
hb.registerHelper('dompurify', function (context) {
|
|
43
|
-
return DOMPurify.sanitize(context);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Register join helper
|
|
48
|
-
*
|
|
49
|
-
* Example :
|
|
50
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
51
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
52
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
53
|
-
*/
|
|
54
|
-
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
55
|
-
var fragments = [];
|
|
56
|
-
keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
|
|
57
|
-
fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
|
|
58
|
-
wrapper = typeof wrapper === 'string' ? wrapper : '"';
|
|
59
|
-
_.forIn(arr, function (value, key) {
|
|
60
|
-
var fragment = '';
|
|
61
|
-
if (value !== null || value !== undefined) {
|
|
62
|
-
if (typeof value === 'boolean') {
|
|
63
|
-
value = value ? 'true' : 'false';
|
|
64
|
-
} else if (typeof value === 'object') {
|
|
65
|
-
value = _.values(value).join(' ');
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
value = '';
|
|
69
|
-
}
|
|
70
|
-
if (keyValueGlue !== undefined) {
|
|
71
|
-
fragment += key + keyValueGlue;
|
|
72
|
-
}
|
|
73
|
-
fragment += wrapper + value + wrapper;
|
|
74
|
-
fragments.push(fragment);
|
|
75
|
-
});
|
|
76
|
-
return fragments.join(fragmentGlue);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
//register a classic "for loop" helper
|
|
80
|
-
//it also adds a local variable "i" as the index in each iteration loop
|
|
81
|
-
hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
|
|
82
|
-
var ret = '';
|
|
83
|
-
startIndex = parseInt(startIndex);
|
|
84
|
-
stopIndex = parseInt(stopIndex);
|
|
85
|
-
increment = parseInt(increment);
|
|
86
|
-
for (var i = startIndex; i < stopIndex; i += increment) {
|
|
87
|
-
ret += options.fn(_.extend({}, this, {
|
|
88
|
-
i: i
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
return ret;
|
|
92
|
-
});
|
|
93
|
-
hb.registerHelper('equal', function (var1, var2, options) {
|
|
94
|
-
if (var1 == var2) {
|
|
95
|
-
return options.fn(this);
|
|
96
|
-
} else {
|
|
97
|
-
return options.inverse(this);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// register a "get property" helper
|
|
102
|
-
// it gets the named property from the provided context
|
|
103
|
-
hb.registerHelper('property', function (name, context) {
|
|
104
|
-
return context[name] || '';
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// register an 'includes' helper
|
|
108
|
-
// it checks if value is in array
|
|
109
|
-
hb.registerHelper('includes', function (haystack, needle, options) {
|
|
110
|
-
if (_.contains(haystack, needle)) {
|
|
111
|
-
return options.fn(this);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
7
|
+
Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;
|
|
115
8
|
|
|
116
9
|
if (!Helpers0.__initialized) {
|
|
117
10
|
Helpers0(Handlebars);
|
|
@@ -1,117 +1,10 @@
|
|
|
1
|
-
define(['lodash', 'ui/component', 'ui/component/alignable', 'handlebars', '
|
|
1
|
+
define(['lodash', 'ui/component', 'ui/component/alignable', 'handlebars', 'lib/handlebars/helpers', 'css!ui/animable/pulsable/css/pulse.css'], function (_, componentFactory, makeAlignable, Handlebars, Helpers0, pulse_css) { 'use strict';
|
|
2
2
|
|
|
3
3
|
_ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
|
|
4
4
|
componentFactory = componentFactory && Object.prototype.hasOwnProperty.call(componentFactory, 'default') ? componentFactory['default'] : componentFactory;
|
|
5
5
|
makeAlignable = makeAlignable && Object.prototype.hasOwnProperty.call(makeAlignable, 'default') ? makeAlignable['default'] : makeAlignable;
|
|
6
6
|
Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
|
|
7
|
-
|
|
8
|
-
DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This program is free software; you can redistribute it and/or
|
|
12
|
-
* modify it under the terms of the GNU General Public License
|
|
13
|
-
* as published by the Free Software Foundation; under version 2
|
|
14
|
-
* of the License (non-upgradable).
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU General Public License
|
|
22
|
-
* along with this program; if not, write to the Free Software
|
|
23
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
function Helpers0 (hb) {
|
|
30
|
-
//register a i18n helper
|
|
31
|
-
hb.registerHelper('__', function (key) {
|
|
32
|
-
return __(key);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Register dompurify helper
|
|
37
|
-
*
|
|
38
|
-
* https://github.com/cure53/DOMPurify
|
|
39
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
40
|
-
* to make output safe for template systems
|
|
41
|
-
*/
|
|
42
|
-
hb.registerHelper('dompurify', function (context) {
|
|
43
|
-
return DOMPurify.sanitize(context);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Register join helper
|
|
48
|
-
*
|
|
49
|
-
* Example :
|
|
50
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
51
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
52
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
53
|
-
*/
|
|
54
|
-
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
55
|
-
var fragments = [];
|
|
56
|
-
keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
|
|
57
|
-
fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
|
|
58
|
-
wrapper = typeof wrapper === 'string' ? wrapper : '"';
|
|
59
|
-
_.forIn(arr, function (value, key) {
|
|
60
|
-
var fragment = '';
|
|
61
|
-
if (value !== null || value !== undefined) {
|
|
62
|
-
if (typeof value === 'boolean') {
|
|
63
|
-
value = value ? 'true' : 'false';
|
|
64
|
-
} else if (typeof value === 'object') {
|
|
65
|
-
value = _.values(value).join(' ');
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
value = '';
|
|
69
|
-
}
|
|
70
|
-
if (keyValueGlue !== undefined) {
|
|
71
|
-
fragment += key + keyValueGlue;
|
|
72
|
-
}
|
|
73
|
-
fragment += wrapper + value + wrapper;
|
|
74
|
-
fragments.push(fragment);
|
|
75
|
-
});
|
|
76
|
-
return fragments.join(fragmentGlue);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
//register a classic "for loop" helper
|
|
80
|
-
//it also adds a local variable "i" as the index in each iteration loop
|
|
81
|
-
hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
|
|
82
|
-
var ret = '';
|
|
83
|
-
startIndex = parseInt(startIndex);
|
|
84
|
-
stopIndex = parseInt(stopIndex);
|
|
85
|
-
increment = parseInt(increment);
|
|
86
|
-
for (var i = startIndex; i < stopIndex; i += increment) {
|
|
87
|
-
ret += options.fn(_.extend({}, this, {
|
|
88
|
-
i: i
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
return ret;
|
|
92
|
-
});
|
|
93
|
-
hb.registerHelper('equal', function (var1, var2, options) {
|
|
94
|
-
if (var1 == var2) {
|
|
95
|
-
return options.fn(this);
|
|
96
|
-
} else {
|
|
97
|
-
return options.inverse(this);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// register a "get property" helper
|
|
102
|
-
// it gets the named property from the provided context
|
|
103
|
-
hb.registerHelper('property', function (name, context) {
|
|
104
|
-
return context[name] || '';
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// register an 'includes' helper
|
|
108
|
-
// it checks if value is in array
|
|
109
|
-
hb.registerHelper('includes', function (haystack, needle, options) {
|
|
110
|
-
if (_.contains(haystack, needle)) {
|
|
111
|
-
return options.fn(this);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
7
|
+
Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;
|
|
115
8
|
|
|
116
9
|
if (!Helpers0.__initialized) {
|
|
117
10
|
Helpers0(Handlebars);
|
package/dist/badge/badge.js
CHANGED
|
@@ -1,117 +1,10 @@
|
|
|
1
|
-
define(['lodash', 'ui/hider', 'ui/component', 'handlebars', '
|
|
1
|
+
define(['lodash', 'ui/hider', 'ui/component', 'handlebars', 'lib/handlebars/helpers', 'css!ui/badge/css/badge.css'], function (_, hider, component, Handlebars, Helpers0, badge_css) { 'use strict';
|
|
2
2
|
|
|
3
3
|
_ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
|
|
4
4
|
hider = hider && Object.prototype.hasOwnProperty.call(hider, 'default') ? hider['default'] : hider;
|
|
5
5
|
component = component && Object.prototype.hasOwnProperty.call(component, 'default') ? component['default'] : component;
|
|
6
6
|
Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
|
|
7
|
-
|
|
8
|
-
DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This program is free software; you can redistribute it and/or
|
|
12
|
-
* modify it under the terms of the GNU General Public License
|
|
13
|
-
* as published by the Free Software Foundation; under version 2
|
|
14
|
-
* of the License (non-upgradable).
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU General Public License
|
|
22
|
-
* along with this program; if not, write to the Free Software
|
|
23
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
function Helpers0 (hb) {
|
|
30
|
-
//register a i18n helper
|
|
31
|
-
hb.registerHelper('__', function (key) {
|
|
32
|
-
return __(key);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Register dompurify helper
|
|
37
|
-
*
|
|
38
|
-
* https://github.com/cure53/DOMPurify
|
|
39
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
40
|
-
* to make output safe for template systems
|
|
41
|
-
*/
|
|
42
|
-
hb.registerHelper('dompurify', function (context) {
|
|
43
|
-
return DOMPurify.sanitize(context);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Register join helper
|
|
48
|
-
*
|
|
49
|
-
* Example :
|
|
50
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
51
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
52
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
53
|
-
*/
|
|
54
|
-
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
55
|
-
var fragments = [];
|
|
56
|
-
keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
|
|
57
|
-
fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
|
|
58
|
-
wrapper = typeof wrapper === 'string' ? wrapper : '"';
|
|
59
|
-
_.forIn(arr, function (value, key) {
|
|
60
|
-
var fragment = '';
|
|
61
|
-
if (value !== null || value !== undefined) {
|
|
62
|
-
if (typeof value === 'boolean') {
|
|
63
|
-
value = value ? 'true' : 'false';
|
|
64
|
-
} else if (typeof value === 'object') {
|
|
65
|
-
value = _.values(value).join(' ');
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
value = '';
|
|
69
|
-
}
|
|
70
|
-
if (keyValueGlue !== undefined) {
|
|
71
|
-
fragment += key + keyValueGlue;
|
|
72
|
-
}
|
|
73
|
-
fragment += wrapper + value + wrapper;
|
|
74
|
-
fragments.push(fragment);
|
|
75
|
-
});
|
|
76
|
-
return fragments.join(fragmentGlue);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
//register a classic "for loop" helper
|
|
80
|
-
//it also adds a local variable "i" as the index in each iteration loop
|
|
81
|
-
hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
|
|
82
|
-
var ret = '';
|
|
83
|
-
startIndex = parseInt(startIndex);
|
|
84
|
-
stopIndex = parseInt(stopIndex);
|
|
85
|
-
increment = parseInt(increment);
|
|
86
|
-
for (var i = startIndex; i < stopIndex; i += increment) {
|
|
87
|
-
ret += options.fn(_.extend({}, this, {
|
|
88
|
-
i: i
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
return ret;
|
|
92
|
-
});
|
|
93
|
-
hb.registerHelper('equal', function (var1, var2, options) {
|
|
94
|
-
if (var1 == var2) {
|
|
95
|
-
return options.fn(this);
|
|
96
|
-
} else {
|
|
97
|
-
return options.inverse(this);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// register a "get property" helper
|
|
102
|
-
// it gets the named property from the provided context
|
|
103
|
-
hb.registerHelper('property', function (name, context) {
|
|
104
|
-
return context[name] || '';
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// register an 'includes' helper
|
|
108
|
-
// it checks if value is in array
|
|
109
|
-
hb.registerHelper('includes', function (haystack, needle, options) {
|
|
110
|
-
if (_.contains(haystack, needle)) {
|
|
111
|
-
return options.fn(this);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
7
|
+
Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;
|
|
115
8
|
|
|
116
9
|
if (!Helpers0.__initialized) {
|
|
117
10
|
Helpers0(Handlebars);
|
package/dist/breadcrumbs.js
CHANGED
|
@@ -1,116 +1,9 @@
|
|
|
1
|
-
define(['lodash', 'ui/component', 'handlebars', '
|
|
1
|
+
define(['lodash', 'ui/component', 'handlebars', 'lib/handlebars/helpers', 'css!ui/breadcrumbs/css/breadcrumbs.css'], function (_, component, Handlebars, Helpers0, breadcrumbs_css) { 'use strict';
|
|
2
2
|
|
|
3
3
|
_ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
|
|
4
4
|
component = component && Object.prototype.hasOwnProperty.call(component, 'default') ? component['default'] : component;
|
|
5
5
|
Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
|
|
6
|
-
|
|
7
|
-
DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* This program is free software; you can redistribute it and/or
|
|
11
|
-
* modify it under the terms of the GNU General Public License
|
|
12
|
-
* as published by the Free Software Foundation; under version 2
|
|
13
|
-
* of the License (non-upgradable).
|
|
14
|
-
*
|
|
15
|
-
* This program is distributed in the hope that it will be useful,
|
|
16
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18
|
-
* GNU General Public License for more details.
|
|
19
|
-
*
|
|
20
|
-
* You should have received a copy of the GNU General Public License
|
|
21
|
-
* along with this program; if not, write to the Free Software
|
|
22
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
23
|
-
*
|
|
24
|
-
* Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
function Helpers0 (hb) {
|
|
29
|
-
//register a i18n helper
|
|
30
|
-
hb.registerHelper('__', function (key) {
|
|
31
|
-
return __(key);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Register dompurify helper
|
|
36
|
-
*
|
|
37
|
-
* https://github.com/cure53/DOMPurify
|
|
38
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
39
|
-
* to make output safe for template systems
|
|
40
|
-
*/
|
|
41
|
-
hb.registerHelper('dompurify', function (context) {
|
|
42
|
-
return DOMPurify.sanitize(context);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Register join helper
|
|
47
|
-
*
|
|
48
|
-
* Example :
|
|
49
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
50
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
51
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
52
|
-
*/
|
|
53
|
-
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
54
|
-
var fragments = [];
|
|
55
|
-
keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
|
|
56
|
-
fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
|
|
57
|
-
wrapper = typeof wrapper === 'string' ? wrapper : '"';
|
|
58
|
-
_.forIn(arr, function (value, key) {
|
|
59
|
-
var fragment = '';
|
|
60
|
-
if (value !== null || value !== undefined) {
|
|
61
|
-
if (typeof value === 'boolean') {
|
|
62
|
-
value = value ? 'true' : 'false';
|
|
63
|
-
} else if (typeof value === 'object') {
|
|
64
|
-
value = _.values(value).join(' ');
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
value = '';
|
|
68
|
-
}
|
|
69
|
-
if (keyValueGlue !== undefined) {
|
|
70
|
-
fragment += key + keyValueGlue;
|
|
71
|
-
}
|
|
72
|
-
fragment += wrapper + value + wrapper;
|
|
73
|
-
fragments.push(fragment);
|
|
74
|
-
});
|
|
75
|
-
return fragments.join(fragmentGlue);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
//register a classic "for loop" helper
|
|
79
|
-
//it also adds a local variable "i" as the index in each iteration loop
|
|
80
|
-
hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
|
|
81
|
-
var ret = '';
|
|
82
|
-
startIndex = parseInt(startIndex);
|
|
83
|
-
stopIndex = parseInt(stopIndex);
|
|
84
|
-
increment = parseInt(increment);
|
|
85
|
-
for (var i = startIndex; i < stopIndex; i += increment) {
|
|
86
|
-
ret += options.fn(_.extend({}, this, {
|
|
87
|
-
i: i
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
|
-
return ret;
|
|
91
|
-
});
|
|
92
|
-
hb.registerHelper('equal', function (var1, var2, options) {
|
|
93
|
-
if (var1 == var2) {
|
|
94
|
-
return options.fn(this);
|
|
95
|
-
} else {
|
|
96
|
-
return options.inverse(this);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
// register a "get property" helper
|
|
101
|
-
// it gets the named property from the provided context
|
|
102
|
-
hb.registerHelper('property', function (name, context) {
|
|
103
|
-
return context[name] || '';
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
// register an 'includes' helper
|
|
107
|
-
// it checks if value is in array
|
|
108
|
-
hb.registerHelper('includes', function (haystack, needle, options) {
|
|
109
|
-
if (_.contains(haystack, needle)) {
|
|
110
|
-
return options.fn(this);
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
6
|
+
Helpers0 = Helpers0 && Object.prototype.hasOwnProperty.call(Helpers0, 'default') ? Helpers0['default'] : Helpers0;
|
|
114
7
|
|
|
115
8
|
if (!Helpers0.__initialized) {
|
|
116
9
|
Helpers0(Handlebars);
|