├── .github
├── FUNDING.yml
└── ISSUE_TEMPLATE
│ ├── bug_report.yaml
│ ├── config.yml
│ ├── feature_request.yaml
│ └── support_request.yaml
├── .gitignore
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── composer.json
├── config.codekit3
├── docs
├── .sidebar.json
├── README.md
├── feature-tour
│ └── overview.md
└── get-started
│ ├── installation-setup.md
│ └── requirements.md
└── src
├── Smith.php
├── assetbundles
└── SmithAsset.php
├── base
└── PluginTrait.php
├── controllers
└── FieldController.php
├── icon.svg
├── resources
├── dist
│ ├── css
│ │ └── smith.css
│ ├── fonts
│ │ ├── fa-regular-400.eot
│ │ ├── fa-regular-400.svg
│ │ ├── fa-regular-400.ttf
│ │ ├── fa-regular-400.woff
│ │ └── fa-regular-400.woff2
│ └── js
│ │ ├── smith.js
│ │ └── smith.js.map
└── src
│ ├── js
│ └── smith.js
│ └── scss
│ └── smith.scss
├── services
└── Field.php
└── translations
├── de
└── smith.php
└── en
└── smith.php
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: verbb
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yaml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: Create a report to help us improve.
3 | body:
4 | - type: markdown
5 | attributes:
6 | value: |
7 | Before you send through your bug report, please ensure you have taken these steps first:
8 |
9 | ✅ I‘ve searched open and closed issues.
10 |
11 | - type: textarea
12 | id: bug-description
13 | attributes:
14 | label: Describe the bug
15 | description: Describe the bug and what behaviour you expect if the bug is fixed.
16 | placeholder: "I have an issue where..."
17 | validations:
18 | required: true
19 | - type: textarea
20 | id: steps-to-reproduce
21 | attributes:
22 | label: Steps to reproduce
23 | description: Detail how we can reproduce this issue.
24 | value: |
25 | 1.
26 | 2.
27 | validations:
28 | required: true
29 | - type: input
30 | id: craft-version
31 | attributes:
32 | label: Craft CMS version
33 | description: What version of Craft CMS you‘re using. **Do not write "latest"**.
34 | validations:
35 | required: true
36 | - type: input
37 | id: plugin-version
38 | attributes:
39 | label: Plugin version
40 | description: What version of the plugin you‘re using. **Do not write "latest"**.
41 | validations:
42 | required: true
43 | - type: input
44 | id: multi-site
45 | attributes:
46 | label: Multi-site?
47 | description: Whether your install is a multi-site.
48 | placeholder: |
49 | "Yes" or "No"
50 | - type: textarea
51 | id: additional-context
52 | attributes:
53 | label: Additional context
54 | description: Provide any additional information you think might be useful. The more information you provide the easier it‘ll be for use to fix this bug!
55 | placeholder: |
56 | "I also have X plugin installed..." or "This only happens on production..."
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Craft Discord
4 | url: https://craftcms.com/discord
5 | about: Community discussion and support.
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yaml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: Suggest an idea or enhancement.
3 | labels: 'feature request'
4 | body:
5 | - type: textarea
6 | id: feature-description
7 | attributes:
8 | label: What are you trying to do?
9 | description: A description of what you want to happen.
10 | placeholder: "I would like to see..."
11 | validations:
12 | required: true
13 | - type: textarea
14 | id: proposed-solution
15 | attributes:
16 | label: What's your proposed solution?
17 | description: A description of how you think this could be solved, including any alternatives that you considered.
18 | validations:
19 | required: true
20 | - type: textarea
21 | id: additional-context
22 | attributes:
23 | label: Additional context
24 | description: Add any other context or screenshots about the feature request here.
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/support_request.yaml:
--------------------------------------------------------------------------------
1 | name: Question
2 | description: Ask a question about this plugin. DO NOT use this to submit bug reports.
3 | labels: 'question'
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Before you send through your question, please ensure you have taken these steps first:
9 |
10 | ✅ I‘ve searched open and closed issues.
11 | ✅ This is not a bug report, just a general question.
12 |
13 | - type: textarea
14 | id: question
15 | attributes:
16 | label: Question
17 | description: A question about the plugin or how it works.
18 | placeholder: "Is it possible to do..."
19 | validations:
20 | required: true
21 | - type: textarea
22 | id: additional-context
23 | attributes:
24 | label: Additional context
25 | description: Add any other context or screenshots about your question here.
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # CRAFT ENVIRONMENT
2 | .env.php
3 | .env.sh
4 | .env
5 |
6 | # COMPOSER
7 | /vendor
8 |
9 | # BUILD FILES
10 | /bower_components/*
11 | /node_modules/*
12 | /build/*
13 | /yarn-error.log
14 |
15 | # MISC FILES
16 | .cache
17 | .DS_Store
18 | .idea
19 | .project
20 | .settings
21 | .map
22 | *.esproj
23 | *.sublime-workspace
24 | *.sublime-project
25 | *.tmproj
26 | *.tmproject
27 | .vscode/*
28 | !.vscode/settings.json
29 | !.vscode/tasks.json
30 | !.vscode/launch.json
31 | !.vscode/extensions.json
32 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## 3.1.0 - 2024-08-09
4 |
5 | ### Changed
6 | - Now requires Craft 5.1+.
7 |
8 | ### Fixed
9 | - Fix an issue when cloning and pasting blocks, where the source field would have their blocks duplicated.
10 | - Fix an error working with non-primary site elements.
11 |
12 | ## 3.0.0 - 2024-05-18
13 |
14 | ### Changed
15 | - Now requires PHP `8.2.0+`.
16 | - Now requires Craft `5.0.0+`.
17 |
18 | ## 2.0.1 - 2024-04-10
19 |
20 | ### Fixed
21 | - Fix plugin not working correctly in element slide-out editors.
22 |
23 | ## 2.0.0 - 2022-06-03
24 |
25 | ### Changed
26 | - Now requires PHP `8.0.2+`.
27 | - Now requires Craft `4.0.0+`.
28 |
29 | ## 1.2.3 - 2022-04-04
30 |
31 | ### Fixed
32 | - Add support for cloning complex Matrix fields, when nested in Super Table fields.
33 |
34 | ## 1.2.2 - 2022-04-02
35 |
36 | ### Fixed
37 | - Fix un-saved Super Table and Matrix combinations not being able to be cloned.
38 |
39 | ## 1.2.1 - 2022-03-24
40 |
41 | ### Fixed
42 | - Fix an error when viewing a revision for an entry/element.
43 |
44 | ## 1.2.0 - 2022-01-11
45 |
46 | ### Changed
47 | - Now requires Craft 3.7.31+.
48 |
49 | ### Fixed
50 | - Fix compatibility with Craft 3.7.31.
51 | - Fix potential error with MatrixMate and cloning blocks.
52 |
53 | ## 1.1.14 - 2021-05-30
54 |
55 | ### Fixed
56 | - Fix cloned or pasted block not always appearing in some instances.
57 | - Fix incorrectly rendering Matrix blocks for Craft 3.5+.
58 |
59 | ## 1.1.13 - 2021-03-17
60 |
61 | ### Fixed
62 | - Fix translations not working.
63 |
64 | ## 1.1.12 - 2021-01-19
65 |
66 | ### Fixed
67 | - Fix cloned blocks on un-saved elements not always appearing after cloned source block.
68 | - Fix potentially incorrect blocks being cloned.
69 |
70 | ## 1.1.11 - 2021-01-15
71 |
72 | ### Fixed
73 | - Fix being unable to clone or copy/paste unsaved blocks.
74 |
75 | ## 1.1.10 - 2020-10-21
76 |
77 | ### Fixed
78 | - Fix error when cloning or pasting blocks where multiple Matrix fields with the same handle existed.
79 |
80 | ## 1.1.9 - 2020-10-18
81 |
82 | ### Fixed
83 | - Fix nested Matrix + Super Table fields, where excessively large POST data was being sent to the server.
84 |
85 | ## 1.1.8 - 2020-09-05
86 |
87 | ### Fixed
88 | - Fix pasting into new matrix fields, not using the correct `placeholderKey` for the destination field.
89 |
90 | ## 1.1.7 - 2020-08-31
91 |
92 | ### Fixed
93 | - Fix error when selecting one or multiple blocks and trying to copy.
94 |
95 | ## 1.1.6 - 2020-08-10
96 |
97 | ### Changed
98 | - Updated handling to cater for the latest changes in Matrix and Super Table, with `placeholderKey`.
99 | - Now requires Craft 3.4.30+.
100 |
101 | ## 1.1.5 - 2020-07-26
102 |
103 | ### Fixed
104 | - Fix paste-checks not being done each time the menu is opened. Causing previously-copied blocks (from other fields) to show they can be pasted.
105 | - Fix being unable to post for Super Table in Matrix fields.
106 | - Fix JS error in Safari
107 |
108 | ## 1.1.4 - 2020-07-23
109 |
110 | ### Fixed
111 | - Fix being unable to clone Matrix blocks when they contained a Super Table Field.
112 | - Fix being unable to clone Matrix blocks when in Neo fields.
113 | - Fix menu option not being added for Matrix blocks nested in Super Table or Neo fields.
114 | - Fix newly cloned blocks when nested in Super Table or Neo fields not cloning properly.
115 | - Fix Neo support to allow for nested Matrix fields more than 2 levels deep.
116 |
117 | ## 1.1.3 - 2020-04-16
118 |
119 | ### Fixed
120 | - Fix logging error `Call to undefined method setFileLogging()`.
121 |
122 | ## 1.1.2 - 2020-04-15
123 |
124 | ### Changed
125 | - File logging now checks if the overall Craft app uses file logging.
126 | - Log files now only include `GET` and `POST` additional variables.
127 |
128 | ## 1.1.1 - 2020-02-12
129 |
130 | ### Fixed
131 | - Fix issue with pasting blocks.
132 |
133 | ## 1.1.0 - 2020-02-11
134 |
135 | ### Added
136 | - Add Craft 3.4 support.
137 |
138 | ### Changed
139 | - Now requires Craft 3.4+.
140 |
141 | ## 1.0.0 - 2019-04-14
142 |
143 | - Initial release.
144 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Verbb
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > [!NOTE]
2 | > Due to the upcoming changes in Craft 5, Smith will likely be retired, as all functionality will be available in Craft itself.
3 |
4 |

5 | Smith for Craft CMS
6 |
7 | Smith is a Craft CMS plugin that extends the native behaviour of Matrix fields, by adding Copy, Paste and Clone functionality to each block. This allows you to duplicate matrix blocks, or even copy and paste content between entries in different sections.
8 |
9 | ## Documentation
10 | Visit the [Smith Plugin page](https://verbb.io/craft-plugins/smith) for all documentation, guides, pricing and developer resources.
11 |
12 | ## Support
13 | Get in touch with us via the [Smith Support page](https://verbb.io/craft-plugins/smith/support) or by [creating a Github issue](https://github.com/verbb/smith/issues)
14 |
15 | ## Sponsor
16 | Smith is licensed under the MIT license, meaning it will always be free and open source – we love free stuff! If you'd like to show your support to the plugin regardless, [Sponsor](https://github.com/sponsors/verbb) development.
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "verbb/smith",
3 | "description": "Add copy, paste and clone functionality to Matrix blocks.",
4 | "type": "craft-plugin",
5 | "version": "3.1.0",
6 | "keywords": [
7 | "craft",
8 | "cms",
9 | "craftcms",
10 | "craft-plugin",
11 | "smith"
12 | ],
13 | "support": {
14 | "email": "support@verbb.io",
15 | "issues": "https://github.com/verbb/smith/issues?state=open",
16 | "source": "https://github.com/verbb/smith",
17 | "docs": "https://github.com/verbb/smith",
18 | "rss": "https://github.com/verbb/smith/commits/v2.atom"
19 | },
20 | "license": "MIT",
21 | "authors": [
22 | {
23 | "name": "Verbb",
24 | "homepage": "https://verbb.io"
25 | }
26 | ],
27 | "require": {
28 | "php": "^8.2",
29 | "craftcms/cms": "^5.1.0",
30 | "verbb/base": "^3.0.0"
31 | },
32 | "autoload": {
33 | "psr-4": {
34 | "verbb\\smith\\": "src/"
35 | }
36 | },
37 | "extra": {
38 | "name": "Smith",
39 | "handle": "smith",
40 | "changelogUrl": "https://raw.githubusercontent.com/verbb/smith/craft-5/CHANGELOG.md",
41 | "class": "verbb\\smith\\Smith"
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/config.codekit3:
--------------------------------------------------------------------------------
1 | {
2 | "AAInfo" : "This is a CodeKit 3 project config file. EDITING THIS FILE IS A POOR LIFE DECISION. Doing so may cause CodeKit to crash and\/or corrupt your project. Several critical values in this file are 64-bit integers, which JavaScript JSON parsers do not support because JavaScript cannot handle 64-bit integers. These values will be corrupted if the file is parsed with JavaScript. This file is not backwards-compatible with CodeKit 1 or 2. For details, see https:\/\/codekitapp.com\/",
3 | "buildSteps" : [
4 | {
5 | "name" : "Process All Remaining Files and Folders",
6 | "stepType" : 1,
7 | "uuidString" : "ECE3F09A-2816-43C6-9715-3F4A30BD28C5"
8 | }
9 | ],
10 | "creatorBuild" : "34518",
11 | "files" : {
12 | "\/.github" : {
13 | "ft" : 65536,
14 | "oA" : 1,
15 | "oAP" : "\/.github",
16 | "oF" : 0
17 | },
18 | "\/.gitignore" : {
19 | "cB" : 0,
20 | "ft" : 8192,
21 | "hM" : 0,
22 | "oA" : 2,
23 | "oAP" : "\/.gitignore",
24 | "oF" : 0
25 | },
26 | "\/CHANGELOG.md" : {
27 | "cB" : 0,
28 | "cS" : 0,
29 | "eF" : 1,
30 | "eL" : 1,
31 | "ema" : 1,
32 | "eSQ" : 1,
33 | "ft" : 4096,
34 | "hM" : 0,
35 | "oA" : 1,
36 | "oAP" : "\/CHANGELOG.html",
37 | "oF" : 0,
38 | "oFM" : 0,
39 | "oS" : 0,
40 | "pHT" : 0,
41 | "pME" : 1,
42 | "rFN" : 0,
43 | "uCM" : 0
44 | },
45 | "\/composer.json" : {
46 | "ft" : 524288,
47 | "oA" : 1,
48 | "oAP" : "\/composer-min.json",
49 | "oF" : 0,
50 | "oO" : 0,
51 | "oS" : 1
52 | },
53 | "\/docs\/.sidebar.json" : {
54 | "ft" : 524288,
55 | "oA" : 1,
56 | "oAP" : "\/docs\/.sidebar-min.json",
57 | "oF" : 0,
58 | "oO" : 0,
59 | "oS" : 1
60 | },
61 | "\/docs\/feature-tour\/overview.md" : {
62 | "cB" : 0,
63 | "cS" : 0,
64 | "eF" : 1,
65 | "eL" : 1,
66 | "ema" : 1,
67 | "eSQ" : 1,
68 | "ft" : 4096,
69 | "hM" : 0,
70 | "oA" : 1,
71 | "oAP" : "\/docs\/feature-tour\/overview.html",
72 | "oF" : 0,
73 | "oFM" : 0,
74 | "oS" : 0,
75 | "pHT" : 0,
76 | "pME" : 1,
77 | "rFN" : 0,
78 | "uCM" : 0
79 | },
80 | "\/docs\/get-started\/installation-setup.md" : {
81 | "cB" : 0,
82 | "cS" : 0,
83 | "eF" : 1,
84 | "eL" : 1,
85 | "ema" : 1,
86 | "eSQ" : 1,
87 | "ft" : 4096,
88 | "hM" : 0,
89 | "oA" : 1,
90 | "oAP" : "\/docs\/get-started\/installation-setup.html",
91 | "oF" : 0,
92 | "oFM" : 0,
93 | "oS" : 0,
94 | "pHT" : 0,
95 | "pME" : 1,
96 | "rFN" : 0,
97 | "uCM" : 0
98 | },
99 | "\/docs\/get-started\/requirements.md" : {
100 | "cB" : 0,
101 | "cS" : 0,
102 | "eF" : 1,
103 | "eL" : 1,
104 | "ema" : 1,
105 | "eSQ" : 1,
106 | "ft" : 4096,
107 | "hM" : 0,
108 | "oA" : 1,
109 | "oAP" : "\/docs\/get-started\/requirements.html",
110 | "oF" : 0,
111 | "oFM" : 0,
112 | "oS" : 0,
113 | "pHT" : 0,
114 | "pME" : 1,
115 | "rFN" : 0,
116 | "uCM" : 0
117 | },
118 | "\/docs\/README.md" : {
119 | "cB" : 0,
120 | "cS" : 0,
121 | "eF" : 1,
122 | "eL" : 1,
123 | "ema" : 1,
124 | "eSQ" : 1,
125 | "ft" : 4096,
126 | "hM" : 0,
127 | "oA" : 1,
128 | "oAP" : "\/docs\/README.html",
129 | "oF" : 0,
130 | "oFM" : 0,
131 | "oS" : 0,
132 | "pHT" : 0,
133 | "pME" : 1,
134 | "rFN" : 0,
135 | "uCM" : 0
136 | },
137 | "\/LICENSE.md" : {
138 | "cB" : 0,
139 | "cS" : 0,
140 | "eF" : 1,
141 | "eL" : 1,
142 | "ema" : 1,
143 | "eSQ" : 1,
144 | "ft" : 4096,
145 | "hM" : 0,
146 | "oA" : 1,
147 | "oAP" : "\/LICENSE.html",
148 | "oF" : 0,
149 | "oFM" : 0,
150 | "oS" : 0,
151 | "pHT" : 0,
152 | "pME" : 1,
153 | "rFN" : 0,
154 | "uCM" : 0
155 | },
156 | "\/README.md" : {
157 | "cB" : 0,
158 | "cS" : 0,
159 | "eF" : 1,
160 | "eL" : 1,
161 | "ema" : 1,
162 | "eSQ" : 1,
163 | "ft" : 4096,
164 | "hM" : 0,
165 | "oA" : 1,
166 | "oAP" : "\/README.html",
167 | "oF" : 0,
168 | "oFM" : 0,
169 | "oS" : 0,
170 | "pHT" : 0,
171 | "pME" : 1,
172 | "rFN" : 0,
173 | "uCM" : 0
174 | },
175 | "\/src\/assetbundles" : {
176 | "ft" : 65536,
177 | "oA" : 1,
178 | "oAP" : "\/src\/assetbundles",
179 | "oF" : 0
180 | },
181 | "\/src\/base" : {
182 | "ft" : 65536,
183 | "oA" : 1,
184 | "oAP" : "\/src\/base",
185 | "oF" : 0
186 | },
187 | "\/src\/controllers" : {
188 | "ft" : 65536,
189 | "oA" : 1,
190 | "oAP" : "\/src\/controllers",
191 | "oF" : 0
192 | },
193 | "\/src\/icon.svg" : {
194 | "ft" : 2097152,
195 | "miP" : 0,
196 | "oA" : 2,
197 | "oAP" : "\/src\/icon.svg",
198 | "oF" : 0,
199 | "opt" : 0,
200 | "plM" : 3758088159,
201 | "prP" : 0
202 | },
203 | "\/src\/resources\/dist" : {
204 | "ft" : 65536,
205 | "oA" : 1,
206 | "oAP" : "\/src\/resources\/dist",
207 | "oF" : 0
208 | },
209 | "\/src\/resources\/src\/js\/smith.js" : {
210 | "bF" : 0,
211 | "ft" : 64,
212 | "ma" : 1,
213 | "mi" : 1,
214 | "oA" : 0,
215 | "oAP" : "\/src\/resources\/dist\/js\/smith.js",
216 | "oF" : 0,
217 | "sC" : 0,
218 | "tS" : 0
219 | },
220 | "\/src\/resources\/src\/scss\/smith.scss" : {
221 | "aP" : 1,
222 | "bl" : 0,
223 | "co" : 0,
224 | "dP" : 10,
225 | "ec" : 1,
226 | "ft" : 4,
227 | "ma" : 0,
228 | "oA" : 0,
229 | "oAP" : "\/src\/resources\/dist\/css\/smith.css",
230 | "oF" : 0,
231 | "oS" : 3,
232 | "pg" : 0,
233 | "sct" : 0
234 | },
235 | "\/src\/services" : {
236 | "ft" : 65536,
237 | "oA" : 1,
238 | "oAP" : "\/src\/services",
239 | "oF" : 0
240 | },
241 | "\/src\/Smith.php" : {
242 | "cB" : 0,
243 | "ft" : 8192,
244 | "hM" : 0,
245 | "oA" : 2,
246 | "oAP" : "\/src\/Smith.php",
247 | "oF" : 0
248 | },
249 | "\/src\/translations\/de\/smith.php" : {
250 | "cB" : 0,
251 | "ft" : 8192,
252 | "hM" : 0,
253 | "oA" : 2,
254 | "oAP" : "\/src\/translations\/de\/smith.php",
255 | "oF" : 0
256 | },
257 | "\/src\/translations\/en\/smith.php" : {
258 | "cB" : 0,
259 | "ft" : 8192,
260 | "hM" : 0,
261 | "oA" : 2,
262 | "oAP" : "\/src\/translations\/en\/smith.php",
263 | "oF" : 0
264 | }
265 | },
266 | "hooks" : [
267 |
268 | ],
269 | "manualImportLinks" : {
270 |
271 | },
272 | "projectAttributes" : {
273 | "creationDate" : 528723773,
274 | "displayValue" : "smith",
275 | "displayValueWasSetByUser" : 0,
276 | "iconImageName" : "brackets-koamaru",
277 | "iconImageWasSetByUser" : 1
278 | },
279 | "projectSettings" : {
280 | "abortBuildOnError" : 1,
281 | "allowInjectionReloads" : 1,
282 | "alwaysUseExternalServer" : 0,
283 | "animateCSSInjections" : 0,
284 | "autoBuildNewItems" : 1,
285 | "autoprefixerEnableIEGrid" : 0,
286 | "babel7PresetType" : 1,
287 | "babelAllowRCFiles" : 0,
288 | "babelAuxiliaryCommentAfter" : "",
289 | "babelAuxiliaryCommentBefore" : "",
290 | "babelConfigType" : 0,
291 | "babelCustomPluginsList" : "",
292 | "babelCustomPresetsList" : "",
293 | "babelExcludeString" : "\/\\\/node_modules\\\/\/, \/\\\/core-js\\\/\/, \/\\\/bower_components\\\/\/",
294 | "babelInsertModuleIDs" : 0,
295 | "babelModuleID" : "",
296 | "babelNoComments" : 0,
297 | "babelPlugins" : {
298 | "arrow-functions" : {
299 | "active" : 0
300 | },
301 | "async-generator-functions" : {
302 | "active" : 0
303 | },
304 | "async-to-generator" : {
305 | "active" : 0
306 | },
307 | "block-scoped-functions" : {
308 | "active" : 0
309 | },
310 | "block-scoping" : {
311 | "active" : 0
312 | },
313 | "class-properties" : {
314 | "active" : 0
315 | },
316 | "classes" : {
317 | "active" : 0
318 | },
319 | "computed-properties" : {
320 | "active" : 0
321 | },
322 | "decorators" : {
323 | "active" : 0
324 | },
325 | "destructuring" : {
326 | "active" : 0
327 | },
328 | "do-expressions" : {
329 | "active" : 0
330 | },
331 | "dotall-regex" : {
332 | "active" : 0
333 | },
334 | "duplicate-keys" : {
335 | "active" : 0
336 | },
337 | "exponentiation-operator" : {
338 | "active" : 0
339 | },
340 | "export-default-from" : {
341 | "active" : 0
342 | },
343 | "export-namespace-from" : {
344 | "active" : 0
345 | },
346 | "external-helpers" : {
347 | "active" : 0
348 | },
349 | "flow-strip-types" : {
350 | "active" : 0
351 | },
352 | "for-of" : {
353 | "active" : 0
354 | },
355 | "function-bind" : {
356 | "active" : 0
357 | },
358 | "function-name" : {
359 | "active" : 0
360 | },
361 | "function-sent" : {
362 | "active" : 0
363 | },
364 | "inline-consecutive-adds" : {
365 | "active" : 0
366 | },
367 | "inline-environment-variables" : {
368 | "active" : 0
369 | },
370 | "instanceof" : {
371 | "active" : 0
372 | },
373 | "jscript" : {
374 | "active" : 0
375 | },
376 | "literals" : {
377 | "active" : 0
378 | },
379 | "logical-assignment-operators" : {
380 | "active" : 0
381 | },
382 | "member-expression-literals" : {
383 | "active" : 0
384 | },
385 | "merge-sibling-variables" : {
386 | "active" : 0
387 | },
388 | "minify-booleans" : {
389 | "active" : 0
390 | },
391 | "minify-builtins" : {
392 | "active" : 0
393 | },
394 | "minify-constant-folding" : {
395 | "active" : 0
396 | },
397 | "minify-dead-code-elimination" : {
398 | "active" : 0
399 | },
400 | "minify-flip-comparisons" : {
401 | "active" : 0
402 | },
403 | "minify-guarded-expressions" : {
404 | "active" : 0
405 | },
406 | "minify-infinity" : {
407 | "active" : 0
408 | },
409 | "minify-mangle-names" : {
410 | "active" : 0
411 | },
412 | "minify-numeric-literals" : {
413 | "active" : 0
414 | },
415 | "minify-simplify" : {
416 | "active" : 0
417 | },
418 | "minify-type-constructors" : {
419 | "active" : 0
420 | },
421 | "modules-amd" : {
422 | "active" : 0
423 | },
424 | "modules-commonjs" : {
425 | "active" : 0
426 | },
427 | "modules-systemjs" : {
428 | "active" : 0
429 | },
430 | "modules-umd" : {
431 | "active" : 0
432 | },
433 | "named-capturing-groups-regex" : {
434 | "active" : 0
435 | },
436 | "new-target" : {
437 | "active" : 0
438 | },
439 | "node-env-inline" : {
440 | "active" : 0
441 | },
442 | "nullish-coalescing-operator" : {
443 | "active" : 0
444 | },
445 | "numeric-separator" : {
446 | "active" : 0
447 | },
448 | "object-assign" : {
449 | "active" : 0
450 | },
451 | "object-rest-spread" : {
452 | "active" : 0
453 | },
454 | "object-set-prototype-of-to-assign" : {
455 | "active" : 0
456 | },
457 | "object-super" : {
458 | "active" : 0
459 | },
460 | "optional-catch-binding" : {
461 | "active" : 0
462 | },
463 | "optional-chaining" : {
464 | "active" : 0
465 | },
466 | "parameters" : {
467 | "active" : 0
468 | },
469 | "partial-application" : {
470 | "active" : 0
471 | },
472 | "pipeline-operator" : {
473 | "active" : 0
474 | },
475 | "private-methods" : {
476 | "active" : 0
477 | },
478 | "property-literals" : {
479 | "active" : 0
480 | },
481 | "property-mutators" : {
482 | "active" : 0
483 | },
484 | "proto-to-assign" : {
485 | "active" : 0
486 | },
487 | "react-constant-elements" : {
488 | "active" : 0
489 | },
490 | "react-display-name" : {
491 | "active" : 0
492 | },
493 | "react-inline-elements" : {
494 | "active" : 0
495 | },
496 | "react-jsx" : {
497 | "active" : 0
498 | },
499 | "react-jsx-compat" : {
500 | "active" : 0
501 | },
502 | "react-jsx-self" : {
503 | "active" : 0
504 | },
505 | "react-jsx-source" : {
506 | "active" : 0
507 | },
508 | "regenerator" : {
509 | "active" : 0
510 | },
511 | "regexp-constructors" : {
512 | "active" : 0
513 | },
514 | "remove-console" : {
515 | "active" : 0
516 | },
517 | "remove-debugger" : {
518 | "active" : 0
519 | },
520 | "remove-undefined" : {
521 | "active" : 0
522 | },
523 | "reserved-words" : {
524 | "active" : 0
525 | },
526 | "runtime" : {
527 | "active" : 0
528 | },
529 | "shorthand-properties" : {
530 | "active" : 0
531 | },
532 | "simplify-comparison-operators" : {
533 | "active" : 0
534 | },
535 | "spread" : {
536 | "active" : 0
537 | },
538 | "sticky-regex" : {
539 | "active" : 0
540 | },
541 | "strict-mode" : {
542 | "active" : 0
543 | },
544 | "template-literals" : {
545 | "active" : 0
546 | },
547 | "throw-expressions" : {
548 | "active" : 0
549 | },
550 | "typeof-symbol" : {
551 | "active" : 0
552 | },
553 | "undefined-to-void" : {
554 | "active" : 0
555 | },
556 | "unicode-property-regex" : {
557 | "active" : 0
558 | },
559 | "unicode-regex" : {
560 | "active" : 0
561 | }
562 | },
563 | "babelRetainLines" : 0,
564 | "babelUseBuiltInsType" : 0,
565 | "bowerAbbreviatedPath" : "bower_components",
566 | "bowerForceLatestOnConflict" : 1,
567 | "bowerTargetDependencyListType" : 1,
568 | "bowerUseExactVersion" : 0,
569 | "browserRefreshDelay" : 0,
570 | "browserslistString" : ">0.2%, last 2 versions, Firefox ESR, not dead",
571 | "buildEnvironment" : 0,
572 | "buildFolderActive" : 0,
573 | "buildFolderName" : "build",
574 | "cleanBuild" : 1,
575 | "cssoForceMediaMerge" : 0,
576 | "cssoRestructure" : 1,
577 | "environmentVariableEntries" : [
578 | "NODE_ENV:::production"
579 | ],
580 | "esLintConfigFileHandlingType" : 0,
581 | "esLintECMAVersion" : 7,
582 | "esLintEnvironmentsMask" : 1,
583 | "esLintRules" : {
584 | "accessor-pairs" : {
585 | "active" : 0,
586 | "optionString" : "{'setWithoutGet': true, 'getWithoutSet': false}"
587 | },
588 | "array-bracket-newline" : {
589 | "active" : 0,
590 | "optionString" : "{'multiline': true, 'minItems': null}"
591 | },
592 | "array-bracket-spacing" : {
593 | "active" : 0,
594 | "optionString" : "'never', {'singleValue': false, 'objectsInArrays': false, 'arraysInArrays': false}"
595 | },
596 | "array-callback-return" : {
597 | "active" : 0,
598 | "optionString" : ""
599 | },
600 | "array-element-newline" : {
601 | "active" : 0,
602 | "optionString" : "'always'"
603 | },
604 | "arrow-body-style" : {
605 | "active" : 0,
606 | "optionString" : "'as-needed', {'requireReturnForObjectLiteral': false}"
607 | },
608 | "arrow-parens" : {
609 | "active" : 0,
610 | "optionString" : "'always'"
611 | },
612 | "arrow-spacing" : {
613 | "active" : 0,
614 | "optionString" : "{'before': true, 'after': true}"
615 | },
616 | "block-scoped-var" : {
617 | "active" : 0
618 | },
619 | "block-spacing" : {
620 | "active" : 0,
621 | "optionString" : "'always'"
622 | },
623 | "brace-style" : {
624 | "active" : 0,
625 | "optionString" : "'1tbs', {'allowSingleLine': true}"
626 | },
627 | "camelcase" : {
628 | "active" : 0,
629 | "optionString" : "{'properties': 'always'}"
630 | },
631 | "capitalized-comments" : {
632 | "active" : 0,
633 | "optionString" : "'always', {'ignoreInlineComments': false, 'ignoreConsecutiveComments': false}"
634 | },
635 | "class-methods-use-this" : {
636 | "active" : 0,
637 | "optionString" : "{'exceptMethods': []}"
638 | },
639 | "comma-dangle" : {
640 | "active" : 1,
641 | "optionString" : "'never'"
642 | },
643 | "comma-spacing" : {
644 | "active" : 0,
645 | "optionString" : "{'before': false, 'after': true}"
646 | },
647 | "comma-style" : {
648 | "active" : 0,
649 | "optionString" : "'last'"
650 | },
651 | "complexity" : {
652 | "active" : 0,
653 | "optionString" : "20"
654 | },
655 | "computed-property-spacing" : {
656 | "active" : 0,
657 | "optionString" : "'never'"
658 | },
659 | "consistent-return" : {
660 | "active" : 0,
661 | "optionString" : "{'treatUndefinedAsUnspecified': false}"
662 | },
663 | "consistent-this" : {
664 | "active" : 0,
665 | "optionString" : "'that'"
666 | },
667 | "constructor-super" : {
668 | "active" : 1
669 | },
670 | "curly" : {
671 | "active" : 0,
672 | "optionString" : "'all'"
673 | },
674 | "default-case" : {
675 | "active" : 0
676 | },
677 | "default-case-last" : {
678 | "active" : 0
679 | },
680 | "default-param-last" : {
681 | "active" : 0
682 | },
683 | "dot-location" : {
684 | "active" : 0,
685 | "optionString" : "'object'"
686 | },
687 | "dot-notation" : {
688 | "active" : 0,
689 | "optionString" : "{'allowKeywords': false}"
690 | },
691 | "eol-last" : {
692 | "active" : 0,
693 | "optionString" : "'always'"
694 | },
695 | "eqeqeq" : {
696 | "active" : 0,
697 | "optionString" : "'always', {'null': 'always'}"
698 | },
699 | "for-direction" : {
700 | "active" : 0
701 | },
702 | "func-call-spacing" : {
703 | "active" : 0,
704 | "optionString" : "'never'"
705 | },
706 | "func-name-matching" : {
707 | "active" : 0,
708 | "optionString" : "'always', {'includeCommonJSModuleExports': false}"
709 | },
710 | "func-names" : {
711 | "active" : 0,
712 | "optionString" : "'always'"
713 | },
714 | "func-style" : {
715 | "active" : 0,
716 | "optionString" : "'expression'"
717 | },
718 | "function-call-argument-newline" : {
719 | "active" : 0,
720 | "optionString" : "'always'"
721 | },
722 | "function-paren-newline" : {
723 | "active" : 0,
724 | "optionString" : "'multiline'"
725 | },
726 | "generator-star-spacing" : {
727 | "active" : 0,
728 | "optionString" : "{'before': true, 'after': false}"
729 | },
730 | "getter-return" : {
731 | "active" : 0,
732 | "optionString" : "{'allowImplicit': false}"
733 | },
734 | "grouped-accessor-pairs" : {
735 | "active" : 0,
736 | "optionString" : "'anyOrder'"
737 | },
738 | "guard-for-in" : {
739 | "active" : 0
740 | },
741 | "id-denylist" : {
742 | "active" : 0,
743 | "optionString" : "'data', 'err', 'e', 'cb', 'callback'"
744 | },
745 | "id-length" : {
746 | "active" : 0,
747 | "optionString" : "{'min': 2, 'max': 1000, 'properties': 'always', 'exceptions': ['x', 'i', 'y']}"
748 | },
749 | "id-match" : {
750 | "active" : 0,
751 | "optionString" : "'^[a-z]+([A-Z][a-z]+)*$', {'properties': false, 'onlyDeclarations': true}"
752 | },
753 | "implicit-arrow-linebreak" : {
754 | "active" : 0,
755 | "optionString" : "'beside'"
756 | },
757 | "indent" : {
758 | "active" : 0,
759 | "optionString" : "4, {'SwitchCase': 0, 'VariableDeclarator': 1, 'outerIIFEBody': 1, }"
760 | },
761 | "init-declarations" : {
762 | "active" : 0,
763 | "optionString" : "'always', {'ignoreForLoopInit': true}"
764 | },
765 | "jsx-quotes" : {
766 | "active" : 0,
767 | "optionString" : "'prefer-double'"
768 | },
769 | "key-spacing" : {
770 | "active" : 0,
771 | "optionString" : "{'singleLine': {'beforeColon': false, 'afterColon': true, 'mode':'strict'}, 'multiLine': {'beforeColon': false, 'afterColon': true, 'align': 'value', 'mode':'minimum'}}"
772 | },
773 | "keyword-spacing" : {
774 | "active" : 0,
775 | "optionString" : "{'before': true, 'after': true, 'overrides': {}}"
776 | },
777 | "line-comment-position" : {
778 | "active" : 0,
779 | "optionString" : "{'position': 'above'}"
780 | },
781 | "linebreak-style" : {
782 | "active" : 0,
783 | "optionString" : "'unix'"
784 | },
785 | "lines-around-comment" : {
786 | "active" : 0,
787 | "optionString" : "{'beforeBlockComment': true}"
788 | },
789 | "lines-between-class-members" : {
790 | "active" : 0,
791 | "optionString" : "'always', {exceptAfterSingleLine: false}"
792 | },
793 | "logical-assignment-operators" : {
794 | "active" : 0,
795 | "optionString" : "'always', {'enforceForIfStatements': false}"
796 | },
797 | "max-classes-per-file" : {
798 | "active" : 0,
799 | "optionString" : "1"
800 | },
801 | "max-depth" : {
802 | "active" : 0,
803 | "optionString" : "{'max': 4}"
804 | },
805 | "max-len" : {
806 | "active" : 0,
807 | "optionString" : "{'code': 80, 'comments': 80, 'tabWidth': 4, 'ignoreUrls': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true, 'ignoreRegExpLiterals': true}"
808 | },
809 | "max-lines" : {
810 | "active" : 0,
811 | "optionString" : "{'max': 300, 'skipBlankLines': true, 'skipComments': true}"
812 | },
813 | "max-lines-per-function" : {
814 | "active" : 0,
815 | "optionString" : "{'max': 50, 'skipBlankLines': true, 'skipComments': true, 'IIFEs': false}"
816 | },
817 | "max-nested-callbacks" : {
818 | "active" : 0,
819 | "optionString" : "{'max': 10}"
820 | },
821 | "max-params" : {
822 | "active" : 0,
823 | "optionString" : "{'max': 4}"
824 | },
825 | "max-statements" : {
826 | "active" : 0,
827 | "optionString" : "{'max': 10}, {'ignoreTopLevelFunctions': true}"
828 | },
829 | "max-statements-per-line" : {
830 | "active" : 0,
831 | "optionString" : "{'max': 1}"
832 | },
833 | "multiline-comment-style" : {
834 | "active" : 0,
835 | "optionString" : "'starred-block'"
836 | },
837 | "multiline-ternary" : {
838 | "active" : 0,
839 | "optionString" : "'always'"
840 | },
841 | "new-cap" : {
842 | "active" : 0,
843 | "optionString" : "{'newIsCap': true, 'capIsNew': true, 'newIsCapExceptions': [], 'capIsNewExceptions': ['Array', 'Boolean', 'Date', 'Error', 'Function', 'Number', 'Object', 'RegExp', 'String', 'Symbol'], 'properties': true}"
844 | },
845 | "new-parens" : {
846 | "active" : 0,
847 | "optionString" : ""
848 | },
849 | "newline-per-chained-call" : {
850 | "active" : 0,
851 | "optionString" : "{'ignoreChainWithDepth': 2}"
852 | },
853 | "no-alert" : {
854 | "active" : 0
855 | },
856 | "no-array-constructor" : {
857 | "active" : 0
858 | },
859 | "no-async-promise-executor" : {
860 | "active" : 0
861 | },
862 | "no-await-in-loop" : {
863 | "active" : 0
864 | },
865 | "no-bitwise" : {
866 | "active" : 0,
867 | "optionString" : "{'allow': ['~'], 'int32Hint': true}"
868 | },
869 | "no-caller" : {
870 | "active" : 0
871 | },
872 | "no-case-declarations" : {
873 | "active" : 1
874 | },
875 | "no-class-assign" : {
876 | "active" : 1
877 | },
878 | "no-compare-neg-zero" : {
879 | "active" : 0
880 | },
881 | "no-cond-assign" : {
882 | "active" : 1,
883 | "optionString" : "'except-parens'"
884 | },
885 | "no-confusing-arrow" : {
886 | "active" : 0,
887 | "optionString" : "{'allowParens': false}"
888 | },
889 | "no-console" : {
890 | "active" : 1,
891 | "optionString" : "{'allow': ['warn', 'error']}"
892 | },
893 | "no-const-assign" : {
894 | "active" : 1
895 | },
896 | "no-constant-binary-expression" : {
897 | "active" : 0
898 | },
899 | "no-constant-condition" : {
900 | "active" : 1,
901 | "optionString" : "{'checkLoops': true}"
902 | },
903 | "no-constructor-return" : {
904 | "active" : 0
905 | },
906 | "no-continue" : {
907 | "active" : 0
908 | },
909 | "no-control-regex" : {
910 | "active" : 1
911 | },
912 | "no-debugger" : {
913 | "active" : 1
914 | },
915 | "no-delete-var" : {
916 | "active" : 1
917 | },
918 | "no-div-regex" : {
919 | "active" : 0
920 | },
921 | "no-dupe-args" : {
922 | "active" : 1
923 | },
924 | "no-dupe-class-members" : {
925 | "active" : 1
926 | },
927 | "no-dupe-else-if" : {
928 | "active" : 1
929 | },
930 | "no-dupe-keys" : {
931 | "active" : 1
932 | },
933 | "no-duplicate-case" : {
934 | "active" : 1
935 | },
936 | "no-duplicate-imports" : {
937 | "active" : 0,
938 | "optionString" : "{'includeExports': false}"
939 | },
940 | "no-else-return" : {
941 | "active" : 0
942 | },
943 | "no-empty" : {
944 | "active" : 1,
945 | "optionString" : "{'allowEmptyCatch': false}"
946 | },
947 | "no-empty-character-class" : {
948 | "active" : 1
949 | },
950 | "no-empty-function" : {
951 | "active" : 0,
952 | "optionString" : "{'allow': []}"
953 | },
954 | "no-empty-pattern" : {
955 | "active" : 1
956 | },
957 | "no-empty-static-block" : {
958 | "active" : 0
959 | },
960 | "no-eq-null" : {
961 | "active" : 0
962 | },
963 | "no-eval" : {
964 | "active" : 0,
965 | "optionString" : "{'allowIndirect': false}"
966 | },
967 | "no-ex-assign" : {
968 | "active" : 1
969 | },
970 | "no-extend-native" : {
971 | "active" : 0,
972 | "optionString" : "{'exceptions': []}"
973 | },
974 | "no-extra-bind" : {
975 | "active" : 0
976 | },
977 | "no-extra-boolean-cast" : {
978 | "active" : 1
979 | },
980 | "no-extra-label" : {
981 | "active" : 0
982 | },
983 | "no-extra-parens" : {
984 | "active" : 0,
985 | "optionString" : "'all', {'conditionalAssign': false, 'returnAssign': false, 'nestedBinaryExpressions': false, 'ignoreJSX': 'none', 'enforceForArrowConditionals': false}"
986 | },
987 | "no-extra-semi" : {
988 | "active" : 1
989 | },
990 | "no-fallthrough" : {
991 | "active" : 1,
992 | "optionString" : "{'allowEmptyCase': false}"
993 | },
994 | "no-floating-decimal" : {
995 | "active" : 0
996 | },
997 | "no-func-assign" : {
998 | "active" : 1
999 | },
1000 | "no-global-assign" : {
1001 | "active" : 1,
1002 | "optionString" : "{'exceptions': []}"
1003 | },
1004 | "no-implicit-coercion" : {
1005 | "active" : 0,
1006 | "optionString" : "{'boolean': true, 'number': true, 'string': true, 'allow': []}"
1007 | },
1008 | "no-implicit-globals" : {
1009 | "active" : 0
1010 | },
1011 | "no-implied-eval" : {
1012 | "active" : 0
1013 | },
1014 | "no-import-assign" : {
1015 | "active" : 1
1016 | },
1017 | "no-inline-comments" : {
1018 | "active" : 0
1019 | },
1020 | "no-inner-declarations" : {
1021 | "active" : 1,
1022 | "optionString" : "'functions'"
1023 | },
1024 | "no-invalid-regexp" : {
1025 | "active" : 1,
1026 | "optionString" : "{'allowConstructorFlags': ['u', 'y']}"
1027 | },
1028 | "no-invalid-this" : {
1029 | "active" : 0,
1030 | "optionString" : ""
1031 | },
1032 | "no-irregular-whitespace" : {
1033 | "active" : 1,
1034 | "optionString" : "{'skipStrings': true, 'skipComments': false, 'skipRegExps': true, 'skipTemplates': true}"
1035 | },
1036 | "no-iterator" : {
1037 | "active" : 0
1038 | },
1039 | "no-label-var" : {
1040 | "active" : 0
1041 | },
1042 | "no-labels" : {
1043 | "active" : 0,
1044 | "optionString" : "{'allowLoop': false, 'allowSwitch': false}"
1045 | },
1046 | "no-lone-blocks" : {
1047 | "active" : 0
1048 | },
1049 | "no-lonely-if" : {
1050 | "active" : 0
1051 | },
1052 | "no-loop-func" : {
1053 | "active" : 0
1054 | },
1055 | "no-loss-of-precision" : {
1056 | "active" : 0
1057 | },
1058 | "no-magic-numbers" : {
1059 | "active" : 0,
1060 | "optionString" : "{'ignore': [], 'ignoreArrayIndexes': true, 'enforceConst': false, 'detectObjects': false}"
1061 | },
1062 | "no-misleading-character-class" : {
1063 | "active" : 0
1064 | },
1065 | "no-mixed-operators" : {
1066 | "active" : 0,
1067 | "optionString" : "{'groups': [['+', '-', '*', '\/', '%', '**'], ['&', '|', '^', '~', '<<', '>>', '>>>'], ['==', '!=', '===', '!==', '>', '>=', '<', '<='], ['&&', '||'], ['in', 'instanceof']], 'allowSamePrecedence': true}"
1068 | },
1069 | "no-mixed-spaces-and-tabs" : {
1070 | "active" : 0,
1071 | "optionString" : ""
1072 | },
1073 | "no-multi-assign" : {
1074 | "active" : 0,
1075 | "optionString" : "{'ignoreNonDeclaration': false}"
1076 | },
1077 | "no-multi-spaces" : {
1078 | "active" : 0,
1079 | "optionString" : "{'exceptions': {'Property': true, 'BinaryExpression': false, 'VariableDeclarator': false, 'ImportDeclaration': false}}"
1080 | },
1081 | "no-multi-str" : {
1082 | "active" : 0
1083 | },
1084 | "no-multiple-empty-lines" : {
1085 | "active" : 0,
1086 | "optionString" : "{'max': 2, 'maxBOF': 2, 'maxEOF': 2}"
1087 | },
1088 | "no-negated-condition" : {
1089 | "active" : 0
1090 | },
1091 | "no-nested-ternary" : {
1092 | "active" : 0
1093 | },
1094 | "no-new" : {
1095 | "active" : 0
1096 | },
1097 | "no-new-func" : {
1098 | "active" : 0
1099 | },
1100 | "no-new-native-nonconstructor" : {
1101 | "active" : 0
1102 | },
1103 | "no-new-object" : {
1104 | "active" : 0
1105 | },
1106 | "no-new-symbol" : {
1107 | "active" : 1
1108 | },
1109 | "no-new-wrappers" : {
1110 | "active" : 0
1111 | },
1112 | "no-nonoctal-decimal-escape" : {
1113 | "active" : 0
1114 | },
1115 | "no-obj-calls" : {
1116 | "active" : 1
1117 | },
1118 | "no-octal" : {
1119 | "active" : 1
1120 | },
1121 | "no-octal-escape" : {
1122 | "active" : 0
1123 | },
1124 | "no-param-reassign" : {
1125 | "active" : 0,
1126 | "optionString" : "{'props': false}"
1127 | },
1128 | "no-plusplus" : {
1129 | "active" : 0,
1130 | "optionString" : "{'allowForLoopAfterthoughts': false}"
1131 | },
1132 | "no-promise-executor-return" : {
1133 | "active" : 0
1134 | },
1135 | "no-proto" : {
1136 | "active" : 0
1137 | },
1138 | "no-prototype-builtins" : {
1139 | "active" : 0
1140 | },
1141 | "no-redeclare" : {
1142 | "active" : 1,
1143 | "optionString" : "{'builtinGlobals': false}"
1144 | },
1145 | "no-regex-spaces" : {
1146 | "active" : 1
1147 | },
1148 | "no-restricted-exports" : {
1149 | "active" : 0,
1150 | "optionString" : "{'restrictedNamedExports': []}"
1151 | },
1152 | "no-restricted-globals" : {
1153 | "active" : 0,
1154 | "optionString" : "'event', 'fdescribe'"
1155 | },
1156 | "no-restricted-imports" : {
1157 | "active" : 0,
1158 | "optionString" : ""
1159 | },
1160 | "no-restricted-properties" : {
1161 | "active" : 0,
1162 | "optionString" : "[{'object': 'disallowedObjectName', 'property': 'disallowedPropertyName'}, {'object': 'disallowedObjectName', 'property': 'anotherDisallowedPropertyName', 'message': 'Please use allowedObjectName.allowedPropertyName.'}]"
1163 | },
1164 | "no-restricted-syntax" : {
1165 | "active" : 0,
1166 | "optionString" : "'FunctionExpression', 'WithStatement'"
1167 | },
1168 | "no-return-assign" : {
1169 | "active" : 0,
1170 | "optionString" : "'except-parens'"
1171 | },
1172 | "no-script-url" : {
1173 | "active" : 0
1174 | },
1175 | "no-self-assign" : {
1176 | "active" : 1,
1177 | "optionString" : "{'props': false}"
1178 | },
1179 | "no-self-compare" : {
1180 | "active" : 0
1181 | },
1182 | "no-sequences" : {
1183 | "active" : 0,
1184 | "optionString" : "{'allowInParentheses': true}"
1185 | },
1186 | "no-setter-return" : {
1187 | "active" : 1
1188 | },
1189 | "no-shadow" : {
1190 | "active" : 0,
1191 | "optionString" : "{'builtinGlobals': false, 'hoist': 'functions', 'allow': []}"
1192 | },
1193 | "no-shadow-restricted-names" : {
1194 | "active" : 0
1195 | },
1196 | "no-sparse-arrays" : {
1197 | "active" : 1
1198 | },
1199 | "no-tabs" : {
1200 | "active" : 0,
1201 | "optionString" : ""
1202 | },
1203 | "no-template-curly-in-string" : {
1204 | "active" : 0
1205 | },
1206 | "no-ternary" : {
1207 | "active" : 0
1208 | },
1209 | "no-this-before-super" : {
1210 | "active" : 1
1211 | },
1212 | "no-throw-literal" : {
1213 | "active" : 0
1214 | },
1215 | "no-trailing-spaces" : {
1216 | "active" : 0,
1217 | "optionString" : "{'skipBlankLines': false, 'ignoreComments': false}"
1218 | },
1219 | "no-undef" : {
1220 | "active" : 1,
1221 | "optionString" : "{'typeof': false}"
1222 | },
1223 | "no-undef-init" : {
1224 | "active" : 0
1225 | },
1226 | "no-undefined" : {
1227 | "active" : 0
1228 | },
1229 | "no-underscore-dangle" : {
1230 | "active" : 0,
1231 | "optionString" : "{'allow': [], 'allowAfterThis': false, 'allowAfterSuper': false, 'enforceInMethodNames': false}"
1232 | },
1233 | "no-unexpected-multiline" : {
1234 | "active" : 1
1235 | },
1236 | "no-unmodified-loop-condition" : {
1237 | "active" : 0
1238 | },
1239 | "no-unneeded-ternary" : {
1240 | "active" : 0,
1241 | "optionString" : "{'defaultAssignment': true}"
1242 | },
1243 | "no-unreachable" : {
1244 | "active" : 1
1245 | },
1246 | "no-unreachable-loop" : {
1247 | "active" : 0,
1248 | "optionString" : "{'ignore': []}"
1249 | },
1250 | "no-unsafe-finally" : {
1251 | "active" : 1
1252 | },
1253 | "no-unsafe-negation" : {
1254 | "active" : 1,
1255 | "optionString" : ""
1256 | },
1257 | "no-unsafe-optional-chaining" : {
1258 | "active" : 0,
1259 | "optionString" : "{'disallowArithmeticOperators': false}"
1260 | },
1261 | "no-unused-expressions" : {
1262 | "active" : 0,
1263 | "optionString" : "{'allowShortCircuit': false, 'allowTernary': false, 'allowTaggedTemplates': false}"
1264 | },
1265 | "no-unused-labels" : {
1266 | "active" : 1
1267 | },
1268 | "no-unused-private-class-members" : {
1269 | "active" : 0
1270 | },
1271 | "no-unused-vars" : {
1272 | "active" : 1,
1273 | "optionString" : "{'vars': 'all', 'args': 'after-used', 'caughtErrors': 'none', 'ignoreRestSiblings': false}"
1274 | },
1275 | "no-use-before-define" : {
1276 | "active" : 0,
1277 | "optionString" : "{'functions': true, 'classes': true, 'variables': true}"
1278 | },
1279 | "no-useless-backreference" : {
1280 | "active" : 0
1281 | },
1282 | "no-useless-call" : {
1283 | "active" : 0
1284 | },
1285 | "no-useless-catch" : {
1286 | "active" : 0
1287 | },
1288 | "no-useless-computed-key" : {
1289 | "active" : 0,
1290 | "optionString" : ""
1291 | },
1292 | "no-useless-concat" : {
1293 | "active" : 0
1294 | },
1295 | "no-useless-constructor" : {
1296 | "active" : 0
1297 | },
1298 | "no-useless-escape" : {
1299 | "active" : 0
1300 | },
1301 | "no-useless-rename" : {
1302 | "active" : 0,
1303 | "optionString" : "{'ignoreDestructuring': false, 'ignoreImport': false, 'ignoreExport': false}"
1304 | },
1305 | "no-useless-return" : {
1306 | "active" : 0
1307 | },
1308 | "no-var" : {
1309 | "active" : 0
1310 | },
1311 | "no-void" : {
1312 | "active" : 0,
1313 | "optionString" : ""
1314 | },
1315 | "no-warning-comments" : {
1316 | "active" : 0,
1317 | "optionString" : "{'terms': ['todo', 'fixme', 'xxx'], 'location': 'start'}"
1318 | },
1319 | "no-whitespace-before-property" : {
1320 | "active" : 0
1321 | },
1322 | "no-with" : {
1323 | "active" : 0
1324 | },
1325 | "nonblock-statement-body-position" : {
1326 | "active" : 0,
1327 | "optionString" : "'beside'"
1328 | },
1329 | "object-curly-newline" : {
1330 | "active" : 0,
1331 | "optionString" : "{'ObjectExpression': {'multiline': true}, 'ObjectPattern': {'multiline': true}}"
1332 | },
1333 | "object-curly-spacing" : {
1334 | "active" : 0,
1335 | "optionString" : "'never'"
1336 | },
1337 | "object-property-newline" : {
1338 | "active" : 0,
1339 | "optionString" : "{'allowMultiplePropertiesPerLine': true}"
1340 | },
1341 | "object-shorthand" : {
1342 | "active" : 0,
1343 | "optionString" : "'always', {'avoidQuotes': false, 'ignoreConstructors': false}"
1344 | },
1345 | "one-var" : {
1346 | "active" : 0,
1347 | "optionString" : "'always'"
1348 | },
1349 | "one-var-declaration-per-line" : {
1350 | "active" : 0,
1351 | "optionString" : "'always'"
1352 | },
1353 | "operator-assignment" : {
1354 | "active" : 0,
1355 | "optionString" : "'always'"
1356 | },
1357 | "operator-linebreak" : {
1358 | "active" : 0,
1359 | "optionString" : "'after', {'overrides': {'?': 'after', '+=': 'none'}}"
1360 | },
1361 | "padded-blocks" : {
1362 | "active" : 0,
1363 | "optionString" : "{'blocks': 'always', 'switches': 'always', 'classes': 'always'}"
1364 | },
1365 | "padding-line-between-statements" : {
1366 | "active" : 0,
1367 | "optionString" : "{blankLine: 'always', prev:'*', next:'return'}"
1368 | },
1369 | "prefer-arrow-callback" : {
1370 | "active" : 0
1371 | },
1372 | "prefer-const" : {
1373 | "active" : 0,
1374 | "optionString" : "{'destructuring': 'any', 'ignoreReadBeforeAssign': false}"
1375 | },
1376 | "prefer-destructuring" : {
1377 | "active" : 0,
1378 | "optionString" : "{'array': true, 'object': true}, {'enforceForRenamedProperties': false}"
1379 | },
1380 | "prefer-exponentiation-operator" : {
1381 | "active" : 0
1382 | },
1383 | "prefer-named-capture-group" : {
1384 | "active" : 0
1385 | },
1386 | "prefer-numeric-literals" : {
1387 | "active" : 0
1388 | },
1389 | "prefer-object-has-own" : {
1390 | "active" : 0
1391 | },
1392 | "prefer-object-spread" : {
1393 | "active" : 0
1394 | },
1395 | "prefer-promise-reject-errors" : {
1396 | "active" : 0,
1397 | "optionString" : "{'allowEmptyReject': false}"
1398 | },
1399 | "prefer-regex-literals" : {
1400 | "active" : 0
1401 | },
1402 | "prefer-rest-params" : {
1403 | "active" : 0
1404 | },
1405 | "prefer-spread" : {
1406 | "active" : 0
1407 | },
1408 | "prefer-template" : {
1409 | "active" : 0
1410 | },
1411 | "quote-props" : {
1412 | "active" : 0,
1413 | "optionString" : "'always'"
1414 | },
1415 | "quotes" : {
1416 | "active" : 0,
1417 | "optionString" : "'double', {'avoidEscape': true, 'allowTemplateLiterals': true}"
1418 | },
1419 | "radix" : {
1420 | "active" : 0,
1421 | "optionString" : "'always'"
1422 | },
1423 | "require-atomic-updates" : {
1424 | "active" : 0,
1425 | "optionString" : "{'allowProperties': false}"
1426 | },
1427 | "require-await" : {
1428 | "active" : 0
1429 | },
1430 | "require-unicode-regexp" : {
1431 | "active" : 0
1432 | },
1433 | "require-yield" : {
1434 | "active" : 1
1435 | },
1436 | "rest-spread-spacing" : {
1437 | "active" : 0,
1438 | "optionString" : "'never'"
1439 | },
1440 | "semi" : {
1441 | "active" : 0,
1442 | "optionString" : "'always', {'omitLastInOneLineBlock': false}"
1443 | },
1444 | "semi-spacing" : {
1445 | "active" : 0,
1446 | "optionString" : "{'before': false, 'after': true}"
1447 | },
1448 | "semi-style" : {
1449 | "active" : 0,
1450 | "optionString" : "'last'"
1451 | },
1452 | "sort-imports" : {
1453 | "active" : 0,
1454 | "optionString" : "{'ignoreCase': false, 'ignoreMemberSort': true, 'memberSyntaxSortOrder': ['none', 'all', 'multiple', 'single']}"
1455 | },
1456 | "sort-keys" : {
1457 | "active" : 0,
1458 | "optionString" : "'asc', {'caseSensitive': true, 'natural': false}"
1459 | },
1460 | "sort-vars" : {
1461 | "active" : 0,
1462 | "optionString" : "{'ignoreCase': false}"
1463 | },
1464 | "space-before-blocks" : {
1465 | "active" : 0,
1466 | "optionString" : "{'functions': 'always', 'keywords': 'always', 'classes': 'always'}"
1467 | },
1468 | "space-before-function-paren" : {
1469 | "active" : 0,
1470 | "optionString" : "{'anonymous': 'always', 'named': 'never'}"
1471 | },
1472 | "space-in-parens" : {
1473 | "active" : 0,
1474 | "optionString" : "'never', {'exceptions': []}"
1475 | },
1476 | "space-infix-ops" : {
1477 | "active" : 0,
1478 | "optionString" : "{'int32Hint': false}"
1479 | },
1480 | "space-unary-ops" : {
1481 | "active" : 0,
1482 | "optionString" : "{'words': true, 'nonwords': false, 'overrides': {}}"
1483 | },
1484 | "spaced-comment" : {
1485 | "active" : 0,
1486 | "optionString" : "'always', {'line': {'markers': ['\/'], 'exceptions': ['-', '+']}, 'block': {'markers': ['!'], 'exceptions': ['*'], 'balanced': false}}"
1487 | },
1488 | "strict" : {
1489 | "active" : 0,
1490 | "optionString" : "'safe'"
1491 | },
1492 | "switch-colon-spacing" : {
1493 | "active" : 0,
1494 | "optionString" : "{'after': true, 'before': false}"
1495 | },
1496 | "symbol-description" : {
1497 | "active" : 0
1498 | },
1499 | "template-curly-spacing" : {
1500 | "active" : 0,
1501 | "optionString" : "'never'"
1502 | },
1503 | "template-tag-spacing" : {
1504 | "active" : 0,
1505 | "optionString" : "'never'"
1506 | },
1507 | "unicode-bom" : {
1508 | "active" : 0,
1509 | "optionString" : "'never'"
1510 | },
1511 | "use-isnan" : {
1512 | "active" : 1,
1513 | "optionString" : ""
1514 | },
1515 | "valid-typeof" : {
1516 | "active" : 1,
1517 | "optionString" : "{'requireStringLiterals': true}"
1518 | },
1519 | "vars-on-top" : {
1520 | "active" : 0
1521 | },
1522 | "wrap-iife" : {
1523 | "active" : 0,
1524 | "optionString" : "'outside'"
1525 | },
1526 | "wrap-regex" : {
1527 | "active" : 0
1528 | },
1529 | "yield-star-spacing" : {
1530 | "active" : 0,
1531 | "optionString" : "{'before': false, 'after': true}"
1532 | },
1533 | "yoda" : {
1534 | "active" : 0,
1535 | "optionString" : "'never', {'exceptRange': false, 'onlyEquality': false}"
1536 | }
1537 | },
1538 | "esLintSourceType" : 0,
1539 | "externalServerAddress" : "http:\/\/localhost:8888",
1540 | "gitIgnoreBuildFolder" : 1,
1541 | "hideConfigFile" : 0,
1542 | "jsCheckerReservedNamesString" : "",
1543 | "languageDefaultsCOFFEE" : {
1544 | "autoOutputAction" : 0,
1545 | "autoOutputPathFilenamePattern" : "*.js",
1546 | "autoOutputPathRelativePath" : "",
1547 | "autoOutputPathReplace1" : "",
1548 | "autoOutputPathReplace2" : "",
1549 | "autoOutputPathStyle" : 0,
1550 | "minifierStyle" : 1,
1551 | "outputStyle" : 0,
1552 | "sourceMapStyle" : 0,
1553 | "transpilerStyle" : 1
1554 | },
1555 | "languageDefaultsCSS" : {
1556 | "autoOutputAction" : 0,
1557 | "autoOutputPathFilenamePattern" : "*-min.css",
1558 | "autoOutputPathRelativePath" : "",
1559 | "autoOutputPathReplace1" : "",
1560 | "autoOutputPathReplace2" : "",
1561 | "autoOutputPathStyle" : 0,
1562 | "combineImports" : 0,
1563 | "cssoStyle" : 0,
1564 | "purgeCSSStyle" : 0,
1565 | "shouldRunAutoprefixer" : 1,
1566 | "shouldRunBless" : 0,
1567 | "sourceMapStyle" : 0
1568 | },
1569 | "languageDefaultsGIF" : {
1570 | "autoOutputAction" : 0,
1571 | "autoOutputPathFilenamePattern" : "*.gif",
1572 | "autoOutputPathRelativePath" : "",
1573 | "autoOutputPathReplace1" : "",
1574 | "autoOutputPathReplace2" : "",
1575 | "autoOutputPathStyle" : 0,
1576 | "webpOptimizationPresetUUID" : "lpckwebp-none",
1577 | "webpRGBQuality" : 75
1578 | },
1579 | "languageDefaultsHAML" : {
1580 | "autoOutputAction" : 0,
1581 | "autoOutputPathFilenamePattern" : "*.html",
1582 | "autoOutputPathRelativePath" : "",
1583 | "autoOutputPathReplace1" : "",
1584 | "autoOutputPathReplace2" : "",
1585 | "autoOutputPathStyle" : 0,
1586 | "escapeHTMLCharacters" : 0,
1587 | "htmlMinifierStyle" : 0,
1588 | "noEscapeInAttributes" : 0,
1589 | "outputFormat" : 2,
1590 | "shouldRunCacheBuster" : 0,
1591 | "useCDATA" : 0,
1592 | "useDoubleQuotes" : 0,
1593 | "useUnixNewlines" : 0
1594 | },
1595 | "languageDefaultsJPG" : {
1596 | "autoOutputAction" : 0,
1597 | "autoOutputPathFilenamePattern" : "*.jpg",
1598 | "autoOutputPathRelativePath" : "",
1599 | "autoOutputPathReplace1" : "",
1600 | "autoOutputPathReplace2" : "",
1601 | "autoOutputPathStyle" : 0,
1602 | "outputFormat" : 0,
1603 | "quality" : 100,
1604 | "webpOptimizationPresetUUID" : "lpckwebp-none",
1605 | "webpRGBQuality" : 75
1606 | },
1607 | "languageDefaultsJS" : {
1608 | "autoOutputAction" : 0,
1609 | "autoOutputPathFilenamePattern" : "*.js",
1610 | "autoOutputPathRelativePath" : "..\/..\/dist\/js",
1611 | "autoOutputPathReplace1" : "",
1612 | "autoOutputPathReplace2" : "",
1613 | "autoOutputPathStyle" : 2,
1614 | "bundleFormat" : 0,
1615 | "minifierStyle" : 1,
1616 | "sourceMapStyle" : 1,
1617 | "syntaxCheckerStyle" : 0,
1618 | "transpilerStyle" : 0
1619 | },
1620 | "languageDefaultsJSON" : {
1621 | "autoOutputAction" : 1,
1622 | "autoOutputPathFilenamePattern" : "*-min.json",
1623 | "autoOutputPathRelativePath" : "",
1624 | "autoOutputPathReplace1" : "",
1625 | "autoOutputPathReplace2" : "",
1626 | "autoOutputPathStyle" : 0,
1627 | "orderOutput" : 0,
1628 | "outputStyle" : 1
1629 | },
1630 | "languageDefaultsKIT" : {
1631 | "autoOutputAction" : 0,
1632 | "autoOutputPathFilenamePattern" : "*.html",
1633 | "autoOutputPathRelativePath" : "",
1634 | "autoOutputPathReplace1" : "kit",
1635 | "autoOutputPathReplace2" : "html",
1636 | "autoOutputPathStyle" : 0,
1637 | "htmlMinifierStyle" : 0,
1638 | "shouldRunCacheBuster" : 0
1639 | },
1640 | "languageDefaultsLESS" : {
1641 | "allowInsecureImports" : 0,
1642 | "autoOutputAction" : 0,
1643 | "autoOutputPathFilenamePattern" : "*.css",
1644 | "autoOutputPathRelativePath" : "..\/css",
1645 | "autoOutputPathReplace1" : "less",
1646 | "autoOutputPathReplace2" : "css",
1647 | "autoOutputPathStyle" : 0,
1648 | "cssoStyle" : 0,
1649 | "enableJavascript" : 0,
1650 | "mathStyle" : 0,
1651 | "outputStyle" : 1,
1652 | "purgeCSSStyle" : 0,
1653 | "rewriteURLStyle" : 0,
1654 | "shouldRunAutoprefixer" : 1,
1655 | "shouldRunBless" : 0,
1656 | "sourceMapStyle" : 0,
1657 | "strictImports" : 0,
1658 | "strictUnits" : 0
1659 | },
1660 | "languageDefaultsMARKDOWN" : {
1661 | "autoOutputAction" : 1,
1662 | "autoOutputPathFilenamePattern" : "*.html",
1663 | "autoOutputPathRelativePath" : "",
1664 | "autoOutputPathReplace1" : "",
1665 | "autoOutputPathReplace2" : "",
1666 | "autoOutputPathStyle" : 0,
1667 | "criticStyle" : 0,
1668 | "enableFootnotes" : 1,
1669 | "enableLabels" : 1,
1670 | "enableSmartQuotes" : 1,
1671 | "htmlMinifierStyle" : 0,
1672 | "maskEmailAddresses" : 1,
1673 | "outputFormat" : 0,
1674 | "outputStyle" : 0,
1675 | "parseMetadata" : 1,
1676 | "processHTML" : 0,
1677 | "randomFootnoteNumbers" : 0,
1678 | "shouldRunCacheBuster" : 0,
1679 | "useCompatibilityMode" : 0
1680 | },
1681 | "languageDefaultsOTHER" : {
1682 | "autoOutputAction" : 2,
1683 | "autoOutputPathFilenamePattern" : "*.*",
1684 | "autoOutputPathRelativePath" : "",
1685 | "autoOutputPathReplace1" : "",
1686 | "autoOutputPathReplace2" : "",
1687 | "autoOutputPathStyle" : 0,
1688 | "htmlMinifierStyle" : 0,
1689 | "shouldRunCacheBuster" : 0
1690 | },
1691 | "languageDefaultsPNG" : {
1692 | "autoOutputAction" : 0,
1693 | "autoOutputPathFilenamePattern" : "*.png",
1694 | "autoOutputPathRelativePath" : "",
1695 | "autoOutputPathReplace1" : "",
1696 | "autoOutputPathReplace2" : "",
1697 | "autoOutputPathStyle" : 0,
1698 | "optimizerType" : 1,
1699 | "quality" : 100,
1700 | "webpOptimizationPresetUUID" : "lpckwebp-none",
1701 | "webpRGBQuality" : 75
1702 | },
1703 | "languageDefaultsPUG" : {
1704 | "autoOutputAction" : 0,
1705 | "autoOutputPathFilenamePattern" : "*.html",
1706 | "autoOutputPathRelativePath" : "",
1707 | "autoOutputPathReplace1" : "",
1708 | "autoOutputPathReplace2" : "",
1709 | "autoOutputPathStyle" : 0,
1710 | "compileDebug" : 1,
1711 | "htmlMinifierStyle" : 0,
1712 | "outputStyle" : 0,
1713 | "shouldRunCacheBuster" : 0
1714 | },
1715 | "languageDefaultsSASS" : {
1716 | "autoOutputAction" : 0,
1717 | "autoOutputPathFilenamePattern" : "*.css",
1718 | "autoOutputPathRelativePath" : "..\/..\/dist\/css",
1719 | "autoOutputPathReplace1" : "sass",
1720 | "autoOutputPathReplace2" : "css",
1721 | "autoOutputPathStyle" : 2,
1722 | "compilerType" : 0,
1723 | "cssoStyle" : 0,
1724 | "decimalPrecision" : 10,
1725 | "emitCharset" : 1,
1726 | "outputStyle" : 3,
1727 | "purgeCSSStyle" : 0,
1728 | "shouldRunAutoprefixer" : 1,
1729 | "shouldRunBless" : 0,
1730 | "sourceMapStyle" : 0
1731 | },
1732 | "languageDefaultsSLIM" : {
1733 | "autoOutputAction" : 0,
1734 | "autoOutputPathFilenamePattern" : "*.html",
1735 | "autoOutputPathRelativePath" : "",
1736 | "autoOutputPathReplace1" : "",
1737 | "autoOutputPathReplace2" : "",
1738 | "autoOutputPathStyle" : 0,
1739 | "compileOnly" : 0,
1740 | "htmlMinifierStyle" : 0,
1741 | "logicless" : 0,
1742 | "outputFormat" : 0,
1743 | "outputStyle" : 1,
1744 | "railsCompatible" : 0,
1745 | "shouldRunCacheBuster" : 0
1746 | },
1747 | "languageDefaultsSTYLUS" : {
1748 | "autoOutputAction" : 0,
1749 | "autoOutputPathFilenamePattern" : "*.css",
1750 | "autoOutputPathRelativePath" : "..\/css",
1751 | "autoOutputPathReplace1" : "stylus",
1752 | "autoOutputPathReplace2" : "css",
1753 | "autoOutputPathStyle" : 0,
1754 | "cssoStyle" : 0,
1755 | "debugStyle" : 0,
1756 | "importCSS" : 0,
1757 | "outputStyle" : 0,
1758 | "purgeCSSStyle" : 0,
1759 | "resolveRelativeURLS" : 0,
1760 | "shouldRunAutoprefixer" : 0,
1761 | "shouldRunBless" : 0,
1762 | "sourceMapStyle" : 0
1763 | },
1764 | "languageDefaultsSVG" : {
1765 | "autoOutputAction" : 2,
1766 | "autoOutputPathFilenamePattern" : "*.svg",
1767 | "autoOutputPathRelativePath" : "",
1768 | "autoOutputPathReplace1" : "",
1769 | "autoOutputPathReplace2" : "",
1770 | "autoOutputPathStyle" : 0,
1771 | "pluginMask" : 3758088159
1772 | },
1773 | "languageDefaultsTS" : {
1774 | "autoOutputAction" : 0,
1775 | "autoOutputPathFilenamePattern" : "*.js",
1776 | "autoOutputPathRelativePath" : "\/js",
1777 | "autoOutputPathReplace1" : "",
1778 | "autoOutputPathReplace2" : "",
1779 | "autoOutputPathStyle" : 0,
1780 | "createDeclarationFile" : 0,
1781 | "jsxMode" : 0,
1782 | "minifierStyle" : 0,
1783 | "moduleDetectionType" : 0,
1784 | "moduleResolutionType" : 0,
1785 | "moduleType" : 2,
1786 | "removeComments" : 0,
1787 | "sourceMapStyle" : 0,
1788 | "targetECMAVersion" : 2018
1789 | },
1790 | "languageDefaultsUserDefined" : [
1791 |
1792 | ],
1793 | "npmAbbreviatedPath" : "",
1794 | "npmCreatePackageLock" : 1,
1795 | "npmInstallOptionalDependencies" : 0,
1796 | "npmSaveExactVersion" : 0,
1797 | "npmTargetDependencyListType" : 1,
1798 | "overrideExternalServerCSS" : 0,
1799 | "previewPathAddition" : "",
1800 | "purgeCSS" : {
1801 | "blocklistEntries" : [
1802 |
1803 | ],
1804 | "contentEntries" : [
1805 | "**\/*.html",
1806 | "**\/*.htm",
1807 | "**\/*.shtml",
1808 | "**\/*.xhtml",
1809 | "**\/*.php",
1810 | "**\/*.js",
1811 | "**\/*.ts",
1812 | "**\/*.coffee",
1813 | "**\/*.erb",
1814 | "**\/*.pug",
1815 | "**\/*.jade",
1816 | "**\/*.slim",
1817 | "**\/*.haml",
1818 | "**\/*.md",
1819 | "**\/*.kit"
1820 | ],
1821 | "removeFontFace" : 0,
1822 | "removeKeyframes" : 0,
1823 | "removeVariables" : 0,
1824 | "safelistEntries" : [
1825 |
1826 | ],
1827 | "skippedEntries" : [
1828 | "node_modules\/**"
1829 | ]
1830 | },
1831 | "rollupContext" : "",
1832 | "rollupExternalEntries" : [
1833 |
1834 | ],
1835 | "rollupReplacementEntries" : [
1836 | "process.env.NODE_ENV:::$NODE_ENV",
1837 | "ENVIRONMENT:::$NODE_ENV"
1838 | ],
1839 | "rollupTreeshakingEnabled" : 1,
1840 | "rollupTreeshakingModuleSideEffects" : 1,
1841 | "skippedFoldersString" : "log, _logs, logs, _cache, cache, \/storage\/framework\/sessions, node_modules, \/src\/models, \/src\/tasks, \/src\/elements, \/src\/helpers, \/src\/migrations, \/src\/data, \/src\/templates, \/src\/records, \/src\/controllers, \/src\/assetbundles, \/src\/base, \/src\/fields, \/src\/services, \/src\/variables, \/src\/resources\/dist, \/.github",
1842 | "sourceFolderName" : "source",
1843 | "susyVersion" : 3,
1844 | "tsAllowArbitraryExtensions" : 0,
1845 | "tsAllowImportingTSExtensions" : 0,
1846 | "tsAllowSyntheticDefaultImports" : 0,
1847 | "tsAllowUMDGlobalAccess" : 0,
1848 | "tsAllowUnreachableCode" : 0,
1849 | "tsAllowUnusedLabels" : 0,
1850 | "tsAlwaysStrict" : 0,
1851 | "tsDownlevelIteration" : 0,
1852 | "tsEmitBOM" : 0,
1853 | "tsEmitDecoratorMetadata" : 0,
1854 | "tsESModuleInterop" : 0,
1855 | "tsExactOptionalPropertyTypes" : 0,
1856 | "tsExperimentalDecorators" : 0,
1857 | "tsForceConsistentCasingInFileNames" : 0,
1858 | "tsImportHelpers" : 0,
1859 | "tsIsolatedModules" : 0,
1860 | "tsJSXFactory" : "React.createElement",
1861 | "tsNoEmitHelpers" : 0,
1862 | "tsNoFallthroughCasesInSwitch" : 0,
1863 | "tsNoImplicitAny" : 0,
1864 | "tsNoImplicitOverride" : 0,
1865 | "tsNoImplicitReturns" : 0,
1866 | "tsNoImplicitThis" : 0,
1867 | "tsNoLib" : 0,
1868 | "tsNoPropertyAccessFromIndexSignature" : 0,
1869 | "tsNoResolve" : 0,
1870 | "tsNoUncheckedIndexAccess" : 0,
1871 | "tsNoUnusedLocals" : 0,
1872 | "tsNoUnusedParameters" : 0,
1873 | "tsPreserveConstEnums" : 0,
1874 | "tsPreserveSymlinks" : 0,
1875 | "tsResolveJsonModule" : 0,
1876 | "tsSkipDefaultLibCheck" : 0,
1877 | "tsSkipLibCheck" : 0,
1878 | "tsStrictBindCallApply" : 0,
1879 | "tsStrictFunctionTypes" : 0,
1880 | "tsStrictNullChecks" : 0,
1881 | "tsStrictPropertyInitialization" : 0,
1882 | "tsStripInternal" : 0,
1883 | "tsUseDefineForClassFields" : 0,
1884 | "tsUseUnknownInCatchVariables" : 0,
1885 | "tsVerbatimModuleSyntax" : 0,
1886 | "uglifyDefinesString" : "",
1887 | "uglifyFlags2" : {
1888 | "arguments" : {
1889 | "active" : 1,
1890 | "flagValue" : -1
1891 | },
1892 | "arrows" : {
1893 | "active" : 1,
1894 | "flagValue" : -1
1895 | },
1896 | "ascii_only" : {
1897 | "active" : 0,
1898 | "flagValue" : -1
1899 | },
1900 | "booleans" : {
1901 | "active" : 1,
1902 | "flagValue" : -1
1903 | },
1904 | "booleans_as_integers" : {
1905 | "active" : 0,
1906 | "flagValue" : -1
1907 | },
1908 | "braces" : {
1909 | "active" : 0,
1910 | "flagValue" : -1
1911 | },
1912 | "collapse_vars" : {
1913 | "active" : 1,
1914 | "flagValue" : -1
1915 | },
1916 | "comments" : {
1917 | "active" : 0,
1918 | "flagValue" : 1
1919 | },
1920 | "comparisons" : {
1921 | "active" : 1,
1922 | "flagValue" : -1
1923 | },
1924 | "computed_props" : {
1925 | "active" : 1,
1926 | "flagValue" : -1
1927 | },
1928 | "conditionals" : {
1929 | "active" : 1,
1930 | "flagValue" : -1
1931 | },
1932 | "dead_code" : {
1933 | "active" : 0,
1934 | "flagValue" : -1
1935 | },
1936 | "directives" : {
1937 | "active" : 1,
1938 | "flagValue" : -1
1939 | },
1940 | "drop_console" : {
1941 | "active" : 0,
1942 | "flagValue" : -1
1943 | },
1944 | "drop_debugger" : {
1945 | "active" : 1,
1946 | "flagValue" : -1
1947 | },
1948 | "ecma" : {
1949 | "active" : 1,
1950 | "flagValue" : 5
1951 | },
1952 | "eval" : {
1953 | "active" : 0,
1954 | "flagValue" : -1
1955 | },
1956 | "evaluate" : {
1957 | "active" : 1,
1958 | "flagValue" : -1
1959 | },
1960 | "expression" : {
1961 | "active" : 0,
1962 | "flagValue" : -1
1963 | },
1964 | "hoist_funs" : {
1965 | "active" : 1,
1966 | "flagValue" : -1
1967 | },
1968 | "hoist_props" : {
1969 | "active" : 1,
1970 | "flagValue" : -1
1971 | },
1972 | "hoist_vars" : {
1973 | "active" : 0,
1974 | "flagValue" : -1
1975 | },
1976 | "ie8" : {
1977 | "active" : 0,
1978 | "flagValue" : -1
1979 | },
1980 | "if_return" : {
1981 | "active" : 1,
1982 | "flagValue" : -1
1983 | },
1984 | "indent_level" : {
1985 | "active" : 0,
1986 | "flagValue" : 4
1987 | },
1988 | "indent_start" : {
1989 | "active" : 0,
1990 | "flagValue" : 0
1991 | },
1992 | "inline" : {
1993 | "active" : 1,
1994 | "flagValue" : 3
1995 | },
1996 | "inline_script" : {
1997 | "active" : 1,
1998 | "flagValue" : -1
1999 | },
2000 | "join_vars" : {
2001 | "active" : 1,
2002 | "flagValue" : -1
2003 | },
2004 | "keep_classnames" : {
2005 | "active" : 0,
2006 | "flagValue" : -1
2007 | },
2008 | "keep_fargs" : {
2009 | "active" : 0,
2010 | "flagValue" : -1
2011 | },
2012 | "keep_fnames" : {
2013 | "active" : 0,
2014 | "flagValue" : -1
2015 | },
2016 | "keep_infinity" : {
2017 | "active" : 0,
2018 | "flagValue" : -1
2019 | },
2020 | "keep_numbers" : {
2021 | "active" : 0,
2022 | "flagValue" : -1
2023 | },
2024 | "keep_quoted_props" : {
2025 | "active" : 0,
2026 | "flagValue" : -1
2027 | },
2028 | "loops" : {
2029 | "active" : 1,
2030 | "flagValue" : -1
2031 | },
2032 | "max_line_len" : {
2033 | "active" : 1,
2034 | "flagValue" : 32000
2035 | },
2036 | "module" : {
2037 | "active" : 0,
2038 | "flagValue" : -1
2039 | },
2040 | "negate_iife" : {
2041 | "active" : 1,
2042 | "flagValue" : -1
2043 | },
2044 | "passes" : {
2045 | "active" : 1,
2046 | "flagValue" : 1
2047 | },
2048 | "preserve_annotations" : {
2049 | "active" : 0,
2050 | "flagValue" : -1
2051 | },
2052 | "properties" : {
2053 | "active" : 1,
2054 | "flagValue" : -1
2055 | },
2056 | "pure_getters" : {
2057 | "active" : 0,
2058 | "flagValue" : -1
2059 | },
2060 | "quote_keys" : {
2061 | "active" : 0,
2062 | "flagValue" : -1
2063 | },
2064 | "quote_style" : {
2065 | "active" : 1,
2066 | "flagValue" : 0
2067 | },
2068 | "reduce_funcs" : {
2069 | "active" : 1,
2070 | "flagValue" : -1
2071 | },
2072 | "reduce_vars" : {
2073 | "active" : 1,
2074 | "flagValue" : -1
2075 | },
2076 | "safari10" : {
2077 | "active" : 0,
2078 | "flagValue" : -1
2079 | },
2080 | "semicolons" : {
2081 | "active" : 1,
2082 | "flagValue" : -1
2083 | },
2084 | "sequences" : {
2085 | "active" : 1,
2086 | "flagValue" : -1
2087 | },
2088 | "shebang" : {
2089 | "active" : 1,
2090 | "flagValue" : -1
2091 | },
2092 | "side_effects" : {
2093 | "active" : 1,
2094 | "flagValue" : -1
2095 | },
2096 | "switches" : {
2097 | "active" : 1,
2098 | "flagValue" : -1
2099 | },
2100 | "toplevel" : {
2101 | "active" : 0,
2102 | "flagValue" : -1
2103 | },
2104 | "typeofs" : {
2105 | "active" : 1,
2106 | "flagValue" : -1
2107 | },
2108 | "unsafe" : {
2109 | "active" : 0,
2110 | "flagValue" : -1
2111 | },
2112 | "unsafe_arrows" : {
2113 | "active" : 0,
2114 | "flagValue" : -1
2115 | },
2116 | "unsafe_comps" : {
2117 | "active" : 0,
2118 | "flagValue" : -1
2119 | },
2120 | "unsafe_Function" : {
2121 | "active" : 0,
2122 | "flagValue" : -1
2123 | },
2124 | "unsafe_math" : {
2125 | "active" : 0,
2126 | "flagValue" : -1
2127 | },
2128 | "unsafe_methods" : {
2129 | "active" : 0,
2130 | "flagValue" : -1
2131 | },
2132 | "unsafe_proto" : {
2133 | "active" : 0,
2134 | "flagValue" : -1
2135 | },
2136 | "unsafe_regexp" : {
2137 | "active" : 0,
2138 | "flagValue" : -1
2139 | },
2140 | "unsafe_undefined" : {
2141 | "active" : 0,
2142 | "flagValue" : -1
2143 | },
2144 | "unused" : {
2145 | "active" : 0,
2146 | "flagValue" : -1
2147 | },
2148 | "warnings" : {
2149 | "active" : 0,
2150 | "flagValue" : -1
2151 | },
2152 | "webkit" : {
2153 | "active" : 0,
2154 | "flagValue" : -1
2155 | },
2156 | "wrap_func_args" : {
2157 | "active" : 1,
2158 | "flagValue" : -1
2159 | },
2160 | "wrap_iife" : {
2161 | "active" : 0,
2162 | "flagValue" : -1
2163 | }
2164 | },
2165 | "uglifyMangleNames" : 1,
2166 | "uglifyReservedNamesString" : "$",
2167 | "webpPresets" : {
2168 |
2169 | },
2170 | "websiteRelativeRoot" : ""
2171 | },
2172 | "settingsFileVersion" : "3"
2173 | }
--------------------------------------------------------------------------------
/docs/.sidebar.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "title": "Get Started",
4 | "collapsable": false,
5 | "children": [
6 | "get-started/installation-setup",
7 | "get-started/requirements"
8 | ]
9 | },
10 | {
11 | "title": "Feature Tour",
12 | "collapsable": false,
13 | "children": [
14 | "feature-tour/overview"
15 | ]
16 | }
17 | ]
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/verbb/smith/d9a6e7ad5d4e022ebc8b3f758455ca83b2f55049/docs/README.md
--------------------------------------------------------------------------------
/docs/feature-tour/overview.md:
--------------------------------------------------------------------------------
1 | # Usage
2 | Smith adds these functions to the settings 'cog' icon, in the top-right of each matrix block.
3 |
4 | ### Clone
5 | To clone a block, select `Clone` in the settings menu for a block. This will add a new block at the end of your existing blocks, with the content duplicated. You can only clone a single block at a time.
6 |
7 | ### Copy
8 | To copy a block, select `Copy` in the settings menu for a block. You can also select multiple blocks to be copied using the checkboxes in the top-left of any block (next to the title). This will save blocks to local storage, for pasting later.
9 |
10 | ### Paste
11 | To paste a single block, or multiple blocks, select `Paste` in the settings menu for a block. This will paste all copied blocks at the end of your existing blocks.
12 |
13 | You can only paste from blocks that were copied from the same Matrix field. However, this will work across entries and sections. You cannot copy blocks from one matrix field to another (the blocks will most likely be different).
14 |
--------------------------------------------------------------------------------
/docs/get-started/installation-setup.md:
--------------------------------------------------------------------------------
1 | # Installation & Setup
2 | You can install Smith via the plugin store, or through Composer.
3 |
4 | ## Craft Plugin Store
5 | To install **Smith**, navigate to the _Plugin Store_ section of your Craft control panel, search for `Smith`, and click the _Try_ button.
6 |
7 | ## Composer
8 | You can also add the package to your project using Composer and the command line.
9 |
10 | 1. Open your terminal and go to your Craft project:
11 | ```shell
12 | cd /path/to/project
13 | ```
14 |
15 | 2. Then tell Composer to require the plugin, and Craft to install it:
16 | ```shell
17 | composer require verbb/smith && php craft plugin/install smith
18 | ```
19 |
--------------------------------------------------------------------------------
/docs/get-started/requirements.md:
--------------------------------------------------------------------------------
1 | # Requirements
2 |
3 | ## Craft CMS
4 | Smith requires Craft CMS 5.0 or greater.
5 |
6 | ## PHP
7 | Smith requires PHP 8.2 or greater.
8 |
--------------------------------------------------------------------------------
/src/Smith.php:
--------------------------------------------------------------------------------
1 | onInit(function() {
38 | if (Craft::$app->getRequest()->getIsCpRequest()) {
39 | $view = Craft::$app->getView();
40 | $view->registerAssetBundle(SmithAsset::class);
41 | $view->registerJs('new Craft.Smith.Init();');
42 | }
43 | });
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/assetbundles/SmithAsset.php:
--------------------------------------------------------------------------------
1 | sourcePath = "@verbb/smith/resources/dist";
19 |
20 | $this->depends = [
21 | VerbbCpAsset::class,
22 | CpAsset::class,
23 | MatrixAsset::class,
24 | ];
25 |
26 | $this->js = [
27 | 'js/smith.js',
28 | ];
29 |
30 | $this->css = [
31 | 'css/smith.css',
32 | ];
33 |
34 | parent::init();
35 | }
36 |
37 | public function registerAssetFiles($view): void
38 | {
39 | parent::registerAssetFiles($view);
40 |
41 | if ($view instanceof View) {
42 | $view->registerTranslations('app', [
43 | 'Copy',
44 | 'Paste',
45 | 'Clone',
46 | '1 block copied',
47 | '{n} blocks copied',
48 | ]);
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/base/PluginTrait.php:
--------------------------------------------------------------------------------
1 | [
33 | 'field' => Field::class,
34 | ],
35 | ];
36 | }
37 |
38 |
39 | // Public Methods
40 | // =========================================================================
41 |
42 | public function getField(): Field
43 | {
44 | return $this->get('field');
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/src/controllers/FieldController.php:
--------------------------------------------------------------------------------
1 | requireAcceptsJson();
26 | $this->requirePostRequest();
27 |
28 | $blockData = [];
29 | $target = $this->request->getRequiredBodyParam('target', []);
30 | $blocks = $this->request->getRequiredBodyParam('blocks', []);
31 |
32 | foreach ($blocks as $block) {
33 | $uid = $block['uid'];
34 | $fieldId = $block['fieldId'];
35 | $entryTypeId = $block['entryTypeId'];
36 | $ownerId = $target['ownerId'];
37 | $ownerElementType = $target['ownerElementType'];
38 | $siteId = $target['siteId'];
39 | $namespace = $target['namespace'];
40 |
41 | $currentEntry = Entry::find()->siteId('*')->uid($uid)->status(null)->one();
42 |
43 | if (!$currentEntry) {
44 | throw new BadRequestHttpException("Invalid entry UID $uid.");
45 | }
46 |
47 | $elementsService = Craft::$app->getElements();
48 | $owner = $elementsService->getElementById($ownerId, $ownerElementType, $siteId);
49 | if (!$owner) {
50 | throw new BadRequestHttpException("Invalid owner ID, element type, or site ID.");
51 | }
52 |
53 | $field = $owner->getFieldLayout()?->getFieldById($fieldId);
54 | if (!$field instanceof Matrix) {
55 | throw new BadRequestHttpException("Invalid Matrix field ID: $fieldId");
56 | }
57 |
58 | $entryType = Craft::$app->getEntries()->getEntryTypeById($entryTypeId);
59 | if (!$entryType) {
60 | throw new BadRequestHttpException("Invalid entry type ID: $entryTypeId");
61 | }
62 |
63 | $site = Craft::$app->getSites()->getSiteById($siteId, true);
64 | if (!$site) {
65 | throw new BadRequestHttpException("Invalid site ID: $siteId");
66 | }
67 |
68 | /** @var Entry $entry */
69 | $entry = Craft::createObject([
70 | 'class' => Entry::class,
71 | 'siteId' => $siteId,
72 | 'uid' => StringHelper::UUID(),
73 | 'typeId' => $entryType->id,
74 | 'fieldId' => $fieldId,
75 | 'owner' => $owner,
76 | 'title' => $currentEntry->title,
77 | 'slug' => ElementHelper::tempSlug(),
78 | ]);
79 |
80 | $entry->setFieldValues($currentEntry->getSerializedFieldValues());
81 |
82 | $user = static::currentUser();
83 | if (!$elementsService->canSave($entry, $user)) {
84 | throw new ForbiddenHttpException('User not authorized to create this element.');
85 | }
86 |
87 | $entry->setScenario(Element::SCENARIO_ESSENTIALS);
88 |
89 | if (!$elementsService->saveElement($entry, false)) {
90 | return $this->asFailure(Craft::t('app', 'Couldn’t create {type}.', [
91 | 'type' => Entry::lowerDisplayName(),
92 | ]));
93 | }
94 |
95 | /** @var EntryQuery|ElementCollection $value */
96 | $value = $owner->getFieldValue($field->handle);
97 |
98 | $view = $this->getView();
99 |
100 | /** @var Entry[] $entries */
101 | $entries = $value->all();
102 |
103 | $html = $view->namespaceInputs(fn() => $view->renderTemplate('_components/fieldtypes/Matrix/block.twig', [
104 | 'name' => $field->handle,
105 | 'entryTypes' => $field->getEntryTypesForField($entries, $owner),
106 | 'entry' => $entry,
107 | 'isFresh' => true,
108 | ]), $namespace);
109 |
110 | $blockData[] = [
111 | 'blockHtml' => $html,
112 | 'headHtml' => $view->getHeadHtml(),
113 | 'bodyHtml' => $view->getBodyHtml(),
114 | ];
115 | }
116 |
117 | return $this->asJson([
118 | 'success' => true,
119 | 'blocks' => $blockData,
120 | ]);
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/src/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
--------------------------------------------------------------------------------
/src/resources/dist/css/smith.css:
--------------------------------------------------------------------------------
1 | .smith-spinner{width:100%}@font-face{font-family:'Font Awesome 5 Free';font-style:normal;font-weight:900;font-display:auto;src:url("../fonts/fa-regular-400.eot");src:url("../fonts/fa-regular-400.eot?#iefix") format("embedded-opentype"),url("../fonts/fa-regular-400.woff2") format("woff2"),url("../fonts/fa-regular-400.woff") format("woff"),url("../fonts/fa-regular-400.ttf") format("truetype"),url("../fonts/fa-regular-400.svg#fontawesome") format("svg")}.menu ul li a[data-icon="copy"]:before,.menu ul li a[data-icon="paste"]:before,.menu ul li a[data-icon="clone"]:before{font-family:'Font Awesome 5 Free';font-weight:400;text-align:left}.menu ul li a[data-icon="copy"]:before{content:'\f0c5'}.menu ul li a[data-icon="paste"]:before{content:'\f328';padding-left:1px !important}.menu ul li a[data-icon="clone"]:before{content:'\f24d';font-size:12px !important;padding-top:2px !important}
2 |
--------------------------------------------------------------------------------
/src/resources/dist/fonts/fa-regular-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/verbb/smith/d9a6e7ad5d4e022ebc8b3f758455ca83b2f55049/src/resources/dist/fonts/fa-regular-400.eot
--------------------------------------------------------------------------------
/src/resources/dist/fonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/verbb/smith/d9a6e7ad5d4e022ebc8b3f758455ca83b2f55049/src/resources/dist/fonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/src/resources/dist/fonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/verbb/smith/d9a6e7ad5d4e022ebc8b3f758455ca83b2f55049/src/resources/dist/fonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/src/resources/dist/fonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/verbb/smith/d9a6e7ad5d4e022ebc8b3f758455ca83b2f55049/src/resources/dist/fonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/src/resources/dist/js/smith.js:
--------------------------------------------------------------------------------
1 | void 0===Craft.Smith&&(Craft.Smith={}),function($){Craft.Smith.Init=Garnish.Base.extend({smithMenus:[],init:function(t){this.initSmith(),Garnish.on(Craft.CpScreenSlideout,"load",this.initSmith.bind(this))},initSmith:function(){Garnish.requestAnimationFrame($.proxy((function(){for(var t=Garnish.$doc.find(".matrix-field"),e=0;e .blocks > .matrixblock"),n=0;n .blocks > .matrixblock"),a=$(t.$block),n;a.data("block")?($.each(this.smithMenus,(function(t,e){e.$matrixBlocks=i})),a.hasClass("static")||setTimeout((()=>{this.smithMenus.push(new Craft.Smith.Menu(e,a,i))}),200)):this.blockAdded(t)}),this))}}),Craft.Smith.Menu=Garnish.Base.extend({init:function(t,e,i){if(this.$matrixField=t,this.$matrixBlock=e,this.$matrixBlocks=i,this.$matrixBlock.data("renderedSmith"))return;this.blockInstance=this.$matrixBlock.data("entry");var a=this.blockInstance.$actionMenu.find('[data-action="delete"]').parents("ul");this.$copyBtn=$(''+Craft.t("app","Copy")+""),this.$pasteBtn=$(''+Craft.t("app","Paste")+""),this.$cloneBtn=$(''+Craft.t("app","Clone")+"");const n=$("");this.$copyBtn.appendTo(n).wrap(""),this.$pasteBtn.appendTo(n).wrap(""),this.$cloneBtn.appendTo(n).wrap(""),n.insertBefore(a),$('
').insertBefore(a),this.addListener(this.$copyBtn,"click",this.handleClick),this.addListener(this.$pasteBtn,"click",this.handleClick),this.addListener(this.$cloneBtn,"click",this.handleClick),this.checkPaste(),this.$matrixBlock.data("renderedSmith",!0)},handleClick:function(t){var e=$(t.target);e.hasClass("disabled")||e.hasClass("sel")||("copy"==e.data("action")&&this.copyBlock(t),"paste"==e.data("action")&&this.pasteBlock(t),"clone"==e.data("action")&&this.cloneBlock(t),this.blockInstance.actionDisclosure.hide())},checkPaste:function(){var t=!1;try{var e=JSON.parse(localStorage.getItem("smith:block")),i=this.$matrixField.attr("id");e&&i.includes(e.fieldId)&&(t=!0)}catch(t){}t?this.$pasteBtn.enable():this.$pasteBtn.disable()},copyBlock:function(t){var e=this._serializeBlocks();localStorage.setItem("smith:block",JSON.stringify(e));var i=e.blocks.length,a=1==i?"1 block copied":"{n} blocks copied";Craft.cp.displayNotice(Craft.t("app",a,{n:i})),this.checkPaste()},pasteBlock:function(t,e){try{if(!e)var e=JSON.parse(localStorage.getItem("smith:block"));var i=this.$matrixField.find(".blocks"),a=$('').insertAfter(this.$matrixBlock),n=this.$matrixField.data("matrix"),s=a;e.target={fieldId:n.settings.fieldId,ownerId:n.settings.ownerId,ownerElementType:n.settings.ownerElementType,siteId:n.settings.siteId,namespace:n.settings.namespace},Craft.sendActionRequest("POST","smith/field/render-matrix-blocks",{data:e}).then((t=>{for(var e=0;e{console.error(t)})).finally((()=>{a.remove()}))}catch(t){}},cloneBlock:function(t){var e=this._serializeBlocks();this.pasteBlock(t,e)},_serializeBlocks:function(){var t=this.$matrixField.data("matrix"),e=t.entrySelect.$selectedItems,i={fieldId:t.id,blocks:[]};e.length||(e=this.$matrixBlock);for(var a=0;a .blocks > .matrixblock');
31 |
32 | for (var j = 0; j < $matrixBlocks.length; j++) {
33 | var $matrixBlock = $($matrixBlocks[j]);
34 | var $settingsBtn = $matrixBlock.find('.actions .settings.menubtn');
35 |
36 | // Don't do this for static blocks
37 | if ($matrixBlock.hasClass('static')) {
38 | continue;
39 | }
40 |
41 | // Create a new class for this specific Matrix field and block
42 | this.smithMenus.push(new Craft.Smith.Menu($matrixField, $matrixBlock, $matrixBlocks));
43 | }
44 | }
45 |
46 | // Create a callback for new blocks
47 | Garnish.on(Craft.MatrixInput, 'blockAdded', $.proxy(this, 'blockAdded'));
48 |
49 | // Allow for Super Table's nested Matrix JS
50 | if (Craft.SuperTable && Craft.SuperTable.MatrixInputAlt) {
51 | Garnish.on(Craft.SuperTable.MatrixInputAlt, 'blockAdded', $.proxy(this, 'blockAdded'));
52 | }
53 | }, this));
54 | },
55 |
56 | blockAdded: function(e) {
57 | Garnish.requestAnimationFrame($.proxy(function() {
58 | var $matrixField = e.target.$container;
59 | var $matrixBlocks = $matrixField.find('> .blocks > .matrixblock');
60 | var $matrixBlock = $(e.$block);
61 |
62 | var blockInstance = $matrixBlock.data('block');
63 |
64 | // Try again if the menu button isn't initialised yet
65 | if (!blockInstance) {
66 | this.blockAdded(e);
67 | return;
68 | }
69 |
70 | // Update all Smith menus' with the correct matrix blocks
71 | $.each(this.smithMenus, function(index, menu) {
72 | menu.$matrixBlocks = $matrixBlocks;
73 | });
74 |
75 | // Don't do this for static blocks
76 | if ($matrixBlock.hasClass('static')) {
77 | return;
78 | }
79 |
80 | // Create a new Smith menu class for the new block
81 | setTimeout(() => {
82 | this.smithMenus.push(new Craft.Smith.Menu($matrixField, $matrixBlock, $matrixBlocks));
83 | }, 200);
84 | }, this));
85 | },
86 | });
87 |
88 | Craft.Smith.Menu = Garnish.Base.extend({
89 | init: function($matrixField, $matrixBlock, $matrixBlocks) {
90 | this.$matrixField = $matrixField;
91 | this.$matrixBlock = $matrixBlock;
92 | this.$matrixBlocks = $matrixBlocks;
93 |
94 | if (this.$matrixBlock.data('renderedSmith')) {
95 | return;
96 | }
97 |
98 | this.blockInstance = this.$matrixBlock.data('entry');
99 |
100 | // Keep track of the delete option - we want to insert before that
101 | var $deleteOption = this.blockInstance.$actionMenu.find('[data-action="delete"]').parents('ul');
102 |
103 | // Create our buttons
104 | this.$copyBtn = $('' + Craft.t('app', 'Copy') + '');
105 | this.$pasteBtn = $('' + Craft.t('app', 'Paste') + '');
106 | this.$cloneBtn = $('' + Craft.t('app', 'Clone') + '');
107 |
108 | // Add new menu items to the DOM
109 | const $ul = $('');
110 | this.$copyBtn.appendTo($ul).wrap('');
111 | this.$pasteBtn.appendTo($ul).wrap('');
112 | this.$cloneBtn.appendTo($ul).wrap('');
113 | $ul.insertBefore($deleteOption);
114 | $('
').insertBefore($deleteOption);
115 |
116 | this.addListener(this.$copyBtn, 'click', this.handleClick);
117 | this.addListener(this.$pasteBtn, 'click', this.handleClick);
118 | this.addListener(this.$cloneBtn, 'click', this.handleClick);
119 |
120 | // Perform some checks
121 | this.checkPaste();
122 |
123 | // Prevent double-binding
124 | this.$matrixBlock.data('renderedSmith', true);
125 | },
126 |
127 | handleClick: function(e) {
128 | var $option = $(e.target);
129 |
130 | if ($option.hasClass('disabled') || $option.hasClass('sel')) {
131 | return;
132 | }
133 |
134 | if ($option.data('action') == 'copy') {
135 | this.copyBlock(e);
136 | }
137 |
138 | if ($option.data('action') == 'paste') {
139 | this.pasteBlock(e);
140 | }
141 |
142 | if ($option.data('action') == 'clone') {
143 | this.cloneBlock(e);
144 | }
145 |
146 | this.blockInstance.actionDisclosure.hide();
147 | },
148 |
149 |
150 | checkPaste: function() {
151 | var canPaste = false;
152 |
153 | try {
154 | var data = JSON.parse(localStorage.getItem('smith:block'));
155 | var fieldHandle = this.$matrixField.attr('id');
156 |
157 | // Find copy data for this field
158 | if (data && fieldHandle.includes(data.fieldId)) {
159 | canPaste = true;
160 | }
161 | } catch(e) { }
162 |
163 | if (!canPaste) {
164 | this.$pasteBtn.disable();
165 | } else {
166 | this.$pasteBtn.enable();
167 | }
168 | },
169 |
170 | copyBlock: function(e) {
171 | var data = this._serializeBlocks();
172 |
173 | localStorage.setItem('smith:block', JSON.stringify(data));
174 |
175 | var count = data.blocks.length;
176 | var message = count == 1 ? '1 block copied' : '{n} blocks copied';
177 |
178 | Craft.cp.displayNotice(Craft.t('app', message, { n: count }));
179 |
180 | this.checkPaste();
181 | },
182 |
183 | pasteBlock: function(e, data) {
184 | try {
185 | if (!data) {
186 | var data = JSON.parse(localStorage.getItem('smith:block'));
187 | }
188 |
189 | var $blockContainer = this.$matrixField.find('.blocks');
190 | var $spinner = $('').insertAfter(this.$matrixBlock);
191 |
192 | // Get the Matrix field JS instance
193 | var matrixField = this.$matrixField.data('matrix');
194 |
195 | // Figure out the next block, to instruct Matrix to insert before that one
196 | var $insertBefore = $spinner;
197 |
198 | // Add in information about where we're pasting into
199 | data.target = {
200 | fieldId: matrixField.settings.fieldId,
201 | ownerId: matrixField.settings.ownerId,
202 | ownerElementType: matrixField.settings.ownerElementType,
203 | siteId: matrixField.settings.siteId,
204 | namespace: matrixField.settings.namespace,
205 | };
206 |
207 | // Fetch the blocks, rendered with values
208 | Craft.sendActionRequest('POST', 'smith/field/render-matrix-blocks', { data })
209 | .then((response) => {
210 | for (var i = 0; i < response.data.blocks.length; i++) {
211 | var data = response.data.blocks[i];
212 |
213 | const $entry = $(data.blockHtml);
214 |
215 | $entry.insertBefore($insertBefore);
216 |
217 | matrixField.trigger('entryAdded', {
218 | $entry: $entry,
219 | });
220 |
221 | Craft.initUiElements($entry.children('.fields'));
222 | Craft.appendHeadHtml(data.headHtml);
223 | Craft.appendBodyHtml(data.bodyHtml);
224 |
225 | new Craft.MatrixInput.Entry(matrixField, $entry);
226 |
227 | matrixField.entrySort.addItems($entry);
228 | matrixField.entrySelect.addItems($entry);
229 | matrixField.updateAddEntryBtn();
230 | }
231 | })
232 | .catch((error) => {
233 | console.error(error);
234 | })
235 | .finally(() => {
236 | $spinner.remove();
237 | });
238 | } catch(e) { }
239 | },
240 |
241 | cloneBlock: function(e) {
242 | var data = this._serializeBlocks();
243 |
244 | this.pasteBlock(e, data);
245 | },
246 |
247 | _serializeBlocks: function() {
248 | var matrixField = this.$matrixField.data('matrix');
249 | var $selectedItems = matrixField.entrySelect.$selectedItems;
250 |
251 | var data = {
252 | fieldId: matrixField.id,
253 | blocks: []
254 | };
255 |
256 | if (!$selectedItems.length) {
257 | $selectedItems = this.$matrixBlock;
258 | }
259 |
260 | for (var i = 0; i < $selectedItems.length; i++) {
261 | var $blockItem = $($selectedItems[i]);
262 |
263 | data.blocks.push({
264 | id: $blockItem.data('id'),
265 | uid: $blockItem.data('uid'),
266 | fieldId: matrixField.settings.fieldId,
267 | entryTypeId: $blockItem.data('type-id'),
268 | ownerId: matrixField.settings.ownerId,
269 | ownerElementType: matrixField.settings.ownerElementType,
270 | siteId: matrixField.settings.siteId,
271 | namespace: matrixField.settings.namespace,
272 | });
273 | }
274 |
275 | return data;
276 | },
277 | });
278 |
279 |
280 | })(jQuery);
281 |
--------------------------------------------------------------------------------
/src/resources/src/scss/smith.scss:
--------------------------------------------------------------------------------
1 | // ==========================================================================
2 |
3 | // Smith for Craft CMS
4 | // Author: Verbb - https://verbb.io/
5 |
6 | // ==========================================================================
7 |
8 | .smith-spinner {
9 | width: 100%;
10 | }
11 |
12 | @font-face {
13 | font-family: 'Font Awesome 5 Free';
14 | font-style: normal;
15 | font-weight: 900;
16 | font-display: auto;
17 | src: url("../fonts/fa-regular-400.eot");
18 | src: url("../fonts/fa-regular-400.eot?#iefix") format("embedded-opentype"),
19 | url("../fonts/fa-regular-400.woff2") format("woff2"),
20 | url("../fonts/fa-regular-400.woff") format("woff"),
21 | url("../fonts/fa-regular-400.ttf") format("truetype"),
22 | url("../fonts/fa-regular-400.svg#fontawesome") format("svg");
23 | }
24 |
25 | .menu ul li a[data-icon="copy"]:before,
26 | .menu ul li a[data-icon="paste"]:before,
27 | .menu ul li a[data-icon="clone"]:before {
28 | font-family: 'Font Awesome 5 Free';
29 | font-weight: 400;
30 | text-align: left;
31 | }
32 |
33 | .menu ul li a[data-icon="copy"]:before {
34 | content: '\f0c5';
35 | }
36 |
37 | .menu ul li a[data-icon="paste"]:before {
38 | content: '\f328';
39 | padding-left: 1px !important;
40 | }
41 |
42 | .menu ul li a[data-icon="clone"]:before {
43 | content: '\f24d';
44 | font-size: 12px !important;
45 | padding-top: 2px !important;
46 | }
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/services/Field.php:
--------------------------------------------------------------------------------
1 |