sccoreui 5.6.0 → 5.6.1

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.
@@ -16,7 +16,7 @@ const FormulaCoponent = (props) => {
16
16
  const contentEditableDivRef = (0, react_1.useRef)(null);
17
17
  const [content, setContent] = (0, react_1.useState)(`<span class='formulaSpanElm'></span>`);
18
18
  const [contentEditableCursorIndex, setContentEditableCursorIndex] = (0, react_1.useState)(null);
19
- const [conditionValue, setConditionValue] = (0, react_1.useState)(1);
19
+ const [conditionValue, setConditionValue] = (0, react_1.useState)((props === null || props === void 0 ? void 0 : props.conditionValue) ? props === null || props === void 0 ? void 0 : props.conditionValue : 1);
20
20
  const [formulaPlaceholder, setFormulaPlaceholder] = (0, react_1.useState)(true);
21
21
  const operators = {
22
22
  "addition": '+',
@@ -313,7 +313,8 @@ const FormulaCoponent = (props) => {
313
313
  addEventListenerForSpan();
314
314
  }, 1000);
315
315
  };
316
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `condition_column border-1 flex border-gray-300 border-round-lg overflow-hidden w-full ${props === null || props === void 0 ? void 0 : props.className}` }, { children: [(0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { optionLabel: props === null || props === void 0 ? void 0 : props.optionLabel, "data-pr-classname": 'block', placeholder: (props === null || props === void 0 ? void 0 : props.dropdownPlaceholder) ? props === null || props === void 0 ? void 0 : props.dropdownPlaceholder : 'Select', value: conditionValue, onChange: (e) => { setConditionValue(e.value); }, className: `sc_animate w-4 overflow-hidden text-overflow-ellipsis white-space-nowrap formula_condition_dropdown border-right-1 border-gray-300 border-none border-noround`, options: props === null || props === void 0 ? void 0 : props.options }), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (() => {
316
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `condition_column border-1 flex border-gray-300 border-round-lg overflow-hidden w-full ${props === null || props === void 0 ? void 0 : props.className}` }, { children: [(0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { optionLabel: props === null || props === void 0 ? void 0 : props.optionLabel, "data-pr-classname": 'block', placeholder: (props === null || props === void 0 ? void 0 : props.dropdownPlaceholder) ? props === null || props === void 0 ? void 0 : props.dropdownPlaceholder : 'Select', value: conditionValue, onChange: (e) => { if (props === null || props === void 0 ? void 0 : props.onConditionChange)
317
+ props === null || props === void 0 ? void 0 : props.onConditionChange(e); setConditionValue(e.value); }, className: `sc_animate w-4 overflow-hidden text-overflow-ellipsis white-space-nowrap formula_condition_dropdown border-right-1 border-gray-300 border-none border-noround`, options: props === null || props === void 0 ? void 0 : props.options }), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (() => {
317
318
  var _a, _b;
318
319
  let optiontype = (_a = props === null || props === void 0 ? void 0 : props.options.find((x) => x.value === conditionValue)) === null || _a === void 0 ? void 0 : _a.optionType;
319
320
  switch (optiontype) {
@@ -296,6 +296,8 @@ export interface FormulaTemplateTypes {
296
296
  formulaElemectPlaceholder?: string;
297
297
  formulaValue: string;
298
298
  inputValue?: number;
299
+ onConditionChange?: (payload: any) => void;
300
+ conditionValue: number;
299
301
  fieldOptionTemplateTitle?: string;
300
302
  fieldOptions: any[];
301
303
  fieldFilter?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",