@uniformdev/canvas 19.173.1-alpha.17 → 19.173.2-alpha.8
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.d.mts +39 -1462
- package/dist/index.d.ts +39 -1462
- package/dist/index.esm.js +4 -127
- package/dist/index.js +5 -130
- package/dist/index.mjs +4 -127
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
@@ -1631,59 +1631,6 @@ function evaluateCriterion(clause, rootOptions) {
|
|
1631
1631
|
return null;
|
1632
1632
|
}
|
1633
1633
|
|
1634
|
-
// src/enhancement/visibility/evaluatePropertyCriteria.ts
|
1635
|
-
function evaluatePropertyCriteria({
|
1636
|
-
baseValue,
|
1637
|
-
conditionalValues,
|
1638
|
-
keepIndeterminate,
|
1639
|
-
...evaluateGroupOptions
|
1640
|
-
}) {
|
1641
|
-
let authoritative = true;
|
1642
|
-
const result = {
|
1643
|
-
currentValue: baseValue,
|
1644
|
-
remainingConditionalValues: evaluateGroupOptions.simplifyCriteria && conditionalValues ? [...conditionalValues] : conditionalValues,
|
1645
|
-
currentConditionIndex: -1
|
1646
|
-
};
|
1647
|
-
if (!conditionalValues) {
|
1648
|
-
return result;
|
1649
|
-
}
|
1650
|
-
const conditionIndexesToRemove = [];
|
1651
|
-
for (let i = 0; i < conditionalValues.length; i++) {
|
1652
|
-
const conditionalVariant = conditionalValues[i];
|
1653
|
-
if (result.matched) {
|
1654
|
-
conditionIndexesToRemove.push(i);
|
1655
|
-
continue;
|
1656
|
-
}
|
1657
|
-
const evaluationResult = evaluateVisibilityCriteriaGroup({
|
1658
|
-
...evaluateGroupOptions,
|
1659
|
-
criteriaGroup: conditionalVariant.when
|
1660
|
-
});
|
1661
|
-
if (evaluationResult === null) {
|
1662
|
-
if (keepIndeterminate) {
|
1663
|
-
authoritative = false;
|
1664
|
-
} else {
|
1665
|
-
conditionIndexesToRemove.push(i);
|
1666
|
-
}
|
1667
|
-
} else if (evaluationResult === true) {
|
1668
|
-
result.matched = conditionalVariant;
|
1669
|
-
result.currentValue = conditionalVariant.value;
|
1670
|
-
result.currentConditionIndex = i;
|
1671
|
-
conditionIndexesToRemove.push(i);
|
1672
|
-
} else {
|
1673
|
-
conditionIndexesToRemove.push(i);
|
1674
|
-
}
|
1675
|
-
}
|
1676
|
-
if (evaluateGroupOptions.simplifyCriteria) {
|
1677
|
-
for (let i = conditionIndexesToRemove.length - 1; i >= 0; i--) {
|
1678
|
-
result.remainingConditionalValues.splice(conditionIndexesToRemove[i], 1);
|
1679
|
-
}
|
1680
|
-
}
|
1681
|
-
if (authoritative) {
|
1682
|
-
result.remainingConditionalValues = void 0;
|
1683
|
-
}
|
1684
|
-
return result;
|
1685
|
-
}
|
1686
|
-
|
1687
1634
|
// src/enhancement/visibility/types.ts
|
1688
1635
|
var CANVAS_VIZ_CONTROL_PARAM = "$viz";
|
1689
1636
|
|
@@ -1711,8 +1658,8 @@ function evaluateNodeVisibility({
|
|
1711
1658
|
return result;
|
1712
1659
|
}
|
1713
1660
|
|
1714
|
-
// src/enhancement/visibility/
|
1715
|
-
function
|
1661
|
+
// src/enhancement/visibility/evaluateWalkTreeVisibility.ts
|
1662
|
+
function evaluateWalkTreeVisibility({
|
1716
1663
|
rules,
|
1717
1664
|
showIndeterminate,
|
1718
1665
|
context
|
@@ -1729,69 +1676,6 @@ function evaluateWalkTreeNodeVisibility({
|
|
1729
1676
|
return true;
|
1730
1677
|
}
|
1731
1678
|
|
1732
|
-
// src/enhancement/visibility/evaluateWalkTreePropertyCriteria.ts
|
1733
|
-
function evaluateWalkTreePropertyCriteria({
|
1734
|
-
rules,
|
1735
|
-
node,
|
1736
|
-
keepIndeterminate
|
1737
|
-
}) {
|
1738
|
-
const properties = getPropertiesValue(node);
|
1739
|
-
if (!properties) {
|
1740
|
-
return;
|
1741
|
-
}
|
1742
|
-
Object.entries(properties).forEach(([propertyName, property]) => {
|
1743
|
-
var _a, _b, _c;
|
1744
|
-
if (property.locales || property.localesConditions) {
|
1745
|
-
const localesDefined = [
|
1746
|
-
...Object.keys((_a = property.locales) != null ? _a : {}),
|
1747
|
-
...Object.keys((_b = property.localesConditions) != null ? _b : {})
|
1748
|
-
];
|
1749
|
-
localesDefined.forEach((locale) => {
|
1750
|
-
var _a2, _b2, _c2, _d, _e, _f, _g;
|
1751
|
-
const { currentValue, remainingConditionalValues } = evaluatePropertyCriteria({
|
1752
|
-
baseValue: (_a2 = property.locales) == null ? void 0 : _a2[locale],
|
1753
|
-
conditionalValues: (_b2 = property.localesConditions) == null ? void 0 : _b2[locale],
|
1754
|
-
rules,
|
1755
|
-
simplifyCriteria: true,
|
1756
|
-
keepIndeterminate
|
1757
|
-
});
|
1758
|
-
if (currentValue === null) {
|
1759
|
-
(_c2 = property.locales) == null ? true : delete _c2[locale];
|
1760
|
-
if (!Object.keys((_d = property.locales) != null ? _d : {}).length) {
|
1761
|
-
delete properties[propertyName];
|
1762
|
-
}
|
1763
|
-
} else {
|
1764
|
-
(_e = property.locales) != null ? _e : property.locales = {};
|
1765
|
-
property.locales[locale] = currentValue;
|
1766
|
-
}
|
1767
|
-
if (!(remainingConditionalValues == null ? void 0 : remainingConditionalValues.length)) {
|
1768
|
-
(_f = property.localesConditions) == null ? true : delete _f[locale];
|
1769
|
-
} else {
|
1770
|
-
(_g = property.localesConditions) != null ? _g : property.localesConditions = {};
|
1771
|
-
property.localesConditions[locale] = remainingConditionalValues;
|
1772
|
-
}
|
1773
|
-
});
|
1774
|
-
if (!Object.keys((_c = property.localesConditions) != null ? _c : {}).length) {
|
1775
|
-
delete property.localesConditions;
|
1776
|
-
}
|
1777
|
-
} else {
|
1778
|
-
const { currentValue, remainingConditionalValues } = evaluatePropertyCriteria({
|
1779
|
-
baseValue: property.value,
|
1780
|
-
conditionalValues: property.conditions,
|
1781
|
-
rules,
|
1782
|
-
simplifyCriteria: true,
|
1783
|
-
keepIndeterminate
|
1784
|
-
});
|
1785
|
-
if (currentValue === null) {
|
1786
|
-
delete properties[propertyName];
|
1787
|
-
} else {
|
1788
|
-
property.value = currentValue;
|
1789
|
-
}
|
1790
|
-
property.conditions = remainingConditionalValues;
|
1791
|
-
}
|
1792
|
-
});
|
1793
|
-
}
|
1794
|
-
|
1795
1679
|
// src/enhancement/visibility/rules/evaluateStringMatch.ts
|
1796
1680
|
var isEvaluator = (criteria, matchValue) => {
|
1797
1681
|
if (Array.isArray(criteria)) {
|
@@ -1936,7 +1820,7 @@ function localize(options) {
|
|
1936
1820
|
return;
|
1937
1821
|
}
|
1938
1822
|
if (isUsingModernOptions) {
|
1939
|
-
const result =
|
1823
|
+
const result = evaluateWalkTreeVisibility({
|
1940
1824
|
context,
|
1941
1825
|
rules: vizControlLocaleRule,
|
1942
1826
|
showIndeterminate: true
|
@@ -1944,11 +1828,6 @@ function localize(options) {
|
|
1944
1828
|
if (!result) {
|
1945
1829
|
return;
|
1946
1830
|
}
|
1947
|
-
evaluateWalkTreePropertyCriteria({
|
1948
|
-
node: context.node,
|
1949
|
-
rules: vizControlLocaleRule,
|
1950
|
-
keepIndeterminate: true
|
1951
|
-
});
|
1952
1831
|
}
|
1953
1832
|
if (node.type === CANVAS_LOCALIZATION_TYPE) {
|
1954
1833
|
const locales = extractLocales({ component: node });
|
@@ -3203,10 +3082,8 @@ export {
|
|
3203
3082
|
createUniformApiEnhancer,
|
3204
3083
|
createVariableReference,
|
3205
3084
|
enhance,
|
3206
|
-
evaluatePropertyCriteria,
|
3207
3085
|
evaluateVisibilityCriteriaGroup,
|
3208
|
-
|
3209
|
-
evaluateWalkTreePropertyCriteria,
|
3086
|
+
evaluateWalkTreeVisibility,
|
3210
3087
|
extractLocales,
|
3211
3088
|
findParameterInNodeTree,
|
3212
3089
|
flattenValues,
|
package/dist/index.js
CHANGED
@@ -352,10 +352,8 @@ __export(src_exports, {
|
|
352
352
|
createUniformApiEnhancer: () => createUniformApiEnhancer,
|
353
353
|
createVariableReference: () => createVariableReference,
|
354
354
|
enhance: () => enhance,
|
355
|
-
evaluatePropertyCriteria: () => evaluatePropertyCriteria,
|
356
355
|
evaluateVisibilityCriteriaGroup: () => evaluateVisibilityCriteriaGroup,
|
357
|
-
|
358
|
-
evaluateWalkTreePropertyCriteria: () => evaluateWalkTreePropertyCriteria,
|
356
|
+
evaluateWalkTreeVisibility: () => evaluateWalkTreeVisibility,
|
359
357
|
extractLocales: () => extractLocales,
|
360
358
|
findParameterInNodeTree: () => findParameterInNodeTree,
|
361
359
|
flattenValues: () => flattenValues,
|
@@ -1781,59 +1779,6 @@ function evaluateCriterion(clause, rootOptions) {
|
|
1781
1779
|
return null;
|
1782
1780
|
}
|
1783
1781
|
|
1784
|
-
// src/enhancement/visibility/evaluatePropertyCriteria.ts
|
1785
|
-
function evaluatePropertyCriteria({
|
1786
|
-
baseValue,
|
1787
|
-
conditionalValues,
|
1788
|
-
keepIndeterminate,
|
1789
|
-
...evaluateGroupOptions
|
1790
|
-
}) {
|
1791
|
-
let authoritative = true;
|
1792
|
-
const result = {
|
1793
|
-
currentValue: baseValue,
|
1794
|
-
remainingConditionalValues: evaluateGroupOptions.simplifyCriteria && conditionalValues ? [...conditionalValues] : conditionalValues,
|
1795
|
-
currentConditionIndex: -1
|
1796
|
-
};
|
1797
|
-
if (!conditionalValues) {
|
1798
|
-
return result;
|
1799
|
-
}
|
1800
|
-
const conditionIndexesToRemove = [];
|
1801
|
-
for (let i = 0; i < conditionalValues.length; i++) {
|
1802
|
-
const conditionalVariant = conditionalValues[i];
|
1803
|
-
if (result.matched) {
|
1804
|
-
conditionIndexesToRemove.push(i);
|
1805
|
-
continue;
|
1806
|
-
}
|
1807
|
-
const evaluationResult = evaluateVisibilityCriteriaGroup({
|
1808
|
-
...evaluateGroupOptions,
|
1809
|
-
criteriaGroup: conditionalVariant.when
|
1810
|
-
});
|
1811
|
-
if (evaluationResult === null) {
|
1812
|
-
if (keepIndeterminate) {
|
1813
|
-
authoritative = false;
|
1814
|
-
} else {
|
1815
|
-
conditionIndexesToRemove.push(i);
|
1816
|
-
}
|
1817
|
-
} else if (evaluationResult === true) {
|
1818
|
-
result.matched = conditionalVariant;
|
1819
|
-
result.currentValue = conditionalVariant.value;
|
1820
|
-
result.currentConditionIndex = i;
|
1821
|
-
conditionIndexesToRemove.push(i);
|
1822
|
-
} else {
|
1823
|
-
conditionIndexesToRemove.push(i);
|
1824
|
-
}
|
1825
|
-
}
|
1826
|
-
if (evaluateGroupOptions.simplifyCriteria) {
|
1827
|
-
for (let i = conditionIndexesToRemove.length - 1; i >= 0; i--) {
|
1828
|
-
result.remainingConditionalValues.splice(conditionIndexesToRemove[i], 1);
|
1829
|
-
}
|
1830
|
-
}
|
1831
|
-
if (authoritative) {
|
1832
|
-
result.remainingConditionalValues = void 0;
|
1833
|
-
}
|
1834
|
-
return result;
|
1835
|
-
}
|
1836
|
-
|
1837
1782
|
// src/enhancement/visibility/types.ts
|
1838
1783
|
var CANVAS_VIZ_CONTROL_PARAM = "$viz";
|
1839
1784
|
|
@@ -1861,8 +1806,8 @@ function evaluateNodeVisibility({
|
|
1861
1806
|
return result;
|
1862
1807
|
}
|
1863
1808
|
|
1864
|
-
// src/enhancement/visibility/
|
1865
|
-
function
|
1809
|
+
// src/enhancement/visibility/evaluateWalkTreeVisibility.ts
|
1810
|
+
function evaluateWalkTreeVisibility({
|
1866
1811
|
rules,
|
1867
1812
|
showIndeterminate,
|
1868
1813
|
context
|
@@ -1879,69 +1824,6 @@ function evaluateWalkTreeNodeVisibility({
|
|
1879
1824
|
return true;
|
1880
1825
|
}
|
1881
1826
|
|
1882
|
-
// src/enhancement/visibility/evaluateWalkTreePropertyCriteria.ts
|
1883
|
-
function evaluateWalkTreePropertyCriteria({
|
1884
|
-
rules,
|
1885
|
-
node,
|
1886
|
-
keepIndeterminate
|
1887
|
-
}) {
|
1888
|
-
const properties = getPropertiesValue(node);
|
1889
|
-
if (!properties) {
|
1890
|
-
return;
|
1891
|
-
}
|
1892
|
-
Object.entries(properties).forEach(([propertyName, property]) => {
|
1893
|
-
var _a, _b, _c;
|
1894
|
-
if (property.locales || property.localesConditions) {
|
1895
|
-
const localesDefined = [
|
1896
|
-
...Object.keys((_a = property.locales) != null ? _a : {}),
|
1897
|
-
...Object.keys((_b = property.localesConditions) != null ? _b : {})
|
1898
|
-
];
|
1899
|
-
localesDefined.forEach((locale) => {
|
1900
|
-
var _a2, _b2, _c2, _d, _e, _f, _g;
|
1901
|
-
const { currentValue, remainingConditionalValues } = evaluatePropertyCriteria({
|
1902
|
-
baseValue: (_a2 = property.locales) == null ? void 0 : _a2[locale],
|
1903
|
-
conditionalValues: (_b2 = property.localesConditions) == null ? void 0 : _b2[locale],
|
1904
|
-
rules,
|
1905
|
-
simplifyCriteria: true,
|
1906
|
-
keepIndeterminate
|
1907
|
-
});
|
1908
|
-
if (currentValue === null) {
|
1909
|
-
(_c2 = property.locales) == null ? true : delete _c2[locale];
|
1910
|
-
if (!Object.keys((_d = property.locales) != null ? _d : {}).length) {
|
1911
|
-
delete properties[propertyName];
|
1912
|
-
}
|
1913
|
-
} else {
|
1914
|
-
(_e = property.locales) != null ? _e : property.locales = {};
|
1915
|
-
property.locales[locale] = currentValue;
|
1916
|
-
}
|
1917
|
-
if (!(remainingConditionalValues == null ? void 0 : remainingConditionalValues.length)) {
|
1918
|
-
(_f = property.localesConditions) == null ? true : delete _f[locale];
|
1919
|
-
} else {
|
1920
|
-
(_g = property.localesConditions) != null ? _g : property.localesConditions = {};
|
1921
|
-
property.localesConditions[locale] = remainingConditionalValues;
|
1922
|
-
}
|
1923
|
-
});
|
1924
|
-
if (!Object.keys((_c = property.localesConditions) != null ? _c : {}).length) {
|
1925
|
-
delete property.localesConditions;
|
1926
|
-
}
|
1927
|
-
} else {
|
1928
|
-
const { currentValue, remainingConditionalValues } = evaluatePropertyCriteria({
|
1929
|
-
baseValue: property.value,
|
1930
|
-
conditionalValues: property.conditions,
|
1931
|
-
rules,
|
1932
|
-
simplifyCriteria: true,
|
1933
|
-
keepIndeterminate
|
1934
|
-
});
|
1935
|
-
if (currentValue === null) {
|
1936
|
-
delete properties[propertyName];
|
1937
|
-
} else {
|
1938
|
-
property.value = currentValue;
|
1939
|
-
}
|
1940
|
-
property.conditions = remainingConditionalValues;
|
1941
|
-
}
|
1942
|
-
});
|
1943
|
-
}
|
1944
|
-
|
1945
1827
|
// src/enhancement/visibility/rules/evaluateStringMatch.ts
|
1946
1828
|
var isEvaluator = (criteria, matchValue) => {
|
1947
1829
|
if (Array.isArray(criteria)) {
|
@@ -2086,7 +1968,7 @@ function localize(options) {
|
|
2086
1968
|
return;
|
2087
1969
|
}
|
2088
1970
|
if (isUsingModernOptions) {
|
2089
|
-
const result =
|
1971
|
+
const result = evaluateWalkTreeVisibility({
|
2090
1972
|
context,
|
2091
1973
|
rules: vizControlLocaleRule,
|
2092
1974
|
showIndeterminate: true
|
@@ -2094,11 +1976,6 @@ function localize(options) {
|
|
2094
1976
|
if (!result) {
|
2095
1977
|
return;
|
2096
1978
|
}
|
2097
|
-
evaluateWalkTreePropertyCriteria({
|
2098
|
-
node: context.node,
|
2099
|
-
rules: vizControlLocaleRule,
|
2100
|
-
keepIndeterminate: true
|
2101
|
-
});
|
2102
1979
|
}
|
2103
1980
|
if (node.type === CANVAS_LOCALIZATION_TYPE) {
|
2104
1981
|
const locales = extractLocales({ component: node });
|
@@ -3354,10 +3231,8 @@ var CanvasClientError = import_api15.ApiClientError;
|
|
3354
3231
|
createUniformApiEnhancer,
|
3355
3232
|
createVariableReference,
|
3356
3233
|
enhance,
|
3357
|
-
evaluatePropertyCriteria,
|
3358
3234
|
evaluateVisibilityCriteriaGroup,
|
3359
|
-
|
3360
|
-
evaluateWalkTreePropertyCriteria,
|
3235
|
+
evaluateWalkTreeVisibility,
|
3361
3236
|
extractLocales,
|
3362
3237
|
findParameterInNodeTree,
|
3363
3238
|
flattenValues,
|
package/dist/index.mjs
CHANGED
@@ -1631,59 +1631,6 @@ function evaluateCriterion(clause, rootOptions) {
|
|
1631
1631
|
return null;
|
1632
1632
|
}
|
1633
1633
|
|
1634
|
-
// src/enhancement/visibility/evaluatePropertyCriteria.ts
|
1635
|
-
function evaluatePropertyCriteria({
|
1636
|
-
baseValue,
|
1637
|
-
conditionalValues,
|
1638
|
-
keepIndeterminate,
|
1639
|
-
...evaluateGroupOptions
|
1640
|
-
}) {
|
1641
|
-
let authoritative = true;
|
1642
|
-
const result = {
|
1643
|
-
currentValue: baseValue,
|
1644
|
-
remainingConditionalValues: evaluateGroupOptions.simplifyCriteria && conditionalValues ? [...conditionalValues] : conditionalValues,
|
1645
|
-
currentConditionIndex: -1
|
1646
|
-
};
|
1647
|
-
if (!conditionalValues) {
|
1648
|
-
return result;
|
1649
|
-
}
|
1650
|
-
const conditionIndexesToRemove = [];
|
1651
|
-
for (let i = 0; i < conditionalValues.length; i++) {
|
1652
|
-
const conditionalVariant = conditionalValues[i];
|
1653
|
-
if (result.matched) {
|
1654
|
-
conditionIndexesToRemove.push(i);
|
1655
|
-
continue;
|
1656
|
-
}
|
1657
|
-
const evaluationResult = evaluateVisibilityCriteriaGroup({
|
1658
|
-
...evaluateGroupOptions,
|
1659
|
-
criteriaGroup: conditionalVariant.when
|
1660
|
-
});
|
1661
|
-
if (evaluationResult === null) {
|
1662
|
-
if (keepIndeterminate) {
|
1663
|
-
authoritative = false;
|
1664
|
-
} else {
|
1665
|
-
conditionIndexesToRemove.push(i);
|
1666
|
-
}
|
1667
|
-
} else if (evaluationResult === true) {
|
1668
|
-
result.matched = conditionalVariant;
|
1669
|
-
result.currentValue = conditionalVariant.value;
|
1670
|
-
result.currentConditionIndex = i;
|
1671
|
-
conditionIndexesToRemove.push(i);
|
1672
|
-
} else {
|
1673
|
-
conditionIndexesToRemove.push(i);
|
1674
|
-
}
|
1675
|
-
}
|
1676
|
-
if (evaluateGroupOptions.simplifyCriteria) {
|
1677
|
-
for (let i = conditionIndexesToRemove.length - 1; i >= 0; i--) {
|
1678
|
-
result.remainingConditionalValues.splice(conditionIndexesToRemove[i], 1);
|
1679
|
-
}
|
1680
|
-
}
|
1681
|
-
if (authoritative) {
|
1682
|
-
result.remainingConditionalValues = void 0;
|
1683
|
-
}
|
1684
|
-
return result;
|
1685
|
-
}
|
1686
|
-
|
1687
1634
|
// src/enhancement/visibility/types.ts
|
1688
1635
|
var CANVAS_VIZ_CONTROL_PARAM = "$viz";
|
1689
1636
|
|
@@ -1711,8 +1658,8 @@ function evaluateNodeVisibility({
|
|
1711
1658
|
return result;
|
1712
1659
|
}
|
1713
1660
|
|
1714
|
-
// src/enhancement/visibility/
|
1715
|
-
function
|
1661
|
+
// src/enhancement/visibility/evaluateWalkTreeVisibility.ts
|
1662
|
+
function evaluateWalkTreeVisibility({
|
1716
1663
|
rules,
|
1717
1664
|
showIndeterminate,
|
1718
1665
|
context
|
@@ -1729,69 +1676,6 @@ function evaluateWalkTreeNodeVisibility({
|
|
1729
1676
|
return true;
|
1730
1677
|
}
|
1731
1678
|
|
1732
|
-
// src/enhancement/visibility/evaluateWalkTreePropertyCriteria.ts
|
1733
|
-
function evaluateWalkTreePropertyCriteria({
|
1734
|
-
rules,
|
1735
|
-
node,
|
1736
|
-
keepIndeterminate
|
1737
|
-
}) {
|
1738
|
-
const properties = getPropertiesValue(node);
|
1739
|
-
if (!properties) {
|
1740
|
-
return;
|
1741
|
-
}
|
1742
|
-
Object.entries(properties).forEach(([propertyName, property]) => {
|
1743
|
-
var _a, _b, _c;
|
1744
|
-
if (property.locales || property.localesConditions) {
|
1745
|
-
const localesDefined = [
|
1746
|
-
...Object.keys((_a = property.locales) != null ? _a : {}),
|
1747
|
-
...Object.keys((_b = property.localesConditions) != null ? _b : {})
|
1748
|
-
];
|
1749
|
-
localesDefined.forEach((locale) => {
|
1750
|
-
var _a2, _b2, _c2, _d, _e, _f, _g;
|
1751
|
-
const { currentValue, remainingConditionalValues } = evaluatePropertyCriteria({
|
1752
|
-
baseValue: (_a2 = property.locales) == null ? void 0 : _a2[locale],
|
1753
|
-
conditionalValues: (_b2 = property.localesConditions) == null ? void 0 : _b2[locale],
|
1754
|
-
rules,
|
1755
|
-
simplifyCriteria: true,
|
1756
|
-
keepIndeterminate
|
1757
|
-
});
|
1758
|
-
if (currentValue === null) {
|
1759
|
-
(_c2 = property.locales) == null ? true : delete _c2[locale];
|
1760
|
-
if (!Object.keys((_d = property.locales) != null ? _d : {}).length) {
|
1761
|
-
delete properties[propertyName];
|
1762
|
-
}
|
1763
|
-
} else {
|
1764
|
-
(_e = property.locales) != null ? _e : property.locales = {};
|
1765
|
-
property.locales[locale] = currentValue;
|
1766
|
-
}
|
1767
|
-
if (!(remainingConditionalValues == null ? void 0 : remainingConditionalValues.length)) {
|
1768
|
-
(_f = property.localesConditions) == null ? true : delete _f[locale];
|
1769
|
-
} else {
|
1770
|
-
(_g = property.localesConditions) != null ? _g : property.localesConditions = {};
|
1771
|
-
property.localesConditions[locale] = remainingConditionalValues;
|
1772
|
-
}
|
1773
|
-
});
|
1774
|
-
if (!Object.keys((_c = property.localesConditions) != null ? _c : {}).length) {
|
1775
|
-
delete property.localesConditions;
|
1776
|
-
}
|
1777
|
-
} else {
|
1778
|
-
const { currentValue, remainingConditionalValues } = evaluatePropertyCriteria({
|
1779
|
-
baseValue: property.value,
|
1780
|
-
conditionalValues: property.conditions,
|
1781
|
-
rules,
|
1782
|
-
simplifyCriteria: true,
|
1783
|
-
keepIndeterminate
|
1784
|
-
});
|
1785
|
-
if (currentValue === null) {
|
1786
|
-
delete properties[propertyName];
|
1787
|
-
} else {
|
1788
|
-
property.value = currentValue;
|
1789
|
-
}
|
1790
|
-
property.conditions = remainingConditionalValues;
|
1791
|
-
}
|
1792
|
-
});
|
1793
|
-
}
|
1794
|
-
|
1795
1679
|
// src/enhancement/visibility/rules/evaluateStringMatch.ts
|
1796
1680
|
var isEvaluator = (criteria, matchValue) => {
|
1797
1681
|
if (Array.isArray(criteria)) {
|
@@ -1936,7 +1820,7 @@ function localize(options) {
|
|
1936
1820
|
return;
|
1937
1821
|
}
|
1938
1822
|
if (isUsingModernOptions) {
|
1939
|
-
const result =
|
1823
|
+
const result = evaluateWalkTreeVisibility({
|
1940
1824
|
context,
|
1941
1825
|
rules: vizControlLocaleRule,
|
1942
1826
|
showIndeterminate: true
|
@@ -1944,11 +1828,6 @@ function localize(options) {
|
|
1944
1828
|
if (!result) {
|
1945
1829
|
return;
|
1946
1830
|
}
|
1947
|
-
evaluateWalkTreePropertyCriteria({
|
1948
|
-
node: context.node,
|
1949
|
-
rules: vizControlLocaleRule,
|
1950
|
-
keepIndeterminate: true
|
1951
|
-
});
|
1952
1831
|
}
|
1953
1832
|
if (node.type === CANVAS_LOCALIZATION_TYPE) {
|
1954
1833
|
const locales = extractLocales({ component: node });
|
@@ -3203,10 +3082,8 @@ export {
|
|
3203
3082
|
createUniformApiEnhancer,
|
3204
3083
|
createVariableReference,
|
3205
3084
|
enhance,
|
3206
|
-
evaluatePropertyCriteria,
|
3207
3085
|
evaluateVisibilityCriteriaGroup,
|
3208
|
-
|
3209
|
-
evaluateWalkTreePropertyCriteria,
|
3086
|
+
evaluateWalkTreeVisibility,
|
3210
3087
|
extractLocales,
|
3211
3088
|
findParameterInNodeTree,
|
3212
3089
|
flattenValues,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.173.
|
3
|
+
"version": "19.173.2-alpha.8+7b0bc70fd5",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -38,8 +38,8 @@
|
|
38
38
|
"pusher-js": "8.2.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/assets": "19.173.
|
42
|
-
"@uniformdev/context": "19.173.
|
41
|
+
"@uniformdev/assets": "19.173.2-alpha.8+7b0bc70fd5",
|
42
|
+
"@uniformdev/context": "19.173.2-alpha.8+7b0bc70fd5",
|
43
43
|
"immer": "10.1.1"
|
44
44
|
},
|
45
45
|
"files": [
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"publishConfig": {
|
49
49
|
"access": "public"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "7b0bc70fd58912415a860667c266cb339fa8133a"
|
52
52
|
}
|