apostrophecms-plugin-all-in-one-accessibility 1.0.1
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/LICENSE +21 -0
- package/README.md +143 -0
- package/index.js +39 -0
- package/package.json +38 -0
- package/ui/apos/apps/AllInOneAccessibilitySettings.js +8 -0
- package/ui/apos/components/AllInOneAccessibilitySettings.vue +693 -0
- package/views/scriptTag.html +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Skynet Technologies USA LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# All in One Accessibility®: Apostrophe CMS Plugin
|
|
2
|
+
|
|
3
|
+
## Enhance Your Website's Accessibility with All in One Accessibility®
|
|
4
|
+
|
|
5
|
+
**Did you know?** Your website's accessibility can make or break your audience's experience. With the **All in One Accessibility AI Free Accessibility Widget**, you can instantly boost your site's inclusivity and support over **140+ languages**! Experience the power of **23 essential features** in our free version and take the first step towards creating a better web for everyone.
|
|
6
|
+
|
|
7
|
+
### Why All in One Accessibility®?
|
|
8
|
+
|
|
9
|
+
This lightweight and flexible widget is designed to improve your website’s compliance with international accessibility standards, including:
|
|
10
|
+
|
|
11
|
+
- **ADA (Americans with Disabilities Act)**
|
|
12
|
+
- **WCAG 2.0, 2.1, & 2.2**
|
|
13
|
+
- **Section 508 (U.S. Government Standard)**
|
|
14
|
+
- **California Unruh Act**
|
|
15
|
+
- **Australian DDA**
|
|
16
|
+
- **European EAA EN 301 549**
|
|
17
|
+
- **UK Equality Act (EA)**
|
|
18
|
+
- **Israel Standard 5568**
|
|
19
|
+
- **Ontario AODA**
|
|
20
|
+
- **Canada ACA**
|
|
21
|
+
- **UAE Disability Act**
|
|
22
|
+
- **Singapore DSS and SGDS**
|
|
23
|
+
- For more details on Accessibility Standards, Visit **[All in One Accessibility Supported Standards.](https://www.skynettechnologies.com/accessibility-standards)**
|
|
24
|
+
|
|
25
|
+
By implementing the widget, you’re not only enhancing user experience but also minimizing the risk of costly accessibility lawsuits. For more details, visit **[All in One Accessibility®.](https://www.skynettechnologies.com/all-in-one-accessibility)**
|
|
26
|
+
|
|
27
|
+
### Built for Excellence
|
|
28
|
+
|
|
29
|
+
- Adheres to **ISO 9001:2015** & **ISO 27001:2013** standards.
|
|
30
|
+
- Fully compliant with **GDPR** and **COPPA** regulations.
|
|
31
|
+
- Proud member of **W3C** and the **International Association of Accessibility Professionals (IAAP)**.
|
|
32
|
+
|
|
33
|
+
### Upgrade to Unlock Premium Features
|
|
34
|
+
|
|
35
|
+
**Why stop at 23 features?** Unlock over **70 advanced features** with our **paid subscription** and take your website’s accessibility to the next level. Compare the benefits of Free vs. Paid versions **[here](https://www.skynettechnologies.com/all-in-one-accessibility/features)**.
|
|
36
|
+
|
|
37
|
+
Checkout the steps for upgrading **[Free to Paid Widget](https://www.skynettechnologies.com/blog/upgrade-from-all-in-one-accessibility-free-widget-to-premium-version).**
|
|
38
|
+
|
|
39
|
+
### Start Your Accessibility Journey Today
|
|
40
|
+
|
|
41
|
+
Try it risk-free with our **10-day free trial**! Don’t wait, experience the benefits today. **[Click to get started](https://ada.skynettechnologies.us/trial-subscription?utm_source=all-in-one-accessibility&utm_medium=landing-page&utm_campaign=trial-subscription)** and join a growing community of forward-thinking businesses making the web accessible to everyone.
|
|
42
|
+
|
|
43
|
+
**Your website’s accessibility journey begins here. Make an impact.**
|
|
44
|
+
|
|
45
|
+
For more details, visit **[All in One Accessibility®](https://www.skynettechnologies.com/all-in-one-accessibility)** and transform your digital presence.
|
|
46
|
+
|
|
47
|
+
### Supported Languages (140+ Languages)
|
|
48
|
+
|
|
49
|
+
English (USA), English (UK), English (Australian), English (Canadian), English (South Africa), Español, Español (Mexicano), Deutsch, عربى, Português, Português (Brazil), 日本語, Français, Italiano, Polski, Pусский, 中文, 中文 (Traditional), עִברִית, Magyar, Slovenčina, Suomenkieli, Türkçe, Ελληνικά, Latinus, Български, Català, Čeština, Dansk, Nederlands, हिंदी, Bahasa Indonesia, 한국인, Lietuvių, Bahasa Melayu, Norsk, Română, Slovenščina, Svenska, แบบไทย, Українська, Việt Nam, বাঙালি, සිංහල, አማርኛ, Hmoob, မြန်မာ, Eesti keel, latviešu, Cрпски, Hrvatski, ქართული, ʻŌlelo Hawaiʻi, Cymraeg, Cebuano, Samoa, Kreyòl ayisyen, Føroyskt, Crnogorski, Azerbaijani, Euskara, Tagalog, Galego, Norsk Bokmål, فارسی, ਪੰਜਾਬੀ, shqiptare, Hայերեն, অসমীয়া, Aymara, Bamanankan, беларускі, bosanski, Corsu, ދިވެހި, Esperanto, Eʋegbe, Frisian, guarani, ગુજરાતી, Hausa, íslenskur, Igbo, Gaeilge, basa jawa, ಕನ್ನಡ, қазақ, ខ្មែរ, Kinyarwanda, Kurdî, Кыргызча, ພາສາລາວ, Lingala, Luganda, lëtzebuergesch, македонски, Malagasy, മലയാളം, Malti, Maori, मराठी, Монгол, नेपाली, Sea, ଓଡିଆ, Afaan Oromoo, پښتو, Runasimi, संस्कृत, Gàidhlig na h-Alba, Sesotho, Shona, سنڌي, Soomaali, basa Sunda, kiswahili, тоҷикӣ, தமிழ், Татар, తెలుగు, ትግሪኛ, Tsonga, Türkmenler, Ride, اردو, ئۇيغۇر, o'zbek, isiXhosa, יידיש, Yoruba, Zulu, भोजपुरी, डोगरी, कोंकणी, Kurdî, Krio, मैथिली, Meiteilon, Mizo tawng, Sepedi, Ilocano, دری.
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
npm install apostrophecms-plugin-all-in-one-accessibility
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Setup & Usage
|
|
58
|
+
|
|
59
|
+
Add it as a plugin in `app.js`
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
apostrophe({
|
|
63
|
+
modules: {
|
|
64
|
+
'apostrophecms-all-in-one-accessibility': {},
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## CORS Policy Configuration
|
|
71
|
+
|
|
72
|
+
To avoid CORS policy issues, ensure the following URLs are allowed in your website. These URLs should be added to your CORS configuration or trusted domains list.
|
|
73
|
+
|
|
74
|
+
| **Domain** | **Description** | **Usage** |
|
|
75
|
+
|-----------------------------------|----------------------------------------------|----------------------------------|
|
|
76
|
+
| `https://*.skynettechnologies.com` | Skynet Technologies (Global Domain) | API access and resources |
|
|
77
|
+
| `https://*.skynettechnologies.us` | Skynet Technologies (US Domain) | API access and resources |
|
|
78
|
+
| `https://*.googleapis.com` | Google APIs | Services like Fonts, Translation |
|
|
79
|
+
| `https://vlibras.gov.br` | VLibras - Brazilian Sign Language Service | Sign Language |
|
|
80
|
+
|
|
81
|
+
## Instructions
|
|
82
|
+
|
|
83
|
+
1. Update your server's CORS configuration to include these URLs.
|
|
84
|
+
2. Ensure wildcard subdomains (`*`) are supported where necessary.
|
|
85
|
+
3. Verify the application functionality by testing requests to these domains.
|
|
86
|
+
4. If issues persist, consult the documentation for CORS configuration guidance.
|
|
87
|
+
|
|
88
|
+
## Configuration
|
|
89
|
+
|
|
90
|
+
To configure the widget, access the Admin Panel and head to the **All in One Accessibility** menu in the dashboard. From there, you can register **[here](https://ada.skynettechnologies.us/trial-subscription)** with 10 Days free trial.
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
- **[Apostrophe CMS All in One Accessibility](https://www.skynettechnologies.com/apostrophe-cms-website-accessibility)**
|
|
95
|
+
- **[How to install All in One Accessibility Extension on Apostrophe CMS blog](https://www.skynettechnologies.com/blog/apostrophe-cms-web-accessibility-widget-installation)**
|
|
96
|
+
- **[All in One Accessibility - Features Guide](https://www.skynettechnologies.com/sites/default/files/accessibility-widget-features-list.pdf)**
|
|
97
|
+
|
|
98
|
+
## Submit a Support Request
|
|
99
|
+
|
|
100
|
+
Please visit our **[support page](https://www.skynettechnologies.com/report-accessibility-problem)** and fill out the form. Our team will get back to you as soon as possible.
|
|
101
|
+
|
|
102
|
+
## Send Us an Email
|
|
103
|
+
|
|
104
|
+
Alternatively, you can send an email to our support team:
|
|
105
|
+
**[hello@skynettechnologies.com](mailto:hello@skynettechnologies.com)**
|
|
106
|
+
|
|
107
|
+
## Accessibility Partnership Opportunities
|
|
108
|
+
|
|
109
|
+
### **[Agencies Partnership](https://www.skynettechnologies.com/agency-partners)**
|
|
110
|
+
|
|
111
|
+
Partner with us as an agency to provide comprehensive accessibility solutions to your clients. Get access to exclusive resources, training, and support to help you implement and manage accessibility features effectively.
|
|
112
|
+
|
|
113
|
+
### **[Affiliated Partnership](https://www.skynettechnologies.com/affiliate-partner)**
|
|
114
|
+
|
|
115
|
+
Join our affiliate program and earn commissions by promoting All in One Accessibility™. Share our Widget with your network and help businesses improve their website accessibility while generating revenue.
|
|
116
|
+
|
|
117
|
+
For more details, Please visit **[Partnership Opportunities Page](https://www.skynettechnologies.com/partner-program)**
|
|
118
|
+
|
|
119
|
+
## Screenshots
|
|
120
|
+
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+

|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+

|
|
128
|
+
|
|
129
|
+
## Video
|
|
130
|
+
|
|
131
|
+
[](https://www.youtube.com/watch?v=I-DjgZyleeI)
|
|
132
|
+
|
|
133
|
+
## Credits
|
|
134
|
+
|
|
135
|
+
This addon is developed and maintained by **[Skynet Technologies USA LLC](https://www.skynettechnologies.com)**
|
|
136
|
+
|
|
137
|
+
## Current Maintainers
|
|
138
|
+
|
|
139
|
+
- **[Skynet Technologies USA LLC](https://github.com/skynettechnologies)**
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
[MIT](LICENSE) © Skynet Technologies USA LLC
|
package/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
extend: '@apostrophecms/widget-type',
|
|
3
|
+
options: {
|
|
4
|
+
label: 'All in One Accessibility',
|
|
5
|
+
},
|
|
6
|
+
async init(self) {
|
|
7
|
+
self.apos.template.append('head', 'apostrophecms-all-in-one-accessibility:scriptTag');
|
|
8
|
+
self.addManagerModal();
|
|
9
|
+
self.addToAdminBar();
|
|
10
|
+
},
|
|
11
|
+
methods(self) {
|
|
12
|
+
return {
|
|
13
|
+
addManagerModal() {
|
|
14
|
+
self.apos.modal.add(
|
|
15
|
+
`apostrophecms-all-in-one-accessibility`,
|
|
16
|
+
self.getComponentName('managerModal', 'AllInOneAccessibilitySettings'),
|
|
17
|
+
{ moduleName: 'AllInOneAccessibilitySettings' }
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
addToAdminBar() {
|
|
21
|
+
self.apos.adminBar.add(
|
|
22
|
+
`apostrophecms-all-in-one-accessibility`,
|
|
23
|
+
'All in One Accessibility',
|
|
24
|
+
false,
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
components(self) {
|
|
30
|
+
return {
|
|
31
|
+
async scriptTag(req) {
|
|
32
|
+
const settings = await self.apos.doc.db.findOne({
|
|
33
|
+
type: 'apostrophecms-all-in-one-accessibility-settings'
|
|
34
|
+
});
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "apostrophecms-plugin-all-in-one-accessibility",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Website accessibility widget for improving WCAG 2.0, 2.1, 2.2 and ADA compliance!",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"apostrophecms",
|
|
7
|
+
"apostrophecms-plugin",
|
|
8
|
+
"All in One Accessibility",
|
|
9
|
+
"ADA",
|
|
10
|
+
"All in One Accessibility apostrophecms",
|
|
11
|
+
"All in One Accessibility javascript",
|
|
12
|
+
"apostrophecms Plugin All in One Accessibility",
|
|
13
|
+
"apostrophecms-plugin-all-in-one-accessibility"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/skynettechnologies/apostrophecms-plugin-all-in-one-accessibility"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/skynettechnologies/apostrophecms-plugin-all-in-one-accessibility/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/skynettechnologies/apostrophecms-plugin-all-in-one-accessibility#readme",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": "Skynet Technologies USA LLC <developer3@skynettechnologies.com>",
|
|
25
|
+
"main": "index.js",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<AposModal :modal="modal" modal-title="All in One Accessibility" @esc="cancel" @no-modal="$emit('safe-close')"
|
|
3
|
+
@show-modal="modal.showModal = true" @inactive="modal.active = false" @ready="ready">
|
|
4
|
+
<template #secondaryControls>
|
|
5
|
+
<AposButton ref="cancelButton" type="default" label="apostrophe:cancel" @click="cancel" />
|
|
6
|
+
</template>
|
|
7
|
+
<template #main>
|
|
8
|
+
<AposModalBody>
|
|
9
|
+
<template #bodyMain>
|
|
10
|
+
<div :style="elementStyle">
|
|
11
|
+
<div class="all-in-one-accessibility-strapi-container">
|
|
12
|
+
<div class="container">
|
|
13
|
+
<div class="set-width">
|
|
14
|
+
<div class="all-in-one-accessibility-wrap">
|
|
15
|
+
<div class="accessibility-settings">
|
|
16
|
+
<h1><b></b> </h1>
|
|
17
|
+
<img :src="allinoneaccessibilitylogo"
|
|
18
|
+
alt="All in One Accessibility - Skynet Technologies"
|
|
19
|
+
:style="logoStyle" />
|
|
20
|
+
<h1><b></b></h1>
|
|
21
|
+
<div class="all-one-accessibility-form">
|
|
22
|
+
<form @submit.prevent="onSaveChanges">
|
|
23
|
+
<div v-if="!isValid" class="mb-30 row">
|
|
24
|
+
<label class="col-sm-12 col-form-label">
|
|
25
|
+
<div class="form-text col-sm-12 col-form-label">
|
|
26
|
+
Please
|
|
27
|
+
<a href="https://ada.skynettechnologies.us/trial-subscription"
|
|
28
|
+
target="_blank" rel="noopener noreferrer">
|
|
29
|
+
Upgrade
|
|
30
|
+
</a>
|
|
31
|
+
to the full version of All in One Accessibility Pro.
|
|
32
|
+
</div>
|
|
33
|
+
</label>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="mb-30 row">
|
|
36
|
+
<label for="colorcode" class="col-sm-3 col-form-label">Hex
|
|
37
|
+
color code:</label>
|
|
38
|
+
<div class="col-sm-9">
|
|
39
|
+
<input v-model="parameters.hexaColor" class="form-control"
|
|
40
|
+
id="colorcode" name="colorcode" />
|
|
41
|
+
</div>
|
|
42
|
+
<div class="col-sm-3"></div>
|
|
43
|
+
<div class="form-text col-sm-9">
|
|
44
|
+
You can customize the ADA Widget color. For example:
|
|
45
|
+
FF5733
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="mb-30 row">
|
|
49
|
+
<label class="col-sm-12 col-form-label">Select Widget
|
|
50
|
+
Size:</label>
|
|
51
|
+
<div class="col-sm-12 three-col">
|
|
52
|
+
<div class="form-item">
|
|
53
|
+
<input type="radio" id="edit-widget-size-regularsize"
|
|
54
|
+
value="0" v-model="parameters.widget_size"
|
|
55
|
+
class="form-radio" />
|
|
56
|
+
<label for="edit-widget-size-regularsize"
|
|
57
|
+
class="edit-position">Regular Size</label>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="form-item">
|
|
60
|
+
<input type="radio" id="edit-widget-size-oversize"
|
|
61
|
+
value="1" v-model="parameters.widget_size"
|
|
62
|
+
class="form-radio" />
|
|
63
|
+
<label for="edit-widget-size-oversize"
|
|
64
|
+
class="edit-position">Over Size</label>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="icon-custom-size-wrapper mb-3">
|
|
69
|
+
<div class="row align-items-center mb-30">
|
|
70
|
+
<div class="col">
|
|
71
|
+
<label class="col-sm-12 col-form-label">Enable
|
|
72
|
+
precise accessibility widget icon
|
|
73
|
+
position:</label>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="col-auto">
|
|
76
|
+
<!-- <input type="checkbox" id="custom-size-switcher" v-model="isSizeSwitcherEnabled"
|
|
77
|
+
class="custom-switcher" /> -->
|
|
78
|
+
<label class="custom-switch">
|
|
79
|
+
<input type="checkbox" id="custom-size-switcher"
|
|
80
|
+
v-model="isSwitcherEnabled"
|
|
81
|
+
class="custom-switcher" />
|
|
82
|
+
<span class="slider"></span>
|
|
83
|
+
</label>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="mb-30 row">
|
|
88
|
+
<div class="icon-custom-position-wrapper mb-3">
|
|
89
|
+
<div class="mb-2">
|
|
90
|
+
<div v-if="!isSwitcherEnabled">
|
|
91
|
+
<label class="col-sm-12 col-form-label">
|
|
92
|
+
Where would you like to place the
|
|
93
|
+
accessibility icon on your site?:
|
|
94
|
+
</label>
|
|
95
|
+
<div class="col-sm-12 three-col">
|
|
96
|
+
<div class="form-item">
|
|
97
|
+
<input type="radio"
|
|
98
|
+
id="edit-position-top-left"
|
|
99
|
+
value="top_left"
|
|
100
|
+
v-model="parameters.position"
|
|
101
|
+
class="form-radio" />
|
|
102
|
+
<label for="edit-position-top-left"
|
|
103
|
+
class="edit-position">Top
|
|
104
|
+
left</label>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="form-item">
|
|
107
|
+
<input type="radio"
|
|
108
|
+
id="edit-position-top-center"
|
|
109
|
+
value="top_center"
|
|
110
|
+
v-model="parameters.position"
|
|
111
|
+
class="form-radio" />
|
|
112
|
+
<label for="edit-position-top-center"
|
|
113
|
+
class="edit-position">Top
|
|
114
|
+
Center</label>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="form-item">
|
|
117
|
+
<input type="radio"
|
|
118
|
+
id="edit-position-top-right"
|
|
119
|
+
value="top_right"
|
|
120
|
+
v-model="parameters.position"
|
|
121
|
+
class="form-radio" />
|
|
122
|
+
<label for="edit-position-top-right"
|
|
123
|
+
class="edit-position">Top
|
|
124
|
+
Right</label>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="form-item">
|
|
127
|
+
<input type="radio"
|
|
128
|
+
id="edit-position-middle-left"
|
|
129
|
+
value="middle_left"
|
|
130
|
+
v-model="parameters.position"
|
|
131
|
+
class="form-radio" />
|
|
132
|
+
<label for="edit-position-middle-left"
|
|
133
|
+
class="edit-position"> Middle
|
|
134
|
+
left</label>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="form-item">
|
|
137
|
+
<input type="radio"
|
|
138
|
+
id="edit-position-middle-right"
|
|
139
|
+
value="middle_right"
|
|
140
|
+
v-model="parameters.position"
|
|
141
|
+
class="form-radio" />
|
|
142
|
+
<label for="edit-position-middle-right"
|
|
143
|
+
class="edit-position">Middle
|
|
144
|
+
Right</label>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="form-item">
|
|
147
|
+
<input type="radio"
|
|
148
|
+
id="edit-position-bottom-left"
|
|
149
|
+
value="bottom_left"
|
|
150
|
+
v-model="parameters.position"
|
|
151
|
+
class="form-radio" />
|
|
152
|
+
<label for="edit-position-bottom-left"
|
|
153
|
+
class="edit-position">Bottom
|
|
154
|
+
left</label>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="form-item">
|
|
157
|
+
<input type="radio"
|
|
158
|
+
id="edit-position-bottom-center"
|
|
159
|
+
value="bottom_center"
|
|
160
|
+
v-model="parameters.position"
|
|
161
|
+
class="form-radio" />
|
|
162
|
+
<label for="edit-position-bottom-center"
|
|
163
|
+
class="edit-position">Bottom
|
|
164
|
+
Center</label>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="form-item">
|
|
167
|
+
<input type="radio"
|
|
168
|
+
id="edit-position-bottom-right"
|
|
169
|
+
value="bottom_right"
|
|
170
|
+
v-model="parameters.position"
|
|
171
|
+
class="form-radio" />
|
|
172
|
+
<label for="edit-position-bottom-right"
|
|
173
|
+
class="edit-position">Bottom
|
|
174
|
+
Right</label>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
<div v-if="isSwitcherEnabled"
|
|
179
|
+
class="custom-position-controls">
|
|
180
|
+
<div class="row mb-3 d-flex align-items-center">
|
|
181
|
+
<div class="col-auto">
|
|
182
|
+
<input type="number" min="0" max="250"
|
|
183
|
+
id="custom_position_x_value"
|
|
184
|
+
v-model="widgetSettings.custom_position_x_value"
|
|
185
|
+
class="form-control"
|
|
186
|
+
@input="handleInput" />
|
|
187
|
+
</div>
|
|
188
|
+
<div
|
|
189
|
+
class="col-auto d-flex justify-content-center align-items-center">
|
|
190
|
+
<span>PX</span>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="col-auto">
|
|
193
|
+
<select id="custom_position_left_right"
|
|
194
|
+
v-model="widgetSettings.custom_position_left_right"
|
|
195
|
+
class="form-select">
|
|
196
|
+
<option value="cust-pos-to-the-right">To
|
|
197
|
+
the right</option>
|
|
198
|
+
<option value="cust-pos-to-the-left">To
|
|
199
|
+
the left</option>
|
|
200
|
+
</select>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="row mb-3 d-flex align-items-center">
|
|
204
|
+
<div class="col-auto">
|
|
205
|
+
<input type="number" min="0" max="250"
|
|
206
|
+
id="custom_position_y_value"
|
|
207
|
+
v-model="widgetSettings.custom_position_y_value"
|
|
208
|
+
class="form-control"
|
|
209
|
+
@input="handleInput2" />
|
|
210
|
+
</div>
|
|
211
|
+
<div
|
|
212
|
+
class="col-auto d-flex justify-content-center align-items-center">
|
|
213
|
+
<span>PX</span>
|
|
214
|
+
</div>
|
|
215
|
+
<div class="col-auto">
|
|
216
|
+
<select id="custom_position_top_bottom"
|
|
217
|
+
v-model="widgetSettings.custom_position_top_bottom"
|
|
218
|
+
class="form-select">
|
|
219
|
+
<option value="cust-pos-to-the-lower">To
|
|
220
|
+
the bottom</option>
|
|
221
|
+
<option value="cust-pos-to-the-upper">To
|
|
222
|
+
the top</option>
|
|
223
|
+
</select>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="description">0 - 250px are permitted
|
|
227
|
+
values</div>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="icon-type-wrapper row" :class="{ 'd-none': !isValid }">
|
|
233
|
+
<label class="col-sm-12 col-form-label">Select icon
|
|
234
|
+
type:</label>
|
|
235
|
+
<div class="col-sm-12">
|
|
236
|
+
<div class="row">
|
|
237
|
+
<div class="col-auto mb-30"
|
|
238
|
+
v-for="(icon, index) in iconTypes" :key="index">
|
|
239
|
+
<div
|
|
240
|
+
class="form-item js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
|
|
241
|
+
<input type="radio"
|
|
242
|
+
:id="'edit-type-' + (index + 1)"
|
|
243
|
+
:value="icon.value"
|
|
244
|
+
v-model="parameters.icontype"
|
|
245
|
+
class="form-radio" />
|
|
246
|
+
<label :for="'edit-type-' + (index + 1)">
|
|
247
|
+
<img :src=icon.src alt="" width="65"
|
|
248
|
+
height="65" />
|
|
249
|
+
</label>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
<div class="mb-30 row">
|
|
256
|
+
<div class="icon-custom-size-wrapper mb-3">
|
|
257
|
+
<!-- <div class="row align-items-center mb-30"> -->
|
|
258
|
+
<div class="col">
|
|
259
|
+
<label class="col-sm-12 col-form-label">Enable icon
|
|
260
|
+
custom size:</label>
|
|
261
|
+
</div>
|
|
262
|
+
<div class="col-auto">
|
|
263
|
+
<!-- <input type="checkbox" id="custom-size-switcher" v-model="isSizeSwitcherEnabled"
|
|
264
|
+
class="custom-switcher" /> -->
|
|
265
|
+
<label class="custom-switch">
|
|
266
|
+
<input type="checkbox" id="custom-size-switcher"
|
|
267
|
+
v-model="isSizeSwitcherEnabled"
|
|
268
|
+
class="custom-switcher" />
|
|
269
|
+
<span class="slider"></span>
|
|
270
|
+
</label>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
<div v-if="!isSizeSwitcherEnabled">
|
|
274
|
+
<label class="col-sm-12 col-form-label">Select icon
|
|
275
|
+
size:</label>
|
|
276
|
+
<div class="col-sm-12">
|
|
277
|
+
<div class="row">
|
|
278
|
+
<div class="col-auto mb-30"
|
|
279
|
+
v-for="(size, index) in iconSizes" :key="index">
|
|
280
|
+
<div
|
|
281
|
+
class="form-item js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
|
|
282
|
+
<input type="radio"
|
|
283
|
+
:id="'edit-size-' + size.value"
|
|
284
|
+
:value="size.value"
|
|
285
|
+
v-model="parameters.iconsize"
|
|
286
|
+
class="form-radio" />
|
|
287
|
+
<label :for="'edit-size-' + size.value">
|
|
288
|
+
<img :src="'https://sanity.skynettechnologies.us/assets/images/' + parameters.icontype + '.svg'"
|
|
289
|
+
alt="" :width="size.width"
|
|
290
|
+
:height="size.height" />
|
|
291
|
+
</label>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
<div v-if="isSizeSwitcherEnabled"
|
|
298
|
+
class="custom-size-controls mt-3">
|
|
299
|
+
<div class="row">
|
|
300
|
+
<div class="col-xs-auto">
|
|
301
|
+
<label for="widget_icon_size_custom"
|
|
302
|
+
class="col-sm-12 col-form-label">
|
|
303
|
+
Select exact icon size:
|
|
304
|
+
</label>
|
|
305
|
+
<input type="number" id="widget_icon_size_custom"
|
|
306
|
+
v-model="widgetSettings.widget_icon_size_custom"
|
|
307
|
+
min="20" max="150" class="form-control"
|
|
308
|
+
@input="handleInput1" />
|
|
309
|
+
<span>PX</span>
|
|
310
|
+
<div class="description">20 - 150px are
|
|
311
|
+
permitted values</div>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
<!-- </div> -->
|
|
316
|
+
</div>
|
|
317
|
+
<div class="save-changes-btn">
|
|
318
|
+
<button type="submit" class="btn btn-primary">Save
|
|
319
|
+
Changes</button>
|
|
320
|
+
<div class="mt-30 row">
|
|
321
|
+
<div v-if="showSuccessMessage" class="success-message">
|
|
322
|
+
Settings successfully saved!
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
</form>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
</template>
|
|
335
|
+
</AposModalBody>
|
|
336
|
+
</template>
|
|
337
|
+
</AposModal>
|
|
338
|
+
</template>
|
|
339
|
+
|
|
340
|
+
<script>
|
|
341
|
+
export default {
|
|
342
|
+
props: {
|
|
343
|
+
moduleName: String
|
|
344
|
+
},
|
|
345
|
+
emits: ['safe-close'],
|
|
346
|
+
data() {
|
|
347
|
+
return {
|
|
348
|
+
modal: { active: false, showModal: false, type: 'overlay' },
|
|
349
|
+
user: {
|
|
350
|
+
name: '',
|
|
351
|
+
email: ''
|
|
352
|
+
},
|
|
353
|
+
allinoneaccessibilitylogo: 'https://sanity.skynettechnologies.us/assets/images/all-in-one-accessibility-logo.svg',
|
|
354
|
+
parameters: {
|
|
355
|
+
hexaColor: '420083',
|
|
356
|
+
widget_size: '0',
|
|
357
|
+
position: 'bottom_right',
|
|
358
|
+
icontype: 'aioa-icon-type-1',
|
|
359
|
+
iconsize: 'aioa-default-icon',
|
|
360
|
+
},
|
|
361
|
+
widgetSettings: {
|
|
362
|
+
widget_icon_size_custom: '',
|
|
363
|
+
custom_position_x_value: '',
|
|
364
|
+
custom_position_y_value: '',
|
|
365
|
+
custom_position_left_right: 'To the right',
|
|
366
|
+
custom_position_top_bottom: 'To the bottom',
|
|
367
|
+
},
|
|
368
|
+
isSwitcherEnabled: false,
|
|
369
|
+
isSizeSwitcherEnabled: false,
|
|
370
|
+
showSuccessMessage: false,
|
|
371
|
+
isValid: false,
|
|
372
|
+
elementStyle: {
|
|
373
|
+
marginTop: '0px',
|
|
374
|
+
display: 'flex',
|
|
375
|
+
justifyContent: 'center',
|
|
376
|
+
alignItems: 'center',
|
|
377
|
+
flexDirection: 'column',
|
|
378
|
+
},
|
|
379
|
+
logoStyle: {
|
|
380
|
+
display: 'block',
|
|
381
|
+
justifyContent: 'center',
|
|
382
|
+
alignItems: 'center',
|
|
383
|
+
textAlign: 'center',
|
|
384
|
+
marginLeft: 'auto',
|
|
385
|
+
marginRight: 'auto',
|
|
386
|
+
width: '50%',
|
|
387
|
+
},
|
|
388
|
+
iconTypes: [
|
|
389
|
+
{ value: 'aioa-icon-type-1', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg' },
|
|
390
|
+
{ value: 'aioa-icon-type-2', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-2.svg' },
|
|
391
|
+
{ value: 'aioa-icon-type-3', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-3.svg' },
|
|
392
|
+
{ value: 'aioa-icon-type-4', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-4.svg' },
|
|
393
|
+
{ value: 'aioa-icon-type-5', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-5.svg' },
|
|
394
|
+
{ value: 'aioa-icon-type-6', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-6.svg' },
|
|
395
|
+
{ value: 'aioa-icon-type-7', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-7.svg' },
|
|
396
|
+
{ value: 'aioa-icon-type-8', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-8.svg' },
|
|
397
|
+
{ value: 'aioa-icon-type-9', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-9.svg' },
|
|
398
|
+
{ value: 'aioa-icon-type-10', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-10.svg' },
|
|
399
|
+
{ value: 'aioa-icon-type-11', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-11.svg' },
|
|
400
|
+
{ value: 'aioa-icon-type-12', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-12.svg' },
|
|
401
|
+
{ value: 'aioa-icon-type-13', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-13.svg' },
|
|
402
|
+
{ value: 'aioa-icon-type-14', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-14.svg' },
|
|
403
|
+
{ value: 'aioa-icon-type-15', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-15.svg' },
|
|
404
|
+
{ value: 'aioa-icon-type-16', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-16.svg' },
|
|
405
|
+
{ value: 'aioa-icon-type-17', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-17.svg' },
|
|
406
|
+
{ value: 'aioa-icon-type-18', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-18.svg' },
|
|
407
|
+
{ value: 'aioa-icon-type-19', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-19.svg' },
|
|
408
|
+
{ value: 'aioa-icon-type-20', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-20.svg' },
|
|
409
|
+
{ value: 'aioa-icon-type-21', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-21.svg' },
|
|
410
|
+
{ value: 'aioa-icon-type-22', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-22.svg' },
|
|
411
|
+
{ value: 'aioa-icon-type-23', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-23.svg' },
|
|
412
|
+
{ value: 'aioa-icon-type-24', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-24.svg' },
|
|
413
|
+
{ value: 'aioa-icon-type-25', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-25.svg' },
|
|
414
|
+
{ value: 'aioa-icon-type-26', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-26.svg' },
|
|
415
|
+
{ value: 'aioa-icon-type-27', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-27.svg' },
|
|
416
|
+
{ value: 'aioa-icon-type-28', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-28.svg' },
|
|
417
|
+
{ value: 'aioa-icon-type-29', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-29.svg' },
|
|
418
|
+
|
|
419
|
+
// Add other icon types here...
|
|
420
|
+
],
|
|
421
|
+
iconSizes: [
|
|
422
|
+
{ value: 'aioa-big-icon', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg', width: 75, height: 75 },
|
|
423
|
+
{ value: 'aioa-medium-icon', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg', width: 65, height: 65 },
|
|
424
|
+
{ value: 'aioa-default-icon', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg', width: 55, height: 55 },
|
|
425
|
+
{ value: 'aioa-small-icon', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg', width: 45, height: 45 },
|
|
426
|
+
{ value: 'aioa-extra-small-icon', src: 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg', width: 35, height: 35 },
|
|
427
|
+
],
|
|
428
|
+
|
|
429
|
+
};
|
|
430
|
+
},
|
|
431
|
+
async mounted() {
|
|
432
|
+
this.modal.active = true;
|
|
433
|
+
// Create link element for Bootstrap CSS
|
|
434
|
+
const bootstrapLink = document.createElement('link');
|
|
435
|
+
bootstrapLink.rel = 'stylesheet';
|
|
436
|
+
bootstrapLink.href = 'https://sanity.skynettechnologies.us/assets/css/bootstrap.min.css';
|
|
437
|
+
document.head.appendChild(bootstrapLink);
|
|
438
|
+
|
|
439
|
+
// Create link element for your custom CSS
|
|
440
|
+
const customLink = document.createElement('link');
|
|
441
|
+
customLink.rel = 'stylesheet';
|
|
442
|
+
customLink.href = 'https://sanity.skynettechnologies.us/assets/css/style.css';
|
|
443
|
+
document.head.appendChild(customLink);
|
|
444
|
+
this.getAPIData();
|
|
445
|
+
|
|
446
|
+
},
|
|
447
|
+
computed: {
|
|
448
|
+
},
|
|
449
|
+
methods: {
|
|
450
|
+
onSaveChanges() {
|
|
451
|
+
const formdata = new FormData();
|
|
452
|
+
const widget_icon_size_custom = this.widgetSettings.widget_icon_size_custom || '';
|
|
453
|
+
const custom_position_x_value = this.widgetSettings.custom_position_x_value || '';
|
|
454
|
+
const custom_position_y_value = this.widgetSettings.custom_position_y_value || '';
|
|
455
|
+
const custom_position_left_right = this.widgetSettings.custom_position_left_right || '';
|
|
456
|
+
const custom_position_top_bottom = this.widgetSettings.custom_position_top_bottom || '';
|
|
457
|
+
|
|
458
|
+
let widget_position_right = '',
|
|
459
|
+
widget_position_left = '',
|
|
460
|
+
widget_position_top = '',
|
|
461
|
+
widget_position_bottom = '';
|
|
462
|
+
|
|
463
|
+
if (custom_position_left_right == 'cust-pos-to-the-right') {
|
|
464
|
+
widget_position_right = custom_position_x_value;
|
|
465
|
+
} else {
|
|
466
|
+
widget_position_left = custom_position_x_value;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
if (custom_position_left_right == 'cust-pos-to-the-lower') {
|
|
470
|
+
widget_position_bottom = custom_position_y_value;
|
|
471
|
+
} else {
|
|
472
|
+
widget_position_top = custom_position_y_value;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
formdata.append('u', window.location.hostname);
|
|
476
|
+
formdata.append('widget_position', this.parameters.position);
|
|
477
|
+
formdata.append('widget_color_code', this.parameters.hexaColor);
|
|
478
|
+
formdata.append('widget_icon_type', this.parameters.icontype);
|
|
479
|
+
formdata.append('widget_icon_size', this.parameters.iconsize);
|
|
480
|
+
formdata.append('widget_size', this.parameters.widget_size);
|
|
481
|
+
formdata.append('is_widget_custom_position', this.isSwitcherEnabled ? '1' : '0');
|
|
482
|
+
formdata.append('is_widget_custom_size', this.isSizeSwitcherEnabled ? '1' : '0');
|
|
483
|
+
formdata.append('widget_icon_size_custom', widget_icon_size_custom);
|
|
484
|
+
formdata.append('widget_position_right', widget_position_right);
|
|
485
|
+
formdata.append('widget_position_left', widget_position_left);
|
|
486
|
+
formdata.append('widget_position_top', widget_position_top);
|
|
487
|
+
formdata.append('widget_position_bottom', widget_position_bottom);
|
|
488
|
+
|
|
489
|
+
console.log("this.isSizeSwitcherEnabled : ", this.isSizeSwitcherEnabled);
|
|
490
|
+
|
|
491
|
+
console.log('u', window.location.hostname);
|
|
492
|
+
console.log('widget_position', this.parameters.position);
|
|
493
|
+
console.log('widget_color_code', this.parameters.hexaColor);
|
|
494
|
+
console.log('widget_icon_type', this.parameters.icontype);
|
|
495
|
+
console.log('widget_icon_size', this.parameters.iconsize);
|
|
496
|
+
console.log('widget_size', this.parameters.widget_size);
|
|
497
|
+
console.log('is_widget_custom_position', this.isSwitcherEnabled ? '1' : '0');
|
|
498
|
+
console.log('is_widget_custom_size', this.isSizeSwitcherEnabled ? '1' : '0');
|
|
499
|
+
console.log('widget_icon_size_custom', widget_icon_size_custom);
|
|
500
|
+
console.log('widget_position_right', widget_position_right);
|
|
501
|
+
console.log('widget_position_left', widget_position_left);
|
|
502
|
+
console.log('widget_position_top', widget_position_top);
|
|
503
|
+
console.log('widget_position_bottom', widget_position_bottom);
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
fetch('https://ada.skynettechnologies.us/api/widget-setting-update-platform', {
|
|
507
|
+
method: 'POST',
|
|
508
|
+
body: formdata,
|
|
509
|
+
})
|
|
510
|
+
.then((response) => response.json())
|
|
511
|
+
.then((response) => {
|
|
512
|
+
console.log('response Save Data', response);
|
|
513
|
+
this.showSuccessMessage = true;
|
|
514
|
+
|
|
515
|
+
setTimeout(() => {
|
|
516
|
+
this.showSuccessMessage = false;
|
|
517
|
+
}, 3000); // Reset message after 3 seconds
|
|
518
|
+
})
|
|
519
|
+
.catch((error) => console.log('error', error));
|
|
520
|
+
},
|
|
521
|
+
getAPIData() {
|
|
522
|
+
const formdata = new FormData();
|
|
523
|
+
formdata.append('website_url', window.location.hostname);
|
|
524
|
+
|
|
525
|
+
fetch('https://ada.skynettechnologies.us/api/widget-settings', {
|
|
526
|
+
method: 'POST',
|
|
527
|
+
body: formdata,
|
|
528
|
+
})
|
|
529
|
+
.then((response) => response.json())
|
|
530
|
+
.then((response) => {
|
|
531
|
+
if (Object.keys(response.Data).length !== 0) {
|
|
532
|
+
this.isValid = true;
|
|
533
|
+
this.parameters = {
|
|
534
|
+
hexaColor: response.Data.widget_color_code,
|
|
535
|
+
position: response.Data.widget_position,
|
|
536
|
+
icontype: response.Data.widget_icon_type,
|
|
537
|
+
iconsize: response.Data.widget_icon_size,
|
|
538
|
+
widget_size: response.Data.widget_size,
|
|
539
|
+
};
|
|
540
|
+
this.isSizeSwitcherEnabled = response.Data.is_widget_custom_size == '0' ? false : true;
|
|
541
|
+
this.isSwitcherEnabled = response.Data.is_widget_custom_position == '0' ? false : true;
|
|
542
|
+
|
|
543
|
+
this.widgetSettings = {
|
|
544
|
+
widget_icon_size_custom: response.Data.widget_icon_size_custom || '',
|
|
545
|
+
custom_position_x_value: parseInt(response.Data.widget_position_left) > 0
|
|
546
|
+
? response.Data.widget_position_left
|
|
547
|
+
: response.Data.widget_position_right,
|
|
548
|
+
custom_position_y_value: parseInt(response.Data.widget_position_bottom) > 0
|
|
549
|
+
? response.Data.widget_position_bottom
|
|
550
|
+
: response.Data.widget_position_top,
|
|
551
|
+
custom_position_left_right: parseInt(response.Data.widget_position_left) > 0 ? 'cust-pos-to-the-left' : 'cust-pos-to-the-right',
|
|
552
|
+
custom_position_top_bottom: parseInt(response.Data.widget_position_bottom) > 0 ? 'cust-pos-to-the-lower' : 'cust-pos-to-the-upper',
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
} else {
|
|
556
|
+
this.isValid = false;
|
|
557
|
+
}
|
|
558
|
+
})
|
|
559
|
+
.catch((error) => console.log('error', error));
|
|
560
|
+
},
|
|
561
|
+
handleInput(e) {
|
|
562
|
+
e.target.value = Math.min(Math.max(Number(e.target.value), 0), 250).toString();
|
|
563
|
+
},
|
|
564
|
+
handleInput2(e) {
|
|
565
|
+
e.target.value = Math.min(Math.max(Number(e.target.value), 0), 250).toString();
|
|
566
|
+
},
|
|
567
|
+
handleInput1(e) {
|
|
568
|
+
e.target.value = Math.min(Math.max(Number(e.target.value), 0), 150).toString();
|
|
569
|
+
},
|
|
570
|
+
onIconChange(e) {
|
|
571
|
+
this.parameters.icontype = e.target.value;
|
|
572
|
+
},
|
|
573
|
+
setIconSize(e) {
|
|
574
|
+
this.parameters.iconsize = e.target.value;
|
|
575
|
+
},
|
|
576
|
+
ready() {
|
|
577
|
+
this.$refs.cancelButton.$el.querySelector('button').focus();
|
|
578
|
+
},
|
|
579
|
+
cancel() {
|
|
580
|
+
this.modal.showModal = false;
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
beforeDestroy() {
|
|
584
|
+
if (this.pollInterval) {
|
|
585
|
+
clearInterval(this.pollInterval);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
</script>
|
|
590
|
+
|
|
591
|
+
<style scoped>
|
|
592
|
+
.btn [class*=" icon-"],
|
|
593
|
+
.btn [class^=icon-],
|
|
594
|
+
.s-btn [class*=" icon-"],
|
|
595
|
+
.s-btn [class^=icon-],
|
|
596
|
+
[class*=" icon-"],
|
|
597
|
+
[class^=icon-],
|
|
598
|
+
i.icon,
|
|
599
|
+
span.icon {
|
|
600
|
+
display: contents;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
img {
|
|
604
|
+
position: relative;
|
|
605
|
+
top: 50%;
|
|
606
|
+
transform: translateY(-50%);
|
|
607
|
+
margin: 0 auto;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.all-in-one-accessibility-wrap .accessibility-settings .all-one-accessibility-form [type=radio]:checked+label:not(.edit-position),
|
|
611
|
+
.all-in-one-accessibility-wrap .accessibility-settings .all-one-accessibility-form [type=radio]:not(:checked)+label:not(.edit-position) {
|
|
612
|
+
width: 130px;
|
|
613
|
+
height: 130px;
|
|
614
|
+
padding: 10px !important;
|
|
615
|
+
text-align: center;
|
|
616
|
+
background-color: #3c007f !important;
|
|
617
|
+
outline: 4px solid #fff;
|
|
618
|
+
outline-offset: -4px;
|
|
619
|
+
border-radius: 10px;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.all-in-one-accessibility-wrap .accessibility-settings .all-one-accessibility-form {
|
|
623
|
+
margin: 0 auto 40px;
|
|
624
|
+
border-radius: 19px;
|
|
625
|
+
background: #e9efff;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.success-message {
|
|
629
|
+
color: green;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.custom-switch {
|
|
633
|
+
position: relative;
|
|
634
|
+
display: inline-block;
|
|
635
|
+
width: 60px;
|
|
636
|
+
/* Adjust width as needed */
|
|
637
|
+
height: 34px;
|
|
638
|
+
/* Adjust height as needed */
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.custom-switch input {
|
|
642
|
+
opacity: 0;
|
|
643
|
+
/* Hide the default checkbox */
|
|
644
|
+
width: 0;
|
|
645
|
+
height: 0;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.slider {
|
|
649
|
+
position: absolute;
|
|
650
|
+
cursor: pointer;
|
|
651
|
+
top: 0;
|
|
652
|
+
left: 0;
|
|
653
|
+
right: 0;
|
|
654
|
+
bottom: 0;
|
|
655
|
+
background-color: #ccc;
|
|
656
|
+
/* Background color when off */
|
|
657
|
+
transition: .4s;
|
|
658
|
+
/* Transition effect */
|
|
659
|
+
border-radius: 34px;
|
|
660
|
+
/* Rounded corners */
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.slider:before {
|
|
664
|
+
position: absolute;
|
|
665
|
+
content: "";
|
|
666
|
+
height: 26px;
|
|
667
|
+
/* Height of the slider knob */
|
|
668
|
+
width: 26px;
|
|
669
|
+
/* Width of the slider knob */
|
|
670
|
+
left: 4px;
|
|
671
|
+
/* Position of the knob */
|
|
672
|
+
bottom: 4px;
|
|
673
|
+
/* Position of the knob */
|
|
674
|
+
background-color: white;
|
|
675
|
+
/* Color of the knob */
|
|
676
|
+
border-radius: 50%;
|
|
677
|
+
/* Round knob */
|
|
678
|
+
transition: .4s;
|
|
679
|
+
/* Transition effect */
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/* Change background color when checked */
|
|
683
|
+
input:checked+.slider {
|
|
684
|
+
background-color: #420083;
|
|
685
|
+
/* Background color when on */
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/* Move the knob when checked */
|
|
689
|
+
input:checked+.slider:before {
|
|
690
|
+
transform: translateX(26px);
|
|
691
|
+
/* Move knob to the right */
|
|
692
|
+
}
|
|
693
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<script id="aioa-adawidget" src="https://www.skynettechnologies.com/accessibility/js/all-in-one-accessibility-js-widget-minify.js?colorcode=&token=&position="></script>
|