@kontur.candy/generator 5.115.1-enhanced-server-filters.1 → 5.115.1-enhanced-server-filters.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.
Files changed (2) hide show
  1. package/dist/index.js +25 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -47494,6 +47494,26 @@ class ModelPathImpl {
47494
47494
  // @ts-expect-error
47495
47495
  return result.toPath();
47496
47496
  }
47497
+ applyCommonInstancesFromAnotherPath(modelPath) {
47498
+ const anotherTokens = modelPath.getPathPartsAsArray();
47499
+ const updatedTokens = this.tokens.reduce((acc, token, index) => {
47500
+ const anotherToken = anotherTokens[index];
47501
+ const nextTokenInfo = acc.matching && (PathTokens.isMultiToken(token) && PathTokens.isInstanceToken(anotherToken) || PathTokens.isSimpleToken(token) && PathTokens.isSimpleToken(anotherToken) && token === anotherToken) ? {
47502
+ nextToken: anotherToken,
47503
+ matching: true
47504
+ } : {
47505
+ nextToken: token,
47506
+ matching: false
47507
+ };
47508
+ acc.matching = nextTokenInfo.matching;
47509
+ acc.tokens[index] = nextTokenInfo.nextToken;
47510
+ return acc;
47511
+ }, {
47512
+ tokens: Array.from(this.tokens),
47513
+ matching: true
47514
+ }).tokens;
47515
+ return new ModelPathImpl(updatedTokens, this.absolute);
47516
+ }
47497
47517
  pathPartToString(pathPart) {
47498
47518
  if (typeof pathPart === "string") {
47499
47519
  return pathPart;
@@ -92154,7 +92174,9 @@ class FilterDateRangeConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MOD
92154
92174
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__.componentMarkupBuilder)("FilterDateRange");
92155
92175
  markupBuilder.prop(x => x.dataPath).set(dataPath);
92156
92176
  markupBuilder.prop(x => x.filteredUniqKey).set(node.filteredUniqKey);
92157
- markupBuilder.prop(x => x.convertDateToTicksInFilterExpression).set(useServerFilters);
92177
+ if (useServerFilters) {
92178
+ markupBuilder.prop(x => x.convertDateToTicksInFilterExpression).set(useServerFilters);
92179
+ }
92158
92180
  return markupBuilder.buildConverterResult();
92159
92181
  }
92160
92182
  }
@@ -105349,8 +105371,8 @@ class KCLangCalculationsBuildContext {
105349
105371
  getFirstAcceptedParent(schemaNode) {
105350
105372
  let parentNode = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.parent;
105351
105373
  while (parentNode != undefined) {
105352
- if (parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_28__.FormSchemaRngElement) {
105353
- if (parentNode.isOptional() && !parentNode.multiple) {
105374
+ if (parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_28__.FormSchemaRngElement && !parentNode.multiple) {
105375
+ if (parentNode.isOptional()) {
105354
105376
  return parentNode;
105355
105377
  }
105356
105378
  parentNode = parentNode.parent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.115.1-enhanced-server-filters.1",
3
+ "version": "5.115.1-enhanced-server-filters.3",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,