@formio/js 5.1.0-dev.6152.95f2394 → 5.1.0-dev.6154.73887de
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.form.js +2 -2
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/components/button/Button.d.ts +1 -1
- package/lib/cjs/components/button/Button.js +4 -4
- package/lib/cjs/utils/utils.js +4 -0
- package/lib/mjs/components/button/Button.d.ts +1 -1
- package/lib/mjs/components/button/Button.js +1 -1
- package/lib/mjs/utils/utils.js +4 -0
- package/package.json +1 -1
@@ -7,7 +7,7 @@ export default class ButtonComponent extends Field {
|
|
7
7
|
weight: number;
|
8
8
|
schema: any;
|
9
9
|
};
|
10
|
-
static savedValueTypes(schema: any):
|
10
|
+
static savedValueTypes(schema: any): string[];
|
11
11
|
constructor(component: any, options: any, data: any);
|
12
12
|
filesUploading: number;
|
13
13
|
get inputInfo(): any;
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
7
7
|
const Field_1 = __importDefault(require("../_classes/field/Field"));
|
8
8
|
const Input_1 = __importDefault(require("../_classes/input/Input"));
|
9
|
-
const
|
9
|
+
const utils_1 = require("../../utils");
|
10
10
|
class ButtonComponent extends Field_1.default {
|
11
11
|
static schema(...extend) {
|
12
12
|
return Input_1.default.schema({
|
@@ -35,7 +35,7 @@ class ButtonComponent extends Field_1.default {
|
|
35
35
|
};
|
36
36
|
}
|
37
37
|
static savedValueTypes(schema) {
|
38
|
-
return (0,
|
38
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.boolean];
|
39
39
|
}
|
40
40
|
constructor(component, options, data) {
|
41
41
|
super(component, options, data);
|
@@ -306,7 +306,7 @@ class ButtonComponent extends Field_1.default {
|
|
306
306
|
const form = this.getRoot();
|
307
307
|
const flattened = {};
|
308
308
|
const components = {};
|
309
|
-
(0,
|
309
|
+
(0, utils_1.eachComponent)(form.components, (componentWrapper, path) => {
|
310
310
|
const component = componentWrapper.component || componentWrapper;
|
311
311
|
flattened[path] = component;
|
312
312
|
components[component.key] = component;
|
@@ -447,7 +447,7 @@ class ButtonComponent extends Field_1.default {
|
|
447
447
|
}, 100);
|
448
448
|
}
|
449
449
|
get oauthComponentPath() {
|
450
|
-
const pathArray = (0,
|
450
|
+
const pathArray = (0, utils_1.getArrayFromComponentPath)(this.path);
|
451
451
|
return lodash_1.default.chain(pathArray).filter(pathPart => !lodash_1.default.isNumber(pathPart)).join('.').value();
|
452
452
|
}
|
453
453
|
focus() {
|
package/lib/cjs/utils/utils.js
CHANGED
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = exports.observeOverload = exports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToDayjs = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.dayjsDate = exports.shouldHandleTimezone = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.removeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getScriptPlugin = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = void 0;
|
7
7
|
exports.hasEncodedTimezone = exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports.getFocusableElements = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.fastCloneDeep = exports.sanitize = void 0;
|
8
|
+
/* global jQuery */
|
8
9
|
const lodash_1 = __importDefault(require("lodash"));
|
9
10
|
const moment_timezone_1 = __importDefault(require("moment-timezone/moment-timezone"));
|
10
11
|
const jstimezonedetect_1 = __importDefault(require("jstimezonedetect"));
|
@@ -1056,6 +1057,9 @@ function bootstrapVersion(options) {
|
|
1056
1057
|
if (options.bootstrap) {
|
1057
1058
|
return options.bootstrap;
|
1058
1059
|
}
|
1060
|
+
if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {
|
1061
|
+
return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);
|
1062
|
+
}
|
1059
1063
|
if (window.bootstrap && window.bootstrap.Collapse) {
|
1060
1064
|
return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);
|
1061
1065
|
}
|
@@ -7,7 +7,7 @@ export default class ButtonComponent extends Field {
|
|
7
7
|
weight: number;
|
8
8
|
schema: any;
|
9
9
|
};
|
10
|
-
static savedValueTypes(schema: any):
|
10
|
+
static savedValueTypes(schema: any): string[];
|
11
11
|
constructor(component: any, options: any, data: any);
|
12
12
|
filesUploading: number;
|
13
13
|
get inputInfo(): any;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _ from 'lodash';
|
2
2
|
import Field from '../_classes/field/Field';
|
3
3
|
import Input from '../_classes/input/Input';
|
4
|
-
import { componentValueTypes, eachComponent, getArrayFromComponentPath, getComponentSavedTypes } from '../../utils
|
4
|
+
import { componentValueTypes, eachComponent, getArrayFromComponentPath, getComponentSavedTypes } from '../../utils';
|
5
5
|
export default class ButtonComponent extends Field {
|
6
6
|
static schema(...extend) {
|
7
7
|
return Input.schema({
|
package/lib/mjs/utils/utils.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
/* global jQuery */
|
1
2
|
import _ from 'lodash';
|
2
3
|
import moment from 'moment-timezone/moment-timezone';
|
3
4
|
import jtz from 'jstimezonedetect';
|
@@ -1005,6 +1006,9 @@ export function bootstrapVersion(options) {
|
|
1005
1006
|
if (options.bootstrap) {
|
1006
1007
|
return options.bootstrap;
|
1007
1008
|
}
|
1009
|
+
if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {
|
1010
|
+
return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);
|
1011
|
+
}
|
1008
1012
|
if (window.bootstrap && window.bootstrap.Collapse) {
|
1009
1013
|
return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);
|
1010
1014
|
}
|