@scbt-ecom/ui 0.166.1 → 0.167.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 (78) hide show
  1. package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderAlgorithmic/SliderAlgorithmic.js +1 -1
  2. package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderAlgorithmic/hooks/useSliderAlgorithmic.js +1 -1
  3. package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderAlgorithmic/hooks/useSliderAlgorithmic.js.map +1 -1
  4. package/dist/lib/shared/utils/variableHolder/variableContextHolder.js.map +1 -1
  5. package/dist/lib/shared/utils/variables/variableResolver.js.map +1 -1
  6. package/dist/lib/widgets/calculator/CalculatorView.js +1 -1
  7. package/dist/lib/widgets/calculator/CalculatorView.js.map +1 -1
  8. package/dist/lib/widgets/calculator/model/helpers.js +1 -1
  9. package/dist/lib/widgets/calculator/model/helpers.js.map +1 -1
  10. package/dist/lib/widgets/calculator/model/index.js +1 -1
  11. package/dist/lib/widgets/calculator/model/utils.js +1 -1
  12. package/dist/lib/widgets/calculator/model/utils.js.map +1 -1
  13. package/dist/lib/widgets/calculator/ui/calculatorFields/CalculatorFields.js.map +1 -1
  14. package/dist/lib/widgets/calculator/ui/calculatorInfo/CalculatorInfo.js +1 -1
  15. package/dist/lib/widgets/calculator/ui/calculatorInfo/CalculatorInfo.js.map +1 -1
  16. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/CalculatedBlock.js.map +1 -1
  17. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/CalculatorInfoBody.js.map +1 -1
  18. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/InfoListItem.js.map +1 -1
  19. package/dist/lib/widgets/model/helpers.js +1 -1
  20. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +1 -1
  21. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +1 -1
  22. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js.map +1 -1
  23. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -1
  24. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
  25. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +1 -1
  26. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +1 -1
  27. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +1 -1
  28. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js.map +1 -1
  29. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +1 -1
  30. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +1 -1
  31. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
  32. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/slicedToArray.js.map +1 -1
  33. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js.map +1 -1
  34. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -1
  35. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -1
  36. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -1
  37. package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -1
  38. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/Handles/Handle.js +1 -1
  39. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/Handles/index.js +1 -1
  40. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/Marks/Mark.js +1 -1
  41. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/Slider.js +1 -1
  42. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/Steps/Dot.js +1 -1
  43. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/Tracks/Track.js +1 -1
  44. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/Tracks/index.js +1 -1
  45. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/hooks/useDrag.js +1 -1
  46. package/dist/node_modules/.pnpm/rc-slider@11.1.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-slider/es/hooks/useOffset.js +1 -1
  47. package/dist/node_modules/.pnpm/rc-util@5.44.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-util/es/hooks/useMergedState.js +1 -1
  48. package/dist/node_modules/.pnpm/rc-util@5.44.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-util/es/hooks/useState.js +1 -1
  49. package/dist/node_modules/.pnpm/rc-util@5.44.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-util/es/isEqual.js +1 -1
  50. package/dist/stats.html +1 -1
  51. package/dist/types/lib/shared/utils/variableHolder/variableContextHolder.d.ts +3 -0
  52. package/dist/types/lib/shared/utils/variables/variableResolver.d.ts +4 -3
  53. package/dist/types/lib/widgets/calculator/model/helpers.d.ts +2 -2
  54. package/dist/types/lib/widgets/calculator/model/types.d.ts +1 -4
  55. package/dist/types/lib/widgets/calculator/model/utils.d.ts +1 -2
  56. package/dist/types/lib/widgets/calculator/ui/calculatorInfo/CalculatorInfo.d.ts +1 -1
  57. package/dist/types/lib/widgets/calculator/ui/calculatorInfo/ui/CalculatedBlock.d.ts +3 -2
  58. package/dist/types/lib/widgets/calculator/ui/calculatorInfo/ui/CalculatorInfoBody.d.ts +2 -2
  59. package/dist/types/lib/widgets/calculator/ui/calculatorInfo/ui/InfoListItem.d.ts +5 -9
  60. package/package.json +1 -1
  61. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -0
  62. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -0
  63. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -0
  64. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -0
  65. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/extends.js +0 -0
  66. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -0
  67. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -0
  68. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -0
  69. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -0
  70. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -0
  71. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -0
  72. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -0
  73. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -0
  74. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -0
  75. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -0
  76. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -0
  77. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -0
  78. /package/dist/node_modules/.pnpm/{@babel_runtime@7.28.4 → @babel_runtime@7.28.6}/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -0
