@ldmjs/ui 1.0.26 → 1.0.28
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/css/index.css +1 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.js +73 -201
- package/dist/types/validators.d.ts +67 -0
- package/dist/utils/validators.js +1 -0
- package/package.json +1 -1
- /package/dist/{calendar.js → lib/calendar.js} +0 -0
- /package/dist/{floating.js → lib/floating.js} +0 -0
- /package/dist/{imask.js → lib/imask.js} +0 -0
- /package/dist/{multiselect.js → lib/multiselect.js} +0 -0
- /package/dist/{runtime-template.js → lib/runtime-template.js} +0 -0
package/dist/css/index.css
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
.ld-ragiogroup .validate[data-v-bd740210]{overflow:hidden;height:20px}.ld-ragiogroup--row[data-v-bd740210] .ld-radiobutton:not(:first-child){margin-left:8px}
|
|
22
22
|
|
|
23
|
-
.ld-textarea[data-v-
|
|
23
|
+
.ld-textarea[data-v-5e5438c4]{display:flex;min-width:100%;max-width:100%;width:100%}[data-v-5e5438c4] .none-resizable textarea{resize:none}
|
|
24
24
|
|
|
25
25
|
.ld-select[data-v-96d44a7a]{position:relative;min-width:100%}.ld-select[data-v-96d44a7a] .v-field__append-inner{display:none}.ld-select[data-v-96d44a7a] .v-select{position:relative}.ld-select[data-v-96d44a7a] .v-select:before{display:block;position:absolute;right:20px;top:calc(var(--input-height) / 2);margin-top:-2px;color:var(--grey);border-style:solid;border-width:5px 5px 0;border-color:var(--grey) transparent transparent;transition:transform 0.2s ease;content:'';z-index:1}.ld-select[data-v-96d44a7a] .v-select--active-menu:before{transform:rotate(180deg)}input[type='checkbox']+.v-icon[data-v-96d44a7a]{display:block;width:12px !important;height:12px !important;font-size:10px !important;background-color:var(--white);color:transparent;border:1px solid var(--grey-l-5)}input[type='checkbox']:checked+.v-icon[data-v-96d44a7a]{background-color:var(--primary-l-2);color:var(--white);font-size:10px;font-weight:bold}.v-list-item--density-compact.v-list-item--one-line[data-v-96d44a7a]{min-height:var(--input-height)}.v-list-item--density-compact.v-list-item--one-line[data-v-96d44a7a] .v-list-item__content{display:flex;flex-wrap:nowrap}.v-list-item--density-compact.v-list-item--one-line[data-v-96d44a7a] .v-list-item__content .v-list-item-title{font-size:var(--font-size)}
|
|
26
26
|
|
package/dist/index.d.ts
CHANGED
|
@@ -174,3 +174,26 @@ export {
|
|
|
174
174
|
export {
|
|
175
175
|
IPagerOptions
|
|
176
176
|
} from './types/pager';
|
|
177
|
+
export {
|
|
178
|
+
ValidateFunction
|
|
179
|
+
} from './types/validation';
|
|
180
|
+
export {
|
|
181
|
+
validators
|
|
182
|
+
} from './types/validators';
|
|
183
|
+
export {
|
|
184
|
+
requiredRule,
|
|
185
|
+
maxLengthRule,
|
|
186
|
+
alphaRule,
|
|
187
|
+
alphaNumRule,
|
|
188
|
+
betweenRule,
|
|
189
|
+
decimalRule,
|
|
190
|
+
emailRule,
|
|
191
|
+
integerRule,
|
|
192
|
+
ipAddressRule,
|
|
193
|
+
macAddressRule,
|
|
194
|
+
maxValueRule,
|
|
195
|
+
minValueRule,
|
|
196
|
+
numericRule,
|
|
197
|
+
urlRule,
|
|
198
|
+
phoneRule,
|
|
199
|
+
} from './types/validators';
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("./calendar.js"), require("./floating.js"), require("./imask.js"), require("./multiselect.js"), require("./runtime-template.js"), require("
|
|
3
|
+
module.exports = factory(require("./lib/calendar.js"), require("./lib/floating.js"), require("./lib/imask.js"), require("./lib/multiselect.js"), require("./lib/runtime-template.js"), require("./utils/validators.js"), require("markdown-it"), require("md-editor-v3"), require("vue"), require("vue-class-component"), require("vue-property-decorator"), require("vue-toastification"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define(["./calendar.js", "./floating.js", "./imask.js", "./multiselect.js", "./runtime-template.js", "
|
|
5
|
+
define(["./lib/calendar.js", "./lib/floating.js", "./lib/imask.js", "./lib/multiselect.js", "./lib/runtime-template.js", "./utils/validators.js", "markdown-it", "md-editor-v3", "vue", "vue-class-component", "vue-property-decorator", "vue-toastification"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["ldmui"] = factory(require("./calendar.js"), require("./floating.js"), require("./imask.js"), require("./multiselect.js"), require("./runtime-template.js"), require("
|
|
7
|
+
exports["ldmui"] = factory(require("./lib/calendar.js"), require("./lib/floating.js"), require("./lib/imask.js"), require("./lib/multiselect.js"), require("./lib/runtime-template.js"), require("./utils/validators.js"), require("markdown-it"), require("md-editor-v3"), require("vue"), require("vue-class-component"), require("vue-property-decorator"), require("vue-toastification"));
|
|
8
8
|
else
|
|
9
|
-
root["ldmui"] = factory(root["./calendar.js"], root["./floating.js"], root["./imask.js"], root["./multiselect.js"], root["./runtime-template.js"], root["
|
|
10
|
-
})(self, (
|
|
9
|
+
root["ldmui"] = factory(root["./lib/calendar.js"], root["./lib/floating.js"], root["./lib/imask.js"], root["./lib/multiselect.js"], root["./lib/runtime-template.js"], root["./utils/validators.js"], root["markdown-it"], root["md-editor-v3"], root["vue"], root["vue-class-component"], root["vue-property-decorator"], root["vue-toastification"]);
|
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__8766__, __WEBPACK_EXTERNAL_MODULE__9018__, __WEBPACK_EXTERNAL_MODULE__6203__, __WEBPACK_EXTERNAL_MODULE__5733__, __WEBPACK_EXTERNAL_MODULE__9435__, __WEBPACK_EXTERNAL_MODULE__9119__, __WEBPACK_EXTERNAL_MODULE__8461__, __WEBPACK_EXTERNAL_MODULE__6443__, __WEBPACK_EXTERNAL_MODULE__2380__, __WEBPACK_EXTERNAL_MODULE__9299__, __WEBPACK_EXTERNAL_MODULE__5070__, __WEBPACK_EXTERNAL_MODULE__7982__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -38,51 +38,51 @@ exports.A = (sfc, props) => {
|
|
|
38
38
|
|
|
39
39
|
/***/ }),
|
|
40
40
|
|
|
41
|
-
/***/
|
|
41
|
+
/***/ 8766:
|
|
42
42
|
/***/ ((module) => {
|
|
43
43
|
|
|
44
44
|
"use strict";
|
|
45
|
-
module.exports =
|
|
45
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__8766__;
|
|
46
46
|
|
|
47
47
|
/***/ }),
|
|
48
48
|
|
|
49
|
-
/***/
|
|
49
|
+
/***/ 9018:
|
|
50
50
|
/***/ ((module) => {
|
|
51
51
|
|
|
52
52
|
"use strict";
|
|
53
|
-
module.exports =
|
|
53
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__9018__;
|
|
54
54
|
|
|
55
55
|
/***/ }),
|
|
56
56
|
|
|
57
|
-
/***/
|
|
57
|
+
/***/ 6203:
|
|
58
58
|
/***/ ((module) => {
|
|
59
59
|
|
|
60
60
|
"use strict";
|
|
61
|
-
module.exports =
|
|
61
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__6203__;
|
|
62
62
|
|
|
63
63
|
/***/ }),
|
|
64
64
|
|
|
65
|
-
/***/
|
|
65
|
+
/***/ 5733:
|
|
66
66
|
/***/ ((module) => {
|
|
67
67
|
|
|
68
68
|
"use strict";
|
|
69
|
-
module.exports =
|
|
69
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__5733__;
|
|
70
70
|
|
|
71
71
|
/***/ }),
|
|
72
72
|
|
|
73
|
-
/***/
|
|
73
|
+
/***/ 9435:
|
|
74
74
|
/***/ ((module) => {
|
|
75
75
|
|
|
76
76
|
"use strict";
|
|
77
|
-
module.exports =
|
|
77
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__9435__;
|
|
78
78
|
|
|
79
79
|
/***/ }),
|
|
80
80
|
|
|
81
|
-
/***/
|
|
81
|
+
/***/ 9119:
|
|
82
82
|
/***/ ((module) => {
|
|
83
83
|
|
|
84
84
|
"use strict";
|
|
85
|
-
module.exports =
|
|
85
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__9119__;
|
|
86
86
|
|
|
87
87
|
/***/ }),
|
|
88
88
|
|
|
@@ -253,25 +253,41 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
253
253
|
Uint8ArrayToHex: () => (/* reexport */ Uint8ArrayToHex),
|
|
254
254
|
ValidateMixin: () => (/* reexport */ ValidateMixin),
|
|
255
255
|
ValidateMixinOptions: () => (/* reexport */ ValidateMixinOptions),
|
|
256
|
+
alphaNumRule: () => (/* reexport */ validators_js_.alphaNumRule),
|
|
257
|
+
alphaRule: () => (/* reexport */ validators_js_.alphaRule),
|
|
256
258
|
awaiting: () => (/* reexport */ awaiting),
|
|
257
259
|
base64: () => (/* reexport */ base64),
|
|
258
260
|
base64ToUint8Array: () => (/* reexport */ base64ToUint8Array),
|
|
261
|
+
betweenRule: () => (/* reexport */ validators_js_.betweenRule),
|
|
259
262
|
cookie: () => (/* reexport */ cookie),
|
|
263
|
+
decimalRule: () => (/* reexport */ validators_js_.decimalRule),
|
|
260
264
|
deepValueGetter: () => (/* reexport */ deepValueGetter),
|
|
261
265
|
"default": () => (/* binding */ src),
|
|
262
266
|
defaults: () => (/* reexport */ defaults),
|
|
263
267
|
delay: () => (/* reexport */ delay),
|
|
268
|
+
emailRule: () => (/* reexport */ validators_js_.emailRule),
|
|
264
269
|
fileToArrayBuffer: () => (/* reexport */ fileToArrayBuffer),
|
|
265
270
|
fileToBase64: () => (/* reexport */ fileToBase64),
|
|
266
271
|
getAliases: () => (/* reexport */ getAliases),
|
|
267
272
|
hexToArrayBuffer: () => (/* reexport */ hexToArrayBuffer),
|
|
273
|
+
integerRule: () => (/* reexport */ validators_js_.integerRule),
|
|
274
|
+
ipAddressRule: () => (/* reexport */ validators_js_.ipAddressRule),
|
|
268
275
|
isDefined: () => (/* reexport */ isDefined),
|
|
269
276
|
isObjectEmpty: () => (/* reexport */ isObjectEmpty),
|
|
277
|
+
macAddressRule: () => (/* reexport */ validators_js_.macAddressRule),
|
|
278
|
+
maxLengthRule: () => (/* reexport */ validators_js_.maxLengthRule),
|
|
279
|
+
maxValueRule: () => (/* reexport */ validators_js_.maxValueRule),
|
|
280
|
+
minValueRule: () => (/* reexport */ validators_js_.minValueRule),
|
|
281
|
+
numericRule: () => (/* reexport */ validators_js_.numericRule),
|
|
282
|
+
phoneRule: () => (/* reexport */ validators_js_.phoneRule),
|
|
270
283
|
pluralizeNoun: () => (/* reexport */ pluralizeNoun),
|
|
284
|
+
requiredRule: () => (/* reexport */ validators_js_.requiredRule),
|
|
271
285
|
strings: () => (/* reexport */ strings),
|
|
272
286
|
uidGen: () => (/* reexport */ uidGen),
|
|
273
287
|
uint8ArrayToBase64: () => (/* reexport */ uint8ArrayToBase64),
|
|
274
|
-
urlRegexp: () => (/* reexport */ urlRegexp)
|
|
288
|
+
urlRegexp: () => (/* reexport */ urlRegexp),
|
|
289
|
+
urlRule: () => (/* reexport */ validators_js_.urlRule),
|
|
290
|
+
validators: () => (/* reexport */ validators_js_.validators)
|
|
275
291
|
});
|
|
276
292
|
|
|
277
293
|
// NAMESPACE OBJECT: ./src/utils/index.ts
|
|
@@ -2595,155 +2611,8 @@ function uidGen(len = 6, format) {
|
|
|
2595
2611
|
return result;
|
|
2596
2612
|
}
|
|
2597
2613
|
|
|
2598
|
-
// EXTERNAL MODULE: external "
|
|
2599
|
-
var
|
|
2600
|
-
;// CONCATENATED MODULE: ./src/mixins/validators.ts
|
|
2601
|
-
|
|
2602
|
-
/** requiredRule(name?: string) - Обязательность заполнения поля */
|
|
2603
|
-
const requiredRule = (name) => value => {
|
|
2604
|
-
// eslint-disable-next-line eqeqeq
|
|
2605
|
-
if (value == null || (typeof value === 'string' && value === '')) {
|
|
2606
|
-
return name ? `Поле ${name} обязательно` : 'Это поле обязательно';
|
|
2607
|
-
}
|
|
2608
|
-
const valid = validators_.required.$validator(value, null, null);
|
|
2609
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2610
|
-
return true;
|
|
2611
|
-
}
|
|
2612
|
-
return name ? `Поле ${name} обязательно` : 'Это поле обязательно';
|
|
2613
|
-
};
|
|
2614
|
-
/** maxLengthRule(max: number) - Значение должно быть меньше ${max} символов */
|
|
2615
|
-
const maxLengthRule = (max) => value => {
|
|
2616
|
-
const valid = (0,validators_.maxLength)(max).$validator(value, null, null);
|
|
2617
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2618
|
-
return true;
|
|
2619
|
-
}
|
|
2620
|
-
return `Значение должно быть меньше ${max} символов`;
|
|
2621
|
-
};
|
|
2622
|
-
/** alphaRule() - Разрешены только буквы */
|
|
2623
|
-
const alphaRule = () => value => {
|
|
2624
|
-
const valid = validators_.alpha.$validator(value, null, null);
|
|
2625
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2626
|
-
return true;
|
|
2627
|
-
}
|
|
2628
|
-
return 'Разрешены только латинские буквы';
|
|
2629
|
-
};
|
|
2630
|
-
/** alphaNumRule() - Разрешены только буквы и цифры */
|
|
2631
|
-
const alphaNumRule = () => value => {
|
|
2632
|
-
const valid = validators_.alphaNum.$validator(value, null, null);
|
|
2633
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2634
|
-
return true;
|
|
2635
|
-
}
|
|
2636
|
-
return 'Разрешены только латинские буквы и цифры';
|
|
2637
|
-
};
|
|
2638
|
-
/** andRule(..._validators: Array<() => {}>) - Добавление дополнительных валидаторов */
|
|
2639
|
-
// export const andRule =
|
|
2640
|
-
// (..._validators: Array<ValidationRule>): ValidateFunction =>
|
|
2641
|
-
// value =>
|
|
2642
|
-
// and(_validators) ? 'Ошибка' : true;
|
|
2643
|
-
/** betweenRule(min: number, max: number) - допустимы значения в диапазоне от ${min} до ${max} */
|
|
2644
|
-
const betweenRule = (min, max) => value => {
|
|
2645
|
-
const valid = (0,validators_.between)(min, max).$validator(value, null, null);
|
|
2646
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2647
|
-
return true;
|
|
2648
|
-
}
|
|
2649
|
-
return `Значение должно быть в диапазоне от ${min} до ${max}`;
|
|
2650
|
-
};
|
|
2651
|
-
/** decimalRule() - Значение должно быть целым или дробным числом */
|
|
2652
|
-
const decimalRule = () => value => {
|
|
2653
|
-
const valid = validators_.decimal.$validator(value, null, null);
|
|
2654
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2655
|
-
return true;
|
|
2656
|
-
}
|
|
2657
|
-
return 'Значение должно быть целым или дробным числом';
|
|
2658
|
-
};
|
|
2659
|
-
/** emailRule() - только эл. почта */
|
|
2660
|
-
const emailRule = () => value => {
|
|
2661
|
-
const valid = validators_.email.$validator(value, null, null);
|
|
2662
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2663
|
-
return true;
|
|
2664
|
-
}
|
|
2665
|
-
return 'Неверный формат адреса эл.почты';
|
|
2666
|
-
};
|
|
2667
|
-
/** integerRule() - Значение должно быть целым числом */
|
|
2668
|
-
const integerRule = () => value => {
|
|
2669
|
-
const valid = validators_.integer.$validator(value, null, null);
|
|
2670
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2671
|
-
return true;
|
|
2672
|
-
}
|
|
2673
|
-
return 'Значение должно быть целым числом';
|
|
2674
|
-
};
|
|
2675
|
-
/** ipAddressRule() - Неправильный формат IP-адреса */
|
|
2676
|
-
const ipAddressRule = () => value => {
|
|
2677
|
-
const valid = validators_.ipAddress.$validator(value, null, null);
|
|
2678
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2679
|
-
return true;
|
|
2680
|
-
}
|
|
2681
|
-
return 'Неправильный формат IP-адреса';
|
|
2682
|
-
};
|
|
2683
|
-
/** macAddressRule() - Неправильный формат mac-адреса */
|
|
2684
|
-
const macAddressRule = () => value => {
|
|
2685
|
-
const valid = (0,validators_.macAddress)(':').$validator(value, null, null);
|
|
2686
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2687
|
-
return true;
|
|
2688
|
-
}
|
|
2689
|
-
return 'Неправильный формат mac-адреса';
|
|
2690
|
-
};
|
|
2691
|
-
/** maxValueRule(max: number) - Значение должно быть меньше ${max} */
|
|
2692
|
-
const maxValueRule = (max) => value => {
|
|
2693
|
-
const valid = (0,validators_.maxValue)(max).$validator(value, null, null);
|
|
2694
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2695
|
-
return true;
|
|
2696
|
-
}
|
|
2697
|
-
return `Значение должно быть меньше ${max}`;
|
|
2698
|
-
};
|
|
2699
|
-
/** minValueRule(min: number) - Значение должно быть больше ${min} */
|
|
2700
|
-
const minValueRule = (min) => value => {
|
|
2701
|
-
const valid = (0,validators_.minValue)(min).$validator(value, null, null);
|
|
2702
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2703
|
-
return true;
|
|
2704
|
-
}
|
|
2705
|
-
return `Значение должно быть больше ${min}`;
|
|
2706
|
-
};
|
|
2707
|
-
/** numericRule() - Разрешены только цифры */
|
|
2708
|
-
const numericRule = () => value => {
|
|
2709
|
-
const valid = validators_.numeric.$validator(value, null, null);
|
|
2710
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2711
|
-
return true;
|
|
2712
|
-
}
|
|
2713
|
-
return 'Разрешены только цифры';
|
|
2714
|
-
};
|
|
2715
|
-
/** urlRule() - Неправильный формат URI */
|
|
2716
|
-
const urlRule = () => value => {
|
|
2717
|
-
const valid = validators_.url.$validator(value, null, null);
|
|
2718
|
-
if (typeof valid === 'boolean' && valid) {
|
|
2719
|
-
return true;
|
|
2720
|
-
}
|
|
2721
|
-
return 'Неправильный формат URI';
|
|
2722
|
-
};
|
|
2723
|
-
/** phoneRule() - Неправильный формат телефона */
|
|
2724
|
-
const phoneRule = () => value => {
|
|
2725
|
-
const pattern = /^[\d()+-]+$/;
|
|
2726
|
-
return pattern.test(value) || 'Неправильный формат телефона';
|
|
2727
|
-
};
|
|
2728
|
-
const validators = {
|
|
2729
|
-
requiredRule,
|
|
2730
|
-
maxLengthRule,
|
|
2731
|
-
alphaRule,
|
|
2732
|
-
alphaNumRule,
|
|
2733
|
-
betweenRule,
|
|
2734
|
-
decimalRule,
|
|
2735
|
-
emailRule,
|
|
2736
|
-
integerRule,
|
|
2737
|
-
ipAddressRule,
|
|
2738
|
-
macAddressRule,
|
|
2739
|
-
maxValueRule,
|
|
2740
|
-
minValueRule,
|
|
2741
|
-
numericRule,
|
|
2742
|
-
urlRule,
|
|
2743
|
-
phoneRule,
|
|
2744
|
-
};
|
|
2745
|
-
/* harmony default export */ const mixins_validators = ({});
|
|
2746
|
-
|
|
2614
|
+
// EXTERNAL MODULE: external "./utils/validators.js"
|
|
2615
|
+
var validators_js_ = __webpack_require__(9119);
|
|
2747
2616
|
;// CONCATENATED MODULE: ./src/mixins/validatable.mixin.ts
|
|
2748
2617
|
var validatable_mixin_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2749
2618
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -2774,7 +2643,7 @@ class ValidatableMixin extends external_vue_property_decorator_.Vue {
|
|
|
2774
2643
|
}
|
|
2775
2644
|
}
|
|
2776
2645
|
get validRules() {
|
|
2777
|
-
return this.required ? [requiredRule()].concat(this.myRules) : this.myRules;
|
|
2646
|
+
return this.required ? [(0,validators_js_.requiredRule)()].concat(this.myRules) : this.myRules;
|
|
2778
2647
|
}
|
|
2779
2648
|
get showError() {
|
|
2780
2649
|
return this.validRules.length ? Boolean(this.validationMessage) : false;
|
|
@@ -2799,8 +2668,8 @@ validatable_mixin_decorate([
|
|
|
2799
2668
|
validatable_mixin_metadata("design:returntype", void 0)
|
|
2800
2669
|
], ValidatableMixin.prototype, "onRulesChanged", null);
|
|
2801
2670
|
|
|
2802
|
-
// EXTERNAL MODULE: external "./imask.js"
|
|
2803
|
-
var
|
|
2671
|
+
// EXTERNAL MODULE: external "./lib/imask.js"
|
|
2672
|
+
var imask_js_ = __webpack_require__(6203);
|
|
2804
2673
|
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-edit-text/ld-edit-text.ts?vue&type=script&lang=ts&external
|
|
2805
2674
|
var ld_edit_textvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2806
2675
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3161,7 +3030,7 @@ ld_edit_textvue_type_script_lang_ts_external_decorate([
|
|
|
3161
3030
|
EditTextComponent = ld_edit_textvue_type_script_lang_ts_external_decorate([
|
|
3162
3031
|
(0,external_vue_property_decorator_.Options)({
|
|
3163
3032
|
components: {
|
|
3164
|
-
'imask-input':
|
|
3033
|
+
'imask-input': imask_js_.IMaskComponent,
|
|
3165
3034
|
'ld-label': ld_label
|
|
3166
3035
|
},
|
|
3167
3036
|
})
|
|
@@ -7378,9 +7247,9 @@ try {
|
|
|
7378
7247
|
|
|
7379
7248
|
|
|
7380
7249
|
|
|
7381
|
-
// EXTERNAL MODULE: external "./calendar.js"
|
|
7382
|
-
var
|
|
7383
|
-
var
|
|
7250
|
+
// EXTERNAL MODULE: external "./lib/calendar.js"
|
|
7251
|
+
var calendar_js_ = __webpack_require__(8766);
|
|
7252
|
+
var calendar_js_default = /*#__PURE__*/__webpack_require__.n(calendar_js_);
|
|
7384
7253
|
;// CONCATENATED MODULE: ./src/utils/datetime.ts
|
|
7385
7254
|
function dateLocalToISO(value) {
|
|
7386
7255
|
const parsed = /^(\d\d?).(\d\d?).(\d\d\d?\d?)$/.exec(value);
|
|
@@ -8104,7 +7973,7 @@ DatepickerComponent = ld_datepickervue_type_script_lang_js_external_decorate([
|
|
|
8104
7973
|
(0,external_vue_class_component_.Options)({
|
|
8105
7974
|
components: {
|
|
8106
7975
|
'ld-label': ld_label,
|
|
8107
|
-
'datepicker': (
|
|
7976
|
+
'datepicker': (calendar_js_default())
|
|
8108
7977
|
},
|
|
8109
7978
|
})
|
|
8110
7979
|
], DatepickerComponent);
|
|
@@ -8929,11 +8798,11 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8929
8798
|
|
|
8930
8799
|
;// CONCATENATED MODULE: ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=0b117ea1&scoped=true&ts=true
|
|
8931
8800
|
|
|
8932
|
-
// EXTERNAL MODULE: external "./multiselect.js"
|
|
8933
|
-
var
|
|
8934
|
-
var
|
|
8935
|
-
// EXTERNAL MODULE: external "./floating.js"
|
|
8936
|
-
var
|
|
8801
|
+
// EXTERNAL MODULE: external "./lib/multiselect.js"
|
|
8802
|
+
var multiselect_js_ = __webpack_require__(5733);
|
|
8803
|
+
var multiselect_js_default = /*#__PURE__*/__webpack_require__.n(multiselect_js_);
|
|
8804
|
+
// EXTERNAL MODULE: external "./lib/floating.js"
|
|
8805
|
+
var floating_js_ = __webpack_require__(9018);
|
|
8937
8806
|
;// CONCATENATED MODULE: ./src/mixins/floatingUI.mixin.ts
|
|
8938
8807
|
|
|
8939
8808
|
|
|
@@ -8950,11 +8819,11 @@ class FloatingUI extends external_vue_class_component_.Vue {
|
|
|
8950
8819
|
if (!dropdownEl || !referenceEl || !window.ResizeObserver) {
|
|
8951
8820
|
return;
|
|
8952
8821
|
}
|
|
8953
|
-
FloatingUI.CleanupPosWatcher = (0,
|
|
8954
|
-
const { y, strategy } = await (0,
|
|
8822
|
+
FloatingUI.CleanupPosWatcher = (0,floating_js_.autoUpdate)(referenceEl, dropdownEl, async () => {
|
|
8823
|
+
const { y, strategy } = await (0,floating_js_.computePosition)(referenceEl, dropdownEl, {
|
|
8955
8824
|
strategy: 'fixed',
|
|
8956
8825
|
middleware: [
|
|
8957
|
-
(0,
|
|
8826
|
+
(0,floating_js_.autoPlacement)({
|
|
8958
8827
|
allowedPlacements: ['top', 'bottom'],
|
|
8959
8828
|
}),
|
|
8960
8829
|
],
|
|
@@ -11415,7 +11284,7 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
11415
11284
|
this.validationMessage = '';
|
|
11416
11285
|
let funcResult = true;
|
|
11417
11286
|
if (this.required) {
|
|
11418
|
-
funcResult = requiredRule()(this.selectedToArray);
|
|
11287
|
+
funcResult = (0,validators_js_.requiredRule)()(this.selectedToArray);
|
|
11419
11288
|
if (funcResult !== true) {
|
|
11420
11289
|
this.validationMessage = this.messagesBucket.validation || funcResult;
|
|
11421
11290
|
return false;
|
|
@@ -11644,7 +11513,7 @@ SelectListBoxComponent = ld_select_list_boxvue_type_script_lang_ts_external_deco
|
|
|
11644
11513
|
(0,external_vue_property_decorator_.Options)({
|
|
11645
11514
|
components: {
|
|
11646
11515
|
'ld-label': ld_label,
|
|
11647
|
-
'multiselect': (
|
|
11516
|
+
'multiselect': (multiselect_js_default()),
|
|
11648
11517
|
},
|
|
11649
11518
|
})
|
|
11650
11519
|
], SelectListBoxComponent);
|
|
@@ -12323,7 +12192,7 @@ let RadioGroupComponent = class RadioGroupComponent extends (0,external_vue_clas
|
|
|
12323
12192
|
}
|
|
12324
12193
|
validate() {
|
|
12325
12194
|
this.validationMessage = '';
|
|
12326
|
-
const validationResult = requiredRule()(String(this.modelValue));
|
|
12195
|
+
const validationResult = (0,validators_js_.requiredRule)()(String(this.modelValue));
|
|
12327
12196
|
if (validationResult !== true) {
|
|
12328
12197
|
this.validationMessage = validationResult;
|
|
12329
12198
|
}
|
|
@@ -12427,18 +12296,18 @@ function ld_radiogroup_reg(vue, options) {
|
|
|
12427
12296
|
}
|
|
12428
12297
|
/* harmony default export */ const src_ld_radiogroup = (ld_radiogroup_reg);
|
|
12429
12298
|
|
|
12430
|
-
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-textarea/ld-textarea.vue?vue&type=template&id=
|
|
12299
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-textarea/ld-textarea.vue?vue&type=template&id=5e5438c4&scoped=true&ts=true
|
|
12431
12300
|
|
|
12432
|
-
const
|
|
12433
|
-
const
|
|
12434
|
-
function
|
|
12301
|
+
const ld_textareavue_type_template_id_5e5438c4_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-5e5438c4"), n = n(), _popScopeId(), n);
|
|
12302
|
+
const ld_textareavue_type_template_id_5e5438c4_scoped_true_ts_true_hoisted_1 = { class: "ld-textarea" };
|
|
12303
|
+
function ld_textareavue_type_template_id_5e5438c4_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12435
12304
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
|
|
12436
12305
|
const _component_ld_icon = (0,external_vue_.resolveComponent)("ld-icon");
|
|
12437
12306
|
const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
|
|
12438
12307
|
const _component_v_textarea = (0,external_vue_.resolveComponent)("v-textarea");
|
|
12439
12308
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
|
|
12440
12309
|
const _component_v_row = (0,external_vue_.resolveComponent)("v-row");
|
|
12441
|
-
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
12310
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_textareavue_type_template_id_5e5438c4_scoped_true_ts_true_hoisted_1, [
|
|
12442
12311
|
(0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
|
|
12443
12312
|
default: (0,external_vue_.withCtx)(() => [
|
|
12444
12313
|
(_ctx.label)
|
|
@@ -12462,6 +12331,7 @@ function ld_textareavue_type_template_id_515ad14b_scoped_true_ts_true_render(_ct
|
|
|
12462
12331
|
type: _ctx.type,
|
|
12463
12332
|
class: (0,external_vue_.normalizeClass)({ disabled: _ctx.disabled, 'none-resizable': !_ctx.resizable }),
|
|
12464
12333
|
"single-line": "",
|
|
12334
|
+
autofocus: _ctx.autofocus,
|
|
12465
12335
|
variant: "outlined",
|
|
12466
12336
|
"hide-details": _ctx.hideDetails,
|
|
12467
12337
|
"persistent-hint": _ctx.persistentHint,
|
|
@@ -12498,7 +12368,7 @@ function ld_textareavue_type_template_id_515ad14b_scoped_true_ts_true_render(_ct
|
|
|
12498
12368
|
: (0,external_vue_.createCommentVNode)("", true)
|
|
12499
12369
|
]),
|
|
12500
12370
|
_: 1
|
|
12501
|
-
}, 8, ["modelValue", "type", "class", "hide-details", "persistent-hint", "rules", "placeholder", "disabled", "readonly", "hint", "tabindex", "maxlength", "error", "error-messages", "rows", "onBlur"])
|
|
12371
|
+
}, 8, ["modelValue", "type", "class", "autofocus", "hide-details", "persistent-hint", "rules", "placeholder", "disabled", "readonly", "hint", "tabindex", "maxlength", "error", "error-messages", "rows", "onBlur"])
|
|
12502
12372
|
]),
|
|
12503
12373
|
_: 1
|
|
12504
12374
|
}, 8, ["class"])
|
|
@@ -12508,7 +12378,7 @@ function ld_textareavue_type_template_id_515ad14b_scoped_true_ts_true_render(_ct
|
|
|
12508
12378
|
]));
|
|
12509
12379
|
}
|
|
12510
12380
|
|
|
12511
|
-
;// CONCATENATED MODULE: ./src/ld-textarea/ld-textarea.vue?vue&type=template&id=
|
|
12381
|
+
;// CONCATENATED MODULE: ./src/ld-textarea/ld-textarea.vue?vue&type=template&id=5e5438c4&scoped=true&ts=true
|
|
12512
12382
|
|
|
12513
12383
|
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-textarea/ld-textarea.ts?vue&type=script&lang=ts&external
|
|
12514
12384
|
var ld_textareavue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -12657,7 +12527,7 @@ TextareaComponent = ld_textareavue_type_script_lang_ts_external_decorate([
|
|
|
12657
12527
|
;
|
|
12658
12528
|
|
|
12659
12529
|
|
|
12660
|
-
const ld_textarea_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_textareavue_type_script_lang_ts_external, [['render',
|
|
12530
|
+
const ld_textarea_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_textareavue_type_script_lang_ts_external, [['render',ld_textareavue_type_template_id_5e5438c4_scoped_true_ts_true_render],['__scopeId',"data-v-5e5438c4"]])
|
|
12661
12531
|
|
|
12662
12532
|
/* harmony default export */ const ld_textarea = (ld_textarea_exports_);
|
|
12663
12533
|
;// CONCATENATED MODULE: ./src/ld-textarea/index.ts
|
|
@@ -13439,7 +13309,7 @@ let ld_comboboxvue_type_script_lang_ts_external_SelectListBoxComponent = class S
|
|
|
13439
13309
|
this.validationMessage = '';
|
|
13440
13310
|
let funcResult = true;
|
|
13441
13311
|
if (this.required) {
|
|
13442
|
-
funcResult = requiredRule()(this.selectedToArray);
|
|
13312
|
+
funcResult = (0,validators_js_.requiredRule)()(this.selectedToArray);
|
|
13443
13313
|
if (funcResult !== true) {
|
|
13444
13314
|
this.validationMessage = this.messagesBucket.validation || funcResult;
|
|
13445
13315
|
return false;
|
|
@@ -13728,7 +13598,7 @@ ld_comboboxvue_type_script_lang_ts_external_SelectListBoxComponent = ld_combobox
|
|
|
13728
13598
|
(0,external_vue_property_decorator_.Options)({
|
|
13729
13599
|
components: {
|
|
13730
13600
|
'ld-label': ld_label,
|
|
13731
|
-
'multiselect': (
|
|
13601
|
+
'multiselect': (multiselect_js_default()),
|
|
13732
13602
|
},
|
|
13733
13603
|
})
|
|
13734
13604
|
], ld_comboboxvue_type_script_lang_ts_external_SelectListBoxComponent);
|
|
@@ -14529,7 +14399,7 @@ EditMaskedTextComponent = ld_edit_masked_textvue_type_script_lang_js_external_de
|
|
|
14529
14399
|
(0,external_vue_property_decorator_.Options)({
|
|
14530
14400
|
components: {
|
|
14531
14401
|
'ld-label': ld_label,
|
|
14532
|
-
'imask-input':
|
|
14402
|
+
'imask-input': imask_js_.IMaskComponent,
|
|
14533
14403
|
},
|
|
14534
14404
|
})
|
|
14535
14405
|
], EditMaskedTextComponent);
|
|
@@ -14774,9 +14644,9 @@ const ru_RU = {
|
|
|
14774
14644
|
};
|
|
14775
14645
|
/* harmony default export */ const translation = (ru_RU);
|
|
14776
14646
|
|
|
14777
|
-
// EXTERNAL MODULE: external "./runtime-template.js"
|
|
14778
|
-
var
|
|
14779
|
-
var
|
|
14647
|
+
// EXTERNAL MODULE: external "./lib/runtime-template.js"
|
|
14648
|
+
var runtime_template_js_ = __webpack_require__(9435);
|
|
14649
|
+
var runtime_template_js_default = /*#__PURE__*/__webpack_require__.n(runtime_template_js_);
|
|
14780
14650
|
// EXTERNAL MODULE: external "md-editor-v3"
|
|
14781
14651
|
var external_md_editor_v3_ = __webpack_require__(6443);
|
|
14782
14652
|
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-text-markup/ld-text-markup.ts?vue&type=script&lang=js&external
|
|
@@ -14992,7 +14862,7 @@ TextMarkupComponent = ld_text_markupvue_type_script_lang_js_external_decorate([
|
|
|
14992
14862
|
(0,external_vue_property_decorator_.Options)({
|
|
14993
14863
|
components: {
|
|
14994
14864
|
'ld-label': ld_label,
|
|
14995
|
-
'v-runtime-template': (
|
|
14865
|
+
'v-runtime-template': (runtime_template_js_default()),
|
|
14996
14866
|
'md-editor': external_md_editor_v3_.MdEditor,
|
|
14997
14867
|
},
|
|
14998
14868
|
})
|
|
@@ -19218,6 +19088,8 @@ const ldmuiPlugin = {
|
|
|
19218
19088
|
|
|
19219
19089
|
|
|
19220
19090
|
|
|
19091
|
+
|
|
19092
|
+
|
|
19221
19093
|
|
|
19222
19094
|
})();
|
|
19223
19095
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable no-nested-ternary */
|
|
2
|
+
import { ValidateFunction } from './validation';
|
|
3
|
+
import {
|
|
4
|
+
alpha,
|
|
5
|
+
alphaNum,
|
|
6
|
+
between,
|
|
7
|
+
decimal,
|
|
8
|
+
email,
|
|
9
|
+
integer,
|
|
10
|
+
ipAddress,
|
|
11
|
+
macAddress,
|
|
12
|
+
maxLength,
|
|
13
|
+
maxValue,
|
|
14
|
+
minValue,
|
|
15
|
+
numeric,
|
|
16
|
+
required,
|
|
17
|
+
url,
|
|
18
|
+
} from '@vuelidate/validators';
|
|
19
|
+
|
|
20
|
+
/** requiredRule(name?: string) - Обязательность заполнения поля */
|
|
21
|
+
export const requiredRule: (name?: string) => ValidateFunction;
|
|
22
|
+
/** maxLengthRule(max: number) - Значение должно быть меньше ${max} символов */
|
|
23
|
+
export const maxLengthRule: (max: number) => ValidateFunction;
|
|
24
|
+
/** alphaRule() - Разрешены только буквы */
|
|
25
|
+
export const alphaRule: () => ValidateFunction;
|
|
26
|
+
/** alphaNumRule() - Разрешены только буквы и цифры */
|
|
27
|
+
export const alphaNumRule: () => ValidateFunction;
|
|
28
|
+
/** betweenRule(min: number, max: number) - допустимы значения в диапазоне от ${min} до ${max} */
|
|
29
|
+
export const betweenRule: (min: number, max: number) => ValidateFunction;
|
|
30
|
+
/** decimalRule() - Значение должно быть целым или дробным числом */
|
|
31
|
+
export const decimalRule: () => ValidateFunction;
|
|
32
|
+
/** emailRule() - только эл. почта */
|
|
33
|
+
export const emailRule: () => ValidateFunction;
|
|
34
|
+
/** integerRule() - Значение должно быть целым числом */
|
|
35
|
+
export const integerRule: () => ValidateFunction;
|
|
36
|
+
/** ipAddressRule() - Неправильный формат IP-адреса */
|
|
37
|
+
export const ipAddressRule: () => ValidateFunction;
|
|
38
|
+
/** macAddressRule() - Неправильный формат mac-адреса */
|
|
39
|
+
export const macAddressRule: () => ValidateFunction;
|
|
40
|
+
/** maxValueRule(max: number) - Значение должно быть меньше ${max} */
|
|
41
|
+
export const maxValueRule: (max: number) => ValidateFunction;
|
|
42
|
+
/** minValueRule(min: number) - Значение должно быть больше ${min} */
|
|
43
|
+
export const minValueRule: (min: number) => ValidateFunction;
|
|
44
|
+
/** numericRule() - Разрешены только цифры */
|
|
45
|
+
export const numericRule: () => ValidateFunction;
|
|
46
|
+
/** urlRule() - Неправильный формат URI */
|
|
47
|
+
export const urlRule: () => ValidateFunction;
|
|
48
|
+
/** phoneRule() - Неправильный формат телефона */
|
|
49
|
+
export const phoneRule: () => ValidateFunction;
|
|
50
|
+
|
|
51
|
+
export const validators = {
|
|
52
|
+
requiredRule,
|
|
53
|
+
maxLengthRule,
|
|
54
|
+
alphaRule,
|
|
55
|
+
alphaNumRule,
|
|
56
|
+
betweenRule,
|
|
57
|
+
decimalRule,
|
|
58
|
+
emailRule,
|
|
59
|
+
integerRule,
|
|
60
|
+
ipAddressRule,
|
|
61
|
+
macAddressRule,
|
|
62
|
+
maxValueRule,
|
|
63
|
+
minValueRule,
|
|
64
|
+
numericRule,
|
|
65
|
+
urlRule,
|
|
66
|
+
phoneRule,
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(e,l){"object"===typeof exports&&"object"===typeof module?module.exports=l(require("@vuelidate/validators")):"function"===typeof define&&define.amd?define(["@vuelidate/validators"],l):"object"===typeof exports?exports["ldmui"]=l(require("@vuelidate/validators")):e["ldmui"]=l(e["@vuelidate/validators"])})(self,(e=>(()=>{"use strict";var l={887:l=>{l.exports=e}},r={};function __webpack_require__(e){var u=r[e];if(void 0!==u)return u.exports;var t=r[e]={exports:{}};return l[e](t,t.exports,__webpack_require__),t.exports}(()=>{__webpack_require__.n=e=>{var l=e&&e.__esModule?()=>e["default"]:()=>e;return __webpack_require__.d(l,{a:l}),l}})(),(()=>{__webpack_require__.d=(e,l)=>{for(var r in l)__webpack_require__.o(l,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:l[r]})}})(),(()=>{__webpack_require__.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var u={};__webpack_require__.r(u),__webpack_require__.d(u,{alphaNumRule:()=>alphaNumRule,alphaRule:()=>alphaRule,betweenRule:()=>betweenRule,decimalRule:()=>decimalRule,default:()=>a,emailRule:()=>emailRule,integerRule:()=>integerRule,ipAddressRule:()=>ipAddressRule,macAddressRule:()=>macAddressRule,maxLengthRule:()=>maxLengthRule,maxValueRule:()=>maxValueRule,minValueRule:()=>minValueRule,numericRule:()=>numericRule,phoneRule:()=>phoneRule,requiredRule:()=>requiredRule,urlRule:()=>urlRule,validators:()=>o});var t=__webpack_require__(887);const requiredRule=e=>l=>{if(null==l||"string"===typeof l&&""===l)return e?`Поле ${e} обязательно`:"Это поле обязательно";const r=t.required.$validator(l,null,null);return!("boolean"!==typeof r||!r)||(e?`Поле ${e} обязательно`:"Это поле обязательно")},maxLengthRule=e=>l=>{const r=(0,t.maxLength)(e).$validator(l,null,null);return!("boolean"!==typeof r||!r)||`Значение должно быть меньше ${e} символов`},alphaRule=()=>e=>{const l=t.alpha.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только латинские буквы"},alphaNumRule=()=>e=>{const l=t.alphaNum.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только латинские буквы и цифры"},betweenRule=(e,l)=>r=>{const u=(0,t.between)(e,l).$validator(r,null,null);return!("boolean"!==typeof u||!u)||`Значение должно быть в диапазоне от ${e} до ${l}`},decimalRule=()=>e=>{const l=t.decimal.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Значение должно быть целым или дробным числом"},emailRule=()=>e=>{const l=t.email.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неверный формат адреса эл.почты"},integerRule=()=>e=>{const l=t.integer.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Значение должно быть целым числом"},ipAddressRule=()=>e=>{const l=t.ipAddress.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат IP-адреса"},macAddressRule=()=>e=>{const l=(0,t.macAddress)(":").$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат mac-адреса"},maxValueRule=e=>l=>{const r=(0,t.maxValue)(e).$validator(l,null,null);return!("boolean"!==typeof r||!r)||`Значение должно быть меньше ${e}`},minValueRule=e=>l=>{const r=(0,t.minValue)(e).$validator(l,null,null);return!("boolean"!==typeof r||!r)||`Значение должно быть больше ${e}`},numericRule=()=>e=>{const l=t.numeric.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Разрешены только цифры"},urlRule=()=>e=>{const l=t.url.$validator(e,null,null);return!("boolean"!==typeof l||!l)||"Неправильный формат URI"},phoneRule=()=>e=>{const l=/^[\d()+-]+$/;return l.test(e)||"Неправильный формат телефона"},o={requiredRule,maxLengthRule,alphaRule,alphaNumRule,betweenRule,decimalRule,emailRule,integerRule,ipAddressRule,macAddressRule,maxValueRule,minValueRule,numericRule,urlRule,phoneRule},a={};return u})()));
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|