frayerjj-frontend 0.8.31 → 0.8.33
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 +8 -6
- package/src/autocomplete.js +1 -0
- package/src/hasMany.js +1 -0
- package/src/init.js +41 -19
- package/src/phoneInput.js +1 -0
- package/src/quillupload.js +1 -0
- package/src/scss/_forms.scss +0 -33
- package/src/scss/_nav.scss +1 -1
- package/src/scss/_tokenfield.scss +35 -0
- package/src/scss/styles.scss +1 -5
- package/src/wizard.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frayerjj-frontend",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.33",
|
|
4
4
|
"description": "My base frontend for various projects",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -9,23 +9,25 @@
|
|
|
9
9
|
"./styles": "./src/scss/styles.scss"
|
|
10
10
|
},
|
|
11
11
|
"style": "src/scss/styles.scss",
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"**/*.css",
|
|
14
|
+
"**/*.scss"
|
|
15
|
+
],
|
|
12
16
|
"files": [
|
|
13
17
|
"src/"
|
|
14
18
|
],
|
|
15
19
|
"scripts": {
|
|
16
20
|
"build": "echo 'No build step required'",
|
|
17
|
-
"test": "echo 'No tests yet'"
|
|
18
|
-
"postinstall": "patch-package"
|
|
21
|
+
"test": "echo 'No tests yet'"
|
|
19
22
|
},
|
|
20
23
|
"author": "Joshua Frayer",
|
|
21
24
|
"license": "MIT",
|
|
22
25
|
"dependencies": {
|
|
23
26
|
"@popperjs/core": "^2.11.8",
|
|
24
27
|
"bootstrap": "^5.3.8",
|
|
25
|
-
"cropperjs": "^2.1.
|
|
28
|
+
"cropperjs": "^2.1.1",
|
|
26
29
|
"flag-icons": "^7.5.0",
|
|
27
|
-
"libphonenumber-js": "^1.
|
|
28
|
-
"patch-package": "^8.0.1",
|
|
30
|
+
"libphonenumber-js": "^1.13.7",
|
|
29
31
|
"quill": "^2.0.3"
|
|
30
32
|
}
|
|
31
33
|
}
|
package/src/autocomplete.js
CHANGED
package/src/hasMany.js
CHANGED
package/src/init.js
CHANGED
|
@@ -1,43 +1,65 @@
|
|
|
1
1
|
import * as bootstrap from 'bootstrap';
|
|
2
|
-
import { createPopper } from '@popperjs/core';
|
|
3
|
-
import { avatarCropper } from './avatarCropper';
|
|
4
|
-
import { quillUpload } from './quillupload';
|
|
5
|
-
import { fileUpload } from './fileUpload';
|
|
6
|
-
import { hasMany } from './hasMany';
|
|
7
2
|
import { loading } from './loading';
|
|
8
3
|
import { msg } from './msg';
|
|
9
4
|
import { modal } from './modal';
|
|
10
|
-
import { wizard } from './wizard';
|
|
11
|
-
import { phoneInput } from './phoneInput';
|
|
12
5
|
import { session } from './session';
|
|
13
6
|
import { validate } from './validate';
|
|
14
7
|
import { autocomplete } from './autocomplete';
|
|
15
8
|
|
|
16
9
|
export const init = (args) => {
|
|
17
10
|
|
|
11
|
+
const excluded = new Set(args?.exclude ?? []);
|
|
12
|
+
const use = (name) => !excluded.has(name);
|
|
13
|
+
|
|
18
14
|
window.bootstrap = bootstrap;
|
|
19
|
-
window.createPopper = createPopper;
|
|
20
15
|
window.msg = msg;
|
|
21
16
|
window.modal = modal;
|
|
22
17
|
window.session = session;
|
|
23
18
|
window.validate = validate;
|
|
24
19
|
window.loading = loading;
|
|
25
|
-
window.wizard = wizard;
|
|
26
20
|
window.autocomplete = autocomplete;
|
|
27
21
|
loading.init(args?.loadingAnimationStyle ?? 'default');
|
|
28
22
|
|
|
29
|
-
window.addEventListener('load', () => {
|
|
23
|
+
window.addEventListener('load', async () => {
|
|
30
24
|
|
|
31
25
|
msg.verbose('Page Loaded, Initializing');
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
if (use('popper')) {
|
|
27
|
+
const { createPopper } = await import('@popperjs/core');
|
|
28
|
+
window.createPopper = createPopper;
|
|
29
|
+
}
|
|
30
|
+
if (use('cropper')) {
|
|
31
|
+
const { avatarCropper } = await import('./avatarCropper');
|
|
32
|
+
window.avatarCropper = avatarCropper;
|
|
33
|
+
avatarCropper.init();
|
|
34
|
+
}
|
|
35
|
+
if (use('quill')) {
|
|
36
|
+
const { quillUpload } = await import('./quillupload');
|
|
37
|
+
window.quillUpload = quillUpload;
|
|
38
|
+
quillUpload.init();
|
|
39
|
+
}
|
|
40
|
+
if (use('fileUpload')) {
|
|
41
|
+
const { fileUpload } = await import('./fileUpload');
|
|
42
|
+
window.fileUpload = fileUpload;
|
|
43
|
+
fileUpload.init();
|
|
44
|
+
}
|
|
45
|
+
if (use('hasMany')) {
|
|
46
|
+
const { hasMany } = await import('./hasMany');
|
|
47
|
+
window.hasMany = hasMany;
|
|
48
|
+
hasMany.init();
|
|
49
|
+
}
|
|
50
|
+
if (use('modal')) modal.ajax.init();
|
|
51
|
+
if (use('phoneInput')) {
|
|
52
|
+
const { phoneInput } = await import('./phoneInput');
|
|
53
|
+
window.phoneInput = phoneInput;
|
|
54
|
+
phoneInput.init();
|
|
55
|
+
}
|
|
56
|
+
if (use('validate')) validate.init();
|
|
57
|
+
if (use('wizard')) {
|
|
58
|
+
const { wizard } = await import('./wizard');
|
|
59
|
+
window.wizard = wizard;
|
|
60
|
+
wizard.init();
|
|
61
|
+
}
|
|
62
|
+
if (use('autocomplete')) autocomplete.init();
|
|
41
63
|
|
|
42
64
|
//Dynamic height for container-fixed
|
|
43
65
|
let container = document.querySelectorAll('.container-fixed');
|
package/src/phoneInput.js
CHANGED
package/src/quillupload.js
CHANGED
package/src/scss/_forms.scss
CHANGED
|
@@ -36,37 +36,4 @@ span.required {
|
|
|
36
36
|
background-color: #dc3545;
|
|
37
37
|
border-color: #dc3545;
|
|
38
38
|
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
|
|
39
|
-
}
|
|
40
|
-
.token {
|
|
41
|
-
display: inline-block;
|
|
42
|
-
background-color: $color-light-gray-background;
|
|
43
|
-
border: 1px solid $color-light-gray;
|
|
44
|
-
margin: 0.25rem 0.5rem 0.25rem 0;
|
|
45
|
-
padding: 0 0.5rem;
|
|
46
|
-
border-radius: 0.25rem;
|
|
47
|
-
.close {
|
|
48
|
-
margin-left: 0.5rem;
|
|
49
|
-
text-decoration: none;
|
|
50
|
-
color: $color-black;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
.token-input,.token-input:focus-visible {
|
|
54
|
-
border: none;
|
|
55
|
-
outline: none;
|
|
56
|
-
}
|
|
57
|
-
.tokenfield {
|
|
58
|
-
height: auto !important;
|
|
59
|
-
}
|
|
60
|
-
.search-input .list-group {
|
|
61
|
-
z-index: 1;
|
|
62
|
-
.list-group-item:first-child {
|
|
63
|
-
border-top-left-radius: 0 !important;
|
|
64
|
-
border-top-right-radius: 0 !important;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
.input-loader {
|
|
68
|
-
position: absolute;
|
|
69
|
-
top: 0.45rem;
|
|
70
|
-
right: .45rem;
|
|
71
|
-
font-size: 18pt;
|
|
72
39
|
}
|
package/src/scss/_nav.scss
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@import 'colors';
|
|
2
|
+
|
|
3
|
+
.token {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
background-color: $color-light-gray-background;
|
|
6
|
+
border: 1px solid $color-light-gray;
|
|
7
|
+
margin: 0.25rem 0.5rem 0.25rem 0;
|
|
8
|
+
padding: 0 0.5rem;
|
|
9
|
+
border-radius: 0.25rem;
|
|
10
|
+
.close {
|
|
11
|
+
margin-left: 0.5rem;
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
color: $color-black;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.token-input,.token-input:focus-visible {
|
|
17
|
+
border: none;
|
|
18
|
+
outline: none;
|
|
19
|
+
}
|
|
20
|
+
.tokenfield {
|
|
21
|
+
height: auto !important;
|
|
22
|
+
}
|
|
23
|
+
.search-input .list-group {
|
|
24
|
+
z-index: 1;
|
|
25
|
+
.list-group-item:first-child {
|
|
26
|
+
border-top-left-radius: 0 !important;
|
|
27
|
+
border-top-right-radius: 0 !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.input-loader {
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0.45rem;
|
|
33
|
+
right: .45rem;
|
|
34
|
+
font-size: 18pt;
|
|
35
|
+
}
|
package/src/scss/styles.scss
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
@import 'bootstrap/scss/bootstrap';
|
|
2
|
-
@import 'flag-icons/css/flag-icons.min.css';
|
|
3
|
-
@import 'quill/dist/quill.snow.css';
|
|
4
2
|
@import url(//cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css);
|
|
5
3
|
@import url(//use.typekit.net/oox8pkj.css);
|
|
6
4
|
@import 'fonts';
|
|
@@ -11,6 +9,4 @@
|
|
|
11
9
|
@import 'header';
|
|
12
10
|
@import 'footer';
|
|
13
11
|
@import 'loading';
|
|
14
|
-
@import 'forms';
|
|
15
|
-
@import 'wizard';
|
|
16
|
-
@import 'autocomplete';
|
|
12
|
+
@import 'forms';
|
package/src/wizard.js
CHANGED