@formio/js 5.0.0-rc.90 → 5.0.0-rc.91

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@
10
10
  * MIT licensed
11
11
  */
12
12
 
13
- /*! formiojs v5.0.0-rc.90 | https://unpkg.com/formiojs@5.0.0-rc.90/LICENSE.txt */
13
+ /*! formiojs v5.0.0-rc.91 | https://unpkg.com/formiojs@5.0.0-rc.91/LICENSE.txt */
14
14
 
15
15
  /**
16
16
  * @license
@@ -1445,7 +1445,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
1445
1445
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1446
1446
 
1447
1447
  "use strict";
1448
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./node_modules/@formio/core/lib/utils/operators/ConditionOperator.js\"));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nconst date_1 = __webpack_require__(/*! ../../utils/date */ \"./node_modules/@formio/core/lib/utils/date.js\");\nclass DateGeaterThan extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'dateGreaterThan';\n }\n static get displayedName() {\n return 'Greater Than';\n }\n getFormattedDates({ value, comparedValue, conditionTriggerComponent }) {\n const hasValidationFormat = conditionTriggerComponent && conditionTriggerComponent.component.type === 'day' ? (0, date_1.getDateValidationFormat)(conditionTriggerComponent.component) : null;\n const date = hasValidationFormat ? (0, moment_1.default)(value, conditionTriggerComponent.getValidationFormat()) : (0, moment_1.default)(value);\n const comparedDate = hasValidationFormat ? (0, moment_1.default)(comparedValue, conditionTriggerComponent.getValidationFormat()) : (0, moment_1.default)(comparedValue);\n return { date, comparedDate };\n }\n execute(options, functionName = 'isAfter') {\n const { value, instance, conditionComponentPath } = options;\n if (!value) {\n return false;\n }\n let conditionTriggerComponent = null;\n if (instance && instance.root) {\n conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);\n }\n if (conditionTriggerComponent && conditionTriggerComponent.component.type === 'day' && (0, date_1.isPartialDay)(conditionTriggerComponent.component, value)) {\n return false;\n }\n const { date, comparedDate } = this.getFormattedDates(Object.assign(Object.assign({}, options), { conditionTriggerComponent }));\n return date[functionName](comparedDate);\n }\n}\nexports[\"default\"] = DateGeaterThan;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/operators/DateGreaterThan.js?");
1448
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./node_modules/@formio/core/lib/utils/operators/ConditionOperator.js\"));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nconst date_1 = __webpack_require__(/*! ../../utils/date */ \"./node_modules/@formio/core/lib/utils/date.js\");\nclass DateGeaterThan extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'dateGreaterThan';\n }\n static get displayedName() {\n return 'Greater Than';\n }\n getFormattedDates({ value, comparedValue, conditionTriggerComponent }) {\n const validationFormat = conditionTriggerComponent && conditionTriggerComponent.component.type === 'day' ? (0, date_1.getDateValidationFormat)(conditionTriggerComponent.component) : null;\n const date = validationFormat ? (0, moment_1.default)(value, validationFormat) : (0, moment_1.default)(value);\n const comparedDate = validationFormat ? (0, moment_1.default)(comparedValue, validationFormat) : (0, moment_1.default)(comparedValue);\n return { date, comparedDate };\n }\n execute(options, functionName = 'isAfter') {\n const { value, instance, conditionComponentPath } = options;\n if (!value) {\n return false;\n }\n let conditionTriggerComponent = null;\n if (instance && instance.root) {\n conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);\n }\n if (conditionTriggerComponent && conditionTriggerComponent.component.type === 'day' && (0, date_1.isPartialDay)(conditionTriggerComponent.component, value)) {\n return false;\n }\n const { date, comparedDate } = this.getFormattedDates(Object.assign(Object.assign({}, options), { conditionTriggerComponent }));\n return date[functionName](comparedDate);\n }\n}\nexports[\"default\"] = DateGeaterThan;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/operators/DateGreaterThan.js?");
1449
1449
 
1450
1450
  /***/ }),
1451
1451