@livepreso/react-plugin-textfield 0.1.1 → 0.1.3

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.
@@ -133,7 +133,7 @@
133
133
  "/@tiptap/extension-bold@3.0.9(@tiptap/core@3.0.9)": "sha512-rVULIFt9ZO+fO5ty9zuC3HwY3knxUw7q9JBztpKPfQQCuIJ+iQnOfB8NtI3L8hxVSxhIR1pqr8B3S/8vlpXbVg==",
134
134
  "/@tiptap/extension-bubble-menu@3.0.9(@tiptap/core@3.0.9)(@tiptap/pm@3.0.9)": "sha512-fZQfdSbKJl3J+Yi+s8NrcLBgXHOaGVD4g+vn+orTPUlZdG9FWvEoon8DexOdK9OvYnW6QMM7kS8whOgpogVyUQ==",
135
135
  "/@tiptap/extension-document@3.0.9(@tiptap/core@3.0.9)": "sha512-DB/R5e6QvuGhY8EhCkfNjR2xQfz/TOWoxfQGhDuy5U+oK3WBwCcHq9t5+nbSCMHtKfi/i49aHKDvv7TQCpuP0w==",
136
- "/@tiptap/extension-floating-menu@3.4.2(@tiptap/core@3.0.9)(@tiptap/pm@3.0.9)": "sha512-2jDugvR7e506fDfmO22cHU0XnRyBsvig8XNSBPEcXyP3xy53kxiaCF4CzRC8DyzuC7u1NilII27TnwV5iM+9Pg==",
136
+ "/@tiptap/extension-floating-menu@3.4.6(@tiptap/core@3.0.9)(@tiptap/pm@3.0.9)": "sha512-4Y0GbnPd2ET4Z/Co7mcX8Dx2t+ox+6bolIAil378r20mTPTVL09vHWK9OhbGxlxkhbJ158CeKBqsZh4cO824qg==",
137
137
  "/@tiptap/extension-hard-break@3.0.9(@tiptap/core@3.0.9)": "sha512-PWNYsUwVsMWt/R5/OWjfGb+7DQT0DvH+1owBimRq0pWZepg8qkz1jdPGgsRmUFyERRsXeEpgj3VaQfrgbyUfrA==",
138
138
  "/@tiptap/extension-heading@3.0.9(@tiptap/core@3.0.9)": "sha512-LRLCIt87fvDZ5CdkinzhkCwRz5ax6FlsjJzG32MJ3wXyvVslqeLXBvH28JFUZEyzgcd/SnYmYxnef5+yvAX61g==",
139
139
  "/@tiptap/extension-image@3.0.9(@tiptap/core@3.0.9)": "sha512-/2igN/oIF58zqX5fcg00bf6qGLcQyXHysl5I8GiurkvO95d+SQTlYbJneSRUpt6CgrUKbhRnMBPVubmapgg+Zw==",
package/CHANGELOG.json CHANGED
@@ -1,6 +1,30 @@
1
1
  {
2
2
  "name": "@livepreso/react-plugin-textfield",
3
3
  "entries": [
4
+ {
5
+ "version": "0.1.3",
6
+ "tag": "@livepreso/react-plugin-textfield_v0.1.3",
7
+ "date": "Tue, 28 Oct 2025 00:29:49 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "optimise table toolbar creation"
12
+ }
13
+ ]
14
+ }
15
+ },
16
+ {
17
+ "version": "0.1.2",
18
+ "tag": "@livepreso/react-plugin-textfield_v0.1.2",
19
+ "date": "Mon, 27 Oct 2025 00:19:05 GMT",
20
+ "comments": {
21
+ "patch": [
22
+ {
23
+ "comment": "Add user editability check"
24
+ }
25
+ ]
26
+ }
27
+ },
4
28
  {
5
29
  "version": "0.1.1",
6
30
  "tag": "@livepreso/react-plugin-textfield_v0.1.1",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log - @livepreso/react-plugin-textfield
2
2
 
3
- This log was last generated on Wed, 01 Oct 2025 02:27:21 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 28 Oct 2025 00:29:49 GMT and should not be manually modified.
4
+
5
+ ## 0.1.3
6
+ Tue, 28 Oct 2025 00:29:49 GMT
7
+
8
+ ### Patches
9
+
10
+ - optimise table toolbar creation
11
+
12
+ ## 0.1.2
13
+ Mon, 27 Oct 2025 00:19:05 GMT
14
+
15
+ ### Patches
16
+
17
+ - Add user editability check
4
18
 
5
19
  ## 0.1.1
6
20
  Wed, 01 Oct 2025 02:27:21 GMT
package/index.js CHANGED
@@ -219,8 +219,16 @@ function EditableTextField({
219
219
  {isEditable && (
220
220
  <>
221
221
  <PrimaryToolbar configuration={primaryOptions} {...toolbarOptions} />
222
- <TableCellMenu configuration={tableCellOptions} {...toolbarOptions} />
223
- <TableToolbar configuration={tableOptions} {...toolbarOptions} />
222
+
223
+ {tableOptions.length > 0 && (
224
+ <>
225
+ <TableCellMenu
226
+ configuration={tableCellOptions}
227
+ {...toolbarOptions}
228
+ />
229
+ <TableToolbar configuration={tableOptions} {...toolbarOptions} />
230
+ </>
231
+ )}
224
232
  </>
225
233
  )}
226
234
  <div
@@ -268,9 +276,18 @@ function CMSValField({ id, children, ...props }) {
268
276
  const [cmsValue, setCMSValue] = useCMSVal(id);
269
277
  const value = !isThumbnailScreenshot && cmsValue;
270
278
 
279
+ // Check if the app allows editing this field. If the function doesn't exist
280
+ // assume it's ok.
281
+ const userCanEdit =
282
+ isUserTemplate ||
283
+ isUserTemplateLibrary ||
284
+ (Bridge.CMSVals?.canEditKey?.(id) ?? true);
285
+
271
286
  const isEditable =
272
287
  props.isEditable &&
288
+ userCanEdit &&
273
289
  (isPresomanager || isUserTemplateLibrary || isUserTemplate);
290
+
274
291
  return (
275
292
  <EditableTextField
276
293
  {...props}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livepreso/react-plugin-textfield",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {