fomantic-ui 2.9.0-beta.264 → 2.9.0-beta.267
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/.github/workflows/nightly.yml +2 -0
- 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 +69 -14
- package/dist/components/api.min.js +2 -2
- 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 +2 -2
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- 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 +1 -1
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +1 -1
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +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/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/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- 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 +1 -1
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- 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 +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- 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 +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- 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.js +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 +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- 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 +49 -49
- package/dist/semantic.js +94 -39
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/scripts/nightly-version.js +39 -39
- package/src/definitions/behaviors/api.js +68 -13
- package/src/definitions/modules/calendar.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
// node
|
2
2
|
const fs = require('fs')
|
3
3
|
const path = require('path')
|
4
|
+
const childProcess = require('child_process')
|
4
5
|
|
5
6
|
// npm
|
6
7
|
const fetch = require('node-fetch')
|
@@ -8,65 +9,64 @@ const semver = require('semver')
|
|
8
9
|
|
9
10
|
// pkg
|
10
11
|
const pkg = require('../package.json')
|
12
|
+
const process = require('process')
|
11
13
|
|
12
14
|
const ghBase = 'https://api.github.com'
|
13
15
|
const repoUrlPath = 'fomantic/Fomantic-UI'
|
14
16
|
const npmBase = 'https://registry.npmjs.org'
|
15
17
|
const npmPackage = 'fomantic-ui'
|
18
|
+
const currentRev = childProcess // get the current rev from the repo
|
19
|
+
.execSync('git rev-parse HEAD')
|
20
|
+
.toString()
|
21
|
+
.trim()
|
22
|
+
.substr(0, 7)
|
16
23
|
|
17
|
-
|
18
|
-
const
|
19
|
-
return fetch(`${ghBase}/repos/${repoUrlPath}/milestones`)
|
20
|
-
.then(r => r.json())
|
21
|
-
.then(milestones => milestones.filter(m => m.title.indexOf('x') === -1).map(m => m.title).sort()[0])
|
22
|
-
}
|
23
|
-
|
24
|
-
const getCurrentNpmVersion = async function () {
|
25
|
-
return fetch(`${npmBase}/${npmPackage}`)
|
24
|
+
const getNextVersion = async function () {
|
25
|
+
const versions = await fetch(`${ghBase}/repos/${repoUrlPath}/milestones`)
|
26
26
|
.then(r => r.json())
|
27
|
-
.then(
|
28
|
-
|
27
|
+
.then(milestones => milestones.filter(m => m.title.indexOf('x') === -1)) // remove all versions with `x` in it
|
28
|
+
.then(versions => versions.map(m => m.title)) // create array of versions
|
29
|
+
.then(versions => semver.sort(versions))
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
.then(p => p['dist-tags'].nightly)
|
34
|
-
.then(v => semver.prerelease(v))
|
35
|
-
.then(pr => pr === null ? ['beta', 0] : pr)
|
31
|
+
// Return first entry aka the smallest version in milestones which would therefore
|
32
|
+
// be the next version
|
33
|
+
return semver.parse(versions[0])
|
36
34
|
}
|
37
35
|
|
38
|
-
const
|
39
|
-
//
|
40
|
-
|
41
|
-
|
36
|
+
const getPublishedVersion = async function () {
|
37
|
+
// get the latest published nightly tagged version
|
38
|
+
return semver.parse(
|
39
|
+
await fetch(`${npmBase}/${npmPackage}`)
|
42
40
|
.then(r => r.json())
|
43
|
-
.then(p =>
|
41
|
+
.then(p => p['dist-tags'].nightly)
|
42
|
+
)
|
44
43
|
}
|
45
44
|
|
46
45
|
const getNightlyVersion = async function () {
|
47
|
-
const
|
48
|
-
const
|
49
|
-
const currentNightly = `${currentNightlyWithPre.major}.${currentNightlyWithPre.minor}.${currentNightlyWithPre.patch}`
|
50
|
-
const allNpmVersions = await getAllNpmVersions()
|
51
|
-
let nightlyVersion = `${nextVersion}-beta.0`
|
46
|
+
const next = semver.parse(await getNextVersion())
|
47
|
+
const current = semver.parse(await getPublishedVersion())
|
52
48
|
|
53
|
-
if (
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
`${nextVersion}-${preRelease[0]}.${preRelease[1]}`,
|
58
|
-
'prerelease'
|
59
|
-
)
|
49
|
+
if (current.build[0] === currentRev) {
|
50
|
+
console.log('No new commits since last publish. Exiting.')
|
51
|
+
process.exit(1)
|
52
|
+
return
|
60
53
|
}
|
61
|
-
|
62
|
-
|
54
|
+
|
55
|
+
let nightlyVersion = `${next.version}-beta.0`
|
56
|
+
|
57
|
+
// Check if published version is the same version as next version.
|
58
|
+
// Only check major, minor and patch as previously published nightly
|
59
|
+
// versions would include prerelease tag and build metadata
|
60
|
+
if (semver.eq(`${next.major}.${next.minor}.${next.patch}`, `${current.major}.${current.minor}.${current.patch}`)) {
|
61
|
+
// If they match then a nightly version has already been published, so we need to increment
|
62
|
+
// the prerelease and add the new rev as build metadata
|
63
63
|
nightlyVersion = semver.inc(
|
64
|
-
|
65
|
-
|
64
|
+
`${next.version}-beta.${current.prerelease[1]}`,
|
65
|
+
'prerelease'
|
66
66
|
)
|
67
67
|
}
|
68
68
|
|
69
|
-
return nightlyVersion
|
69
|
+
return `${nightlyVersion}+${currentRev}`
|
70
70
|
}
|
71
71
|
|
72
72
|
getNightlyVersion()
|
@@ -428,28 +428,76 @@ $.api = $.fn.api = function(parameters) {
|
|
428
428
|
formData: function(data) {
|
429
429
|
var
|
430
430
|
formData = {},
|
431
|
-
hasOtherData
|
431
|
+
hasOtherData,
|
432
|
+
useFormDataApi = settings.serializeForm === 'formdata'
|
432
433
|
;
|
433
434
|
data = data || originalData || settings.data;
|
434
435
|
hasOtherData = $.isPlainObject(data);
|
435
436
|
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
437
|
+
if (useFormDataApi) {
|
438
|
+
formData = new FormData($form[0]);
|
439
|
+
settings.processData = typeof settings.processData !== 'undefined' ? settings.processData : false;
|
440
|
+
settings.contentType = typeof settings.contentType !== 'undefined' ? settings.contentType : false;
|
441
|
+
} else {
|
442
|
+
var formArray = $form.serializeArray(),
|
443
|
+
pushes = {},
|
444
|
+
pushValues= {},
|
445
|
+
build = function(base, key, value) {
|
446
|
+
base[key] = value;
|
447
|
+
return base;
|
448
|
+
}
|
449
|
+
;
|
450
|
+
// add files
|
451
|
+
$.each($('input[type="file"]',$form), function(i, tag) {
|
452
|
+
$.each($(tag)[0].files, function(j, file) {
|
453
|
+
formArray.push({name:tag.name, value: file});
|
454
|
+
});
|
455
|
+
});
|
456
|
+
$.each(formArray, function(i, el) {
|
457
|
+
if (!settings.regExp.validate.test(el.name)) return;
|
458
|
+
var isCheckbox = $('[name="' + el.name + '"]', $form).attr('type') === 'checkbox',
|
459
|
+
floatValue = parseFloat(el.value),
|
460
|
+
value = (isCheckbox && el.value === 'on') || el.value === 'true' || (String(floatValue) === el.value ? floatValue : (el.value === 'false' ? false : el.value)),
|
461
|
+
nameKeys = el.name.match(settings.regExp.key) || [], k, pushKey= el.name.replace(/\[\]$/,'')
|
462
|
+
;
|
463
|
+
if(!(pushKey in pushes)) {
|
464
|
+
pushes[pushKey] = 0;
|
465
|
+
pushValues[pushKey] = value;
|
466
|
+
} else if (Array.isArray(pushValues[pushKey])) {
|
467
|
+
pushValues[pushKey].push(value);
|
442
468
|
} else {
|
443
|
-
|
469
|
+
pushValues[pushKey] = [pushValues[pushKey] , value];
|
444
470
|
}
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
471
|
+
value = pushValues[pushKey];
|
472
|
+
|
473
|
+
while ((k = nameKeys.pop()) !== undefined) {
|
474
|
+
// foo[]
|
475
|
+
if (k == '' && !Array.isArray(value)){
|
476
|
+
value = build([], pushes[pushKey]++, value);
|
477
|
+
}
|
478
|
+
// foo[n]
|
479
|
+
else if (settings.regExp.fixed.test(k)) {
|
480
|
+
value = build([], k, value);
|
481
|
+
}
|
482
|
+
// foo; foo[bar]
|
483
|
+
else if (settings.regExp.named.test(k)) {
|
484
|
+
value = build({}, k, value);
|
485
|
+
}
|
486
|
+
}
|
487
|
+
formData = $.extend(true, formData, value);
|
488
|
+
});
|
489
|
+
}
|
449
490
|
|
450
491
|
if(hasOtherData) {
|
451
492
|
module.debug('Extending existing data with form data', data, formData);
|
452
|
-
|
493
|
+
if(useFormDataApi) {
|
494
|
+
$.each(Object.keys(data),function(i, el){
|
495
|
+
formData.append(el, data[el]);
|
496
|
+
});
|
497
|
+
data = formData;
|
498
|
+
} else {
|
499
|
+
data = $.extend(true, {}, data, formData);
|
500
|
+
}
|
453
501
|
}
|
454
502
|
else {
|
455
503
|
module.debug('Adding form data', formData);
|
@@ -1088,6 +1136,8 @@ $.api.settings = {
|
|
1088
1136
|
defaultData : true,
|
1089
1137
|
|
1090
1138
|
// whether to serialize closest form
|
1139
|
+
// use true to convert complex named keys like a[b][1][c][] into a nested object
|
1140
|
+
// use 'formdata' for formdata web api
|
1091
1141
|
serializeForm : false,
|
1092
1142
|
|
1093
1143
|
// how long to wait before request should occur
|
@@ -1158,6 +1208,11 @@ $.api.settings = {
|
|
1158
1208
|
regExp : {
|
1159
1209
|
required : /\{\$*[A-z0-9]+\}/g,
|
1160
1210
|
optional : /\{\/\$*[A-z0-9]+\}/g,
|
1211
|
+
validate: /^[a-z_][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,
|
1212
|
+
key: /[a-z0-9_-]+|(?=\[\])/gi,
|
1213
|
+
push: /^$/,
|
1214
|
+
fixed: /^\d+$/,
|
1215
|
+
named: /^[a-z0-9_-]+$/i
|
1161
1216
|
},
|
1162
1217
|
|
1163
1218
|
className: {
|
@@ -1560,7 +1560,7 @@ $.fn.calendar.settings = {
|
|
1560
1560
|
if (!text) {
|
1561
1561
|
return null;
|
1562
1562
|
}
|
1563
|
-
text = String(text).replace(/\s/g,'');
|
1563
|
+
text = String(text).trim().replace(/([.:\/\-])\s+/g,'$1').replace(/\s+([.:\/-])/g,'$1').replace(/\s+/g,' ');
|
1564
1564
|
if (text.length === 0) {
|
1565
1565
|
return null;
|
1566
1566
|
}
|