fomantic-ui 2.10.0-beta.4 → 2.10.0-beta.6
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/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +48 -58
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +26 -8
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +13 -18
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +13 -18
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +5 -7
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +23 -5
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +28 -31
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +14 -19
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +53 -53
- package/dist/semantic.js +188 -182
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -2
- package/src/definitions/modules/dropdown.js +47 -57
- package/src/definitions/modules/embed.js +25 -7
- package/src/definitions/modules/flyout.js +12 -17
- package/src/definitions/modules/modal.js +12 -17
- package/src/definitions/modules/popup.js +4 -6
- package/src/definitions/modules/rating.js +22 -4
- package/src/definitions/modules/search.js +27 -30
- package/src/definitions/modules/toast.js +13 -18
- package/tasks/config/defaults.js +0 -1
- package/tasks/config/project/install.js +5 -8
- package/tasks/install.js +10 -11
- package/types/fomantic-ui-dropdown.d.ts +44 -0
- package/types/fomantic-ui-embed.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +6 -6
@@ -461,10 +461,6 @@
|
|
461
461
|
settings.fullTextSearch = parameters.searchFullText;
|
462
462
|
module.error(settings.error.oldSearchSyntax, element);
|
463
463
|
}
|
464
|
-
if (settings.ignoreDiacritics && !String.prototype.normalize) {
|
465
|
-
settings.ignoreDiacritics = false;
|
466
|
-
module.error(error.noNormalize, element);
|
467
|
-
}
|
468
464
|
},
|
469
465
|
inputEvent: function () {
|
470
466
|
var
|
@@ -1140,7 +1136,7 @@
|
|
1140
1136
|
});
|
1141
1137
|
}
|
1142
1138
|
if (isFunction(template)) {
|
1143
|
-
html = template(response,
|
1139
|
+
html = template(response, settings);
|
1144
1140
|
} else {
|
1145
1141
|
module.error(error.noTemplate, false);
|
1146
1142
|
}
|
@@ -1433,7 +1429,6 @@
|
|
1433
1429
|
serverError: 'There was an issue querying the server.',
|
1434
1430
|
maxResults: 'Results must be an array to use maxResults setting',
|
1435
1431
|
method: 'The method you called is not defined.',
|
1436
|
-
noNormalize: '"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.',
|
1437
1432
|
},
|
1438
1433
|
|
1439
1434
|
metadata: {
|
@@ -1476,23 +1471,23 @@
|
|
1476
1471
|
},
|
1477
1472
|
|
1478
1473
|
templates: {
|
1479
|
-
escape: function (string,
|
1480
|
-
if (preserveHTML) {
|
1474
|
+
escape: function (string, settings) {
|
1475
|
+
if (settings !== undefined && settings.preserveHTML) {
|
1481
1476
|
return string;
|
1482
1477
|
}
|
1483
1478
|
var
|
1484
|
-
badChars = /["'
|
1485
|
-
shouldEscape = /["&'
|
1479
|
+
badChars = /["'<>]/g,
|
1480
|
+
shouldEscape = /["&'<>]/,
|
1486
1481
|
escape = {
|
1487
1482
|
'<': '<',
|
1488
1483
|
'>': '>',
|
1489
1484
|
'"': '"',
|
1490
|
-
"'": '
|
1491
|
-
'`': '`',
|
1485
|
+
"'": ''',
|
1492
1486
|
},
|
1493
1487
|
escapedChar = function (chr) {
|
1494
1488
|
return escape[chr];
|
1495
|
-
}
|
1489
|
+
}
|
1490
|
+
;
|
1496
1491
|
if (shouldEscape.test(string)) {
|
1497
1492
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
1498
1493
|
string = string.replace(badChars, escapedChar);
|
@@ -1519,10 +1514,11 @@
|
|
1519
1514
|
|
1520
1515
|
return html;
|
1521
1516
|
},
|
1522
|
-
category: function (response,
|
1517
|
+
category: function (response, settings) {
|
1523
1518
|
var
|
1524
1519
|
html = '',
|
1525
|
-
|
1520
|
+
fields = settings.fields,
|
1521
|
+
escape = settings.templates.escape
|
1526
1522
|
;
|
1527
1523
|
if (response[fields.categoryResults] !== undefined) {
|
1528
1524
|
// each category
|
@@ -1531,7 +1527,7 @@
|
|
1531
1527
|
html += '<div class="category">';
|
1532
1528
|
|
1533
1529
|
if (category[fields.categoryName] !== undefined) {
|
1534
|
-
html += '<div class="name">' + escape(category[fields.categoryName],
|
1530
|
+
html += '<div class="name">' + escape(category[fields.categoryName], settings) + '</div>';
|
1535
1531
|
}
|
1536
1532
|
|
1537
1533
|
// each item inside category
|
@@ -1543,18 +1539,18 @@
|
|
1543
1539
|
if (result[fields.image] !== undefined) {
|
1544
1540
|
html += ''
|
1545
1541
|
+ '<div class="image">'
|
1546
|
-
+ ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '
|
1542
|
+
+ ' <img src="' + result[fields.image].replace(/"/g, '') + '"' + (result[fields.alt] ? ' alt="' + result[fields.alt].replace(/"/g, '') + '"' : '') + '>'
|
1547
1543
|
+ '</div>';
|
1548
1544
|
}
|
1549
1545
|
html += '<div class="content">';
|
1550
1546
|
if (result[fields.price] !== undefined) {
|
1551
|
-
html += '<div class="price">' + escape(result[fields.price],
|
1547
|
+
html += '<div class="price">' + escape(result[fields.price], settings) + '</div>';
|
1552
1548
|
}
|
1553
1549
|
if (result[fields.title] !== undefined) {
|
1554
|
-
html += '<div class="title">' + escape(result[fields.title],
|
1550
|
+
html += '<div class="title">' + escape(result[fields.title], settings) + '</div>';
|
1555
1551
|
}
|
1556
1552
|
if (result[fields.description] !== undefined) {
|
1557
|
-
html += '<div class="description">' + escape(result[fields.description],
|
1553
|
+
html += '<div class="description">' + escape(result[fields.description], settings) + '</div>';
|
1558
1554
|
}
|
1559
1555
|
html += ''
|
1560
1556
|
+ '</div>';
|
@@ -1569,11 +1565,11 @@
|
|
1569
1565
|
html += fields.actionURL === false
|
1570
1566
|
? ''
|
1571
1567
|
+ '<div class="action">'
|
1572
|
-
+ escape(response[fields.action][fields.actionText],
|
1568
|
+
+ escape(response[fields.action][fields.actionText], settings)
|
1573
1569
|
+ '</div>'
|
1574
1570
|
: ''
|
1575
1571
|
+ '<a href="' + response[fields.action][fields.actionURL].replace(/"/g, '') + '" class="action">'
|
1576
|
-
+ escape(response[fields.action][fields.actionText],
|
1572
|
+
+ escape(response[fields.action][fields.actionText], settings)
|
1577
1573
|
+ '</a>';
|
1578
1574
|
}
|
1579
1575
|
|
@@ -1582,10 +1578,11 @@
|
|
1582
1578
|
|
1583
1579
|
return false;
|
1584
1580
|
},
|
1585
|
-
standard: function (response,
|
1581
|
+
standard: function (response, settings) {
|
1586
1582
|
var
|
1587
1583
|
html = '',
|
1588
|
-
|
1584
|
+
fields = settings.fields,
|
1585
|
+
escape = settings.templates.escape
|
1589
1586
|
;
|
1590
1587
|
if (response[fields.results] !== undefined) {
|
1591
1588
|
// each result
|
@@ -1596,18 +1593,18 @@
|
|
1596
1593
|
if (result[fields.image] !== undefined) {
|
1597
1594
|
html += ''
|
1598
1595
|
+ '<div class="image">'
|
1599
|
-
+ ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '
|
1596
|
+
+ ' <img src="' + result[fields.image].replace(/"/g, '') + '"' + (result[fields.alt] ? ' alt="' + result[fields.alt].replace(/"/g, '') + '"' : '') + '>'
|
1600
1597
|
+ '</div>';
|
1601
1598
|
}
|
1602
1599
|
html += '<div class="content">';
|
1603
1600
|
if (result[fields.price] !== undefined) {
|
1604
|
-
html += '<div class="price">' + escape(result[fields.price],
|
1601
|
+
html += '<div class="price">' + escape(result[fields.price], settings) + '</div>';
|
1605
1602
|
}
|
1606
1603
|
if (result[fields.title] !== undefined) {
|
1607
|
-
html += '<div class="title">' + escape(result[fields.title],
|
1604
|
+
html += '<div class="title">' + escape(result[fields.title], settings) + '</div>';
|
1608
1605
|
}
|
1609
1606
|
if (result[fields.description] !== undefined) {
|
1610
|
-
html += '<div class="description">' + escape(result[fields.description],
|
1607
|
+
html += '<div class="description">' + escape(result[fields.description], settings) + '</div>';
|
1611
1608
|
}
|
1612
1609
|
html += ''
|
1613
1610
|
+ '</div>';
|
@@ -1617,11 +1614,11 @@
|
|
1617
1614
|
html += fields.actionURL === false
|
1618
1615
|
? ''
|
1619
1616
|
+ '<div class="action">'
|
1620
|
-
+ escape(response[fields.action][fields.actionText],
|
1617
|
+
+ escape(response[fields.action][fields.actionText], settings)
|
1621
1618
|
+ '</div>'
|
1622
1619
|
: ''
|
1623
1620
|
+ '<a href="' + response[fields.action][fields.actionURL].replace(/"/g, '') + '" class="action">'
|
1624
|
-
+ escape(response[fields.action][fields.actionText],
|
1621
|
+
+ escape(response[fields.action][fields.actionText], settings)
|
1625
1622
|
+ '</a>';
|
1626
1623
|
}
|
1627
1624
|
|
@@ -192,7 +192,7 @@
|
|
192
192
|
$content.append($('<div/>', {
|
193
193
|
class: className.title,
|
194
194
|
id: titleId,
|
195
|
-
html: module.helpers.escape(settings.title, settings
|
195
|
+
html: module.helpers.escape(settings.title, settings),
|
196
196
|
}));
|
197
197
|
}
|
198
198
|
var descId = '_' + module.get.id() + 'desc';
|
@@ -200,7 +200,7 @@
|
|
200
200
|
$content.append($('<div/>', {
|
201
201
|
class: className.message,
|
202
202
|
id: descId,
|
203
|
-
html: module.helpers.escape(settings.message, settings
|
203
|
+
html: module.helpers.escape(settings.message, settings),
|
204
204
|
}));
|
205
205
|
|
206
206
|
$toast
|
@@ -232,10 +232,10 @@
|
|
232
232
|
$toast.find(selector.image).attr('src', settings.showImage).attr('alt', settings.alt || '');
|
233
233
|
}
|
234
234
|
if (settings.title !== '') {
|
235
|
-
$toast.find(selector.title).html(module.helpers.escape(settings.title, settings
|
235
|
+
$toast.find(selector.title).html(module.helpers.escape(settings.title, settings));
|
236
236
|
}
|
237
237
|
if (settings.message !== '') {
|
238
|
-
$toast.find(selector.message).html(module.helpers.escape(settings.message, settings
|
238
|
+
$toast.find(selector.message).html(module.helpers.escape(settings.message, settings));
|
239
239
|
}
|
240
240
|
}
|
241
241
|
if ($toast.hasClass(className.compact)) {
|
@@ -260,10 +260,10 @@
|
|
260
260
|
var
|
261
261
|
icon = el[fields.icon]
|
262
262
|
? '<i ' + (el[fields.text] ? 'aria-hidden="true"' : '')
|
263
|
-
+ ' class="' + module.helpers.
|
263
|
+
+ ' class="' + module.helpers.escape(el[fields.icon]) + ' icon"></i>'
|
264
264
|
: '',
|
265
|
-
text = module.helpers.escape(el[fields.text] || '', settings
|
266
|
-
cls = module.helpers.
|
265
|
+
text = module.helpers.escape(el[fields.text] || '', settings),
|
266
|
+
cls = module.helpers.escape(el[fields.class] || ''),
|
267
267
|
click = el[fields.click] && isFunction(el[fields.click])
|
268
268
|
? el[fields.click]
|
269
269
|
: function () {}
|
@@ -592,22 +592,18 @@
|
|
592
592
|
|
593
593
|
return result;
|
594
594
|
},
|
595
|
-
|
596
|
-
|
597
|
-
},
|
598
|
-
escape: function (string, preserveHTML) {
|
599
|
-
if (preserveHTML) {
|
595
|
+
escape: function (string, settings) {
|
596
|
+
if (settings !== undefined && settings.preserveHTML) {
|
600
597
|
return string;
|
601
598
|
}
|
602
599
|
var
|
603
|
-
badChars = /["'
|
604
|
-
shouldEscape = /["&'
|
600
|
+
badChars = /["'<>]/g,
|
601
|
+
shouldEscape = /["&'<>]/,
|
605
602
|
escape = {
|
606
603
|
'<': '<',
|
607
604
|
'>': '>',
|
608
605
|
'"': '"',
|
609
|
-
"'": '
|
610
|
-
'`': '`',
|
606
|
+
"'": ''',
|
611
607
|
},
|
612
608
|
escapedChar = function (chr) {
|
613
609
|
return escape[chr];
|
@@ -615,8 +611,7 @@
|
|
615
611
|
;
|
616
612
|
if (shouldEscape.test(string)) {
|
617
613
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
618
|
-
|
619
|
-
return string.replace(badChars, escapedChar);
|
614
|
+
string = string.replace(badChars, escapedChar);
|
620
615
|
}
|
621
616
|
|
622
617
|
return string;
|
package/tasks/config/defaults.js
CHANGED
@@ -255,7 +255,6 @@ module.exports = {
|
|
255
255
|
config: 'semantic.json',
|
256
256
|
overridesImport: 'src/overrides.less',
|
257
257
|
lessImport: 'src/semantic.less',
|
258
|
-
site: 'src/site',
|
259
258
|
themeConfig: 'src/theme.config',
|
260
259
|
themeImport: 'src/theme.less',
|
261
260
|
},
|
@@ -750,20 +749,18 @@ module.exports = {
|
|
750
749
|
},
|
751
750
|
|
752
751
|
/* Copy Install Folders */
|
753
|
-
|
752
|
+
copy: {
|
754
753
|
|
755
754
|
// overwrite existing files update and install (default theme / definition)
|
756
755
|
overwrite: {
|
757
|
-
|
758
|
-
|
759
|
-
preserveFiles: false,
|
756
|
+
overwrite: true,
|
757
|
+
preserveTimestamps: true,
|
760
758
|
},
|
761
759
|
|
762
760
|
// only create files that don't exist (site theme update)
|
763
761
|
merge: {
|
764
|
-
|
765
|
-
|
766
|
-
preserveFiles: true,
|
762
|
+
overwrite: false,
|
763
|
+
preserveTimestamps: true,
|
767
764
|
},
|
768
765
|
|
769
766
|
},
|
package/tasks/install.js
CHANGED
@@ -27,7 +27,6 @@ const
|
|
27
27
|
rename = require('gulp-rename'),
|
28
28
|
replace = require('gulp-replace'),
|
29
29
|
requireDotFile = require('require-dot-file'),
|
30
|
-
wrench = require('wrench-sui'),
|
31
30
|
|
32
31
|
// install config
|
33
32
|
install = require('./config/project/install'),
|
@@ -105,14 +104,14 @@ module.exports = function (callback) {
|
|
105
104
|
console.log('Updating Fomantic UI from ' + currentConfig.version + ' to ' + release.version);
|
106
105
|
|
107
106
|
console.info('Updating ui definitions...');
|
108
|
-
|
107
|
+
fs.copySync(source.definitions, updatePaths.definition, settings.copy.overwrite);
|
109
108
|
|
110
109
|
console.info('Updating default theme...');
|
111
|
-
|
112
|
-
|
110
|
+
fs.copySync(source.themes, updatePaths.theme, settings.copy.merge);
|
111
|
+
fs.copySync(source.defaultTheme, updatePaths.defaultTheme, settings.copy.overwrite);
|
113
112
|
|
114
113
|
console.info('Updating tasks...');
|
115
|
-
|
114
|
+
fs.copySync(source.tasks, updatePaths.tasks, settings.copy.overwrite);
|
116
115
|
|
117
116
|
console.info('Updating gulpfile.js');
|
118
117
|
gulp.src(source.userGulpFile)
|
@@ -132,7 +131,7 @@ module.exports = function (callback) {
|
|
132
131
|
.pipe(gulp.dest(updatePaths.overridesImport))
|
133
132
|
;
|
134
133
|
console.info('Adding new site theme files...');
|
135
|
-
|
134
|
+
fs.copySync(source.site, updatePaths.site, settings.copy.merge);
|
136
135
|
|
137
136
|
console.info('Updating version...');
|
138
137
|
|
@@ -295,14 +294,14 @@ module.exports = function (callback) {
|
|
295
294
|
console.log('Installing to \u001B[92m' + answers.semanticRoot + '\u001B[0m');
|
296
295
|
|
297
296
|
console.info('Copying UI definitions');
|
298
|
-
|
297
|
+
fs.copySync(source.definitions, installPaths.definition, settings.copy.overwrite);
|
299
298
|
|
300
299
|
console.info('Copying UI themes');
|
301
|
-
|
302
|
-
|
300
|
+
fs.copySync(source.themes, installPaths.theme, settings.copy.merge);
|
301
|
+
fs.copySync(source.defaultTheme, installPaths.defaultTheme, settings.copy.overwrite);
|
303
302
|
|
304
303
|
console.info('Copying gulp tasks');
|
305
|
-
|
304
|
+
fs.copySync(source.tasks, installPaths.tasks, settings.copy.overwrite);
|
306
305
|
|
307
306
|
// copy theme import
|
308
307
|
console.info('Adding theme files');
|
@@ -337,7 +336,7 @@ module.exports = function (callback) {
|
|
337
336
|
} else {
|
338
337
|
console.info('Creating site theme folder', installPaths.site);
|
339
338
|
}
|
340
|
-
|
339
|
+
fs.copySync(source.site, installPaths.site, settings.copy.merge);
|
341
340
|
|
342
341
|
/* --------------
|
343
342
|
Theme Config
|
@@ -500,6 +500,12 @@ declare namespace FomanticUI {
|
|
500
500
|
|
501
501
|
// endregion
|
502
502
|
|
503
|
+
// region Template Settings
|
504
|
+
|
505
|
+
templates: Dropdown.TemplateSettings;
|
506
|
+
|
507
|
+
// endregion
|
508
|
+
|
503
509
|
// region Callbacks
|
504
510
|
|
505
511
|
/**
|
@@ -647,6 +653,7 @@ declare namespace FomanticUI {
|
|
647
653
|
}
|
648
654
|
|
649
655
|
namespace Dropdown {
|
656
|
+
type TemplateSettings = Partial<Pick<Settings.Templates, keyof Settings.Templates>>;
|
650
657
|
type TransitionSettings = Partial<Pick<Settings.Transition, keyof Settings.Transition>>;
|
651
658
|
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
652
659
|
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
@@ -658,6 +665,43 @@ declare namespace FomanticUI {
|
|
658
665
|
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
659
666
|
|
660
667
|
namespace Settings {
|
668
|
+
interface Templates {
|
669
|
+
/**
|
670
|
+
* @default function(string, settings)
|
671
|
+
*/
|
672
|
+
escape: (string: string, settings?: DropdownSettings) => string;
|
673
|
+
|
674
|
+
/**
|
675
|
+
* generates dropdown from select values
|
676
|
+
* @default function(message, type, header)
|
677
|
+
*/
|
678
|
+
dropdown: (select: {placeholder?: string, values: {[key: string]: string}}, settings: DropdownSettings) => string;
|
679
|
+
|
680
|
+
/**
|
681
|
+
* generates just menu from select
|
682
|
+
* @default function(response, settings)
|
683
|
+
*/
|
684
|
+
menu: (values: {[key: string]: string}, settings: DropdownSettings) => string;
|
685
|
+
|
686
|
+
/**
|
687
|
+
* generates label for multiselect
|
688
|
+
* @default function(response, settings)
|
689
|
+
*/
|
690
|
+
label: (value: string, text: string, settings: DropdownSettings) => string;
|
691
|
+
|
692
|
+
/**
|
693
|
+
* generates messages like "No results"
|
694
|
+
* @default function(response, settings)
|
695
|
+
*/
|
696
|
+
message: (message: string) => string;
|
697
|
+
|
698
|
+
/**
|
699
|
+
* generates user addition to the selection menu
|
700
|
+
* @default function(response, settings)
|
701
|
+
*/
|
702
|
+
addition: (choice: string) => string;
|
703
|
+
}
|
704
|
+
|
661
705
|
interface Transition {
|
662
706
|
|
663
707
|
/**
|
@@ -394,9 +394,9 @@ declare namespace FomanticUI {
|
|
394
394
|
namespace Settings {
|
395
395
|
interface Templates {
|
396
396
|
/**
|
397
|
-
* @default function(string,
|
397
|
+
* @default function(string, settings)
|
398
398
|
*/
|
399
|
-
escape: (string: string,
|
399
|
+
escape: (string: string, settings?: SearchSettings) => string;
|
400
400
|
|
401
401
|
/**
|
402
402
|
* @default function(message, type, header)
|
@@ -404,14 +404,14 @@ declare namespace FomanticUI {
|
|
404
404
|
message: (message: string, type?: string, header?: string) => string;
|
405
405
|
|
406
406
|
/**
|
407
|
-
* @default function(response,
|
407
|
+
* @default function(response, settings)
|
408
408
|
*/
|
409
|
-
category: (response: unknown,
|
409
|
+
category: (response: unknown, settings: SearchSettings) => string;
|
410
410
|
|
411
411
|
/**
|
412
|
-
* @default function(response,
|
412
|
+
* @default function(response, settings)
|
413
413
|
*/
|
414
|
-
standard: (response: unknown,
|
414
|
+
standard: (response: unknown, settings: SearchSettings) => string;
|
415
415
|
}
|
416
416
|
|
417
417
|
interface Selectors {
|