@kontur.candy/generator 6.25.0 → 6.27.0-persons-api-url-fix.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 (2) hide show
  1. package/dist/index.js +23 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -109012,6 +109012,7 @@ __webpack_require__.r(__webpack_exports__);
109012
109012
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
109013
109013
  /* harmony export */ clamp: () => (/* binding */ clamp),
109014
109014
  /* harmony export */ clampUInt: () => (/* binding */ clampUInt),
109015
+ /* harmony export */ inRange: () => (/* binding */ inRange),
109015
109016
  /* harmony export */ sign: () => (/* binding */ sign)
109016
109017
  /* harmony export */ });
109017
109018
  function clamp(value, min, max) {
@@ -109037,6 +109038,9 @@ function sign(value) {
109037
109038
  }
109038
109039
  return 0;
109039
109040
  }
109041
+ function inRange(value, min, max) {
109042
+ return value >= min && value <= max;
109043
+ }
109040
109044
 
109041
109045
  /***/ }),
109042
109046
 
@@ -109600,7 +109604,13 @@ class KCLangRuntimeUtils {
109600
109604
  if (pattern == undefined || value == undefined || replacement == undefined || typeof value !== "string") {
109601
109605
  return undefined;
109602
109606
  }
109603
- return value.replace(new RegExp(pattern, flags), replacement);
109607
+ for (const flag of flags !== null && flags !== void 0 ? flags : "") {
109608
+ if (!"ims".includes(flag)) {
109609
+ throw new Error(`Unknown regex flag: ${flag}`);
109610
+ }
109611
+ }
109612
+ const effectiveFlags = flags !== null && flags !== void 0 && flags.includes("g") ? flags : (flags !== null && flags !== void 0 ? flags : "") + "g";
109613
+ return value.replace(new RegExp(pattern, effectiveFlags), replacement);
109604
109614
  }
109605
109615
  oneof(values, value) {
109606
109616
  if (values == undefined) {
@@ -110730,6 +110740,7 @@ __webpack_require__.r(__webpack_exports__);
110730
110740
  /* harmony export */ arrayHasLength: () => (/* binding */ arrayHasLength),
110731
110741
  /* harmony export */ arrayIsNotEmpty: () => (/* binding */ arrayIsNotEmpty),
110732
110742
  /* harmony export */ assertIs: () => (/* binding */ assertIs),
110743
+ /* harmony export */ castToError: () => (/* binding */ castToError),
110733
110744
  /* harmony export */ ensureAndGetString: () => (/* binding */ ensureAndGetString),
110734
110745
  /* harmony export */ ensureArrayHasLength: () => (/* binding */ ensureArrayHasLength),
110735
110746
  /* harmony export */ ensureArrayIsNotEmpty: () => (/* binding */ ensureArrayIsNotEmpty),
@@ -110763,6 +110774,9 @@ function stringifyUnknownError(error) {
110763
110774
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return
110764
110775
  return typeof error === "object" && (error === null || error === void 0 ? void 0 : error["message"]);
110765
110776
  }
110777
+ function castToError(unknown) {
110778
+ return unknown instanceof Error ? unknown : new Error(String(unknown));
110779
+ }
110766
110780
  function ensureNotNullOrUndefined(input, message) {
110767
110781
  if (!isNotNullOrUndefined(input)) {
110768
110782
  throw new Error(message !== null && message !== void 0 ? message : `Value must be defined`);
@@ -138549,7 +138563,7 @@ class KCLangExpressionToJsExpressionConverter extends _common_KCLang_CodeDom_KCL
138549
138563
  const keyAsStringConst = (0,_common_CastUtils__WEBPACK_IMPORTED_MODULE_11__.safeCast)(expression.key, _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_9__.StringConstExpression);
138550
138564
  const dependencyKey = keyAsStringConst != undefined ? keyAsStringConst.value : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)("visitGetExternalInfoFunctionalCall: Supported only constant value for key");
138551
138565
  context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.ExternalInfoDependency(dependencyKey));
138552
- return this.gcf(x => x.getProperty, `"${dependencyKey.replace(/^\@/, "")}"`, `() => undefined`);
138566
+ return this.gcf(x => x.getProperty, `"${dependencyKey.replace(/^\@/, "")}"`);
138553
138567
  }
138554
138568
  visitGetSumByKeysFunctionCall(_expression, _context) {
138555
138569
  throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_4__.NotSupportedError("GetSumByKeysFunctionCall is not supported");
@@ -141263,11 +141277,11 @@ class ConverterResult {
141263
141277
  const contextPath = context.dirName;
141264
141278
  const dependencyFilesWithContent = this.getDependencies(ctxName).map(dependency => dependency.toFile()).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined);
141265
141279
  if (context.isBase) {
141266
- builder.addComponent(`${contextPath}/index.js`, `export default from './${ctxName}'\n`, true);
141280
+ builder.addComponent(`${contextPath}/index.js`, `export default from './${ctxName}'\n`);
141267
141281
  }
141268
141282
  for (const dependencyFile of dependencyFilesWithContent) {
141269
141283
  const dependencyFilePath = `${contextPath}/${dependencyFile.getName()}`;
141270
- builder.addComponent(dependencyFilePath, dependencyFile.getContent(), true);
141284
+ builder.addComponent(dependencyFilePath, dependencyFile.getContent());
141271
141285
  }
141272
141286
  }
141273
141287
  setRenderBody(body = "") {
@@ -169079,7 +169093,7 @@ class MarkupGenerator {
169079
169093
  const contextName = context.name;
169080
169094
  converterResult.getDependenciesContent(contextName, builder);
169081
169095
  const converterResultJsx = _ConverterResults_ConverterResultJsxGenerator__WEBPACK_IMPORTED_MODULE_0__.ConverterResultJsxGenerator.generateJsx(contextName, converterResult, builder);
169082
- builder.addComponent(`${context.dirName}/${contextName}.jsx`, unescape(converterResultJsx.replace(/(\\)(u[\dA-Fa-f]{4})/g, "%$2")), false);
169096
+ builder.addComponent(`${context.dirName}/${contextName}.jsx`, unescape(converterResultJsx.replace(/(\\)(u[\dA-Fa-f]{4})/g, "%$2")));
169083
169097
  }
169084
169098
  }
169085
169099
  }
