@liferay-editor-custom-fields/framework 7.4.8 → 74.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -24
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lawrence Behar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,37 +1,19 @@
1
1
  # Liferay Custom Fields Framework
2
2
 
3
- The engine behind Liferay Editor Custom Fields.
3
+ The engine behind Liferay Editor Custom Fields.
4
+
5
+ You only need this if you are creating a new Liferay Editor Custom Fields package, otherwise it is provided as a dependency on existing ones.
4
6
 
5
7
  ## Before You Start
6
8
 
7
9
  Any client extension using this framework should not run on a production or pre-prod staging environment. It is only intended for the fragment and web content editors. Any JS that will end up on the page should be elsewhere, either in a separate client extension or in the fragment/web content template.
8
10
 
9
- You only need this if you are creating a new Liferay Editor Custom Fields package, otherwise it is provided as a dependency on existing ones.
11
+ If you are creating/appending DOM elements, make sure that you check for an existing element to avoid infinite MutationObserver loops.
10
12
 
11
13
  ## Getting Started
12
14
 
13
- - Install @liferay-editor-custom-fields/framework
14
- - Make sure the version matches the minor version of Liferay you are using
15
- - For example `yarn add @liferay-editor-custom-fields/framework@~7.4.0` for Liferay 7.4.
16
- - In the index.ts of your app:
17
- - Declare the Liferay global object
18
- - Import the default exported function from @liferay-editor-custom-fields/framework. You can call it something short like initFramework();
19
- - Create a default exported function of your own and call that function
20
- - Write a Liferay.on event subscriber for each event that your app will be using. See the Events section of this document for a list of events.
21
-
22
- ```
23
- declare const Liferay;
24
-
25
- import initFramework from '@liferay-editor-custom-fields/framework';
26
-
27
- const initImageTools: () => void = () => {
28
- initFramework();
29
- Liferay.on('EditorCustomFields_WebContentFields_OnLoad', ()=>{});
30
- Liferay.on('EditorCustomFields_FragmenConfig_OnLoad', ()=>{});
31
- Liferay.on('EditorCustomFields_Image_OnChange', ()=>{});
32
- }
33
- export default initImageTools;
34
- ```
15
+ - Download the boilerplate starter at https://github.com/lbeharxtivia/liferay-editor-custom-fields-sample
16
+ - See below for available events and helper functions
35
17
 
36
18
  ## Events
37
19
 
package/package.json CHANGED
@@ -25,5 +25,5 @@
25
25
  "start": "webpack serve",
26
26
  "watch": "tsc --watch"
27
27
  },
28
- "version": "7.4.8"
28
+ "version": "74.0.0"
29
29
  }