@uniformdev/tms-sdk 20.75.1-alpha.15.sha-b6ff05804e → 20.75.1-alpha.6

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/dist/index.esm.js CHANGED
@@ -160,11 +160,7 @@ var SUPPORTED_PARAM_TYPES = {
160
160
  };
161
161
 
162
162
  // src/richText/renderAsTranslatableXml.ts
163
- import {
164
- getRichTextListItemValue,
165
- getRichTextTagsFromTextFormat,
166
- isRichTextNodeType
167
- } from "@uniformdev/richtext";
163
+ import { getRichTextTagsFromTextFormat, isRichTextNodeType } from "@uniformdev/richtext";
168
164
  var REF_ATTRIBUTE_NAME = "ref";
169
165
  function renderAsTranslatableXml(root) {
170
166
  if (!root) {
@@ -222,23 +218,8 @@ var getPropsAsBase64 = (node, ignoreProps) => {
222
218
  props[key] = node[key];
223
219
  }
224
220
  });
225
- applyMissingSerializedDefaults(node.type, props);
226
221
  return btoa(JSON.stringify(props));
227
222
  };
228
- function applyMissingSerializedDefaults(nodeType, props) {
229
- if (props.version === void 0) {
230
- props.version = 1;
231
- }
232
- if ((nodeType === "text" || nodeType === "tab") && props.format === void 0) {
233
- props.format = 0;
234
- } else if (nodeType === "list" && props.start === void 0) {
235
- props.start = 1;
236
- } else if (nodeType === "listitem" && props.value === void 0) {
237
- props.value = 1;
238
- } else if (nodeType === "tablecell" && props.headerState === void 0) {
239
- props.headerState = 0;
240
- }
241
- }
242
223
  var getNodeMetaAttributesString = (node) => {
243
224
  const metadata = {};
244
225
  if (isRichTextNodeType(node, "text")) {
@@ -259,10 +240,7 @@ var getNodeMetaAttributesString = (node) => {
259
240
  metadata["tag"] = node.tag;
260
241
  }
261
242
  } else if (isRichTextNodeType(node, "listitem")) {
262
- const value = getRichTextListItemValue(node.value);
263
- if (typeof value === "number") {
264
- metadata["value"] = String(value);
265
- }
243
+ metadata["value"] = String(node.value);
266
244
  }
267
245
  if (!Object.keys(metadata).length) {
268
246
  return "";
package/dist/index.js CHANGED
@@ -234,23 +234,8 @@ var getPropsAsBase64 = (node, ignoreProps) => {
234
234
  props[key] = node[key];
235
235
  }
236
236
  });
237
- applyMissingSerializedDefaults(node.type, props);
238
237
  return btoa(JSON.stringify(props));
239
238
  };
240
- function applyMissingSerializedDefaults(nodeType, props) {
241
- if (props.version === void 0) {
242
- props.version = 1;
243
- }
244
- if ((nodeType === "text" || nodeType === "tab") && props.format === void 0) {
245
- props.format = 0;
246
- } else if (nodeType === "list" && props.start === void 0) {
247
- props.start = 1;
248
- } else if (nodeType === "listitem" && props.value === void 0) {
249
- props.value = 1;
250
- } else if (nodeType === "tablecell" && props.headerState === void 0) {
251
- props.headerState = 0;
252
- }
253
- }
254
239
  var getNodeMetaAttributesString = (node) => {
255
240
  const metadata = {};
256
241
  if ((0, import_richtext.isRichTextNodeType)(node, "text")) {
@@ -271,10 +256,7 @@ var getNodeMetaAttributesString = (node) => {
271
256
  metadata["tag"] = node.tag;
272
257
  }
273
258
  } else if ((0, import_richtext.isRichTextNodeType)(node, "listitem")) {
274
- const value = (0, import_richtext.getRichTextListItemValue)(node.value);
275
- if (typeof value === "number") {
276
- metadata["value"] = String(value);
277
- }
259
+ metadata["value"] = String(node.value);
278
260
  }
279
261
  if (!Object.keys(metadata).length) {
280
262
  return "";
package/dist/index.mjs CHANGED
@@ -160,11 +160,7 @@ var SUPPORTED_PARAM_TYPES = {
160
160
  };
161
161
 
162
162
  // src/richText/renderAsTranslatableXml.ts
163
- import {
164
- getRichTextListItemValue,
165
- getRichTextTagsFromTextFormat,
166
- isRichTextNodeType
167
- } from "@uniformdev/richtext";
163
+ import { getRichTextTagsFromTextFormat, isRichTextNodeType } from "@uniformdev/richtext";
168
164
  var REF_ATTRIBUTE_NAME = "ref";
169
165
  function renderAsTranslatableXml(root) {
170
166
  if (!root) {
@@ -222,23 +218,8 @@ var getPropsAsBase64 = (node, ignoreProps) => {
222
218
  props[key] = node[key];
223
219
  }
224
220
  });
225
- applyMissingSerializedDefaults(node.type, props);
226
221
  return btoa(JSON.stringify(props));
227
222
  };
228
- function applyMissingSerializedDefaults(nodeType, props) {
229
- if (props.version === void 0) {
230
- props.version = 1;
231
- }
232
- if ((nodeType === "text" || nodeType === "tab") && props.format === void 0) {
233
- props.format = 0;
234
- } else if (nodeType === "list" && props.start === void 0) {
235
- props.start = 1;
236
- } else if (nodeType === "listitem" && props.value === void 0) {
237
- props.value = 1;
238
- } else if (nodeType === "tablecell" && props.headerState === void 0) {
239
- props.headerState = 0;
240
- }
241
- }
242
223
  var getNodeMetaAttributesString = (node) => {
243
224
  const metadata = {};
244
225
  if (isRichTextNodeType(node, "text")) {
@@ -259,10 +240,7 @@ var getNodeMetaAttributesString = (node) => {
259
240
  metadata["tag"] = node.tag;
260
241
  }
261
242
  } else if (isRichTextNodeType(node, "listitem")) {
262
- const value = getRichTextListItemValue(node.value);
263
- if (typeof value === "number") {
264
- metadata["value"] = String(value);
265
- }
243
+ metadata["value"] = String(node.value);
266
244
  }
267
245
  if (!Object.keys(metadata).length) {
268
246
  return "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/tms-sdk",
3
- "version": "20.75.1-alpha.15.sha-b6ff05804e",
3
+ "version": "20.75.1-alpha.6+28f494b01a",
4
4
  "description": "Uniform Translation Management System SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -32,12 +32,12 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@uniformdev/canvas": "20.75.1-alpha.15.sha-b6ff05804e",
36
- "@uniformdev/mesh-sdk": "20.75.1-alpha.15.sha-b6ff05804e",
37
- "@uniformdev/richtext": "20.75.1-alpha.15.sha-b6ff05804e",
35
+ "@uniformdev/canvas": "20.75.1-alpha.6+28f494b01a",
36
+ "@uniformdev/mesh-sdk": "20.75.1-alpha.6+28f494b01a",
37
+ "@uniformdev/richtext": "20.75.1-alpha.6+28f494b01a",
38
38
  "dequal": "2.0.3",
39
39
  "fast-xml-parser": "4.5.5",
40
40
  "immer": "10.2.0"
41
41
  },
42
- "gitHead": "b6ff05804e8d082bdd9563566f9eda24d999a771"
42
+ "gitHead": "28f494b01a1b988afdf9f7e3ecf6fad402bb3777"
43
43
  }