@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelforms/fontawesome-vuetify",
3
- "version": "1.0.4",
3
+ "version": "2.1.0",
4
4
  "main": "./components/index.d.ts",
5
5
  "type": "module",
6
6
  "exports": {
@@ -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
- }
@@ -1,11 +0,0 @@
1
- import { index } from "../models/resources";
2
-
3
- export const findLast = (entries: string[]) => {
4
- return entries[entries.length - index];
5
- }
6
-
7
- export const findFirst = (entires: any[]) => {
8
- for(let entry of entires){
9
- return entry;
10
- }
11
- }