@modelforms/fontawesome-vuetify 1.0.4 → 2.1.0
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/components/form/Form.vue +3 -3
- package/components/form/complete/Complete.vue +78 -37
- package/components/form/date/Date.vue +1 -1
- package/components/form/functions/methods.ts +25 -0
- package/components/form/functions/rules.ts +6 -1
- package/components/form/helpers/parsers.ts +37 -0
- package/components/form/models/completeModels.ts +4 -6
- package/components/form/models/formModels.ts +14 -12
- package/components/form/models/resources.ts +2 -1
- package/components/index.d.ts +2 -1
- package/dist/index.amd.ts +15 -15
- package/dist/index.cjs.ts +15 -15
- package/package.json +1 -1
- package/components/form/functions/complete.ts +0 -45
- package/components/form/functions/helper.ts +0 -11
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { CompleteItems } from "../models/formModels";
|
|
2
|
-
import { empty, searchError } from "../models/resources";
|
|
3
|
-
import { componentType } from "./init";
|
|
4
|
-
|
|
5
|
-
export const removeItem = (search: string, value: CompleteItems) => {
|
|
6
|
-
if(search == null || search == undefined){
|
|
7
|
-
search = empty;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
let lastIndex = search.indexOf(', ' + value.title);
|
|
11
|
-
|
|
12
|
-
if(lastIndex >= 0){
|
|
13
|
-
let title = ', ' + value.title;
|
|
14
|
-
let s = search.indexOf(title);
|
|
15
|
-
return search.substring(0, s) + search.substring(s + title.length, search.length);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let firstIndex = search.indexOf(value.title!);
|
|
19
|
-
|
|
20
|
-
if(firstIndex >= 0){
|
|
21
|
-
let title = value.title!;
|
|
22
|
-
let s = search.indexOf(title);
|
|
23
|
-
let result = search.substring(0, s) + search.substring(s + title.length, search.length);
|
|
24
|
-
|
|
25
|
-
if(result.substring(0, 2) == ', '){
|
|
26
|
-
return result.substring(2, result.length);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
new Error(`${searchError} ${componentType.component}`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const addItem = (compare: string, value: CompleteItems, first = true) => {
|
|
36
|
-
if(value.title == undefined){
|
|
37
|
-
return empty;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if(!first){
|
|
41
|
-
return ', ' + value.title;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return value.title;
|
|
45
|
-
}
|