@@ -152,6 +152,9 @@ export interface VariableStore {
152
152
  * const processedString = transformVariable(stringWithVariables)
153
153
  * ```
154
154
  */
155
+ /**
156
+ * @deprecated dont use
157
+ */
155
158
  export declare class VariableContextHolder<Key extends string = string, Value = string> implements IVariableContextHolder<Key, Value> {
156
159
  private _store;
157
160
  private _variables;
@@ -1,10 +1,11 @@
1
1
  import { AllowedVariablePrefix, Resolved, VariablePattern, VariableType } from './types';
2
2
  export declare const defaultAllowedPrefixes: AllowedVariablePrefix[];
3
- export declare const variableResolver: <Variable extends VariableType>() => {
4
- addPattern: (start: VariablePattern["start"], end: VariablePattern["end"]) => /*elided*/ any;
5
- addVariables: (vars: Variable[]) => /*elided*/ any;
3
+ export type VariableResolver<Variable extends VariableType> = {
4
+ addPattern: (start: VariablePattern['start'], end: VariablePattern['end']) => VariableResolver<Variable>;
5
+ addVariables: (vars: Variable[]) => VariableResolver<Variable>;
6
6
  unwrapVariable: (string: string, allowedPrefixes?: AllowedVariablePrefix[]) => string;
7
7
  wrapVariable: (string: string, allowedPrefixes?: AllowedVariablePrefix[]) => string;
8
8
  escapeVariable: (string: string) => string;
9
9
  resolve: <T>(data: T) => Resolved<T>;
10
10
  };
11
+ export declare const variableResolver: <Variable extends VariableType>() => VariableResolver<Variable>;
@@ -1,4 +1,4 @@
1
- import { InfoListItemDTO, InfoListItemProps } from '../ui';
1
+ import { InfoListItemProps } from '../ui';
2
2
  import { CalculatorVariables } from './types';
3
3
  export declare const evaluateFormula: (formula: string, variables: CalculatorVariables) => string;
4
- export declare const formatInfoList: (list: InfoListItemDTO[], variables: CalculatorVariables) => InfoListItemProps[];
4
+ export declare const formatInfoList: (list: InfoListItemProps[], variables: CalculatorVariables) => InfoListItemProps[];
@@ -1,9 +1,6 @@
1
1
  import { getCalculatorSchema } from './utils';
2
2
  export type CalculatorVariables = Record<string, any>;
3
3
  export type CalculatorSuffix = 'percent' | 'currency';
4
- export type ValueWithFormula = {
5
- formula: string;
6
- };
7
- export type CalculatorValue = ValueWithFormula | string;
4
+ export type CalculatorRootValue = string;
8
5
  export type ModalContentVariant = 'content1' | 'content2';
9
6
  export type CalculatorSchema = ReturnType<typeof getCalculatorSchema>;
@@ -1,9 +1,8 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
2
  import { z } from 'zod';
3
3
  import { CalculatorViewProps } from '../..';
4
- import { CalculatorSuffix, ValueWithFormula } from './types';
4
+ import { CalculatorSuffix } from './types';
5
5
  import { InfoListItemMode } from '../ui';
6
- export declare const isFormula: (value: ValueWithFormula | string) => value is ValueWithFormula;
7
6
  export declare const formatWithIntl: (suffix: CalculatorSuffix, value: number) => string | null;
8
7
  export declare const formatValueToRenderInfoItem: (renderMode: InfoListItemMode, value: string) => string | null;
9
8
  export declare const getCalculatorSchema: <T extends FieldValues>(props: CalculatorViewProps<T>["calculatorFieldsConfig"]["fieldsGroup"]) => z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
@@ -10,4 +10,4 @@ export interface CalculatorInfoProps extends Omit<CalculatedBlockProps, 'classes
10
10
  classes?: CalculatorInfoClasses;
11
11
  headline?: string;
12
12
  }
13
- export declare const CalculatorInfo: ({ rootDescription, bottomDescription, rootValue, title, subtitle, buttonsConfig, infoList, suffix, assistHint, headline, classes }: CalculatorInfoProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const CalculatorInfo: ({ rootDescription, bottomDescription, rootValue, title, subtitle, buttonsConfig, infoList, suffix, assistHint, headline, isFormula, classes }: CalculatorInfoProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { CalculatorSuffix, CalculatorValue } from '../../../model';
1
+ import { CalculatorRootValue, CalculatorSuffix } from '../../../model';
2
2
  export type CalculatedBlockClasses = {
3
3
  wrapper?: string;
4
4
  description?: string;
@@ -6,7 +6,8 @@ export type CalculatedBlockClasses = {
6
6
  };
7
7
  export interface CalculatedBlockProps {
8
8
  rootDescription: string;
9
- rootValue: CalculatorValue;
9
+ rootValue: CalculatorRootValue;
10
+ isFormula: boolean;
10
11
  suffix: CalculatorSuffix;
11
12
  classes?: CalculatedBlockClasses;
12
13
  }
@@ -1,9 +1,9 @@
1
- import { InfoListItemDTO } from '../..';
1
+ import { InfoListItemProps } from '../..';
2
2
  export type CalculatorInfoBodyClasses = {
3
3
  wrapper?: string;
4
4
  };
5
5
  export interface CalculatedInfoBodyProps {
6
- infoList: InfoListItemDTO[];
6
+ infoList: InfoListItemProps[];
7
7
  classes?: CalculatorInfoBodyClasses;
8
8
  withoutDivider?: boolean;
9
9
  }
@@ -1,18 +1,14 @@
1
- import { CalculatorSuffix, CalculatorValue } from '../../../model';
1
+ import { CalculatorSuffix } from '../../../model';
2
2
  export type InfoListItemMode = CalculatorSuffix | 'text';
3
3
  export type InfoListItemColor = 'dark' | 'blue';
4
- export interface InfoListItemCommon {
4
+ export type InfoListItemValue = string;
5
+ export interface InfoListItemProps {
5
6
  label: string;
6
7
  mode: InfoListItemMode;
7
8
  hint?: string;
8
9
  accent?: boolean;
9
10
  color?: InfoListItemColor;
10
- withFormula?: boolean;
11
- }
12
- export interface InfoListItemDTO extends InfoListItemCommon {
13
- value: CalculatorValue;
14
- }
15
- export interface InfoListItemProps extends InfoListItemCommon {
16
- value: string;
11
+ isFormula: boolean;
12
+ value: InfoListItemValue;
17
13
  }
18
14
  export declare const InfoListItem: ({ hint, value, label, mode, color, accent }: InfoListItemProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scbt-ecom/ui",
3
- "version": "0.166.1",
3
+ "version": "0.167.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {