UNPKG

@react-awesome-query-builder/core

Version:
14 lines (13 loc) 6.64 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.translations = void 0; var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var constants = _interopRequireWildcard(require("./constains")); var _translations; function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } var translations = exports.translations = (_translations = {}, (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])(_translations, constants.EMPTY_GROUP, "Empty group"), constants.EMPTY_RULE_GROUP, "No conditions for group field {{field}}"), constants.EMPTY_QUERY, "Empty query"), constants.EMPTY_CASE, "Empty case"), constants.NO_CONFIG_FOR_FIELD, "No config for field {{field}}"), constants.FIXED_OPERATOR, "Fixed operator {{from}} to {{to}} for field {{field}}"), constants.NO_CONFIG_FOR_OPERATOR, "No config for operator {{operator}}"), constants.NO_CONFIG_FOR_FUNCTION, "No config for function {{funcKey}}"), constants.INVALID_VALUE, "Invalid value"), constants.INVALID_FUNC_ARG_VALUE, "Invalid value of arg {{argName}} for func {{funcName}}: {{argValidationError}}"), (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])(_translations, constants.UNSUPPORTED_FIELD_TYPE, "Type of field {{field}} is not supported"), constants.UNSUPPORTED_OPERATOR_FOR_FIELD, "Operator {{operator}} is not supported for field {{field}}"), constants.INCOMPLETE_RULE, "Incomplete rule"), constants.INCOMPLETE_LHS, "Incomplete LHS"), constants.INCOMPLETE_RHS, "Incomplete RHS"), constants.INVALID_VALUE_SRC, "Invalid value src {{valueSrcs, list}}"), constants.BAD_MULTISELECT_VALUES + "_one", "Value {{badValues, list}} is not in the list of allowed values"), constants.BAD_MULTISELECT_VALUES + "_other", "Values {{badValues, list}} are not in the list of allowed values"), constants.BAD_SELECT_VALUE, "Value {{value}} is not in the list of allowed values"), constants.INCORRECT_VALUE_TYPE, "Value should have type {{wType}}, but got value of type {{valueType}}"), (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])(_translations, constants.INCORRECT_VALUE_JS_TYPE, "Value should have JS type {{jsType}}, but got value of type {{valueTypeof}}"), constants.VALUE_LENGTH_CONSTRAINT_FAIL, "Value {{value}} should have max length {{fieldSettings.maxLength}} but got {{length}}"), constants.VALUE_MIN_CONSTRAINT_FAIL, "Value {{value}} should be greater than or equal to {{fieldSettings.min}}"), constants.VALUE_MIN_CONSTRAINT_FAIL + "_" + constants._CONTEXT_MIN_MAX, "Value {{value}} should be from {{fieldSettings.min}} to {{fieldSettings.max}}"), constants.VALUE_MAX_CONSTRAINT_FAIL, "Value {{value}} should be less than or equal to {{fieldSettings.max}}"), constants.VALUE_MAX_CONSTRAINT_FAIL + "_" + constants._CONTEXT_MIN_MAX, "Value {{value}} should be from {{fieldSettings.min}} to {{fieldSettings.max}}"), constants.NO_CONFIG_FOR_FIELD_VALUE, "No config for field {{field}}"), constants.CANT_COMPARE_FIELD_WITH_ITSELF, "Can't compare field {{field}} with itself"), constants.CANT_COMPARE_FIELD_WITH_FIELD, "Can't compare field {{leftField}} with {{rightField}}"), constants.INCORRECT_FIELD_TYPE, "Field {{field}} is of type {{type}}, but expected {{expected}}"), (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])(_translations, constants.UNSUPPORTED_FUNCTION_FOR_FIELD, "Unsupported function {{funcKey}} for field {{field}}"), constants.REQUIRED_FUNCTION_ARG, "Value of arg {{argName}} for func {{funcName}} is required"), constants.INCORRECT_FUNCTION_RETURN_TYPE, "Function {{funcKey}} should return value of type {{returnType}}, but got {{valueType}}"), constants.INVALID_RANGE, "Invalid range"), constants.ITEM_POSITION_ROOT, "Root"), constants.ITEM_POSITION + "__rule", "Leaf #{{globalLeafNo}}"), constants.ITEM_POSITION + "__group", "Group #{{globalGroupNo}}"), constants.ITEM_POSITION + "__rule_group", "Rule-group #{{globalNoByType}}"), constants.ITEM_POSITION + "__case_group", "Case #{{globalNoByType}}"), constants.ITEM_POSITION + "__rule__deleted", "Deleted leaf #{{globalLeafNo}}"), (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])(_translations, constants.ITEM_POSITION + "__group__deleted", "Deleted group #{{globalGroupNo}}"), constants.ITEM_POSITION + "__rule_group__deleted", "Deleted rule-group #{{globalNoByType}}"), constants.ITEM_POSITION + "__case_group__deleted", "Deleted case #{{globalNoByType}}"), constants.ITEM_POSITION_IN_CASE, "{{str}} in case #{{caseNo}}"), constants.ITEM_POSITION_WITH_INDEX_PATH, "{{str}} (index path: {{indexPath, list}})"));