@formio/js 5.1.0-dev.5965.5d8702c → 5.1.0-dev.5969.9a6e3f5
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/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.form.js +5 -5
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +5 -5
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +3 -3
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +3 -3
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/components/day/Day.js +18 -2
- package/lib/cjs/formio.embed.d.ts +1 -1
- package/lib/cjs/formio.embed.js +3 -0
- package/lib/cjs/translations/en.js +2 -2
- package/lib/mjs/components/day/Day.js +18 -2
- package/lib/mjs/formio.embed.d.ts +1 -1
- package/lib/mjs/formio.embed.js +1 -0
- package/lib/mjs/translations/en.js +2 -2
- package/package.json +2 -2
@@ -7,7 +7,6 @@ const lodash_1 = __importDefault(require("lodash"));
|
|
7
7
|
const moment_1 = __importDefault(require("moment"));
|
8
8
|
const Field_1 = __importDefault(require("../_classes/field/Field"));
|
9
9
|
const utils_1 = require("../../utils/utils");
|
10
|
-
const core_1 = require("@formio/core");
|
11
10
|
class DayComponent extends Field_1.default {
|
12
11
|
static schema(...extend) {
|
13
12
|
return Field_1.default.schema({
|
@@ -475,7 +474,24 @@ class DayComponent extends Field_1.default {
|
|
475
474
|
* @returns {string} - the format for the value string.
|
476
475
|
*/
|
477
476
|
get format() {
|
478
|
-
|
477
|
+
let format = '';
|
478
|
+
if (this.component.dayFirst && this.showDay) {
|
479
|
+
format += 'D/';
|
480
|
+
}
|
481
|
+
if (this.showMonth) {
|
482
|
+
format += 'M/';
|
483
|
+
}
|
484
|
+
if (!this.component.dayFirst && this.showDay) {
|
485
|
+
format += 'D/';
|
486
|
+
}
|
487
|
+
if (this.showYear) {
|
488
|
+
format += 'YYYY';
|
489
|
+
return format;
|
490
|
+
}
|
491
|
+
else {
|
492
|
+
// Trim off the "/" from the end of the format string.
|
493
|
+
return format.length ? format.substring(0, format.length - 1) : format;
|
494
|
+
}
|
479
495
|
}
|
480
496
|
/**
|
481
497
|
* Return the date for this component.
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export { Formio } from "./InlineEmbed";
|
package/lib/cjs/formio.embed.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Formio = void 0;
|
3
4
|
const InlineEmbed_1 = require("./InlineEmbed");
|
4
5
|
(0, InlineEmbed_1.embed)();
|
6
|
+
var InlineEmbed_2 = require("./InlineEmbed");
|
7
|
+
Object.defineProperty(exports, "Formio", { enumerable: true, get: function () { return InlineEmbed_2.Formio; } });
|
@@ -26,8 +26,8 @@ exports.default = {
|
|
26
26
|
maxWords: '{{field}} must have no more than {{length}} words.',
|
27
27
|
min: '{{field}} cannot be less than {{min}}.',
|
28
28
|
max: '{{field}} cannot be greater than {{max}}.',
|
29
|
-
maxDate: '{{field}} should not contain date after {{maxDate}}',
|
30
|
-
minDate: '{{field}} should not contain date before {{minDate}}',
|
29
|
+
maxDate: '{{field}} should not contain date after {{- maxDate}}',
|
30
|
+
minDate: '{{field}} should not contain date before {{- minDate}}',
|
31
31
|
maxYear: '{{field}} should not contain year greater than {{maxYear}}',
|
32
32
|
minYear: '{{field}} should not contain year less than {{minYear}}',
|
33
33
|
minSelectedCount: 'You must select at least {{minCount}} items',
|
@@ -2,7 +2,6 @@ import _ from 'lodash';
|
|
2
2
|
import moment from 'moment';
|
3
3
|
import Field from '../_classes/field/Field';
|
4
4
|
import { boolValue, componentValueTypes, getComponentSavedTypes, getLocaleDateFormatInfo } from '../../utils/utils';
|
5
|
-
import { getDayFormat } from '@formio/core';
|
6
5
|
export default class DayComponent extends Field {
|
7
6
|
static schema(...extend) {
|
8
7
|
return Field.schema({
|
@@ -475,7 +474,24 @@ export default class DayComponent extends Field {
|
|
475
474
|
* @returns {string} - the format for the value string.
|
476
475
|
*/
|
477
476
|
get format() {
|
478
|
-
|
477
|
+
let format = '';
|
478
|
+
if (this.component.dayFirst && this.showDay) {
|
479
|
+
format += 'D/';
|
480
|
+
}
|
481
|
+
if (this.showMonth) {
|
482
|
+
format += 'M/';
|
483
|
+
}
|
484
|
+
if (!this.component.dayFirst && this.showDay) {
|
485
|
+
format += 'D/';
|
486
|
+
}
|
487
|
+
if (this.showYear) {
|
488
|
+
format += 'YYYY';
|
489
|
+
return format;
|
490
|
+
}
|
491
|
+
else {
|
492
|
+
// Trim off the "/" from the end of the format string.
|
493
|
+
return format.length ? format.substring(0, format.length - 1) : format;
|
494
|
+
}
|
479
495
|
}
|
480
496
|
/**
|
481
497
|
* Return the date for this component.
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export { Formio } from "./InlineEmbed";
|
package/lib/mjs/formio.embed.js
CHANGED
@@ -24,8 +24,8 @@ export default {
|
|
24
24
|
maxWords: '{{field}} must have no more than {{length}} words.',
|
25
25
|
min: '{{field}} cannot be less than {{min}}.',
|
26
26
|
max: '{{field}} cannot be greater than {{max}}.',
|
27
|
-
maxDate: '{{field}} should not contain date after {{maxDate}}',
|
28
|
-
minDate: '{{field}} should not contain date before {{minDate}}',
|
27
|
+
maxDate: '{{field}} should not contain date after {{- maxDate}}',
|
28
|
+
minDate: '{{field}} should not contain date before {{- minDate}}',
|
29
29
|
maxYear: '{{field}} should not contain year greater than {{maxYear}}',
|
30
30
|
minYear: '{{field}} should not contain year less than {{minYear}}',
|
31
31
|
minSelectedCount: 'You must select at least {{minCount}} items',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.1.0-dev.
|
3
|
+
"version": "5.1.0-dev.5969.9a6e3f5",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -82,7 +82,7 @@
|
|
82
82
|
"dependencies": {
|
83
83
|
"@formio/bootstrap": "3.1.0-dev.1-dev.120.01bbe80",
|
84
84
|
"@formio/choices.js": "^10.2.1",
|
85
|
-
"@formio/core": "
|
85
|
+
"@formio/core": "2.4.0-dev.205.f4cc49f",
|
86
86
|
"@formio/text-mask-addons": "3.8.0-formio.4",
|
87
87
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
88
88
|
"abortcontroller-polyfill": "^1.7.5",
|