seat-editor 3.5.57 → 3.5.59

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.
@@ -8,7 +8,7 @@ import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
8
8
  import { isEqual, omit } from "lodash";
9
9
  import LayerView from "../view-only-3";
10
10
  import { Spin } from "antd";
11
- import { objectDataKlenik } from "../panel/utils";
11
+ import { objectDataExtraKlenik, objectDataKlenik } from "../panel/utils";
12
12
  const TableEditor = (props) => {
13
13
  var _a;
14
14
  const [initialValue, setInitialValue] = useState(null);
@@ -44,6 +44,7 @@ const TableEditor = (props) => {
44
44
  }
45
45
  }, [viewOnly]);
46
46
  const onUpdateCurrentState = () => {
47
+ var _a;
47
48
  let reverseComponentHidden = (props === null || props === void 0 ? void 0 : props.hiddenStatusKey)
48
49
  ? components === null || components === void 0 ? void 0 : components.map((c, i) => {
49
50
  var _a, _b;
@@ -104,14 +105,14 @@ const TableEditor = (props) => {
104
105
  // );
105
106
  // }
106
107
  if (!hasUndefined && !viewOnly) {
107
- const extraComponentFilterFromDataKlenik = Object.fromEntries(Object.entries(extraComponents)
108
- .filter(([key]) => objectDataKlenik.includes(key))
109
- .map(([key, value]) => {
108
+ const extraComponentFilterFromDataKlenik = (_a = extraComponents === null || extraComponents === void 0 ? void 0 : extraComponents.map((item) => Object.fromEntries(Object.entries(item).map(([key, value]) => {
109
+ if (!objectDataExtraKlenik.includes(key))
110
+ return [key, value];
110
111
  const num = Number(value);
111
112
  if (isNaN(num))
112
113
  return [key, key === "opacity" ? 0.5 : 0];
113
114
  return [key, num];
114
- }));
115
+ })))) !== null && _a !== void 0 ? _a : [];
115
116
  onCurrentStateChange({
116
117
  // @ts-ignore
117
118
  components: matchInitialValueWithComponents,
@@ -7,7 +7,7 @@ import { useAppDispatch, useAppSelector } from "../../hooks/use-redux";
7
7
  import { isEqual, omit } from "lodash";
8
8
  import LayerView from "../view-only-3";
9
9
  import { Spin } from "antd";
10
- import { objectDataKlenik } from "../panel/utils";
10
+ import { objectDataExtraKlenik, objectDataKlenik } from "../panel/utils";
11
11
  const TableEditor = (props) => {
12
12
  var _a;
13
13
  const [initialValue, setInitialValue] = useState(null);
@@ -43,6 +43,7 @@ const TableEditor = (props) => {
43
43
  }
44
44
  }, [viewOnly]);
45
45
  const onUpdateCurrentState = () => {
46
+ var _a;
46
47
  let reverseComponentHidden = (props === null || props === void 0 ? void 0 : props.hiddenStatusKey)
47
48
  ? components === null || components === void 0 ? void 0 : components.map((c, i) => {
48
49
  var _a, _b;
@@ -103,14 +104,14 @@ const TableEditor = (props) => {
103
104
  // );
104
105
  // }
105
106
  if (!hasUndefined && !viewOnly) {
106
- const extraComponentFilterFromDataKlenik = Object.fromEntries(Object.entries(extraComponents)
107
- .filter(([key]) => objectDataKlenik.includes(key))
108
- .map(([key, value]) => {
107
+ const extraComponentFilterFromDataKlenik = (_a = extraComponents === null || extraComponents === void 0 ? void 0 : extraComponents.map((item) => Object.fromEntries(Object.entries(item).map(([key, value]) => {
108
+ if (!objectDataExtraKlenik.includes(key))
109
+ return [key, value];
109
110
  const num = Number(value);
110
111
  if (isNaN(num))
111
112
  return [key, key === "opacity" ? 0.5 : 0];
112
113
  return [key, num];
113
- }));
114
+ })))) !== null && _a !== void 0 ? _a : [];
114
115
  onCurrentStateChange({
115
116
  // @ts-ignore
116
117
  components: matchInitialValueWithComponents,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.5.57",
3
+ "version": "3.5.59",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",