@iebh/tera-fy 1.14.0 → 1.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.14.2](https://github.com/IEBH/TERA-fy/compare/v1.14.1...v1.14.2) (2024-11-01)
4
+
5
+
6
+ ### fix
7
+
8
+ * Wrong body text binding with UIConfirm ([ecd870c](https://github.com/IEBH/TERA-fy/commit/ecd870c4460a7021853220a6bc34756a9f425430))
9
+
10
+ ## [1.14.1](https://github.com/IEBH/TERA-fy/compare/v1.14.0...v1.14.1) (2024-10-17)
11
+
12
+
13
+ ### docs
14
+
15
+ * Stale docs for setProjectFileContents() ([e9e8867](https://github.com/IEBH/TERA-fy/commit/e9e8867db3d23415ecfa6f6daf7f15ed98ab5954))
16
+
3
17
  # [1.14.0](https://github.com/IEBH/TERA-fy/compare/v1.13.4...v1.14.0) (2024-10-17)
4
18
 
5
19
 
package/api.md CHANGED
@@ -894,12 +894,20 @@ Returns **[Promise][155]** A promise which resolves when the operation has compl
894
894
 
895
895
  ## setProjectFileContents
896
896
 
897
- Replace a project files contents
897
+ Save (or overwrite) a file within a project
898
898
 
899
899
  ### Parameters
900
900
 
901
- * `id` **[String][148]** File to overwrite
901
+ * `id` **([String][148] | [ProjectFile][1])?** ProjectFile or ID of the same to overwrite, if omitted a file is prompted for
902
902
  * `contents` **(File | [Blob][152] | [FormData][153] | [Object][149] | [Array][154])** The new file contents
903
+ * `options` **[Object][149]?** Additional options to mutate behaviour
904
+
905
+ * `options.id` **([String][148] | [ProjectFile][1])?** Alternate method to specify the file ID to save as, if omitted one will be prompted for
906
+ * `options.autoRequire` **[Boolean][157]** Run `requireProject()` automatically before continuing (optional, default `true`)
907
+ * `options.hint` **([String][148] | [Array][154]<[String][148]>)?** Hint(s) to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
908
+ * `options.filename` **[String][148]?** Suggested filename if `id` is unspecified
909
+ * `options.title` **[String][148]** Dialog title if `id` is unspecified and a prompt is necessary (optional, default `'Save citation library'`)
910
+ * `options.meta` **[Object][149]?** Optional meta data to merge into the file data
903
911
 
904
912
  Returns **[Promise][155]** A promise which will resolve when the write operation has completed
905
913
 
@@ -1214,11 +1214,19 @@ export default class TeraFy {
1214
1214
 
1215
1215
 
1216
1216
  /**
1217
- * Replace a project files contents
1217
+ * Save (or overwrite) a file within a project
1218
1218
  *
1219
1219
  * @function setProjectFileContents
1220
- * @param {String} id File to overwrite
1220
+ * @param {String|ProjectFile} [id] ProjectFile or ID of the same to overwrite, if omitted a file is prompted for
1221
1221
  * @param {File|Blob|FormData|Object|Array} contents The new file contents
1222
+ * @param {Object} [options] Additional options to mutate behaviour
1223
+ * @param {String|ProjectFile} [options.id] Alternate method to specify the file ID to save as, if omitted one will be prompted for
1224
+ * @param {Boolean} [options.autoRequire=true] Run `requireProject()` automatically before continuing
1225
+ * @param {String|Array<String>} [options.hint] Hint(s) to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
1226
+ * @param {String} [options.filename] Suggested filename if `id` is unspecified
1227
+ * @param {String} [options.title='Save citation library'] Dialog title if `id` is unspecified and a prompt is necessary
1228
+ * @param {Object} [options.meta] Optional meta data to merge into the file data
1229
+ *
1222
1230
  * @returns {Promise} A promise which will resolve when the write operation has completed
1223
1231
  */
1224
1232
 
@@ -1117,12 +1117,12 @@ export default class TeraFyServer {
1117
1117
 
1118
1118
 
1119
1119
  /**
1120
- * Replace a project files contents
1120
+ * Save (or overwrite) a file within a project
1121
1121
  *
1122
- * @param {String} [id] File ID to save back to, if omitted a file will be prompted for
1122
+ * @param {String|ProjectFile} [id] ProjectFile or ID of the same to overwrite, if omitted a file is prompted for
1123
1123
  * @param {File|Blob|FormData|Object|Array} contents The new file contents
1124
1124
  * @param {Object} [options] Additional options to mutate behaviour
1125
- * @param {String} [options.id] Alternate method to specify the file ID to save as, if omitted one will be prompted for
1125
+ * @param {String|ProjectFile} [options.id] Alternate method to specify the file ID to save as, if omitted one will be prompted for
1126
1126
  * @param {Boolean} [options.autoRequire=true] Run `requireProject()` automatically before continuing
1127
1127
  * @param {String|Array<String>} [options.hint] Hint(s) to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
1128
1128
  * @param {String} [options.filename] Suggested filename if `id` is unspecified
@@ -1483,7 +1483,7 @@ export default class TeraFyServer {
1483
1483
  return this.requestFocus(()=>
1484
1484
  app.service('$prompt').dialog({
1485
1485
  title: settings.title,
1486
- body: text,
1486
+ body: settings.body,
1487
1487
  isHtml: settings.isHtml,
1488
1488
  buttons: [
1489
1489
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iebh/tera-fy",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "description": "TERA website worker",
5
5
  "scripts": {
6
6
  "dev": "esbuild --platform=browser --format=esm --bundle lib/terafy.client.js --outfile=dist/terafy.js --minify --serve --servedir=.",