@@ -171827,7 +171841,8 @@ function getSettings(sugarRoot, gfv, additionalSettings, formJsonSettings) {
171827
171841
  useServerSideCalculations: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.useServerSideCalculations,
171828
171842
  disableFlangRulesForEnableAutoFieldFeature: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.disableFlangRulesForEnableAutoFieldFeature,
171829
171843
  enableAutocalcsInReadOnly: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.enableAutocalcsInReadOnly,
171830
- showErrorsCountInPanel: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.showErrorsCountInPanel
171844
+ showErrorsCountInPanel: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.showErrorsCountInPanel,
171845
+ inventoryAttachment: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.inventoryAttachment
171831
171846
  };
171832
171847
  return `module.exports = ${JSON.stringify(settings, undefined, 2)}`;
171833
171848
  }
@@ -356226,9 +356241,10 @@ __webpack_require__.r(__webpack_exports__);
356226
356241
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
356227
356242
  /* harmony export */ getAllDependencies: () => (/* reexport safe */ _generators_ReadFormSources__WEBPACK_IMPORTED_MODULE_8__.getAllDependencies),
356228
356243
  /* harmony export */ getAllDependenciesHash: () => (/* reexport safe */ _generators_ReadFormSources__WEBPACK_IMPORTED_MODULE_8__.getAllDependenciesHash),
356244
+ /* harmony export */ getDictionary: () => (/* reexport safe */ _generators_localization__WEBPACK_IMPORTED_MODULE_6__.getDictionary),
356229
356245
  /* harmony export */ getDocumentation: () => (/* reexport safe */ _generators_getDocumentation__WEBPACK_IMPORTED_MODULE_5__.getDocumentation),
356246
+ /* harmony export */ getLocalizedSugar: () => (/* reexport safe */ _generators_localization__WEBPACK_IMPORTED_MODULE_6__.getLocalizedSugar),
356230
356247
  /* harmony export */ getSugarTexts: () => (/* reexport safe */ _common_SugarExtractor_GetSugarTexts__WEBPACK_IMPORTED_MODULE_9__.getSugarTexts),
356231
- /* harmony export */ localization: () => (/* reexport module object */ _generators_localization__WEBPACK_IMPORTED_MODULE_6__),
356232
356248
  /* harmony export */ processSugar: () => (/* reexport safe */ _generators_ProcessFormSources__WEBPACK_IMPORTED_MODULE_7__.processSugar),
356233
356249
  /* harmony export */ readSources: () => (/* reexport safe */ _generators_ReadFormSources__WEBPACK_IMPORTED_MODULE_8__.readFormSources)
356234
356250
  /* harmony export */ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "6.25.0",
3
+ "version": "6.27.0-persons-api-url-fix.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,