@crystaldesign/diva-backoffice 25.1.0-beta.2 → 25.1.0-beta.4
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/build/esm/index.js +1705 -1151
- package/build/types/backoffice/src/layout/Content/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/MainLayout.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Navigation/types.d.ts +9 -4
- package/build/types/backoffice/src/layout/Navigation/types.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts +8 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts +2 -6
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts +2 -11
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/index.d.ts +2 -6
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/useWysiwygContentItem.d.ts +2 -7
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/useWysiwygContentItem.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/index.d.ts +3 -2
- package/build/types/backoffice/src/layout/Toolbar/index.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts +4 -19
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ToolBarStore.d.ts +30 -0
- package/build/types/backoffice/src/store/ToolBarStore.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/Form/types.d.ts +2 -6
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Features.d.ts +11 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Features.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Items.d.ts +9 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Items.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts +9 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts +11 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/index.d.ts +10 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts +12 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/types.d.ts +2 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/types.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableFeatureClasses/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableFeatures/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableItems/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableOptions/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableSeries/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useNavigation.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCommonComponents/SpreadsheetWrapper/index.d.ts +8 -0
- package/build/types/backoffice/src/ui/IDMCommonComponents/SpreadsheetWrapper/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableTabGroups/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/RelationSelector/useRelationSelectorData.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/downloadHandler.d.ts +3 -2
- package/build/types/backoffice/src/utils/downloadHandler.d.ts.map +1 -1
- package/package.json +9 -9
- package/build/types/backoffice/src/layout/Toolbar/Spinner/index.d.ts +0 -7
- package/build/types/backoffice/src/layout/Toolbar/Spinner/index.d.ts.map +0 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/SpreadsheetWrapper/index.d.ts +0 -4
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/SpreadsheetWrapper/index.d.ts.map +0 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/SpreadsheetWrapper/index.d.ts +0 -4
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/SpreadsheetWrapper/index.d.ts.map +0 -1
package/build/esm/index.js
CHANGED
|
@@ -75,7 +75,7 @@ import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
|
|
|
75
75
|
import JSONEditor from 'jsoneditor';
|
|
76
76
|
import 'jsoneditor/dist/jsoneditor.css';
|
|
77
77
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
78
|
-
import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined,
|
|
78
|
+
import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, UploadOutlined as UploadOutlined$1, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
|
|
79
79
|
import classnames from 'classnames';
|
|
80
80
|
import RTFEditor from '@crystaldesign/rtf-editor';
|
|
81
81
|
import debounce from 'lodash/debounce';
|
|
@@ -119,17 +119,19 @@ import QuestionOutlined from '@ant-design/icons/QuestionOutlined';
|
|
|
119
119
|
import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';
|
|
120
120
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
121
121
|
import Descriptions$1 from 'antd/es/descriptions';
|
|
122
|
-
import { Spreadsheet as Spreadsheet$
|
|
122
|
+
import { Spreadsheet as Spreadsheet$1 } from '@crystaldesign/spreadsheet';
|
|
123
123
|
import EditOutlined from '@ant-design/icons/lib/icons/EditOutlined';
|
|
124
124
|
import Checkbox$1 from 'antd/es/checkbox/Checkbox';
|
|
125
|
+
import Modal$3 from 'antd/es/modal';
|
|
125
126
|
import Switch$1 from 'antd/es/switch';
|
|
126
127
|
import Layout$1 from 'antd/es/layout';
|
|
127
128
|
import Menu from 'antd/es/menu';
|
|
128
|
-
import { DoubleLeftOutlined } from '@ant-design/icons/lib/icons';
|
|
129
|
+
import { DoubleLeftOutlined, PushpinFilled } from '@ant-design/icons/lib/icons';
|
|
129
130
|
import { WebPlannerReact } from '@crystaldesign/diva-web-planner-react';
|
|
130
|
-
import Select$2 from 'react-select';
|
|
131
131
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
132
132
|
import { ContentItemComponent } from '@crystaldesign/content-item';
|
|
133
|
+
import PushpinOutlined from '@ant-design/icons/lib/icons/PushpinOutlined';
|
|
134
|
+
import Spin$1 from 'antd/es/spin';
|
|
133
135
|
|
|
134
136
|
(function() {
|
|
135
137
|
const env = {"STAGE":"production"};
|
|
@@ -146,8 +148,8 @@ import { ContentItemComponent } from '@crystaldesign/content-item';
|
|
|
146
148
|
function _createForOfIteratorHelper$m(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$m(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
147
149
|
function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$m(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$m(r, a) : void 0; } }
|
|
148
150
|
function _arrayLikeToArray$m(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
149
|
-
function ownKeys$
|
|
150
|
-
function _objectSpread$
|
|
151
|
+
function ownKeys$O(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
152
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$O(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$O(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
151
153
|
var LOG$e = getLogger('Backoffice', 'ApplyMapping');
|
|
152
154
|
function applyMapping (_ref) {
|
|
153
155
|
var mappable = _ref.mappable,
|
|
@@ -168,10 +170,10 @@ function applyMapping (_ref) {
|
|
|
168
170
|
var newValue = {};
|
|
169
171
|
newValue[newKey] = valueToAdd;
|
|
170
172
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
171
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
173
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$O(_objectSpread$O({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
172
174
|
return startValue;
|
|
173
175
|
}
|
|
174
|
-
if (newIdx == 1) return _objectSpread$
|
|
176
|
+
if (newIdx == 1) return _objectSpread$O(_objectSpread$O({}, startValue), newValue);
|
|
175
177
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
176
178
|
};
|
|
177
179
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -472,8 +474,8 @@ function getLeafColumns(columns) {
|
|
|
472
474
|
});
|
|
473
475
|
}
|
|
474
476
|
|
|
475
|
-
function ownKeys$
|
|
476
|
-
function _objectSpread$
|
|
477
|
+
function ownKeys$N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
478
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$N(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
477
479
|
var LOG$d = getLogger('Backoffice', 'ApiHandler');
|
|
478
480
|
var jp = require('jsonpath');
|
|
479
481
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -652,7 +654,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
652
654
|
_context2.next = 20;
|
|
653
655
|
return fetch(finalUrl, {
|
|
654
656
|
method: this._updateMethod,
|
|
655
|
-
headers: _objectSpread$
|
|
657
|
+
headers: _objectSpread$N(_objectSpread$N({}, jwt ? {
|
|
656
658
|
Authorization: 'Bearer ' + jwt
|
|
657
659
|
} : {}), {}, {
|
|
658
660
|
'Content-Type': 'application/json'
|
|
@@ -745,7 +747,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
745
747
|
rootStore: this._rootStore,
|
|
746
748
|
fallBackToParams: true
|
|
747
749
|
});
|
|
748
|
-
if (data) createData = _objectSpread$
|
|
750
|
+
if (data) createData = _objectSpread$N({}, data);
|
|
749
751
|
} else if (data !== undefined) {
|
|
750
752
|
createData = applyMapping({
|
|
751
753
|
mappable: data,
|
|
@@ -1007,7 +1009,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1007
1009
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1008
1010
|
case 2:
|
|
1009
1011
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
1010
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1012
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$N(_objectSpread$N({}, filterServerSide), {}, {
|
|
1011
1013
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1012
1014
|
baseUrl: this._readListUrl,
|
|
1013
1015
|
prefilter: prefilter
|
|
@@ -1027,7 +1029,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1027
1029
|
});
|
|
1028
1030
|
case 6:
|
|
1029
1031
|
response = _context8.sent;
|
|
1030
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1032
|
+
return _context8.abrupt("return", _objectSpread$N(_objectSpread$N({}, response), {}, {
|
|
1031
1033
|
data: response.data.map(function (d) {
|
|
1032
1034
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1033
1035
|
})
|
|
@@ -1051,7 +1053,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1051
1053
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1052
1054
|
}
|
|
1053
1055
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1054
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1056
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$N(_objectSpread$N({}, filterServerSide), {}, {
|
|
1055
1057
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1056
1058
|
baseUrl: this._readListUrl,
|
|
1057
1059
|
prefilter: prefilter
|
|
@@ -1258,8 +1260,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1258
1260
|
}]);
|
|
1259
1261
|
}(_default$d);
|
|
1260
1262
|
|
|
1261
|
-
function ownKeys$
|
|
1262
|
-
function _objectSpread$
|
|
1263
|
+
function ownKeys$M(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1264
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$M(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$M(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1263
1265
|
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1264
1266
|
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1265
1267
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1358,7 +1360,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1358
1360
|
_context2.next = 5;
|
|
1359
1361
|
return fetch(this._createUrl + '?ref=true', {
|
|
1360
1362
|
method: this._createMethod,
|
|
1361
|
-
headers: _objectSpread$
|
|
1363
|
+
headers: _objectSpread$M({}, jwt ? {
|
|
1362
1364
|
Authorization: 'Bearer ' + jwt
|
|
1363
1365
|
} : {}),
|
|
1364
1366
|
body: data
|
|
@@ -1736,8 +1738,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1736
1738
|
}]);
|
|
1737
1739
|
}(_default$d);
|
|
1738
1740
|
|
|
1739
|
-
function ownKeys$
|
|
1740
|
-
function _objectSpread$
|
|
1741
|
+
function ownKeys$L(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1742
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$L(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$L(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1741
1743
|
var _default$7 = /*#__PURE__*/function () {
|
|
1742
1744
|
function _default(root) {
|
|
1743
1745
|
_classCallCheck(this, _default);
|
|
@@ -1773,7 +1775,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1773
1775
|
var _i$permission;
|
|
1774
1776
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1775
1777
|
});
|
|
1776
|
-
config = _objectSpread$
|
|
1778
|
+
config = _objectSpread$L(_objectSpread$L({}, config), {}, {
|
|
1777
1779
|
items: filteredItems
|
|
1778
1780
|
});
|
|
1779
1781
|
}
|
|
@@ -7828,6 +7830,22 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7828
7830
|
hidden: function hidden(data) {
|
|
7829
7831
|
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7830
7832
|
}
|
|
7833
|
+
}, {
|
|
7834
|
+
name: ['settings', 'enable3DExport'],
|
|
7835
|
+
label: t('backoffice.form.organizationdetails.items.settings.enable3DExport'),
|
|
7836
|
+
type: 'radio',
|
|
7837
|
+
optionType: 'button',
|
|
7838
|
+
options: [{
|
|
7839
|
+
label: t('backoffice.form.organizationdetails.items.vererbt'),
|
|
7840
|
+
value: undefined
|
|
7841
|
+
}, {
|
|
7842
|
+
label: t('backoffice.form.organizationdetails.items.ja'),
|
|
7843
|
+
value: true
|
|
7844
|
+
}, {
|
|
7845
|
+
label: t('backoffice.form.organizationdetails.items.nein'),
|
|
7846
|
+
value: false
|
|
7847
|
+
}],
|
|
7848
|
+
permission: 'backoffice_sys_admin_organizations'
|
|
7831
7849
|
}, {
|
|
7832
7850
|
name: ['settings', 'enableAR'],
|
|
7833
7851
|
label: t('backoffice.form.organizationdetails.items.settings.enableAR'),
|
|
@@ -8306,7 +8324,9 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8306
8324
|
tools: [{
|
|
8307
8325
|
id: 'WYSIWYG_ContentItem',
|
|
8308
8326
|
name: 'ContentItem Preview',
|
|
8309
|
-
type: 'ContentItem'
|
|
8327
|
+
type: 'ContentItem',
|
|
8328
|
+
defaultPinned: true,
|
|
8329
|
+
startWidth: 450
|
|
8310
8330
|
}],
|
|
8311
8331
|
itemsByData: function itemsByData(data, apiConfig) {
|
|
8312
8332
|
var result = [{
|
|
@@ -8791,7 +8811,9 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8791
8811
|
tools: [{
|
|
8792
8812
|
id: 'WYSIWYG_ContentItem',
|
|
8793
8813
|
name: 'ContentItem Preview',
|
|
8794
|
-
type: 'ContentItem'
|
|
8814
|
+
type: 'ContentItem',
|
|
8815
|
+
defaultPinned: true,
|
|
8816
|
+
startWidth: 450
|
|
8795
8817
|
}]
|
|
8796
8818
|
},
|
|
8797
8819
|
FormApplicationTranslationsEdit: {
|
|
@@ -12933,8 +12955,187 @@ function getIcon(icon) {
|
|
|
12933
12955
|
return undefined;
|
|
12934
12956
|
}
|
|
12935
12957
|
|
|
12936
|
-
|
|
12937
|
-
|
|
12958
|
+
var DEFAULT_WIDTH = 500;
|
|
12959
|
+
var ToolBarStore = /*#__PURE__*/function () {
|
|
12960
|
+
function ToolBarStore(defaultLanguage) {
|
|
12961
|
+
_classCallCheck(this, ToolBarStore);
|
|
12962
|
+
this.defaultLanguage = defaultLanguage;
|
|
12963
|
+
_defineProperty(this, "_tools", []);
|
|
12964
|
+
_defineProperty(this, "_hidden", true);
|
|
12965
|
+
_defineProperty(this, "_pinned", false);
|
|
12966
|
+
_defineProperty(this, "_openedToolId", void 0);
|
|
12967
|
+
_defineProperty(this, "_loadingTools", new Map());
|
|
12968
|
+
_defineProperty(this, "_currentLanguage", void 0);
|
|
12969
|
+
_defineProperty(this, "_width", 0);
|
|
12970
|
+
_defineProperty(this, "_toolbarElement", null);
|
|
12971
|
+
this._currentLanguage = defaultLanguage;
|
|
12972
|
+
makeAutoObservable(this, {
|
|
12973
|
+
_toolbarElement: observable.ref
|
|
12974
|
+
});
|
|
12975
|
+
}
|
|
12976
|
+
return _createClass(ToolBarStore, [{
|
|
12977
|
+
key: "tools",
|
|
12978
|
+
get: function get() {
|
|
12979
|
+
return this._tools;
|
|
12980
|
+
},
|
|
12981
|
+
set: function set(tools) {
|
|
12982
|
+
var _this = this,
|
|
12983
|
+
_tools$,
|
|
12984
|
+
_tools$0$defaultPinne,
|
|
12985
|
+
_tools$2,
|
|
12986
|
+
_tools$3,
|
|
12987
|
+
_tools$0$startWidth,
|
|
12988
|
+
_tools$4;
|
|
12989
|
+
this._tools = tools;
|
|
12990
|
+
if (tools.find(function (t) {
|
|
12991
|
+
return t.id === _this._openedToolId;
|
|
12992
|
+
})) {
|
|
12993
|
+
//if current tool is in the new list, don't change the current state
|
|
12994
|
+
return;
|
|
12995
|
+
}
|
|
12996
|
+
this._openedToolId = (_tools$ = tools[0]) === null || _tools$ === void 0 ? void 0 : _tools$.id;
|
|
12997
|
+
this._pinned = (_tools$0$defaultPinne = (_tools$2 = tools[0]) === null || _tools$2 === void 0 ? void 0 : _tools$2.defaultPinned) !== null && _tools$0$defaultPinne !== void 0 ? _tools$0$defaultPinne : this._pinned;
|
|
12998
|
+
this._hidden = ((_tools$3 = tools[0]) === null || _tools$3 === void 0 ? void 0 : _tools$3.defaultOpen) !== undefined ? !tools[0].defaultOpen : this._hidden;
|
|
12999
|
+
this._width = (_tools$0$startWidth = (_tools$4 = tools[0]) === null || _tools$4 === void 0 ? void 0 : _tools$4.startWidth) !== null && _tools$0$startWidth !== void 0 ? _tools$0$startWidth : this._width;
|
|
13000
|
+
}
|
|
13001
|
+
}, {
|
|
13002
|
+
key: "hidden",
|
|
13003
|
+
get: function get() {
|
|
13004
|
+
return this._hidden;
|
|
13005
|
+
},
|
|
13006
|
+
set: function set(hidden) {
|
|
13007
|
+
this._hidden = hidden;
|
|
13008
|
+
if (!hidden && this._width === 0) {
|
|
13009
|
+
var _this$currentOpenTool, _this$currentOpenTool2;
|
|
13010
|
+
this._width = (_this$currentOpenTool = (_this$currentOpenTool2 = this.currentOpenTool) === null || _this$currentOpenTool2 === void 0 ? void 0 : _this$currentOpenTool2.startWidth) !== null && _this$currentOpenTool !== void 0 ? _this$currentOpenTool : DEFAULT_WIDTH;
|
|
13011
|
+
}
|
|
13012
|
+
}
|
|
13013
|
+
}, {
|
|
13014
|
+
key: "pinned",
|
|
13015
|
+
get: function get() {
|
|
13016
|
+
return this._pinned;
|
|
13017
|
+
},
|
|
13018
|
+
set: function set(pinned) {
|
|
13019
|
+
this._pinned = pinned;
|
|
13020
|
+
}
|
|
13021
|
+
}, {
|
|
13022
|
+
key: "currentLanguage",
|
|
13023
|
+
get: function get() {
|
|
13024
|
+
return this._currentLanguage;
|
|
13025
|
+
},
|
|
13026
|
+
set: function set(language) {
|
|
13027
|
+
this._currentLanguage = language;
|
|
13028
|
+
}
|
|
13029
|
+
}, {
|
|
13030
|
+
key: "currentOpenTool",
|
|
13031
|
+
get: function get() {
|
|
13032
|
+
var _this2 = this;
|
|
13033
|
+
return this._tools.find(function (t) {
|
|
13034
|
+
return t.id === _this2._openedToolId;
|
|
13035
|
+
});
|
|
13036
|
+
}
|
|
13037
|
+
}, {
|
|
13038
|
+
key: "width",
|
|
13039
|
+
get: function get() {
|
|
13040
|
+
return this._hidden ? 0 : this._width;
|
|
13041
|
+
},
|
|
13042
|
+
set: function set(width) {
|
|
13043
|
+
if (width > this._width) {
|
|
13044
|
+
this._hidden = false;
|
|
13045
|
+
}
|
|
13046
|
+
this._width = width;
|
|
13047
|
+
if (width < 50) {
|
|
13048
|
+
this._width = 0;
|
|
13049
|
+
this._hidden = true;
|
|
13050
|
+
}
|
|
13051
|
+
}
|
|
13052
|
+
}, {
|
|
13053
|
+
key: "toolbarElement",
|
|
13054
|
+
get: function get() {
|
|
13055
|
+
return this._toolbarElement;
|
|
13056
|
+
},
|
|
13057
|
+
set: function set(element) {
|
|
13058
|
+
this._toolbarElement = element;
|
|
13059
|
+
}
|
|
13060
|
+
}, {
|
|
13061
|
+
key: "openTool",
|
|
13062
|
+
value: function openTool(toolId) {
|
|
13063
|
+
this._openedToolId = toolId;
|
|
13064
|
+
this._currentLanguage = this.defaultLanguage;
|
|
13065
|
+
var tool = this._tools.find(function (t) {
|
|
13066
|
+
return t.id === toolId;
|
|
13067
|
+
});
|
|
13068
|
+
if (tool) {
|
|
13069
|
+
var _tool$startWidth;
|
|
13070
|
+
this._width = Math.max((_tool$startWidth = tool.startWidth) !== null && _tool$startWidth !== void 0 ? _tool$startWidth : DEFAULT_WIDTH, this._width);
|
|
13071
|
+
}
|
|
13072
|
+
}
|
|
13073
|
+
}, {
|
|
13074
|
+
key: "isLoading",
|
|
13075
|
+
value: function isLoading(toolId) {
|
|
13076
|
+
var loading = this._loadingTools.get(toolId);
|
|
13077
|
+
return loading !== undefined && loading.length > 0;
|
|
13078
|
+
}
|
|
13079
|
+
}, {
|
|
13080
|
+
key: "toggleLoading",
|
|
13081
|
+
value: function toggleLoading(toolId, subId, toggle) {
|
|
13082
|
+
// Get current loading state for tool
|
|
13083
|
+
var loadingState = this._loadingTools.get(toolId);
|
|
13084
|
+
if (!subId) {
|
|
13085
|
+
// Handle tool-level loading
|
|
13086
|
+
if (toggle === undefined) {
|
|
13087
|
+
// Toggle loading state
|
|
13088
|
+
if (loadingState) {
|
|
13089
|
+
this._loadingTools["delete"](toolId);
|
|
13090
|
+
} else {
|
|
13091
|
+
this._loadingTools.set(toolId, []);
|
|
13092
|
+
}
|
|
13093
|
+
} else {
|
|
13094
|
+
// Set explicit loading state
|
|
13095
|
+
if (toggle) {
|
|
13096
|
+
this._loadingTools.set(toolId, []);
|
|
13097
|
+
} else {
|
|
13098
|
+
this._loadingTools["delete"](toolId);
|
|
13099
|
+
}
|
|
13100
|
+
}
|
|
13101
|
+
} else {
|
|
13102
|
+
loadingState = loadingState || [];
|
|
13103
|
+
// Handle subId-level loading
|
|
13104
|
+
if (toggle === undefined) {
|
|
13105
|
+
// Toggle subId in loading state
|
|
13106
|
+
var subIdIndex = loadingState.indexOf(subId);
|
|
13107
|
+
if (subIdIndex > -1) {
|
|
13108
|
+
loadingState.splice(subIdIndex, 1);
|
|
13109
|
+
} else {
|
|
13110
|
+
loadingState.push(subId);
|
|
13111
|
+
}
|
|
13112
|
+
} else {
|
|
13113
|
+
// Set explicit subId loading state
|
|
13114
|
+
if (toggle) {
|
|
13115
|
+
if (!loadingState.includes(subId)) {
|
|
13116
|
+
loadingState.push(subId);
|
|
13117
|
+
}
|
|
13118
|
+
} else {
|
|
13119
|
+
var _subIdIndex = loadingState.indexOf(subId);
|
|
13120
|
+
if (_subIdIndex > -1) {
|
|
13121
|
+
loadingState.splice(_subIdIndex, 1);
|
|
13122
|
+
}
|
|
13123
|
+
}
|
|
13124
|
+
}
|
|
13125
|
+
|
|
13126
|
+
// If no subIds are loading, remove the tool loading state entirely
|
|
13127
|
+
if (loadingState.length === 0) {
|
|
13128
|
+
this._loadingTools["delete"](toolId);
|
|
13129
|
+
} else {
|
|
13130
|
+
this._loadingTools.set(toolId, loadingState);
|
|
13131
|
+
}
|
|
13132
|
+
}
|
|
13133
|
+
}
|
|
13134
|
+
}]);
|
|
13135
|
+
}();
|
|
13136
|
+
|
|
13137
|
+
function ownKeys$K(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13138
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$K(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$K(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12938
13139
|
var _default$6 = /*#__PURE__*/function () {
|
|
12939
13140
|
function _default(root) {
|
|
12940
13141
|
_classCallCheck(this, _default);
|
|
@@ -12945,20 +13146,19 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
12945
13146
|
_defineProperty(this, "_menuElement1", void 0);
|
|
12946
13147
|
_defineProperty(this, "_menuElement2", void 0);
|
|
12947
13148
|
_defineProperty(this, "_additionalMenuElements", []);
|
|
12948
|
-
_defineProperty(this, "
|
|
12949
|
-
_defineProperty(this, "
|
|
12950
|
-
_defineProperty(this, "_openedToolId", undefined);
|
|
12951
|
-
_defineProperty(this, "_hideTools", true);
|
|
12952
|
-
_defineProperty(this, "_toolLoading", new Map());
|
|
12953
|
-
_defineProperty(this, "_toolPinned", false);
|
|
13149
|
+
_defineProperty(this, "rightToolBar", void 0);
|
|
13150
|
+
_defineProperty(this, "bottomToolBar", void 0);
|
|
12954
13151
|
makeAutoObservable(this, {
|
|
12955
|
-
root: false
|
|
13152
|
+
root: false,
|
|
13153
|
+
rightToolBar: false,
|
|
13154
|
+
bottomToolBar: false
|
|
12956
13155
|
});
|
|
12957
13156
|
var theme = localStorage.getItem('theme');
|
|
12958
13157
|
if (theme) {
|
|
12959
13158
|
this._theme = theme;
|
|
12960
13159
|
}
|
|
12961
|
-
this.
|
|
13160
|
+
this.rightToolBar = new ToolBarStore(this.root.i18n.language);
|
|
13161
|
+
this.bottomToolBar = new ToolBarStore(this.root.i18n.language);
|
|
12962
13162
|
}
|
|
12963
13163
|
return _createClass(_default, [{
|
|
12964
13164
|
key: "initMenu",
|
|
@@ -13003,60 +13203,6 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13003
13203
|
get: function get() {
|
|
13004
13204
|
return this._menuElement2;
|
|
13005
13205
|
}
|
|
13006
|
-
}, {
|
|
13007
|
-
key: "tools",
|
|
13008
|
-
get: function get() {
|
|
13009
|
-
return this._tools;
|
|
13010
|
-
},
|
|
13011
|
-
set: function set(tools) {
|
|
13012
|
-
this._tools = tools;
|
|
13013
|
-
}
|
|
13014
|
-
}, {
|
|
13015
|
-
key: "hideTools",
|
|
13016
|
-
get: function get() {
|
|
13017
|
-
return this._hideTools;
|
|
13018
|
-
},
|
|
13019
|
-
set: function set(hidden) {
|
|
13020
|
-
this._hideTools = hidden;
|
|
13021
|
-
}
|
|
13022
|
-
}, {
|
|
13023
|
-
key: "openedToolId",
|
|
13024
|
-
get: function get() {
|
|
13025
|
-
return this._openedToolId;
|
|
13026
|
-
},
|
|
13027
|
-
set: function set(id) {
|
|
13028
|
-
this._openedToolId = id;
|
|
13029
|
-
}
|
|
13030
|
-
}, {
|
|
13031
|
-
key: "toolPinned",
|
|
13032
|
-
get: function get() {
|
|
13033
|
-
return this._toolPinned;
|
|
13034
|
-
},
|
|
13035
|
-
set: function set(val) {
|
|
13036
|
-
this._toolPinned = val;
|
|
13037
|
-
}
|
|
13038
|
-
}, {
|
|
13039
|
-
key: "toolsLanguage",
|
|
13040
|
-
get: function get() {
|
|
13041
|
-
return this._toolsLanguage;
|
|
13042
|
-
},
|
|
13043
|
-
set: function set(lang) {
|
|
13044
|
-
this._toolsLanguage = lang;
|
|
13045
|
-
}
|
|
13046
|
-
}, {
|
|
13047
|
-
key: "isToolLoading",
|
|
13048
|
-
get: function get() {
|
|
13049
|
-
return this._toolLoading.size != 0;
|
|
13050
|
-
}
|
|
13051
|
-
}, {
|
|
13052
|
-
key: "toggleToolLoading",
|
|
13053
|
-
value: function toggleToolLoading(id, hidden, toggle) {
|
|
13054
|
-
if (this._toolLoading.has(id) && toggle !== true) {
|
|
13055
|
-
this._toolLoading["delete"](id);
|
|
13056
|
-
} else if (!this._toolLoading.has(id) && toggle !== false) {
|
|
13057
|
-
this._toolLoading.set(id, hidden == undefined ? false : hidden);
|
|
13058
|
-
}
|
|
13059
|
-
}
|
|
13060
13206
|
}, {
|
|
13061
13207
|
key: "updateAdditionalElement",
|
|
13062
13208
|
value: function updateAdditionalElement(key, items, selected) {
|
|
@@ -13066,7 +13212,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13066
13212
|
if (index >= 0) {
|
|
13067
13213
|
this._additionalMenuElements[index] = {
|
|
13068
13214
|
key: key,
|
|
13069
|
-
element: _objectSpread$
|
|
13215
|
+
element: _objectSpread$K(_objectSpread$K({}, this._additionalMenuElements[index].element), {}, {
|
|
13070
13216
|
items: items,
|
|
13071
13217
|
selected: selected
|
|
13072
13218
|
})
|
|
@@ -13117,7 +13263,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13117
13263
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
13118
13264
|
this.root.navigate('/' + path);
|
|
13119
13265
|
}
|
|
13120
|
-
this._menuElement1 = _objectSpread$
|
|
13266
|
+
this._menuElement1 = _objectSpread$K(_objectSpread$K({}, this.menuElement1), {}, {
|
|
13121
13267
|
selected: this._selectedMenuKeys[0]
|
|
13122
13268
|
});
|
|
13123
13269
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -13361,7 +13507,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13361
13507
|
return items.filter(function (item) {
|
|
13362
13508
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
13363
13509
|
}).map(function (item) {
|
|
13364
|
-
return _objectSpread$
|
|
13510
|
+
return _objectSpread$K(_objectSpread$K({}, item), {}, {
|
|
13365
13511
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
13366
13512
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
13367
13513
|
});
|
|
@@ -15100,8 +15246,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
15100
15246
|
}]);
|
|
15101
15247
|
}();
|
|
15102
15248
|
|
|
15103
|
-
function ownKeys$
|
|
15104
|
-
function _objectSpread$
|
|
15249
|
+
function ownKeys$J(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15250
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$J(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$J(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15105
15251
|
function _createForOfIteratorHelper$j(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
15106
15252
|
function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$j(r, a) : void 0; } }
|
|
15107
15253
|
function _arrayLikeToArray$j(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -15223,7 +15369,7 @@ function useFormData (_ref) {
|
|
|
15223
15369
|
multipleEditingData = inboundData;
|
|
15224
15370
|
}
|
|
15225
15371
|
return {
|
|
15226
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
15372
|
+
loadedData: _onLoadFields(_objectSpread$J({}, dt)),
|
|
15227
15373
|
multipleEditingData: multipleEditingData
|
|
15228
15374
|
};
|
|
15229
15375
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -15260,7 +15406,7 @@ function useFormData (_ref) {
|
|
|
15260
15406
|
setFieldErrors = _useState20[1];
|
|
15261
15407
|
useEffect(function () {
|
|
15262
15408
|
var _loadedData$_id2;
|
|
15263
|
-
setState(_objectSpread$
|
|
15409
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15264
15410
|
data: loadedData,
|
|
15265
15411
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
15266
15412
|
update: !!((_loadedData$_id2 = loadedData === null || loadedData === void 0 ? void 0 : loadedData._id) !== null && _loadedData$_id2 !== void 0 ? _loadedData$_id2 : loadedData === null || loadedData === void 0 ? void 0 : loadedData.ID),
|
|
@@ -15362,7 +15508,7 @@ function useFormData (_ref) {
|
|
|
15362
15508
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
15363
15509
|
while (1) switch (_context2.prev = _context2.next) {
|
|
15364
15510
|
case 0:
|
|
15365
|
-
newData = merge(_objectSpread$
|
|
15511
|
+
newData = merge(_objectSpread$J({}, state.data), values);
|
|
15366
15512
|
if (!skipApi) {
|
|
15367
15513
|
_context2.next = 3;
|
|
15368
15514
|
break;
|
|
@@ -15372,7 +15518,7 @@ function useFormData (_ref) {
|
|
|
15372
15518
|
root.actions.toggleLoading('saving_form');
|
|
15373
15519
|
_context2.prev = 4;
|
|
15374
15520
|
_context2.next = 7;
|
|
15375
|
-
return setDynamicFields(_objectSpread$
|
|
15521
|
+
return setDynamicFields(_objectSpread$J({}, state.data), newData);
|
|
15376
15522
|
case 7:
|
|
15377
15523
|
newData = _context2.sent;
|
|
15378
15524
|
_context2.next = 10;
|
|
@@ -15387,7 +15533,7 @@ function useFormData (_ref) {
|
|
|
15387
15533
|
root.actions.toggleLoading('saving_form');
|
|
15388
15534
|
throw _context2.t0;
|
|
15389
15535
|
case 17:
|
|
15390
|
-
setState(_objectSpread$
|
|
15536
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15391
15537
|
loading: true
|
|
15392
15538
|
}));
|
|
15393
15539
|
finalData = state.data;
|
|
@@ -15440,14 +15586,14 @@ function useFormData (_ref) {
|
|
|
15440
15586
|
_context2.next = 47;
|
|
15441
15587
|
break;
|
|
15442
15588
|
}
|
|
15443
|
-
setFieldErrors(_objectSpread$
|
|
15589
|
+
setFieldErrors(_objectSpread$J(_objectSpread$J({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
15444
15590
|
return _context2.abrupt("return", undefined);
|
|
15445
15591
|
case 47:
|
|
15446
15592
|
throw _context2.t1;
|
|
15447
15593
|
case 48:
|
|
15448
15594
|
_context2.prev = 48;
|
|
15449
15595
|
root.actions.toggleLoading('saving_form');
|
|
15450
|
-
setState(_objectSpread$
|
|
15596
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15451
15597
|
data: finalData,
|
|
15452
15598
|
loading: false
|
|
15453
15599
|
}));
|
|
@@ -15477,7 +15623,7 @@ function useFormData (_ref) {
|
|
|
15477
15623
|
}
|
|
15478
15624
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
15479
15625
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
15480
|
-
var wholeData = Object.assign(_objectSpread$
|
|
15626
|
+
var wholeData = Object.assign(_objectSpread$J({}, state.data), _objectSpread$J({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
15481
15627
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
15482
15628
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
15483
15629
|
setHiddenRequiredDisabled(newState);
|
|
@@ -15490,14 +15636,14 @@ function useFormData (_ref) {
|
|
|
15490
15636
|
}
|
|
15491
15637
|
};
|
|
15492
15638
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
15493
|
-
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$
|
|
15639
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$J({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
15494
15640
|
if (id) {
|
|
15495
15641
|
setFieldInObject(id, data, value);
|
|
15496
|
-
var newFieldErrors = _objectSpread$
|
|
15642
|
+
var newFieldErrors = _objectSpread$J({}, fieldErrors);
|
|
15497
15643
|
delete newFieldErrors[id.toString()];
|
|
15498
15644
|
setFieldErrors(newFieldErrors);
|
|
15499
15645
|
}
|
|
15500
|
-
setState(_objectSpread$
|
|
15646
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15501
15647
|
data: data
|
|
15502
15648
|
}));
|
|
15503
15649
|
return data;
|
|
@@ -15529,12 +15675,12 @@ function useFormData (_ref) {
|
|
|
15529
15675
|
var _value$value;
|
|
15530
15676
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
15531
15677
|
if (configuration.itemSelectorReset) {
|
|
15532
|
-
setState(_objectSpread$
|
|
15678
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15533
15679
|
data: _defineProperty({}, name, val)
|
|
15534
15680
|
}));
|
|
15535
15681
|
} else {
|
|
15536
|
-
setState(_objectSpread$
|
|
15537
|
-
data: _objectSpread$
|
|
15682
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15683
|
+
data: _objectSpread$J(_objectSpread$J({}, state.data), {}, _defineProperty({}, name, val))
|
|
15538
15684
|
}));
|
|
15539
15685
|
}
|
|
15540
15686
|
setSelectedItemsIndex(idx);
|
|
@@ -15544,12 +15690,12 @@ function useFormData (_ref) {
|
|
|
15544
15690
|
var val = _ref6.value;
|
|
15545
15691
|
if (value === val) {
|
|
15546
15692
|
if (configuration.itemSelectorReset) {
|
|
15547
|
-
setState(_objectSpread$
|
|
15693
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15548
15694
|
data: _defineProperty({}, name, val)
|
|
15549
15695
|
}));
|
|
15550
15696
|
} else {
|
|
15551
|
-
setState(_objectSpread$
|
|
15552
|
-
data: _objectSpread$
|
|
15697
|
+
setState(_objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15698
|
+
data: _objectSpread$J(_objectSpread$J({}, state.data), {}, _defineProperty({}, name, val))
|
|
15553
15699
|
}));
|
|
15554
15700
|
}
|
|
15555
15701
|
setSelectedItemsIndex(idx);
|
|
@@ -15828,19 +15974,20 @@ function useFormData (_ref) {
|
|
|
15828
15974
|
if ((_configuration$tools = configuration.tools) !== null && _configuration$tools !== void 0 && _configuration$tools.length) {
|
|
15829
15975
|
var tools = [];
|
|
15830
15976
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
15977
|
+
var _tool$defaultOpen;
|
|
15831
15978
|
var tool = configuration.tools[i];
|
|
15832
|
-
tools.push(_objectSpread$
|
|
15979
|
+
tools.push(_objectSpread$J(_objectSpread$J({}, tool), {}, {
|
|
15833
15980
|
parameters: {
|
|
15834
15981
|
data: state.data
|
|
15835
15982
|
},
|
|
15836
|
-
startWidth:
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
}
|
|
15983
|
+
startWidth: tool.startWidth,
|
|
15984
|
+
defaultOpen: (_tool$defaultOpen = tool.defaultOpen) !== null && _tool$defaultOpen !== void 0 ? _tool$defaultOpen : true,
|
|
15985
|
+
defaultPinned: tool.defaultPinned
|
|
15986
|
+
}));
|
|
15840
15987
|
}
|
|
15841
|
-
root.contentStore.tools = tools;
|
|
15988
|
+
root.contentStore.rightToolBar.tools = tools;
|
|
15842
15989
|
return function () {
|
|
15843
|
-
root.contentStore.tools = [];
|
|
15990
|
+
root.contentStore.rightToolBar.tools = [];
|
|
15844
15991
|
};
|
|
15845
15992
|
}
|
|
15846
15993
|
return;
|
|
@@ -15931,7 +16078,7 @@ function useFormData (_ref) {
|
|
|
15931
16078
|
})) return;
|
|
15932
16079
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
15933
16080
|
};
|
|
15934
|
-
return _objectSpread$
|
|
16081
|
+
return _objectSpread$J(_objectSpread$J({}, state), {}, {
|
|
15935
16082
|
getIsHidden: getIsHidden,
|
|
15936
16083
|
setUsedPreset: setUsedPreset,
|
|
15937
16084
|
configuration: configuration,
|
|
@@ -16048,8 +16195,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
16048
16195
|
};
|
|
16049
16196
|
|
|
16050
16197
|
var _excluded$3 = ["key", "name"];
|
|
16051
|
-
function ownKeys$
|
|
16052
|
-
function _objectSpread$
|
|
16198
|
+
function ownKeys$I(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16199
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$I(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$I(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16053
16200
|
var FormList$2 = function FormList(_ref) {
|
|
16054
16201
|
var _item$initialValue;
|
|
16055
16202
|
var value = _ref.value,
|
|
@@ -16102,7 +16249,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16102
16249
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
16103
16250
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
16104
16251
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
16105
|
-
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$
|
|
16252
|
+
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$I(_objectSpread$I({}, restField), {}, {
|
|
16106
16253
|
id: n.join(),
|
|
16107
16254
|
key: n.join(),
|
|
16108
16255
|
name: n,
|
|
@@ -16114,7 +16261,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16114
16261
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
16115
16262
|
help: state.fieldErrors[n.toString()],
|
|
16116
16263
|
hidden: hidden
|
|
16117
|
-
}), getElement(_objectSpread$
|
|
16264
|
+
}), getElement(_objectSpread$I(_objectSpread$I({}, i), {}, {
|
|
16118
16265
|
name: n
|
|
16119
16266
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
16120
16267
|
})
|
|
@@ -16347,8 +16494,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
16347
16494
|
var css_248z$n = ".wrapper-GVe2h {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n\n.button-group-GYt-T {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin: 0 12px;\n}\n";
|
|
16348
16495
|
styleInject(css_248z$n);
|
|
16349
16496
|
|
|
16350
|
-
function ownKeys$
|
|
16351
|
-
function _objectSpread$
|
|
16497
|
+
function ownKeys$H(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16498
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$H(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$H(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16352
16499
|
var SubTitle = function SubTitle(_ref) {
|
|
16353
16500
|
var _item$orientation, _item$buttonIds;
|
|
16354
16501
|
var item = _ref.item,
|
|
@@ -16357,7 +16504,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
16357
16504
|
t = _useTranslation.t;
|
|
16358
16505
|
return /*#__PURE__*/jsx(Divider, {
|
|
16359
16506
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
16360
|
-
style: _objectSpread$
|
|
16507
|
+
style: _objectSpread$H({}, item.style),
|
|
16361
16508
|
children: /*#__PURE__*/jsxs("div", {
|
|
16362
16509
|
className: wrapper$5,
|
|
16363
16510
|
children: [Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -16607,8 +16754,8 @@ var css_248z$m = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
16607
16754
|
styleInject(css_248z$m);
|
|
16608
16755
|
|
|
16609
16756
|
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
16610
|
-
function ownKeys$
|
|
16611
|
-
function _objectSpread$
|
|
16757
|
+
function ownKeys$G(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16758
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16612
16759
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
16613
16760
|
var apiInterface = _ref.apiInterface,
|
|
16614
16761
|
selectMapping = _ref.selectMapping,
|
|
@@ -16633,7 +16780,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
16633
16780
|
return /*#__PURE__*/jsxs("div", {
|
|
16634
16781
|
ref: ref,
|
|
16635
16782
|
className: classnames(title ? wrapper$4 : undefined),
|
|
16636
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
16783
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$G(_objectSpread$G({}, selectProps), {}, {
|
|
16637
16784
|
showSearch: search,
|
|
16638
16785
|
loading: state.loading,
|
|
16639
16786
|
options: state.options,
|
|
@@ -17250,8 +17397,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
17250
17397
|
}]);
|
|
17251
17398
|
}(_default$d);
|
|
17252
17399
|
|
|
17253
|
-
function ownKeys$
|
|
17254
|
-
function _objectSpread$
|
|
17400
|
+
function ownKeys$F(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17401
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$F(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17255
17402
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
17256
17403
|
function useSelectClientRelationCatalog (_ref) {
|
|
17257
17404
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -17420,7 +17567,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
17420
17567
|
case 22:
|
|
17421
17568
|
supplierData = _context2.sent;
|
|
17422
17569
|
case 23:
|
|
17423
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
17570
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$F(_objectSpread$F({}, _selectedSupplier), {}, {
|
|
17424
17571
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
17425
17572
|
}), supplierData);
|
|
17426
17573
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -17641,8 +17788,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
17641
17788
|
function _createForOfIteratorHelper$h(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$h(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
17642
17789
|
function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$h(r, a) : void 0; } }
|
|
17643
17790
|
function _arrayLikeToArray$h(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17644
|
-
function ownKeys$
|
|
17645
|
-
function _objectSpread$
|
|
17791
|
+
function ownKeys$E(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17792
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17646
17793
|
function useSelectData (_ref) {
|
|
17647
17794
|
var data = _ref.data,
|
|
17648
17795
|
onChange = _ref.onChange,
|
|
@@ -17825,7 +17972,7 @@ function useSelectData (_ref) {
|
|
|
17825
17972
|
setFetching(true);
|
|
17826
17973
|
serverSideParams = {
|
|
17827
17974
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
17828
|
-
return _objectSpread$
|
|
17975
|
+
return _objectSpread$E(_objectSpread$E({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
17829
17976
|
}, {}) : {
|
|
17830
17977
|
_id: [value, 'contains']
|
|
17831
17978
|
},
|
|
@@ -18117,8 +18264,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
18117
18264
|
var css_248z$j = ".wrapper-WStAk {\n display: flex;\n flex-direction: column;\n}\n.header-wrapper-gWQuH {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: 64px;\n}\n\n.buttons-wrapper-7ebR9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n}\n";
|
|
18118
18265
|
styleInject(css_248z$j);
|
|
18119
18266
|
|
|
18120
|
-
function ownKeys$
|
|
18121
|
-
function _objectSpread$
|
|
18267
|
+
function ownKeys$D(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18268
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$D(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$D(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18122
18269
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
18123
18270
|
function useTranslationHook (item, state) {
|
|
18124
18271
|
var root = useStore();
|
|
@@ -18251,7 +18398,7 @@ function useTranslationHook (item, state) {
|
|
|
18251
18398
|
case 0:
|
|
18252
18399
|
_context2.next = 2;
|
|
18253
18400
|
return apiHandler.create({
|
|
18254
|
-
locales: _objectSpread$
|
|
18401
|
+
locales: _objectSpread$D({
|
|
18255
18402
|
de: {},
|
|
18256
18403
|
it: {},
|
|
18257
18404
|
fr: {},
|
|
@@ -18289,7 +18436,7 @@ function useTranslationHook (item, state) {
|
|
|
18289
18436
|
};
|
|
18290
18437
|
var onChange = function onChange(value) {
|
|
18291
18438
|
state.onInputChanged();
|
|
18292
|
-
root.contentStore.
|
|
18439
|
+
root.contentStore.rightToolBar.currentLanguage = value;
|
|
18293
18440
|
setCurrentLang(value);
|
|
18294
18441
|
};
|
|
18295
18442
|
return {
|
|
@@ -18300,8 +18447,8 @@ function useTranslationHook (item, state) {
|
|
|
18300
18447
|
};
|
|
18301
18448
|
}
|
|
18302
18449
|
|
|
18303
|
-
function ownKeys$
|
|
18304
|
-
function _objectSpread$
|
|
18450
|
+
function ownKeys$C(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18451
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18305
18452
|
var Translation = function Translation(_ref) {
|
|
18306
18453
|
var item = _ref.item,
|
|
18307
18454
|
state = _ref.state,
|
|
@@ -18351,7 +18498,7 @@ var Translation = function Translation(_ref) {
|
|
|
18351
18498
|
var hidden = state.getIsHidden(i, data);
|
|
18352
18499
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
18353
18500
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
18354
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
18501
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$C(_objectSpread$C({}, i), {}, {
|
|
18355
18502
|
name: n
|
|
18356
18503
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
18357
18504
|
id: idx.toString(),
|
|
@@ -18364,7 +18511,7 @@ var Translation = function Translation(_ref) {
|
|
|
18364
18511
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18365
18512
|
help: state.fieldErrors[n.toString()],
|
|
18366
18513
|
hidden: hidden,
|
|
18367
|
-
children: getElement(_objectSpread$
|
|
18514
|
+
children: getElement(_objectSpread$C(_objectSpread$C({}, i), {}, {
|
|
18368
18515
|
name: n
|
|
18369
18516
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
18370
18517
|
})
|
|
@@ -18699,8 +18846,8 @@ var Text$1 = observer(Text);
|
|
|
18699
18846
|
function _createForOfIteratorHelper$g(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$g(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
18700
18847
|
function _unsupportedIterableToArray$g(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$g(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$g(r, a) : void 0; } }
|
|
18701
18848
|
function _arrayLikeToArray$g(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
18702
|
-
function ownKeys$
|
|
18703
|
-
function _objectSpread$
|
|
18849
|
+
function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18850
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18704
18851
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
18705
18852
|
var _isReadonly, _state$hiddenRequired;
|
|
18706
18853
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -18735,7 +18882,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18735
18882
|
}
|
|
18736
18883
|
});
|
|
18737
18884
|
case 'selectSimple':
|
|
18738
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
18885
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$B(_objectSpread$B({}, item), {}, {
|
|
18739
18886
|
disabled: disabled,
|
|
18740
18887
|
onChange: function onChange(value) {
|
|
18741
18888
|
_onChange(absoluteName, value);
|
|
@@ -18939,7 +19086,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18939
19086
|
value: item.value,
|
|
18940
19087
|
options: item.options.map(function (o) {
|
|
18941
19088
|
var _o$disabled;
|
|
18942
|
-
return _objectSpread$
|
|
19089
|
+
return _objectSpread$B(_objectSpread$B({}, o), {}, {
|
|
18943
19090
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
18944
19091
|
});
|
|
18945
19092
|
}),
|
|
@@ -18960,7 +19107,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18960
19107
|
},
|
|
18961
19108
|
icon: item.icon,
|
|
18962
19109
|
callback: function callback(data) {
|
|
18963
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
19110
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$B(_objectSpread$B({}, state.data), data));
|
|
18964
19111
|
}
|
|
18965
19112
|
});
|
|
18966
19113
|
case 'media':
|
|
@@ -18981,7 +19128,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18981
19128
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
18982
19129
|
var _useTranslation = useTranslation(),
|
|
18983
19130
|
t = _useTranslation.t;
|
|
18984
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
19131
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$B(_objectSpread$B({}, props), {}, {
|
|
18985
19132
|
ref: ref,
|
|
18986
19133
|
disabled: true,
|
|
18987
19134
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -19000,8 +19147,8 @@ function isReadonly(item, data) {
|
|
|
19000
19147
|
return false;
|
|
19001
19148
|
}
|
|
19002
19149
|
|
|
19003
|
-
function ownKeys$
|
|
19004
|
-
function _objectSpread$
|
|
19150
|
+
function ownKeys$A(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19151
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19005
19152
|
function _createForOfIteratorHelper$f(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$f(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
19006
19153
|
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$f(r, a) : void 0; } }
|
|
19007
19154
|
function _arrayLikeToArray$f(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -19051,13 +19198,13 @@ var Presets = function Presets(_ref) {
|
|
|
19051
19198
|
} finally {
|
|
19052
19199
|
_iterator.f();
|
|
19053
19200
|
}
|
|
19054
|
-
var data = _objectSpread$
|
|
19201
|
+
var data = _objectSpread$A(_objectSpread$A({}, form.getFieldsValue(names)), {}, {
|
|
19055
19202
|
newPresetName: newPresetName
|
|
19056
19203
|
});
|
|
19057
19204
|
data.dpi = parseInt(data.dpi);
|
|
19058
19205
|
data.organization = root.getGlobalValue('organizationId');
|
|
19059
19206
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
19060
|
-
var dt = _objectSpread$
|
|
19207
|
+
var dt = _objectSpread$A(_objectSpread$A({}, form.getFieldsValue(names)), {}, {
|
|
19061
19208
|
name: newPresetName
|
|
19062
19209
|
});
|
|
19063
19210
|
setPresets({
|
|
@@ -19399,8 +19546,8 @@ function getLabel(item, t) {
|
|
|
19399
19546
|
}
|
|
19400
19547
|
var Form = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
19401
19548
|
|
|
19402
|
-
function ownKeys$
|
|
19403
|
-
function _objectSpread$
|
|
19549
|
+
function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19550
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19404
19551
|
function _createForOfIteratorHelper$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
19405
19552
|
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$e(r, a) : void 0; } }
|
|
19406
19553
|
function _arrayLikeToArray$e(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -19602,7 +19749,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19602
19749
|
roles.forEach(function (r) {
|
|
19603
19750
|
//check if after the changes the role is selected
|
|
19604
19751
|
if (value.includes(r._id)) {
|
|
19605
|
-
var newValue = _objectSpread$
|
|
19752
|
+
var newValue = _objectSpread$z(_objectSpread$z({}, r), {}, {
|
|
19606
19753
|
selected: true
|
|
19607
19754
|
});
|
|
19608
19755
|
//add it to the new list as selected role
|
|
@@ -19638,7 +19785,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19638
19785
|
}
|
|
19639
19786
|
}
|
|
19640
19787
|
} else {
|
|
19641
|
-
var _newValue = _objectSpread$
|
|
19788
|
+
var _newValue = _objectSpread$z(_objectSpread$z({}, r), {}, {
|
|
19642
19789
|
selected: false
|
|
19643
19790
|
});
|
|
19644
19791
|
//add it to the new list as unselected role
|
|
@@ -19842,7 +19989,7 @@ function _updateRoles() {
|
|
|
19842
19989
|
userRole = userRoles.find(function (r) {
|
|
19843
19990
|
return r._id == role._id;
|
|
19844
19991
|
});
|
|
19845
|
-
newRole = _objectSpread$
|
|
19992
|
+
newRole = _objectSpread$z({}, role);
|
|
19846
19993
|
if (userRole) {
|
|
19847
19994
|
newRole.selected = true;
|
|
19848
19995
|
newRole.inherited = userRole.inherited;
|
|
@@ -20062,7 +20209,7 @@ function _fetchOptions() {
|
|
|
20062
20209
|
case 4:
|
|
20063
20210
|
result = _context11.sent;
|
|
20064
20211
|
options = result.data.map(function (d) {
|
|
20065
|
-
return _objectSpread$
|
|
20212
|
+
return _objectSpread$z(_objectSpread$z({}, d), {}, {
|
|
20066
20213
|
label: d.displayName,
|
|
20067
20214
|
value: d._id,
|
|
20068
20215
|
isLeaf: !d.hasChildren
|
|
@@ -20164,8 +20311,8 @@ var parent = "parent-NZJ3S";
|
|
|
20164
20311
|
var css_248z$i = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n height: 100%;\n}\n\n.skeleton--xCI0 {\n padding-left: 25px;\n padding-bottom: 10px;\n}\n.filterField-1kU1O {\n display: flex;\n gap: 10px;\n}\n.filterField-1kU1O button {\n height: 32px;\n}\n.filterField-1kU1O div {\n height: 32px;\n}\n\n.parent-scroll-GmaL9 {\n overflow: auto;\n padding: 24px;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.parent-NZJ3S {\n overflow: auto;\n padding: 24px;\n height: 100%;\n}\n\n.parent-scroll-GmaL9 .ant-spin-container {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component__outerdiv {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component {\n height: 100% !important;\n}\n";
|
|
20165
20312
|
styleInject(css_248z$i);
|
|
20166
20313
|
|
|
20167
|
-
function ownKeys$
|
|
20168
|
-
function _objectSpread$
|
|
20314
|
+
function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20315
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20169
20316
|
function _createForOfIteratorHelper$d(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$d(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20170
20317
|
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$d(r, a) : void 0; } }
|
|
20171
20318
|
function _arrayLikeToArray$d(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -20225,8 +20372,8 @@ function _generateCSV() {
|
|
|
20225
20372
|
break;
|
|
20226
20373
|
}
|
|
20227
20374
|
_context2.next = 21;
|
|
20228
|
-
return generateCSV(_objectSpread$
|
|
20229
|
-
mappingData: _objectSpread$
|
|
20375
|
+
return generateCSV(_objectSpread$y(_objectSpread$y({}, exportParams.children), {}, {
|
|
20376
|
+
mappingData: _objectSpread$y(_objectSpread$y({}, parent), {}, {
|
|
20230
20377
|
parentId: exportParams.mappingData._id
|
|
20231
20378
|
})
|
|
20232
20379
|
}), csvData);
|
|
@@ -20287,9 +20434,55 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
20287
20434
|
return _ref.apply(this, arguments);
|
|
20288
20435
|
};
|
|
20289
20436
|
}();
|
|
20437
|
+
function downloadFile(_x4, _x5, _x6, _x7) {
|
|
20438
|
+
return _downloadFile.apply(this, arguments);
|
|
20439
|
+
}
|
|
20440
|
+
function _downloadFile() {
|
|
20441
|
+
_downloadFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(url, jwt, accept, fileName) {
|
|
20442
|
+
var response, blob, downloadLink, fileURL;
|
|
20443
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
20444
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
20445
|
+
case 0:
|
|
20446
|
+
_context3.next = 2;
|
|
20447
|
+
return fetch(url, {
|
|
20448
|
+
headers: {
|
|
20449
|
+
Authorization: 'Bearer ' + jwt,
|
|
20450
|
+
Accept: accept
|
|
20451
|
+
}
|
|
20452
|
+
});
|
|
20453
|
+
case 2:
|
|
20454
|
+
response = _context3.sent;
|
|
20455
|
+
if (response.ok) {
|
|
20456
|
+
_context3.next = 5;
|
|
20457
|
+
break;
|
|
20458
|
+
}
|
|
20459
|
+
throw new Error("Failed to fetch the file: ".concat(response.statusText));
|
|
20460
|
+
case 5:
|
|
20461
|
+
_context3.next = 7;
|
|
20462
|
+
return response.blob();
|
|
20463
|
+
case 7:
|
|
20464
|
+
blob = _context3.sent;
|
|
20465
|
+
downloadLink = document.createElement('a');
|
|
20466
|
+
fileURL = URL.createObjectURL(blob);
|
|
20467
|
+
downloadLink.href = fileURL;
|
|
20468
|
+
downloadLink.download = fileName; // Specify the desired file name
|
|
20469
|
+
document.body.appendChild(downloadLink);
|
|
20470
|
+
downloadLink.click();
|
|
20471
|
+
|
|
20472
|
+
// Clean up
|
|
20473
|
+
document.body.removeChild(downloadLink);
|
|
20474
|
+
URL.revokeObjectURL(fileURL);
|
|
20475
|
+
case 16:
|
|
20476
|
+
case "end":
|
|
20477
|
+
return _context3.stop();
|
|
20478
|
+
}
|
|
20479
|
+
}, _callee3);
|
|
20480
|
+
}));
|
|
20481
|
+
return _downloadFile.apply(this, arguments);
|
|
20482
|
+
}
|
|
20290
20483
|
|
|
20291
|
-
function ownKeys$
|
|
20292
|
-
function _objectSpread$
|
|
20484
|
+
function ownKeys$x(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20485
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20293
20486
|
function _createForOfIteratorHelper$c(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$c(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20294
20487
|
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$c(r, a) : void 0; } }
|
|
20295
20488
|
function _arrayLikeToArray$c(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -20708,7 +20901,7 @@ function useRelationSelectorData (_ref) {
|
|
|
20708
20901
|
var activeItem = _step.value;
|
|
20709
20902
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
20710
20903
|
addedObjects.push(addedData);
|
|
20711
|
-
getSplittedItems(_objectSpread$
|
|
20904
|
+
getSplittedItems(_objectSpread$x(_objectSpread$x({}, activeItem), {}, {
|
|
20712
20905
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
20713
20906
|
}));
|
|
20714
20907
|
ret = true;
|
|
@@ -20913,8 +21106,8 @@ function useRelationSelectorData (_ref) {
|
|
|
20913
21106
|
};
|
|
20914
21107
|
}
|
|
20915
21108
|
|
|
20916
|
-
function ownKeys$
|
|
20917
|
-
function _objectSpread$
|
|
21109
|
+
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21110
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20918
21111
|
function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20919
21112
|
function _unsupportedIterableToArray$b(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$b(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$b(r, a) : void 0; } }
|
|
20920
21113
|
function _arrayLikeToArray$b(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -21047,7 +21240,7 @@ function ActionButton (_ref) {
|
|
|
21047
21240
|
_iterator2.f();
|
|
21048
21241
|
}
|
|
21049
21242
|
_context.next = 19;
|
|
21050
|
-
return apiInterface.update(_objectSpread$
|
|
21243
|
+
return apiInterface.update(_objectSpread$w(_objectSpread$w({}, data), {}, {
|
|
21051
21244
|
state: toSwitch
|
|
21052
21245
|
}), data);
|
|
21053
21246
|
case 19:
|
|
@@ -21204,14 +21397,14 @@ function _simpleChangeValue() {
|
|
|
21204
21397
|
break;
|
|
21205
21398
|
}
|
|
21206
21399
|
for (i = 0; i < action.newValues.length; i++) {
|
|
21207
|
-
fieldsToUpdate = _objectSpread$
|
|
21400
|
+
fieldsToUpdate = _objectSpread$w(_objectSpread$w({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
21208
21401
|
}
|
|
21209
21402
|
if (!apiInterface.canUpdate) {
|
|
21210
21403
|
_context2.next = 9;
|
|
21211
21404
|
break;
|
|
21212
21405
|
}
|
|
21213
21406
|
_context2.next = 7;
|
|
21214
|
-
return apiInterface.update(_objectSpread$
|
|
21407
|
+
return apiInterface.update(_objectSpread$w({}, fieldsToUpdate), data);
|
|
21215
21408
|
case 7:
|
|
21216
21409
|
response = _context2.sent;
|
|
21217
21410
|
return _context2.abrupt("return", response);
|
|
@@ -21226,7 +21419,7 @@ function _simpleChangeValue() {
|
|
|
21226
21419
|
return _simpleChangeValue.apply(this, arguments);
|
|
21227
21420
|
}
|
|
21228
21421
|
function A(props) {
|
|
21229
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
21422
|
+
return /*#__PURE__*/jsx("a", _objectSpread$w({}, props));
|
|
21230
21423
|
}
|
|
21231
21424
|
|
|
21232
21425
|
function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -21364,8 +21557,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
21364
21557
|
var css_248z$h = ".diva-component-DIVA_BACKOFFICE_NEW .title-cl-ZAj2y {\n color: black;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .description-m3mNY {\n color: grey;\n flex: 1 1 100%;\n margin-left: 25px;\n margin-top: -25px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-group-xWnj- {\n /* border-bottom: 1px solid black; */\n margin-bottom: 40px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .delete-item-otdSr {\n cursor: pointer;\n position: relative;\n float: right;\n top: 13px;\n margin-right: 20px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .newscroller-INKeD {\n overflow: auto;\n height: 400px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-collapse-header--6FgU div {\n flex-wrap: wrap !important;\n}\n.diva-component-DIVA_BACKOFFICE_NEW a .item-title--BTvC {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.85);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-desc-DBiiF {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.45);\n}\n";
|
|
21365
21558
|
styleInject(css_248z$h);
|
|
21366
21559
|
|
|
21367
|
-
function ownKeys$
|
|
21368
|
-
function _objectSpread$
|
|
21560
|
+
function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21561
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21369
21562
|
var DropDown = function DropDown(_ref) {
|
|
21370
21563
|
var _curItem$data$length;
|
|
21371
21564
|
var split = _ref.split,
|
|
@@ -21397,7 +21590,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
21397
21590
|
});
|
|
21398
21591
|
return /*#__PURE__*/jsx(Collapse, {
|
|
21399
21592
|
onChange: function onChange() {
|
|
21400
|
-
return getSplittedItems(_objectSpread$
|
|
21593
|
+
return getSplittedItems(_objectSpread$v(_objectSpread$v({}, item.item), {}, {
|
|
21401
21594
|
parentId: item.parentId
|
|
21402
21595
|
}), 0);
|
|
21403
21596
|
},
|
|
@@ -21655,8 +21848,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
21655
21848
|
};
|
|
21656
21849
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
21657
21850
|
|
|
21658
|
-
function ownKeys$
|
|
21659
|
-
function _objectSpread$
|
|
21851
|
+
function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21852
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21660
21853
|
function useFormListData (_ref) {
|
|
21661
21854
|
var _configuration$defaul;
|
|
21662
21855
|
var id = _ref.id,
|
|
@@ -21736,7 +21929,7 @@ function useFormListData (_ref) {
|
|
|
21736
21929
|
if (updated.length == state.length) {
|
|
21737
21930
|
newState = state.map(function (s, i) {
|
|
21738
21931
|
var _updated$find;
|
|
21739
|
-
return _objectSpread$
|
|
21932
|
+
return _objectSpread$u(_objectSpread$u({}, s), {}, {
|
|
21740
21933
|
data: (_updated$find = updated.find(function (u) {
|
|
21741
21934
|
return u.index == i;
|
|
21742
21935
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -21873,8 +22066,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
21873
22066
|
};
|
|
21874
22067
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
21875
22068
|
|
|
21876
|
-
function ownKeys$
|
|
21877
|
-
function _objectSpread$
|
|
22069
|
+
function ownKeys$t(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22070
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21878
22071
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
21879
22072
|
function useSelectOrCreateData (_ref) {
|
|
21880
22073
|
var id = _ref.id,
|
|
@@ -21971,7 +22164,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
21971
22164
|
_context.next = 7;
|
|
21972
22165
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
21973
22166
|
filters: (_configuration$select3 = configuration.selectMapping) !== null && _configuration$select3 !== void 0 && _configuration$select3.searchField ? (_configuration$select4 = configuration.selectMapping) === null || _configuration$select4 === void 0 ? void 0 : _configuration$select4.searchField.reduce(function (filter, field) {
|
|
21974
|
-
return _objectSpread$
|
|
22167
|
+
return _objectSpread$t(_objectSpread$t({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
21975
22168
|
}, {}) : {
|
|
21976
22169
|
_id: [value, 'contains']
|
|
21977
22170
|
},
|
|
@@ -22282,8 +22475,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
22282
22475
|
});
|
|
22283
22476
|
};
|
|
22284
22477
|
|
|
22285
|
-
function ownKeys$
|
|
22286
|
-
function _objectSpread$
|
|
22478
|
+
function ownKeys$s(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22479
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22287
22480
|
function useListData (_ref) {
|
|
22288
22481
|
var id = _ref.id,
|
|
22289
22482
|
data = _ref.data;
|
|
@@ -22326,7 +22519,7 @@ function useListData (_ref) {
|
|
|
22326
22519
|
case 3:
|
|
22327
22520
|
result = _context.sent;
|
|
22328
22521
|
setListData(result.data.map(parseField));
|
|
22329
|
-
initData = _objectSpread$
|
|
22522
|
+
initData = _objectSpread$s({}, data);
|
|
22330
22523
|
setUpdatedObject(initData);
|
|
22331
22524
|
setLoading(false);
|
|
22332
22525
|
case 8:
|
|
@@ -22367,7 +22560,7 @@ function useListData (_ref) {
|
|
|
22367
22560
|
});
|
|
22368
22561
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
22369
22562
|
var parsedField = field.field.split('.');
|
|
22370
|
-
item.itemUpdate = _objectSpread$
|
|
22563
|
+
item.itemUpdate = _objectSpread$s(_objectSpread$s({}, field), {}, {
|
|
22371
22564
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
22372
22565
|
});
|
|
22373
22566
|
});
|
|
@@ -22398,16 +22591,16 @@ function useListData (_ref) {
|
|
|
22398
22591
|
console.error('field with more than 2 parts not allowed');
|
|
22399
22592
|
return;
|
|
22400
22593
|
}
|
|
22401
|
-
var updObj = _objectSpread$
|
|
22594
|
+
var updObj = _objectSpread$s({}, updatedObject);
|
|
22402
22595
|
if (fields.length === 1) {
|
|
22403
|
-
updObj = _objectSpread$
|
|
22596
|
+
updObj = _objectSpread$s(_objectSpread$s({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
22404
22597
|
} else if (fields.length === 2) {
|
|
22405
22598
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
22406
22599
|
return v.id === item.id.trim();
|
|
22407
22600
|
});
|
|
22408
22601
|
if (updatedField) {
|
|
22409
|
-
var updatedFieldCopy = _objectSpread$
|
|
22410
|
-
updObj = _objectSpread$
|
|
22602
|
+
var updatedFieldCopy = _objectSpread$s(_objectSpread$s({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
22603
|
+
updObj = _objectSpread$s(_objectSpread$s({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
22411
22604
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
22412
22605
|
})));
|
|
22413
22606
|
}
|
|
@@ -22416,11 +22609,11 @@ function useListData (_ref) {
|
|
|
22416
22609
|
var acItems = listData;
|
|
22417
22610
|
for (var i = 0; i < acItems.length; i++) {
|
|
22418
22611
|
if (i == index) {
|
|
22419
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22612
|
+
acItems[i].itemUpdate = _objectSpread$s(_objectSpread$s({}, acItems[i].itemUpdate), {}, {
|
|
22420
22613
|
value: value
|
|
22421
22614
|
});
|
|
22422
22615
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
22423
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22616
|
+
acItems[i].itemUpdate = _objectSpread$s(_objectSpread$s({}, acItems[i].itemUpdate), {}, {
|
|
22424
22617
|
value: !value
|
|
22425
22618
|
});
|
|
22426
22619
|
}
|
|
@@ -22934,8 +23127,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
22934
23127
|
};
|
|
22935
23128
|
}
|
|
22936
23129
|
|
|
22937
|
-
function ownKeys$
|
|
22938
|
-
function _objectSpread$
|
|
23130
|
+
function ownKeys$r(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23131
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22939
23132
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
22940
23133
|
var id = _ref.id,
|
|
22941
23134
|
data = _ref.data,
|
|
@@ -23043,12 +23236,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
23043
23236
|
}
|
|
23044
23237
|
function onEnter(e) {
|
|
23045
23238
|
if (e.key != 'Enter') return;
|
|
23046
|
-
setCrop(_objectSpread$
|
|
23239
|
+
setCrop(_objectSpread$r(_objectSpread$r({}, crop), {}, {
|
|
23047
23240
|
unit: 'px',
|
|
23048
23241
|
width: Number(widthInputElement.current.value),
|
|
23049
23242
|
height: Number(heightInputElement.current.value)
|
|
23050
23243
|
}));
|
|
23051
|
-
setCompletedCrop(_objectSpread$
|
|
23244
|
+
setCompletedCrop(_objectSpread$r(_objectSpread$r({}, crop), {}, {
|
|
23052
23245
|
unit: 'px',
|
|
23053
23246
|
width: Number(widthInputElement.current.value),
|
|
23054
23247
|
height: Number(heightInputElement.current.value)
|
|
@@ -23126,8 +23319,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
23126
23319
|
function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
23127
23320
|
function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
|
|
23128
23321
|
function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23129
|
-
function ownKeys$
|
|
23130
|
-
function _objectSpread$
|
|
23322
|
+
function ownKeys$q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23323
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23131
23324
|
function useDescriptions (_ref) {
|
|
23132
23325
|
var id = _ref.id;
|
|
23133
23326
|
var root = useStore();
|
|
@@ -23220,7 +23413,7 @@ function _getDisplayData() {
|
|
|
23220
23413
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
23221
23414
|
while (1) switch (_context4.prev = _context4.next) {
|
|
23222
23415
|
case 0:
|
|
23223
|
-
displayData = _objectSpread$
|
|
23416
|
+
displayData = _objectSpread$q({}, data);
|
|
23224
23417
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
23225
23418
|
_context4.prev = 2;
|
|
23226
23419
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -23496,8 +23689,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
23496
23689
|
};
|
|
23497
23690
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
23498
23691
|
|
|
23499
|
-
function ownKeys$
|
|
23500
|
-
function _objectSpread$
|
|
23692
|
+
function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23693
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23501
23694
|
function useGridData (_ref) {
|
|
23502
23695
|
var id = _ref.id,
|
|
23503
23696
|
data = _ref.data;
|
|
@@ -23540,11 +23733,11 @@ function useGridData (_ref) {
|
|
|
23540
23733
|
function reducer(state, action) {
|
|
23541
23734
|
switch (action.type) {
|
|
23542
23735
|
case 'update':
|
|
23543
|
-
return _objectSpread$
|
|
23736
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$p(_objectSpread$p({}, action.data), {}, {
|
|
23544
23737
|
buffer: Buffer.from(action.data.buffer)
|
|
23545
23738
|
})));
|
|
23546
23739
|
case 'delete':
|
|
23547
|
-
var newState = _objectSpread$
|
|
23740
|
+
var newState = _objectSpread$p({}, state);
|
|
23548
23741
|
delete newState[action.data.divaNr];
|
|
23549
23742
|
return newState;
|
|
23550
23743
|
default:
|
|
@@ -23558,7 +23751,7 @@ var css_248z$f = ".grid-sGemi {\n display: grid;\n grid-template-columns: repe
|
|
|
23558
23751
|
styleInject(css_248z$f);
|
|
23559
23752
|
|
|
23560
23753
|
var wrapper$2 = "wrapper-p-gR3";
|
|
23561
|
-
var container$
|
|
23754
|
+
var container$3 = "container-DoZqe";
|
|
23562
23755
|
var css_248z$e = ".wrapper-p-gR3 {\n background: #ececec;\n}\n\n.container-DoZqe {\n display: flex;\n justify-content: space-between;\n}\n";
|
|
23563
23756
|
styleInject(css_248z$e);
|
|
23564
23757
|
|
|
@@ -23579,7 +23772,7 @@ var ToolTipInfo = function ToolTipInfo(props) {
|
|
|
23579
23772
|
width: 230
|
|
23580
23773
|
},
|
|
23581
23774
|
children: /*#__PURE__*/jsx("div", {
|
|
23582
|
-
className: container$
|
|
23775
|
+
className: container$3
|
|
23583
23776
|
})
|
|
23584
23777
|
})
|
|
23585
23778
|
});
|
|
@@ -23631,8 +23824,8 @@ var Grid = function Grid(_ref) {
|
|
|
23631
23824
|
});
|
|
23632
23825
|
};
|
|
23633
23826
|
|
|
23634
|
-
function ownKeys$
|
|
23635
|
-
function _objectSpread$
|
|
23827
|
+
function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23828
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23636
23829
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
23637
23830
|
var id = _ref.id;
|
|
23638
23831
|
var root = useStore();
|
|
@@ -23751,7 +23944,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
23751
23944
|
onRemove: onRemove,
|
|
23752
23945
|
customRequest: customRequest,
|
|
23753
23946
|
fileList: fileList.map(function (f) {
|
|
23754
|
-
return _objectSpread$
|
|
23947
|
+
return _objectSpread$o(_objectSpread$o({}, f), {}, {
|
|
23755
23948
|
url: f.url
|
|
23756
23949
|
});
|
|
23757
23950
|
}),
|
|
@@ -24508,8 +24701,8 @@ function LinkCell (_ref) {
|
|
|
24508
24701
|
|
|
24509
24702
|
var _excluded$1 = ["index"],
|
|
24510
24703
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
24511
|
-
function ownKeys$
|
|
24512
|
-
function _objectSpread$
|
|
24704
|
+
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24705
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24513
24706
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
24514
24707
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
24515
24708
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -24523,7 +24716,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
24523
24716
|
component: false,
|
|
24524
24717
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
24525
24718
|
value: form,
|
|
24526
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
24719
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$n({}, props))
|
|
24527
24720
|
})
|
|
24528
24721
|
});
|
|
24529
24722
|
};
|
|
@@ -24576,7 +24769,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24576
24769
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
24577
24770
|
longDescriptionType = 'text';
|
|
24578
24771
|
}
|
|
24579
|
-
var modifiedColumn = _objectSpread$
|
|
24772
|
+
var modifiedColumn = _objectSpread$n(_objectSpread$n({}, column), {}, {
|
|
24580
24773
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
24581
24774
|
});
|
|
24582
24775
|
if (column) {
|
|
@@ -24589,40 +24782,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24589
24782
|
};
|
|
24590
24783
|
switch (modifiedColumn.type) {
|
|
24591
24784
|
case 'boolean':
|
|
24592
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
24785
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$n({}, cellProps));
|
|
24593
24786
|
break;
|
|
24594
24787
|
case 'text':
|
|
24595
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
24788
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$n({}, cellProps));
|
|
24596
24789
|
break;
|
|
24597
24790
|
case 'select':
|
|
24598
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
24791
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$n({}, cellProps));
|
|
24599
24792
|
case 'media':
|
|
24600
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
24793
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$n({}, cellProps));
|
|
24601
24794
|
break;
|
|
24602
24795
|
case 'mediaItem':
|
|
24603
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
24796
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$n({}, cellProps));
|
|
24604
24797
|
break;
|
|
24605
24798
|
case 'unixTimeStamp':
|
|
24606
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
24799
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$n({}, cellProps));
|
|
24607
24800
|
break;
|
|
24608
24801
|
case 'unixTimeStampCheck':
|
|
24609
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
24802
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$n({}, cellProps));
|
|
24610
24803
|
break;
|
|
24611
24804
|
case 'icon':
|
|
24612
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
24805
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$n({}, cellProps));
|
|
24613
24806
|
break;
|
|
24614
24807
|
case 'progress':
|
|
24615
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
24808
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$n({}, cellProps));
|
|
24616
24809
|
break;
|
|
24617
24810
|
case 'link':
|
|
24618
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
24811
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$n({}, cellProps));
|
|
24619
24812
|
break;
|
|
24620
24813
|
default:
|
|
24621
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
24814
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$n({}, cellProps));
|
|
24622
24815
|
break;
|
|
24623
24816
|
}
|
|
24624
24817
|
}
|
|
24625
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
24818
|
+
return /*#__PURE__*/jsx("td", _objectSpread$n(_objectSpread$n({}, restProps), {}, {
|
|
24626
24819
|
children: childNode
|
|
24627
24820
|
}));
|
|
24628
24821
|
};
|
|
@@ -24811,7 +25004,7 @@ function useAGHistogram (_ref) {
|
|
|
24811
25004
|
};
|
|
24812
25005
|
}
|
|
24813
25006
|
|
|
24814
|
-
var container$
|
|
25007
|
+
var container$2 = "container-2r-OJ";
|
|
24815
25008
|
var column1 = "column1-9viTK";
|
|
24816
25009
|
var spinner = "spinner-00VcK";
|
|
24817
25010
|
var css_248z$b = ".container-2r-OJ {\n display: flex;\n gap: 40px; /* Distribute the columns evenly */\n}\n\n.column-yZ2Qc {\n padding: 10px;\n}\n\n.column1-9viTK .column-yZ2Qc {\n flex: 8;\n}\n\n.column2-pCnEz .column-yZ2Qc {\n flex: 1;\n}\n\n.column3-QZDVv .column-yZ2Qc {\n flex: 3;\n}\n\n.spinner-00VcK {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
|
|
@@ -24928,7 +25121,7 @@ function AGHistogram (_ref) {
|
|
|
24928
25121
|
children: /*#__PURE__*/jsx(Panel, {
|
|
24929
25122
|
header: headerText,
|
|
24930
25123
|
children: /*#__PURE__*/jsxs("div", {
|
|
24931
|
-
className: container$
|
|
25124
|
+
className: container$2,
|
|
24932
25125
|
children: [!loadingHistogram && /*#__PURE__*/jsx("div", {
|
|
24933
25126
|
className: classnames(column1, 'ag-theme-alpine'),
|
|
24934
25127
|
style: {
|
|
@@ -24974,8 +25167,8 @@ var SMChart = function SMChart(props) {
|
|
|
24974
25167
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
24975
25168
|
};
|
|
24976
25169
|
|
|
24977
|
-
function ownKeys$
|
|
24978
|
-
function _objectSpread$
|
|
25170
|
+
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25171
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24979
25172
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
24980
25173
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
|
|
24981
25174
|
function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -25170,7 +25363,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25170
25363
|
// Convert to Dayjs
|
|
25171
25364
|
(_state$globalFilter4 = state.globalFilter) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4.timeStamp) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) !== null && _state$globalFilter4 !== void 0 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
25172
25365
|
]
|
|
25173
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
25366
|
+
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$m(_objectSpread$m({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
|
|
25174
25367
|
style: {
|
|
25175
25368
|
minWidth: '200px'
|
|
25176
25369
|
},
|
|
@@ -25275,7 +25468,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25275
25468
|
},
|
|
25276
25469
|
dataSource: data,
|
|
25277
25470
|
loading: state.loading,
|
|
25278
|
-
pagination: _objectSpread$
|
|
25471
|
+
pagination: _objectSpread$m(_objectSpread$m({}, state.pagination), {}, {
|
|
25279
25472
|
showTotal: function showTotal(total, range) {
|
|
25280
25473
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
25281
25474
|
},
|
|
@@ -25582,7 +25775,7 @@ function BulkAction(_ref6) {
|
|
|
25582
25775
|
}
|
|
25583
25776
|
_context4.t0 = data;
|
|
25584
25777
|
_context4.next = 11;
|
|
25585
|
-
return apiInterface.update(_objectSpread$
|
|
25778
|
+
return apiInterface.update(_objectSpread$m(_objectSpread$m({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
25586
25779
|
case 11:
|
|
25587
25780
|
_context4.t1 = _context4.sent;
|
|
25588
25781
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -25695,8 +25888,8 @@ function SelectionText(_ref8) {
|
|
|
25695
25888
|
});
|
|
25696
25889
|
}
|
|
25697
25890
|
|
|
25698
|
-
function ownKeys$
|
|
25699
|
-
function _objectSpread$
|
|
25891
|
+
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25892
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25700
25893
|
function getColumnFilterProps (_ref) {
|
|
25701
25894
|
var filter = _ref.filter,
|
|
25702
25895
|
title = _ref.title;
|
|
@@ -26059,7 +26252,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
26059
26252
|
});
|
|
26060
26253
|
},
|
|
26061
26254
|
options: filter.map(function (f) {
|
|
26062
|
-
return _objectSpread$
|
|
26255
|
+
return _objectSpread$l(_objectSpread$l({}, f), {}, {
|
|
26063
26256
|
label: t(f.label)
|
|
26064
26257
|
});
|
|
26065
26258
|
})
|
|
@@ -26108,7 +26301,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26108
26301
|
setDisplaySelectedvalues = _useState4[1];
|
|
26109
26302
|
var options = [];
|
|
26110
26303
|
options = filter.map(function (f) {
|
|
26111
|
-
return _objectSpread$
|
|
26304
|
+
return _objectSpread$l(_objectSpread$l({}, f), {}, {
|
|
26112
26305
|
label: t(f.label)
|
|
26113
26306
|
});
|
|
26114
26307
|
});
|
|
@@ -26182,8 +26375,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26182
26375
|
};
|
|
26183
26376
|
};
|
|
26184
26377
|
|
|
26185
|
-
function ownKeys$
|
|
26186
|
-
function _objectSpread$
|
|
26378
|
+
function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26379
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26187
26380
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
26188
26381
|
var columns = configuration.columns.filter(function (c) {
|
|
26189
26382
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -26236,7 +26429,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
26236
26429
|
}
|
|
26237
26430
|
function mapColumn(column, onUpdate) {
|
|
26238
26431
|
var _column$field, _column$children;
|
|
26239
|
-
return _objectSpread$
|
|
26432
|
+
return _objectSpread$k(_objectSpread$k(_objectSpread$k({}, column), {}, {
|
|
26240
26433
|
hidden: false,
|
|
26241
26434
|
width: column.width || 100,
|
|
26242
26435
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -26286,8 +26479,8 @@ function updateData (_ref) {
|
|
|
26286
26479
|
};
|
|
26287
26480
|
}
|
|
26288
26481
|
|
|
26289
|
-
function ownKeys$
|
|
26290
|
-
function _objectSpread$
|
|
26482
|
+
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26483
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26291
26484
|
function applyFilterAndSortation (_ref) {
|
|
26292
26485
|
var data = _ref.data,
|
|
26293
26486
|
filters = _ref.filters,
|
|
@@ -26302,7 +26495,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
26302
26495
|
processedData = sort(sorter || [], processedData);
|
|
26303
26496
|
return {
|
|
26304
26497
|
data: processedData,
|
|
26305
|
-
pagination: _objectSpread$
|
|
26498
|
+
pagination: _objectSpread$j(_objectSpread$j({}, pagination), {}, {
|
|
26306
26499
|
total: processedData.length
|
|
26307
26500
|
})
|
|
26308
26501
|
};
|
|
@@ -26387,8 +26580,8 @@ function filter(f, data) {
|
|
|
26387
26580
|
}
|
|
26388
26581
|
|
|
26389
26582
|
var _excluded = ["_id"];
|
|
26390
|
-
function ownKeys$
|
|
26391
|
-
function _objectSpread$
|
|
26583
|
+
function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26584
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26392
26585
|
function useTableData$1 (_ref) {
|
|
26393
26586
|
var _configuration$apiInt;
|
|
26394
26587
|
var id = _ref.id;
|
|
@@ -26443,7 +26636,7 @@ function useTableData$1 (_ref) {
|
|
|
26443
26636
|
var _configuration$create;
|
|
26444
26637
|
if (!dataRow) return;
|
|
26445
26638
|
var id = v4();
|
|
26446
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
26639
|
+
var processedDataRow = unflatten(_objectSpread$i({
|
|
26447
26640
|
_id: id,
|
|
26448
26641
|
ID: id
|
|
26449
26642
|
}, dataRow));
|
|
@@ -26455,11 +26648,11 @@ function useTableData$1 (_ref) {
|
|
|
26455
26648
|
newData = _updateData.data;
|
|
26456
26649
|
_updateData.prevDataRow;
|
|
26457
26650
|
_updateData.index;
|
|
26458
|
-
var newState = _objectSpread$
|
|
26651
|
+
var newState = _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26459
26652
|
data: newData
|
|
26460
26653
|
});
|
|
26461
26654
|
if (!filterServerSide) {
|
|
26462
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
26655
|
+
var res = applyFilterAndSortation(_objectSpread$i(_objectSpread$i({}, filterData), {}, {
|
|
26463
26656
|
data: newData
|
|
26464
26657
|
}));
|
|
26465
26658
|
newState.data = res.data;
|
|
@@ -26471,33 +26664,33 @@ function useTableData$1 (_ref) {
|
|
|
26471
26664
|
var formData = new FormData();
|
|
26472
26665
|
processedDataRow._id;
|
|
26473
26666
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
26474
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
26667
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
26475
26668
|
filterContex: filterContex,
|
|
26476
26669
|
value: JSON.stringify([value])
|
|
26477
26670
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
26478
26671
|
if (d && d.Result && d.Result == 'Success') return;
|
|
26479
|
-
setState(_objectSpread$
|
|
26672
|
+
setState(_objectSpread$i({}, oldState));
|
|
26480
26673
|
});
|
|
26481
26674
|
}, [state, catalogItem, filterData]);
|
|
26482
26675
|
useEffect(function () {
|
|
26483
26676
|
if (!catalogItem) return;
|
|
26484
|
-
setState(_objectSpread$
|
|
26677
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26485
26678
|
loading: true,
|
|
26486
|
-
mappingData: _objectSpread$
|
|
26679
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
26487
26680
|
filterContex: filterContex
|
|
26488
26681
|
})
|
|
26489
26682
|
}));
|
|
26490
26683
|
if (!filterServerSide) {
|
|
26491
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26684
|
+
apiHandler.readList(configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
26492
26685
|
filterContex: filterContex
|
|
26493
26686
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
26494
26687
|
var newData = data.data.map(function (d) {
|
|
26495
|
-
return _objectSpread$
|
|
26688
|
+
return _objectSpread$i(_objectSpread$i({}, d), {}, {
|
|
26496
26689
|
_id: d._id || d.ID || nanoid()
|
|
26497
26690
|
});
|
|
26498
26691
|
});
|
|
26499
26692
|
onChange({
|
|
26500
|
-
pagination: _objectSpread$
|
|
26693
|
+
pagination: _objectSpread$i({}, state.pagination),
|
|
26501
26694
|
filters: {},
|
|
26502
26695
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26503
26696
|
return c.defaultSortOrder;
|
|
@@ -26513,7 +26706,7 @@ function useTableData$1 (_ref) {
|
|
|
26513
26706
|
});
|
|
26514
26707
|
} else {
|
|
26515
26708
|
onChange({
|
|
26516
|
-
pagination: _objectSpread$
|
|
26709
|
+
pagination: _objectSpread$i({}, state.pagination),
|
|
26517
26710
|
filters: {},
|
|
26518
26711
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26519
26712
|
return c.defaultSortOrder;
|
|
@@ -26529,17 +26722,17 @@ function useTableData$1 (_ref) {
|
|
|
26529
26722
|
}
|
|
26530
26723
|
}, [filterContex, catalogItem]);
|
|
26531
26724
|
var onChange = function onChange(p, dataParam) {
|
|
26532
|
-
setState(_objectSpread$
|
|
26725
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26533
26726
|
loading: true
|
|
26534
26727
|
}));
|
|
26535
26728
|
if (!filterServerSide) {
|
|
26536
26729
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
26537
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
26730
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$i(_objectSpread$i({}, p), {}, {
|
|
26538
26731
|
data: unfilteredData
|
|
26539
26732
|
})),
|
|
26540
26733
|
data = _applyFilterAndSortat.data,
|
|
26541
26734
|
pagination = _applyFilterAndSortat.pagination;
|
|
26542
|
-
setState(_objectSpread$
|
|
26735
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26543
26736
|
data: data,
|
|
26544
26737
|
pagination: pagination,
|
|
26545
26738
|
loading: false,
|
|
@@ -26550,20 +26743,20 @@ function useTableData$1 (_ref) {
|
|
|
26550
26743
|
sorter: p.sorter
|
|
26551
26744
|
});
|
|
26552
26745
|
} else {
|
|
26553
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26746
|
+
apiHandler.readList(configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
26554
26747
|
filterContex: filterContex
|
|
26555
26748
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
26556
|
-
setState(_objectSpread$
|
|
26749
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26557
26750
|
data: data.data.map(function (dt) {
|
|
26558
|
-
return _objectSpread$
|
|
26751
|
+
return _objectSpread$i(_objectSpread$i({}, dt), {}, {
|
|
26559
26752
|
_id: dt._id || dt.ID || nanoid()
|
|
26560
26753
|
});
|
|
26561
26754
|
}),
|
|
26562
|
-
pagination: _objectSpread$
|
|
26755
|
+
pagination: _objectSpread$i(_objectSpread$i({}, p.pagination), {}, {
|
|
26563
26756
|
total: data.total
|
|
26564
26757
|
}),
|
|
26565
26758
|
loading: false,
|
|
26566
|
-
mappingData: _objectSpread$
|
|
26759
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
26567
26760
|
filterContex: filterContex
|
|
26568
26761
|
})
|
|
26569
26762
|
}));
|
|
@@ -26584,7 +26777,7 @@ function useTableData$1 (_ref) {
|
|
|
26584
26777
|
filters['_id'] = [id, 'eq', false];
|
|
26585
26778
|
_context.next = 4;
|
|
26586
26779
|
return apiHandler.readList(configuration.mapping, {
|
|
26587
|
-
pagination: _objectSpread$
|
|
26780
|
+
pagination: _objectSpread$i({}, state.pagination),
|
|
26588
26781
|
columns: configuration.columns,
|
|
26589
26782
|
filters: filters,
|
|
26590
26783
|
sorter: filterData.sorter
|
|
@@ -26603,7 +26796,7 @@ function useTableData$1 (_ref) {
|
|
|
26603
26796
|
};
|
|
26604
26797
|
}();
|
|
26605
26798
|
var onSelect = function onSelect(keys) {
|
|
26606
|
-
setState(_objectSpread$
|
|
26799
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26607
26800
|
selected: keys
|
|
26608
26801
|
}));
|
|
26609
26802
|
};
|
|
@@ -26613,7 +26806,7 @@ function useTableData$1 (_ref) {
|
|
|
26613
26806
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
26614
26807
|
while (1) switch (_context3.prev = _context3.next) {
|
|
26615
26808
|
case 0:
|
|
26616
|
-
setState(_objectSpread$
|
|
26809
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26617
26810
|
deleting: true
|
|
26618
26811
|
}));
|
|
26619
26812
|
newData = _toConsumableArray(state.data);
|
|
@@ -26628,7 +26821,7 @@ function useTableData$1 (_ref) {
|
|
|
26628
26821
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
26629
26822
|
return nd._id === state.selected[index];
|
|
26630
26823
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
26631
|
-
mappingData = _objectSpread$
|
|
26824
|
+
mappingData = _objectSpread$i(_objectSpread$i({}, mappingData), state.mappingData);
|
|
26632
26825
|
_context2.next = 5;
|
|
26633
26826
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid);
|
|
26634
26827
|
case 5:
|
|
@@ -26678,7 +26871,7 @@ function useTableData$1 (_ref) {
|
|
|
26678
26871
|
}
|
|
26679
26872
|
_context3.next = 18;
|
|
26680
26873
|
return apiHandler.readList(configuration.mapping, {
|
|
26681
|
-
pagination: _objectSpread$
|
|
26874
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
26682
26875
|
current: current
|
|
26683
26876
|
}),
|
|
26684
26877
|
columns: configuration.columns,
|
|
@@ -26690,11 +26883,11 @@ function useTableData$1 (_ref) {
|
|
|
26690
26883
|
newData = data.data;
|
|
26691
26884
|
total = data.total;
|
|
26692
26885
|
case 21:
|
|
26693
|
-
setState(_objectSpread$
|
|
26886
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26694
26887
|
selected: [],
|
|
26695
26888
|
deleting: false,
|
|
26696
26889
|
data: newData,
|
|
26697
|
-
pagination: _objectSpread$
|
|
26890
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
26698
26891
|
current: current,
|
|
26699
26892
|
total: total
|
|
26700
26893
|
})
|
|
@@ -26710,12 +26903,12 @@ function useTableData$1 (_ref) {
|
|
|
26710
26903
|
};
|
|
26711
26904
|
}();
|
|
26712
26905
|
function setLoading() {
|
|
26713
|
-
setState(_objectSpread$
|
|
26906
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26714
26907
|
loading: true
|
|
26715
26908
|
}));
|
|
26716
26909
|
}
|
|
26717
|
-
return _objectSpread$
|
|
26718
|
-
configuration: _objectSpread$
|
|
26910
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26911
|
+
configuration: _objectSpread$i(_objectSpread$i({}, configuration), {}, {
|
|
26719
26912
|
title: undefined
|
|
26720
26913
|
}),
|
|
26721
26914
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -26827,8 +27020,8 @@ function objectHash (obj) {
|
|
|
26827
27020
|
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
26828
27021
|
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
|
|
26829
27022
|
function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
26830
|
-
function ownKeys$
|
|
26831
|
-
function _objectSpread$
|
|
27023
|
+
function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27024
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26832
27025
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
26833
27026
|
function useTableData (_ref) {
|
|
26834
27027
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -26886,7 +27079,7 @@ function useTableData (_ref) {
|
|
|
26886
27079
|
var _useState13 = useState({
|
|
26887
27080
|
loading: true,
|
|
26888
27081
|
deleting: false,
|
|
26889
|
-
pagination: _objectSpread$
|
|
27082
|
+
pagination: _objectSpread$h({
|
|
26890
27083
|
current: 1,
|
|
26891
27084
|
pageSize: 20,
|
|
26892
27085
|
total: 0,
|
|
@@ -26895,7 +27088,7 @@ function useTableData (_ref) {
|
|
|
26895
27088
|
selected: [],
|
|
26896
27089
|
canDelete: !!apiHandler.canDelete,
|
|
26897
27090
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
26898
|
-
mappingData: _objectSpread$
|
|
27091
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
26899
27092
|
prefilter: {
|
|
26900
27093
|
select: globalFilter.select
|
|
26901
27094
|
}
|
|
@@ -26904,7 +27097,7 @@ function useTableData (_ref) {
|
|
|
26904
27097
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
26905
27098
|
state = _useState14[0],
|
|
26906
27099
|
setState = _useState14[1];
|
|
26907
|
-
var mapping = _objectSpread$
|
|
27100
|
+
var mapping = _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
26908
27101
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
26909
27102
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
26910
27103
|
});
|
|
@@ -26943,14 +27136,14 @@ function useTableData (_ref) {
|
|
|
26943
27136
|
}
|
|
26944
27137
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
26945
27138
|
var newInitData = initData;
|
|
26946
|
-
var newState = _objectSpread$
|
|
27139
|
+
var newState = _objectSpread$h({}, state);
|
|
26947
27140
|
var selected = [];
|
|
26948
27141
|
if (configuration.deselectOnUpdate == false) {
|
|
26949
27142
|
selected = state.selected;
|
|
26950
27143
|
}
|
|
26951
27144
|
var pagination = undefined;
|
|
26952
27145
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
26953
|
-
pagination = _objectSpread$
|
|
27146
|
+
pagination = _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
26954
27147
|
total: state.data.length + dataArray.length
|
|
26955
27148
|
});
|
|
26956
27149
|
}
|
|
@@ -26967,7 +27160,7 @@ function useTableData (_ref) {
|
|
|
26967
27160
|
dataRow: dataRow
|
|
26968
27161
|
}),
|
|
26969
27162
|
_data = _updateData.data;
|
|
26970
|
-
newState = _objectSpread$
|
|
27163
|
+
newState = _objectSpread$h(_objectSpread$h({}, newState), {}, {
|
|
26971
27164
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
26972
27165
|
data: _data,
|
|
26973
27166
|
selected: selected
|
|
@@ -26980,8 +27173,8 @@ function useTableData (_ref) {
|
|
|
26980
27173
|
dataRow: dataRow
|
|
26981
27174
|
}),
|
|
26982
27175
|
nextInitData = _updateData2.data;
|
|
26983
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
26984
|
-
filters: _objectSpread$
|
|
27176
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, filterData), {}, {
|
|
27177
|
+
filters: _objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.toggle) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
26985
27178
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery ? {
|
|
26986
27179
|
genericProps: globalFilter.toggle
|
|
26987
27180
|
} : undefined), {}, {
|
|
@@ -26991,7 +27184,7 @@ function useTableData (_ref) {
|
|
|
26991
27184
|
_data2 = _applyFilterAndSortat.data,
|
|
26992
27185
|
_pagination2 = _applyFilterAndSortat.pagination;
|
|
26993
27186
|
newInitData = nextInitData;
|
|
26994
|
-
newState = _objectSpread$
|
|
27187
|
+
newState = _objectSpread$h(_objectSpread$h({}, newState), {}, {
|
|
26995
27188
|
pagination: _pagination2,
|
|
26996
27189
|
data: _data2,
|
|
26997
27190
|
selected: selected
|
|
@@ -27001,8 +27194,8 @@ function useTableData (_ref) {
|
|
|
27001
27194
|
if (apiHandler.canCreate) {
|
|
27002
27195
|
apiCreate(data).then(function (res) {
|
|
27003
27196
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
27004
|
-
initData && setInitData(_objectSpread$
|
|
27005
|
-
setState(_objectSpread$
|
|
27197
|
+
initData && setInitData(_objectSpread$h({}, initData));
|
|
27198
|
+
setState(_objectSpread$h({}, state));
|
|
27006
27199
|
}
|
|
27007
27200
|
});
|
|
27008
27201
|
}
|
|
@@ -27015,7 +27208,7 @@ function useTableData (_ref) {
|
|
|
27015
27208
|
var triggerRefresh = function triggerRefresh() {
|
|
27016
27209
|
var _configuration$filter7;
|
|
27017
27210
|
setError(undefined);
|
|
27018
|
-
var newGlobalFilter = _objectSpread$
|
|
27211
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
27019
27212
|
//on refresh update default filter, since global value can change
|
|
27020
27213
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
27021
27214
|
var _configuration$filter8;
|
|
@@ -27026,7 +27219,7 @@ function useTableData (_ref) {
|
|
|
27026
27219
|
newGlobalFilter["default"] = _defaultFilter;
|
|
27027
27220
|
setGlobaFilter(newGlobalFilter);
|
|
27028
27221
|
}
|
|
27029
|
-
onChange(_objectSpread$
|
|
27222
|
+
onChange(_objectSpread$h({
|
|
27030
27223
|
pagination: state.pagination
|
|
27031
27224
|
}, filterData), newGlobalFilter, true);
|
|
27032
27225
|
};
|
|
@@ -27044,7 +27237,7 @@ function useTableData (_ref) {
|
|
|
27044
27237
|
order: c.defaultSortOrder
|
|
27045
27238
|
};
|
|
27046
27239
|
});
|
|
27047
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
27240
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
27048
27241
|
loading: false
|
|
27049
27242
|
}));else {
|
|
27050
27243
|
onChange({
|
|
@@ -27087,7 +27280,7 @@ function useTableData (_ref) {
|
|
|
27087
27280
|
case 0:
|
|
27088
27281
|
filters = {};
|
|
27089
27282
|
filters['_id'] = [id, 'eq', false];
|
|
27090
|
-
ssf = _objectSpread$
|
|
27283
|
+
ssf = _objectSpread$h({
|
|
27091
27284
|
pagination: {
|
|
27092
27285
|
current: 1,
|
|
27093
27286
|
pageSize: 1
|
|
@@ -27140,11 +27333,11 @@ function useTableData (_ref) {
|
|
|
27140
27333
|
prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
|
|
27141
27334
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
27142
27335
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
27143
|
-
setState(_objectSpread$
|
|
27336
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
27144
27337
|
loading: true
|
|
27145
27338
|
}));
|
|
27146
27339
|
currentData = initData;
|
|
27147
|
-
filterData = _objectSpread$
|
|
27340
|
+
filterData = _objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, prefilter.search), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
27148
27341
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
27149
27342
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
27150
27343
|
_ref7[0];
|
|
@@ -27152,7 +27345,7 @@ function useTableData (_ref) {
|
|
|
27152
27345
|
return v != null;
|
|
27153
27346
|
}));
|
|
27154
27347
|
currentFilterHash = objectHash(filterData);
|
|
27155
|
-
currentPagination = _objectSpread$
|
|
27348
|
+
currentPagination = _objectSpread$h(_objectSpread$h({}, p.pagination), {}, {
|
|
27156
27349
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
27157
27350
|
});
|
|
27158
27351
|
filterHash.current = currentFilterHash;
|
|
@@ -27160,7 +27353,7 @@ function useTableData (_ref) {
|
|
|
27160
27353
|
_context3.next = 20;
|
|
27161
27354
|
break;
|
|
27162
27355
|
}
|
|
27163
|
-
ssf = _objectSpread$
|
|
27356
|
+
ssf = _objectSpread$h({
|
|
27164
27357
|
pagination: currentPagination,
|
|
27165
27358
|
columns: configuration.columns,
|
|
27166
27359
|
filters: filterData,
|
|
@@ -27174,7 +27367,7 @@ function useTableData (_ref) {
|
|
|
27174
27367
|
data = _context3.sent;
|
|
27175
27368
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
27176
27369
|
currentData = data.data;
|
|
27177
|
-
currentPagination = _objectSpread$
|
|
27370
|
+
currentPagination = _objectSpread$h(_objectSpread$h({}, currentPagination), {}, {
|
|
27178
27371
|
total: data.total
|
|
27179
27372
|
});
|
|
27180
27373
|
_context3.next = 29;
|
|
@@ -27191,7 +27384,7 @@ function useTableData (_ref) {
|
|
|
27191
27384
|
currentData = _data3.data;
|
|
27192
27385
|
setInitData(currentData);
|
|
27193
27386
|
case 26:
|
|
27194
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
27387
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$h(_objectSpread$h({}, p), {}, {
|
|
27195
27388
|
pagination: currentPagination,
|
|
27196
27389
|
filters: filterData,
|
|
27197
27390
|
data: currentData,
|
|
@@ -27200,11 +27393,11 @@ function useTableData (_ref) {
|
|
|
27200
27393
|
currentData = _data4;
|
|
27201
27394
|
currentPagination = pagination;
|
|
27202
27395
|
case 29:
|
|
27203
|
-
setState(_objectSpread$
|
|
27396
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
27204
27397
|
loading: false,
|
|
27205
27398
|
data: currentData,
|
|
27206
27399
|
pagination: currentPagination,
|
|
27207
|
-
mappingData: _objectSpread$
|
|
27400
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
27208
27401
|
prefilter: prefilter
|
|
27209
27402
|
}),
|
|
27210
27403
|
currentFetchUrl: currentUrl
|
|
@@ -27226,7 +27419,7 @@ function useTableData (_ref) {
|
|
|
27226
27419
|
};
|
|
27227
27420
|
}();
|
|
27228
27421
|
var onSelect = function onSelect(keys) {
|
|
27229
|
-
setState(_objectSpread$
|
|
27422
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
27230
27423
|
selected: keys
|
|
27231
27424
|
}));
|
|
27232
27425
|
};
|
|
@@ -27237,7 +27430,7 @@ function useTableData (_ref) {
|
|
|
27237
27430
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
27238
27431
|
while (1) switch (_context5.prev = _context5.next) {
|
|
27239
27432
|
case 0:
|
|
27240
|
-
setState(_objectSpread$
|
|
27433
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
27241
27434
|
deleting: true
|
|
27242
27435
|
}));
|
|
27243
27436
|
newData = _toConsumableArray(state.data);
|
|
@@ -27277,7 +27470,7 @@ function useTableData (_ref) {
|
|
|
27277
27470
|
} finally {
|
|
27278
27471
|
_iterator.f();
|
|
27279
27472
|
}
|
|
27280
|
-
mappingData = _objectSpread$
|
|
27473
|
+
mappingData = _objectSpread$h(_objectSpread$h(_objectSpread$h({}, mappingData), state.mappingData), mapToggle);
|
|
27281
27474
|
deleteResult = undefined;
|
|
27282
27475
|
_context4.prev = 7;
|
|
27283
27476
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -27367,12 +27560,12 @@ function useTableData (_ref) {
|
|
|
27367
27560
|
break;
|
|
27368
27561
|
}
|
|
27369
27562
|
_context5.next = 25;
|
|
27370
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
27371
|
-
pagination: _objectSpread$
|
|
27563
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$h({
|
|
27564
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
27372
27565
|
current: current
|
|
27373
27566
|
}),
|
|
27374
27567
|
columns: configuration.columns,
|
|
27375
|
-
filters: _objectSpread$
|
|
27568
|
+
filters: _objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
27376
27569
|
sorter: filterData.sorter
|
|
27377
27570
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery ? {
|
|
27378
27571
|
genericProps: globalFilter.toggle
|
|
@@ -27383,11 +27576,11 @@ function useTableData (_ref) {
|
|
|
27383
27576
|
total = data.total;
|
|
27384
27577
|
case 28:
|
|
27385
27578
|
setInitData(newInitData);
|
|
27386
|
-
setState(_objectSpread$
|
|
27579
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
27387
27580
|
selected: [],
|
|
27388
27581
|
deleting: false,
|
|
27389
27582
|
data: newData,
|
|
27390
|
-
pagination: _objectSpread$
|
|
27583
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
27391
27584
|
current: current === 0 ? 1 : current,
|
|
27392
27585
|
total: total
|
|
27393
27586
|
})
|
|
@@ -27408,14 +27601,14 @@ function useTableData (_ref) {
|
|
|
27408
27601
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
27409
27602
|
return;
|
|
27410
27603
|
}
|
|
27411
|
-
var newGlobalFilter = _objectSpread$
|
|
27604
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
27412
27605
|
if (value !== null && value !== void 0 && value.length) {
|
|
27413
27606
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
27414
27607
|
} else {
|
|
27415
27608
|
newGlobalFilter.select = {};
|
|
27416
27609
|
}
|
|
27417
27610
|
setGlobaFilter(newGlobalFilter);
|
|
27418
|
-
onChange(_objectSpread$
|
|
27611
|
+
onChange(_objectSpread$h({
|
|
27419
27612
|
pagination: state.pagination
|
|
27420
27613
|
}, filterData), newGlobalFilter);
|
|
27421
27614
|
};
|
|
@@ -27429,11 +27622,11 @@ function useTableData (_ref) {
|
|
|
27429
27622
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
27430
27623
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
27431
27624
|
});
|
|
27432
|
-
var newGlobalFilter = _objectSpread$
|
|
27625
|
+
var newGlobalFilter = _objectSpread$h(_objectSpread$h({}, globalFilter), {}, {
|
|
27433
27626
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
27434
27627
|
});
|
|
27435
27628
|
setGlobaFilter(newGlobalFilter);
|
|
27436
|
-
onChange(_objectSpread$
|
|
27629
|
+
onChange(_objectSpread$h({
|
|
27437
27630
|
pagination: state.pagination
|
|
27438
27631
|
}, filterData), newGlobalFilter, undefined, true);
|
|
27439
27632
|
};
|
|
@@ -27446,7 +27639,7 @@ function useTableData (_ref) {
|
|
|
27446
27639
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
27447
27640
|
return;
|
|
27448
27641
|
}
|
|
27449
|
-
var newGlobalFilter = _objectSpread$
|
|
27642
|
+
var newGlobalFilter = _objectSpread$h(_objectSpread$h({}, globalFilter), {}, {
|
|
27450
27643
|
search: {}
|
|
27451
27644
|
});
|
|
27452
27645
|
if (value) {
|
|
@@ -27460,7 +27653,7 @@ function useTableData (_ref) {
|
|
|
27460
27653
|
});
|
|
27461
27654
|
}
|
|
27462
27655
|
setGlobaFilter(newGlobalFilter);
|
|
27463
|
-
onChange(_objectSpread$
|
|
27656
|
+
onChange(_objectSpread$h({
|
|
27464
27657
|
pagination: state.pagination
|
|
27465
27658
|
}, filterData), newGlobalFilter);
|
|
27466
27659
|
};
|
|
@@ -27470,17 +27663,17 @@ function useTableData (_ref) {
|
|
|
27470
27663
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
27471
27664
|
return;
|
|
27472
27665
|
}
|
|
27473
|
-
var newGlobalFilter = _objectSpread$
|
|
27666
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
27474
27667
|
newGlobalFilter.timeStamp = {
|
|
27475
27668
|
fromTimeStamp: [from],
|
|
27476
27669
|
toTimeStamp: [to]
|
|
27477
27670
|
};
|
|
27478
27671
|
setGlobaFilter(newGlobalFilter);
|
|
27479
|
-
onChange(_objectSpread$
|
|
27672
|
+
onChange(_objectSpread$h({
|
|
27480
27673
|
pagination: state.pagination
|
|
27481
27674
|
}, filterData), newGlobalFilter);
|
|
27482
27675
|
};
|
|
27483
|
-
return _objectSpread$
|
|
27676
|
+
return _objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
27484
27677
|
title: title,
|
|
27485
27678
|
configuration: configuration,
|
|
27486
27679
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -27522,8 +27715,8 @@ function StandardTable (_ref) {
|
|
|
27522
27715
|
});
|
|
27523
27716
|
}
|
|
27524
27717
|
|
|
27525
|
-
function ownKeys$
|
|
27526
|
-
function _objectSpread$
|
|
27718
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27719
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27527
27720
|
function Table (props) {
|
|
27528
27721
|
var root = useStore();
|
|
27529
27722
|
var variant = useMemo(function () {
|
|
@@ -27531,15 +27724,15 @@ function Table (props) {
|
|
|
27531
27724
|
return config.variant;
|
|
27532
27725
|
}, [props.id]);
|
|
27533
27726
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
27534
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
27727
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$g({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$g({}, props))]
|
|
27535
27728
|
});
|
|
27536
27729
|
}
|
|
27537
27730
|
|
|
27538
27731
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
27539
27732
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
|
|
27540
27733
|
function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
27541
|
-
function ownKeys$
|
|
27542
|
-
function _objectSpread$
|
|
27734
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27735
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27543
27736
|
function useAGGrid (_ref) {
|
|
27544
27737
|
var id = _ref.id,
|
|
27545
27738
|
filter = _ref.filter,
|
|
@@ -27633,7 +27826,7 @@ function useAGGrid (_ref) {
|
|
|
27633
27826
|
value = _ref3[1];
|
|
27634
27827
|
if (_idx == 0) {
|
|
27635
27828
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
27636
|
-
rdat.push(_objectSpread$
|
|
27829
|
+
rdat.push(_objectSpread$f(_objectSpread$f({}, rd), {}, {
|
|
27637
27830
|
grouping: [idx.toString()]
|
|
27638
27831
|
}));
|
|
27639
27832
|
var sp = key.split(':');
|
|
@@ -27768,7 +27961,7 @@ function useAGGrid (_ref) {
|
|
|
27768
27961
|
};
|
|
27769
27962
|
}
|
|
27770
27963
|
|
|
27771
|
-
var overlay
|
|
27964
|
+
var overlay = "overlay-lm0tm";
|
|
27772
27965
|
var loader = "loader-LaXZy";
|
|
27773
27966
|
var flex = "flex-yQdda";
|
|
27774
27967
|
var bar = "bar-Y663f";
|
|
@@ -27776,8 +27969,8 @@ var value = "value-FCA-6";
|
|
|
27776
27969
|
var css_248z$a = ".overlay-lm0tm {\n position: absolute;\n z-index: 1;\n background-color: rgba(247,247,247,0.45882);\n height: 60vh;\n width: 100%;\n}\n.loader-LaXZy {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50px;\n height: 50px;\n border: 3px solid rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin-qUdpu 1s ease-in-out infinite;\n -webkit-animation: spin-qUdpu 1s ease-in-out infinite;\n}\n.flex-yQdda {\n display: flex;\n}\n\n.bar-Y663f {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 7%;\n}\n\n.value-FCA-6 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: -moz-fit-content;\n width: fit-content;\n}\n@keyframes spin-qUdpu {\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n";
|
|
27777
27970
|
styleInject(css_248z$a);
|
|
27778
27971
|
|
|
27779
|
-
function ownKeys$
|
|
27780
|
-
function _objectSpread$
|
|
27972
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27973
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27781
27974
|
var AGChart = function AGChart(_ref) {
|
|
27782
27975
|
var data = _ref.data;
|
|
27783
27976
|
var groupedData = [];
|
|
@@ -27785,11 +27978,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
27785
27978
|
data.forEach(function (dt) {
|
|
27786
27979
|
if (dt.count == 0) return;
|
|
27787
27980
|
if (groupedData.length > dt.grouping[0]) {
|
|
27788
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
27981
|
+
groupedData[dt.grouping[0]].push(_objectSpread$e(_objectSpread$e({}, dt), {}, {
|
|
27789
27982
|
count: Number(dt.count)
|
|
27790
27983
|
}));
|
|
27791
27984
|
} else {
|
|
27792
|
-
groupedData.push([_objectSpread$
|
|
27985
|
+
groupedData.push([_objectSpread$e(_objectSpread$e({}, dt), {}, {
|
|
27793
27986
|
count: Number(dt.count)
|
|
27794
27987
|
})]);
|
|
27795
27988
|
}
|
|
@@ -27830,8 +28023,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
27830
28023
|
});
|
|
27831
28024
|
};
|
|
27832
28025
|
|
|
27833
|
-
function ownKeys$
|
|
27834
|
-
function _objectSpread$
|
|
28026
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28027
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27835
28028
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
27836
28029
|
var id = _ref.id,
|
|
27837
28030
|
filter = _ref.filter,
|
|
@@ -27924,7 +28117,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
27924
28117
|
});
|
|
27925
28118
|
});
|
|
27926
28119
|
}
|
|
27927
|
-
return _objectSpread$
|
|
28120
|
+
return _objectSpread$d(_objectSpread$d({}, column), {}, {
|
|
27928
28121
|
cellRenderer: renderer
|
|
27929
28122
|
});
|
|
27930
28123
|
});
|
|
@@ -28051,7 +28244,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
28051
28244
|
checkedChildren: "Chart",
|
|
28052
28245
|
unCheckedChildren: "Grid"
|
|
28053
28246
|
}), /*#__PURE__*/jsx("div", {
|
|
28054
|
-
className: loading || state.loading ? overlay
|
|
28247
|
+
className: loading || state.loading ? overlay : undefined,
|
|
28055
28248
|
children: /*#__PURE__*/jsx("div", {
|
|
28056
28249
|
className: loading || state.loading ? loader : undefined
|
|
28057
28250
|
})
|
|
@@ -28194,8 +28387,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
28194
28387
|
};
|
|
28195
28388
|
var CustomText$1 = observer(CustomText);
|
|
28196
28389
|
|
|
28197
|
-
function ownKeys$
|
|
28198
|
-
function _objectSpread$
|
|
28390
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28391
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28199
28392
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
28200
28393
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
28201
28394
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -28258,7 +28451,7 @@ function useFilterBoxData (id) {
|
|
|
28258
28451
|
} finally {
|
|
28259
28452
|
_iterator.f();
|
|
28260
28453
|
}
|
|
28261
|
-
return _objectSpread$
|
|
28454
|
+
return _objectSpread$c(_objectSpread$c({}, state), ob);
|
|
28262
28455
|
}
|
|
28263
28456
|
return {
|
|
28264
28457
|
configuration: configuration,
|
|
@@ -28272,8 +28465,8 @@ function useFilterBoxData (id) {
|
|
|
28272
28465
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
28273
28466
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
28274
28467
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
28275
|
-
function ownKeys$
|
|
28276
|
-
function _objectSpread$
|
|
28468
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28469
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28277
28470
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
28278
28471
|
var id = _ref.id,
|
|
28279
28472
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -28301,7 +28494,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28301
28494
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
28302
28495
|
mode: "single",
|
|
28303
28496
|
apiInterface: filter.requestOptions,
|
|
28304
|
-
wholeData: _objectSpread$
|
|
28497
|
+
wholeData: _objectSpread$b(_objectSpread$b({}, state.filter), {}, {
|
|
28305
28498
|
tab: tab
|
|
28306
28499
|
}),
|
|
28307
28500
|
mapping: filter.requestMapping,
|
|
@@ -28533,8 +28726,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28533
28726
|
return false;
|
|
28534
28727
|
});
|
|
28535
28728
|
|
|
28536
|
-
function ownKeys$
|
|
28537
|
-
function _objectSpread$
|
|
28729
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28730
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28538
28731
|
function useUIBuilderData (id) {
|
|
28539
28732
|
var save = undefined;
|
|
28540
28733
|
var root = useStore();
|
|
@@ -28566,7 +28759,7 @@ function useUIBuilderData (id) {
|
|
|
28566
28759
|
var configuration = _useMemo.configuration;
|
|
28567
28760
|
useEffect(function () {
|
|
28568
28761
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
28569
|
-
return setFilter(_objectSpread$
|
|
28762
|
+
return setFilter(_objectSpread$a(_objectSpread$a({}, filter), {}, {
|
|
28570
28763
|
sessionGuid: res
|
|
28571
28764
|
}));
|
|
28572
28765
|
});
|
|
@@ -28589,8 +28782,8 @@ function useUIBuilderData (id) {
|
|
|
28589
28782
|
};
|
|
28590
28783
|
}
|
|
28591
28784
|
|
|
28592
|
-
function ownKeys$
|
|
28593
|
-
function _objectSpread$
|
|
28785
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28786
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28594
28787
|
function UIBuilder(_ref) {
|
|
28595
28788
|
var id = _ref.id;
|
|
28596
28789
|
var state = useUIBuilderData(id);
|
|
@@ -28617,7 +28810,7 @@ function UIBuilder(_ref) {
|
|
|
28617
28810
|
override = {
|
|
28618
28811
|
value: newFilter[item.field],
|
|
28619
28812
|
setValue: function setValue(newVal) {
|
|
28620
|
-
var newFilter = _objectSpread$
|
|
28813
|
+
var newFilter = _objectSpread$9({}, state.filter);
|
|
28621
28814
|
newFilter[item.field] = newVal;
|
|
28622
28815
|
state.setFilter(newFilter);
|
|
28623
28816
|
}
|
|
@@ -28665,7 +28858,7 @@ function UIBuilder(_ref) {
|
|
|
28665
28858
|
case 'AGGrid':
|
|
28666
28859
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
28667
28860
|
id: item.id,
|
|
28668
|
-
filter: _objectSpread$
|
|
28861
|
+
filter: _objectSpread$9({
|
|
28669
28862
|
optionCodices: JSON.stringify(state.data)
|
|
28670
28863
|
}, state.filter),
|
|
28671
28864
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -28825,8 +29018,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
28825
29018
|
};
|
|
28826
29019
|
var OrgItem$1 = observer(OrgItem);
|
|
28827
29020
|
|
|
28828
|
-
function ownKeys$
|
|
28829
|
-
function _objectSpread$
|
|
29021
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29022
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28830
29023
|
function useTransformJson (_ref) {
|
|
28831
29024
|
var id = _ref.id;
|
|
28832
29025
|
var _useState = useState(),
|
|
@@ -28892,7 +29085,7 @@ function useTransformJson (_ref) {
|
|
|
28892
29085
|
}();
|
|
28893
29086
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
28894
29087
|
var _data$children;
|
|
28895
|
-
return _objectSpread$
|
|
29088
|
+
return _objectSpread$8(_objectSpread$8({}, data), {}, {
|
|
28896
29089
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
28897
29090
|
data: data,
|
|
28898
29091
|
configuration: configuration,
|
|
@@ -29553,8 +29746,8 @@ function useCatalogEditor (id) {
|
|
|
29553
29746
|
};
|
|
29554
29747
|
}
|
|
29555
29748
|
|
|
29556
|
-
function ownKeys$
|
|
29557
|
-
function _objectSpread$
|
|
29749
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29750
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29558
29751
|
function DragDropUpload(_ref) {
|
|
29559
29752
|
var api2Params = _ref.api2Params,
|
|
29560
29753
|
catalogId = _ref.catalogId,
|
|
@@ -29659,7 +29852,7 @@ function DragDropUpload(_ref) {
|
|
|
29659
29852
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
29660
29853
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
29661
29854
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
29662
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
29855
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
29663
29856
|
children: [/*#__PURE__*/jsx("p", {
|
|
29664
29857
|
className: "ant-upload-drag-icon",
|
|
29665
29858
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -29876,15 +30069,20 @@ function CatalogEditor(_ref) {
|
|
|
29876
30069
|
}
|
|
29877
30070
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
29878
30071
|
|
|
29879
|
-
function ownKeys$
|
|
29880
|
-
function _objectSpread$
|
|
29881
|
-
function
|
|
30072
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30073
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30074
|
+
function SpreadsheetWrapper(props) {
|
|
30075
|
+
var _root$contentStore$bo, _root$contentStore$ri;
|
|
29882
30076
|
var root = useStore();
|
|
29883
|
-
return /*#__PURE__*/jsx(Spreadsheet$
|
|
30077
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
29884
30078
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
29885
|
-
jwt: root.dataStore.jwt
|
|
30079
|
+
jwt: root.dataStore.jwt,
|
|
30080
|
+
refSecondaryGrids: [(_root$contentStore$bo = root.contentStore.bottomToolBar.toolbarElement) !== null && _root$contentStore$bo !== void 0 ? _root$contentStore$bo : undefined, (_root$contentStore$ri = root.contentStore.rightToolBar.toolbarElement) !== null && _root$contentStore$ri !== void 0 ? _root$contentStore$ri : undefined].filter(function (element) {
|
|
30081
|
+
return element !== undefined;
|
|
30082
|
+
})
|
|
29886
30083
|
}));
|
|
29887
30084
|
}
|
|
30085
|
+
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
29888
30086
|
|
|
29889
30087
|
function useNavigation$1 () {
|
|
29890
30088
|
var root = useStore();
|
|
@@ -30035,6 +30233,14 @@ function TablePackages () {
|
|
|
30035
30233
|
organizationId: organizationId
|
|
30036
30234
|
};
|
|
30037
30235
|
}, [organizationId]);
|
|
30236
|
+
var preFilter = useMemo(function () {
|
|
30237
|
+
return {
|
|
30238
|
+
colId: 'organizationId',
|
|
30239
|
+
filterType: 'text',
|
|
30240
|
+
type: 'equals',
|
|
30241
|
+
filter: organizationId
|
|
30242
|
+
};
|
|
30243
|
+
}, [organizationId]);
|
|
30038
30244
|
useEffect(function () {
|
|
30039
30245
|
//remove the packages submenu when opening this module
|
|
30040
30246
|
root.contentStore.removeAdditionalElement('idmenricher');
|
|
@@ -30042,7 +30248,7 @@ function TablePackages () {
|
|
|
30042
30248
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
30043
30249
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
30044
30250
|
title: t('backoffice.menu.items.label.IDMEnricherTablePackages')
|
|
30045
|
-
}), /*#__PURE__*/jsx(Spreadsheet
|
|
30251
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
30046
30252
|
gridId: 'packages-grid',
|
|
30047
30253
|
applicationData: applicationData,
|
|
30048
30254
|
rowActions: [{
|
|
@@ -30055,13 +30261,31 @@ function TablePackages () {
|
|
|
30055
30261
|
var selectedNodes = _ref2.selectedNodes;
|
|
30056
30262
|
return !selectedNodes[0].data.basedCatalogId && !selectedNodes[0].data.basedPackageId || !selectedNodes[0].data.name;
|
|
30057
30263
|
}
|
|
30264
|
+
}, {
|
|
30265
|
+
icon: /*#__PURE__*/jsx(DownloadOutlined, {}),
|
|
30266
|
+
action: function () {
|
|
30267
|
+
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
|
|
30268
|
+
var selectedNodes, url;
|
|
30269
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30270
|
+
while (1) switch (_context.prev = _context.next) {
|
|
30271
|
+
case 0:
|
|
30272
|
+
selectedNodes = _ref3.selectedNodes;
|
|
30273
|
+
url = apiConfig.enricherService + '/packages/' + selectedNodes[0].data._id + '/catalog';
|
|
30274
|
+
_context.next = 4;
|
|
30275
|
+
return downloadFile(url, root.dataStore.jwt, 'application/xml', selectedNodes[0].data.name + '.xml');
|
|
30276
|
+
case 4:
|
|
30277
|
+
case "end":
|
|
30278
|
+
return _context.stop();
|
|
30279
|
+
}
|
|
30280
|
+
}, _callee);
|
|
30281
|
+
}));
|
|
30282
|
+
function action(_x) {
|
|
30283
|
+
return _action.apply(this, arguments);
|
|
30284
|
+
}
|
|
30285
|
+
return action;
|
|
30286
|
+
}()
|
|
30058
30287
|
}],
|
|
30059
|
-
preFilter:
|
|
30060
|
-
colId: 'organizationId',
|
|
30061
|
-
filterType: 'text',
|
|
30062
|
-
type: 'equals',
|
|
30063
|
-
filter: organizationId
|
|
30064
|
-
},
|
|
30288
|
+
preFilter: preFilter,
|
|
30065
30289
|
configuration: {
|
|
30066
30290
|
type: 'dotnetSSM',
|
|
30067
30291
|
apiInterface: {
|
|
@@ -30076,8 +30300,8 @@ function TablePackages () {
|
|
|
30076
30300
|
colDef: [{
|
|
30077
30301
|
field: 'isPublished',
|
|
30078
30302
|
//the cell should refresh on changes of this fields
|
|
30079
|
-
valueGetter: function valueGetter(
|
|
30080
|
-
var data =
|
|
30303
|
+
valueGetter: function valueGetter(_ref4) {
|
|
30304
|
+
var data = _ref4.data;
|
|
30081
30305
|
return {
|
|
30082
30306
|
isPublished: data === null || data === void 0 ? void 0 : data.isPublished,
|
|
30083
30307
|
name: data === null || data === void 0 ? void 0 : data.name,
|
|
@@ -30102,8 +30326,8 @@ function TablePackages () {
|
|
|
30102
30326
|
headerName: 'backoffice.idmEnricher.packages.label.catalogId',
|
|
30103
30327
|
field: 'basedCatalogId',
|
|
30104
30328
|
cellDataType: 'lookup',
|
|
30105
|
-
editable: function editable(
|
|
30106
|
-
var data =
|
|
30329
|
+
editable: function editable(_ref5) {
|
|
30330
|
+
var data = _ref5.data;
|
|
30107
30331
|
return !data.basedCatalogId && !data.basedPackageId;
|
|
30108
30332
|
},
|
|
30109
30333
|
customParams: {
|
|
@@ -30120,8 +30344,8 @@ function TablePackages () {
|
|
|
30120
30344
|
headerName: 'backoffice.idmEnricher.packages.label.packageId',
|
|
30121
30345
|
field: 'basedPackageId',
|
|
30122
30346
|
cellDataType: 'lookup',
|
|
30123
|
-
editable: function editable(
|
|
30124
|
-
var data =
|
|
30347
|
+
editable: function editable(_ref6) {
|
|
30348
|
+
var data = _ref6.data;
|
|
30125
30349
|
return !data.basedCatalogId && !data.basedPackageId;
|
|
30126
30350
|
},
|
|
30127
30351
|
customParams: {
|
|
@@ -30412,9 +30636,9 @@ function useModule$1 (currentModules) {
|
|
|
30412
30636
|
startWidth: 600,
|
|
30413
30637
|
defaultPinned: true
|
|
30414
30638
|
});
|
|
30415
|
-
root.contentStore.tools = tools;
|
|
30639
|
+
root.contentStore.rightToolBar.tools = tools;
|
|
30416
30640
|
return function () {
|
|
30417
|
-
root.contentStore.tools = [];
|
|
30641
|
+
root.contentStore.rightToolBar.tools = [];
|
|
30418
30642
|
};
|
|
30419
30643
|
}, [packageId]);
|
|
30420
30644
|
return {
|
|
@@ -30456,7 +30680,7 @@ function TableProperties () {
|
|
|
30456
30680
|
})
|
|
30457
30681
|
})]
|
|
30458
30682
|
})
|
|
30459
|
-
}), /*#__PURE__*/jsx(Spreadsheet
|
|
30683
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
30460
30684
|
gridId: 'crud-grid_properties',
|
|
30461
30685
|
applicationData: applicationData,
|
|
30462
30686
|
configuration: {
|
|
@@ -31117,6 +31341,19 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
31117
31341
|
packageId: packageId
|
|
31118
31342
|
};
|
|
31119
31343
|
}, [packageId]);
|
|
31344
|
+
var preFilter = useMemo(function () {
|
|
31345
|
+
return type === 'options' && selectedFeature ? {
|
|
31346
|
+
filterType: 'text',
|
|
31347
|
+
type: 'equals',
|
|
31348
|
+
colId: 'featureNo',
|
|
31349
|
+
filter: selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.featureNo
|
|
31350
|
+
} : type === 'items' && selectedSerie ? {
|
|
31351
|
+
filterType: 'number',
|
|
31352
|
+
type: 'equals',
|
|
31353
|
+
colId: 'serieNo',
|
|
31354
|
+
filter: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo
|
|
31355
|
+
} : undefined;
|
|
31356
|
+
}, [type, selectedSerie, selectedFeature]);
|
|
31120
31357
|
var showTable = function showTable() {
|
|
31121
31358
|
return !['items', 'options'].includes(type) || type === 'items' && selectedSerie || type === 'options' && selectedFeature;
|
|
31122
31359
|
};
|
|
@@ -31146,20 +31383,10 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
31146
31383
|
})]
|
|
31147
31384
|
})]
|
|
31148
31385
|
})
|
|
31149
|
-
}), showTable() && /*#__PURE__*/jsx(Spreadsheet
|
|
31386
|
+
}), showTable() && /*#__PURE__*/jsx(Spreadsheet, {
|
|
31150
31387
|
gridId: 'renaming-grid_' + type + (type === 'options' ? '_' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.featureNo) : type === 'items' ? '_' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo) : ''),
|
|
31151
31388
|
applicationData: applicationData,
|
|
31152
|
-
preFilter:
|
|
31153
|
-
filterType: 'text',
|
|
31154
|
-
type: 'equals',
|
|
31155
|
-
colId: 'featureNo',
|
|
31156
|
-
filter: selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.featureNo
|
|
31157
|
-
} : type === 'items' && selectedSerie ? {
|
|
31158
|
-
filterType: 'number',
|
|
31159
|
-
type: 'equals',
|
|
31160
|
-
colId: 'serieNo',
|
|
31161
|
-
filter: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo
|
|
31162
|
-
} : undefined,
|
|
31389
|
+
preFilter: preFilter,
|
|
31163
31390
|
configuration: {
|
|
31164
31391
|
type: 'dotnetSSM',
|
|
31165
31392
|
apiInterface: {
|
|
@@ -31623,7 +31850,7 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
31623
31850
|
})]
|
|
31624
31851
|
})]
|
|
31625
31852
|
})
|
|
31626
|
-
}), showTable() && /*#__PURE__*/jsx(Spreadsheet
|
|
31853
|
+
}), showTable() && /*#__PURE__*/jsx(Spreadsheet, {
|
|
31627
31854
|
gridId: 'crud-grid_exclusivity_' + type + ((_selectedSerie$series = selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.seriesName.DE) !== null && _selectedSerie$series !== void 0 ? _selectedSerie$series : ''),
|
|
31628
31855
|
applicationData: applicationData,
|
|
31629
31856
|
configuration: {
|
|
@@ -31669,6 +31896,12 @@ function TableTabGroups () {
|
|
|
31669
31896
|
organizationId = _useModule.organizationId,
|
|
31670
31897
|
updateNavigation = _useModule.updateNavigation,
|
|
31671
31898
|
apiConfig = _useModule.apiConfig;
|
|
31899
|
+
var applicationData = useMemo(function () {
|
|
31900
|
+
return {
|
|
31901
|
+
packageId: packageId,
|
|
31902
|
+
organizationId: organizationId
|
|
31903
|
+
};
|
|
31904
|
+
}, [packageId, organizationId]);
|
|
31672
31905
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
31673
31906
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
31674
31907
|
title: /*#__PURE__*/jsxs("div", {
|
|
@@ -31686,12 +31919,9 @@ function TableTabGroups () {
|
|
|
31686
31919
|
})
|
|
31687
31920
|
})]
|
|
31688
31921
|
})
|
|
31689
|
-
}), /*#__PURE__*/jsx(Spreadsheet
|
|
31922
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
31690
31923
|
gridId: 'crud-grid_tabgroups',
|
|
31691
|
-
applicationData:
|
|
31692
|
-
organizationId: organizationId,
|
|
31693
|
-
packageId: packageId
|
|
31694
|
-
},
|
|
31924
|
+
applicationData: applicationData,
|
|
31695
31925
|
configuration: {
|
|
31696
31926
|
type: 'dotnetSSM',
|
|
31697
31927
|
apiInterface: {
|
|
@@ -31823,16 +32053,6 @@ function Content$2() {
|
|
|
31823
32053
|
});
|
|
31824
32054
|
}
|
|
31825
32055
|
|
|
31826
|
-
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31827
|
-
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31828
|
-
function Spreadsheet (props) {
|
|
31829
|
-
var root = useStore();
|
|
31830
|
-
return /*#__PURE__*/jsx(Spreadsheet$2, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
31831
|
-
darkMode: root.contentStore.theme == 'darkmode',
|
|
31832
|
-
jwt: root.dataStore.jwt
|
|
31833
|
-
}));
|
|
31834
|
-
}
|
|
31835
|
-
|
|
31836
32056
|
function useNavigation () {
|
|
31837
32057
|
var root = useStore();
|
|
31838
32058
|
var _useSearchParams = useSearchParams(),
|
|
@@ -31860,6 +32080,160 @@ function useNavigation () {
|
|
|
31860
32080
|
};
|
|
31861
32081
|
}
|
|
31862
32082
|
|
|
32083
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32084
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32085
|
+
function UploadButton (_ref) {
|
|
32086
|
+
var action = _ref.action,
|
|
32087
|
+
title = _ref.title,
|
|
32088
|
+
disabled = _ref.disabled,
|
|
32089
|
+
contentType = _ref.contentType,
|
|
32090
|
+
setProgress = _ref.setProgress;
|
|
32091
|
+
var _useTranslation = useTranslation(),
|
|
32092
|
+
t = _useTranslation.t;
|
|
32093
|
+
var root = useStore();
|
|
32094
|
+
var _useState = useState([]),
|
|
32095
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32096
|
+
fileList = _useState2[0],
|
|
32097
|
+
setFileList = _useState2[1];
|
|
32098
|
+
var handleUploadChange = function handleUploadChange(info) {
|
|
32099
|
+
var status = info.file.status;
|
|
32100
|
+
if (status === 'done') {
|
|
32101
|
+
message.success("".concat(info.file.name, " file uploaded successfully."));
|
|
32102
|
+
setFileList([]); // Clear the file list
|
|
32103
|
+
setProgress('SUCCESS'); // Mark upload as successful
|
|
32104
|
+
} else if (status === 'error') {
|
|
32105
|
+
message.error("".concat(info.file.name, " file upload failed."));
|
|
32106
|
+
setProgress('ERROR'); // Mark upload as failed
|
|
32107
|
+
} else if (status === 'removed') {
|
|
32108
|
+
setFileList([]); // Clear the file list
|
|
32109
|
+
setProgress(undefined); // Reset the progress state
|
|
32110
|
+
} else {
|
|
32111
|
+
setProgress('INPROGRESS'); // Mark upload as in progress
|
|
32112
|
+
setFileList(info.fileList); // Update the file list during the upload
|
|
32113
|
+
}
|
|
32114
|
+
};
|
|
32115
|
+
var props = {
|
|
32116
|
+
name: 'file',
|
|
32117
|
+
action: action,
|
|
32118
|
+
headers: {
|
|
32119
|
+
ContentType: contentType,
|
|
32120
|
+
Authorization: "Bearer ".concat(root.dataStore.jwt)
|
|
32121
|
+
},
|
|
32122
|
+
multiple: false,
|
|
32123
|
+
onChange: handleUploadChange,
|
|
32124
|
+
fileList: fileList
|
|
32125
|
+
};
|
|
32126
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
32127
|
+
children: /*#__PURE__*/jsx(Upload$2, _objectSpread$5(_objectSpread$5({}, props), {}, {
|
|
32128
|
+
children: /*#__PURE__*/jsx(Button$1, {
|
|
32129
|
+
icon: /*#__PURE__*/jsx(UploadOutlined$1, {}),
|
|
32130
|
+
disabled: disabled,
|
|
32131
|
+
children: title !== null && title !== void 0 ? title : t('backoffice.idmEnricher.import.upload')
|
|
32132
|
+
})
|
|
32133
|
+
}))
|
|
32134
|
+
});
|
|
32135
|
+
}
|
|
32136
|
+
|
|
32137
|
+
function IDMImportForm (_ref) {
|
|
32138
|
+
var idmService = _ref.idmService,
|
|
32139
|
+
organizationId = _ref.organizationId,
|
|
32140
|
+
setProgress = _ref.setProgress,
|
|
32141
|
+
progress = _ref.progress;
|
|
32142
|
+
var _useTranslation = useTranslation(),
|
|
32143
|
+
t = _useTranslation.t;
|
|
32144
|
+
var _useState = useState(''),
|
|
32145
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32146
|
+
name = _useState2[0],
|
|
32147
|
+
setName = _useState2[1];
|
|
32148
|
+
var uploadAction = "".concat(idmService, "/v3.0/catalogs/upload?organizationId=").concat(organizationId, "&name=").concat(encodeURIComponent(name));
|
|
32149
|
+
return /*#__PURE__*/jsxs(Form$1, {
|
|
32150
|
+
name: "basic",
|
|
32151
|
+
children: [/*#__PURE__*/jsx(Form$1.Item, {
|
|
32152
|
+
label: "Name",
|
|
32153
|
+
name: "name",
|
|
32154
|
+
rules: [{
|
|
32155
|
+
required: true,
|
|
32156
|
+
message: t('backoffice.idmEnricher.import.namerequired')
|
|
32157
|
+
}],
|
|
32158
|
+
children: /*#__PURE__*/jsx(Input, {
|
|
32159
|
+
onChange: function onChange(e) {
|
|
32160
|
+
return setName(e.target.value);
|
|
32161
|
+
},
|
|
32162
|
+
value: name
|
|
32163
|
+
})
|
|
32164
|
+
}), /*#__PURE__*/jsx(Form$1.Item, {
|
|
32165
|
+
children: /*#__PURE__*/jsx(UploadButton, {
|
|
32166
|
+
action: uploadAction,
|
|
32167
|
+
contentType: "multipart/form-data",
|
|
32168
|
+
setProgress: setProgress,
|
|
32169
|
+
disabled: !name.trim()
|
|
32170
|
+
})
|
|
32171
|
+
}), /*#__PURE__*/jsxs(Form$1.Item, {
|
|
32172
|
+
style: {
|
|
32173
|
+
display: !progress || progress === 'INPROGRESS' ? 'none' : 'block'
|
|
32174
|
+
},
|
|
32175
|
+
children: [progress === 'SUCCESS' && /*#__PURE__*/jsx(Alert, {
|
|
32176
|
+
message: t('backoffice.idmEnricher.import.uploadsuccess'),
|
|
32177
|
+
type: "success",
|
|
32178
|
+
showIcon: true
|
|
32179
|
+
}), progress === 'ERROR' && /*#__PURE__*/jsx(Alert, {
|
|
32180
|
+
message: t('backoffice.idmEnricher.import.uploaderror'),
|
|
32181
|
+
type: "error",
|
|
32182
|
+
showIcon: true
|
|
32183
|
+
})]
|
|
32184
|
+
})]
|
|
32185
|
+
});
|
|
32186
|
+
}
|
|
32187
|
+
|
|
32188
|
+
function OpenModalButton (_ref) {
|
|
32189
|
+
var title = _ref.title,
|
|
32190
|
+
type = _ref.type,
|
|
32191
|
+
idmService = _ref.idmService,
|
|
32192
|
+
organizationId = _ref.organizationId;
|
|
32193
|
+
var _useTranslation = useTranslation(),
|
|
32194
|
+
t = _useTranslation.t;
|
|
32195
|
+
var _useState = useState(false),
|
|
32196
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32197
|
+
isModalOpen = _useState2[0],
|
|
32198
|
+
setIsModalOpen = _useState2[1];
|
|
32199
|
+
var _useState3 = useState(undefined),
|
|
32200
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32201
|
+
progress = _useState4[0],
|
|
32202
|
+
setProgress = _useState4[1];
|
|
32203
|
+
var showModal = function showModal() {
|
|
32204
|
+
setIsModalOpen(true);
|
|
32205
|
+
};
|
|
32206
|
+
var handleOk = function handleOk() {
|
|
32207
|
+
setIsModalOpen(false);
|
|
32208
|
+
};
|
|
32209
|
+
var handleCancel = function handleCancel() {
|
|
32210
|
+
setIsModalOpen(false);
|
|
32211
|
+
};
|
|
32212
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
32213
|
+
children: [/*#__PURE__*/jsx(Button$1, {
|
|
32214
|
+
type: "primary",
|
|
32215
|
+
onClick: showModal,
|
|
32216
|
+
children: title
|
|
32217
|
+
}), /*#__PURE__*/jsx(Modal$3, {
|
|
32218
|
+
title: title,
|
|
32219
|
+
open: isModalOpen,
|
|
32220
|
+
onOk: handleOk,
|
|
32221
|
+
onCancel: handleCancel,
|
|
32222
|
+
okText: progress === 'INPROGRESS' ? t('backoffice.idmEnricher.import.inprogress') : 'OK',
|
|
32223
|
+
okButtonProps: {
|
|
32224
|
+
disabled: progress === 'INPROGRESS'
|
|
32225
|
+
} // Disable the button if progress is 'INPROGRESS'
|
|
32226
|
+
,
|
|
32227
|
+
children: type === 'IDM_IMPORT' && /*#__PURE__*/jsx(IDMImportForm, {
|
|
32228
|
+
setProgress: setProgress,
|
|
32229
|
+
progress: progress,
|
|
32230
|
+
idmService: idmService,
|
|
32231
|
+
organizationId: organizationId
|
|
32232
|
+
})
|
|
32233
|
+
})]
|
|
32234
|
+
});
|
|
32235
|
+
}
|
|
32236
|
+
|
|
31863
32237
|
function TableCatalogs () {
|
|
31864
32238
|
var root = useStore();
|
|
31865
32239
|
var _useTranslation = useTranslation(),
|
|
@@ -31960,13 +32334,33 @@ function TableCatalogs () {
|
|
|
31960
32334
|
organizationId: organizationId
|
|
31961
32335
|
};
|
|
31962
32336
|
}, [organizationId]);
|
|
32337
|
+
var preFilter = useMemo(function () {
|
|
32338
|
+
return {
|
|
32339
|
+
colId: 'organizationId',
|
|
32340
|
+
filterType: 'text',
|
|
32341
|
+
type: 'equals',
|
|
32342
|
+
filter: organizationId
|
|
32343
|
+
};
|
|
32344
|
+
}, [organizationId]);
|
|
31963
32345
|
useEffect(function () {
|
|
31964
32346
|
//remove the packages submenu when opening this module
|
|
31965
32347
|
root.contentStore.removeAdditionalElement('idmenricher');
|
|
31966
32348
|
}, []);
|
|
31967
32349
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
31968
32350
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
31969
|
-
title:
|
|
32351
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
32352
|
+
children: [t('backoffice.menu.items.label.IDMEditorTableCatalogs'), /*#__PURE__*/jsx(Space$1, {
|
|
32353
|
+
style: {
|
|
32354
|
+
"float": 'right'
|
|
32355
|
+
},
|
|
32356
|
+
children: /*#__PURE__*/jsx(OpenModalButton, {
|
|
32357
|
+
title: "IDM Import",
|
|
32358
|
+
type: "IDM_IMPORT",
|
|
32359
|
+
idmService: apiConfig.idmService,
|
|
32360
|
+
organizationId: organizationId
|
|
32361
|
+
})
|
|
32362
|
+
})]
|
|
32363
|
+
})
|
|
31970
32364
|
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
31971
32365
|
gridId: 'catalogs-grid',
|
|
31972
32366
|
applicationData: applicationData,
|
|
@@ -31976,13 +32370,33 @@ function TableCatalogs () {
|
|
|
31976
32370
|
var selectedNodes = _ref.selectedNodes;
|
|
31977
32371
|
updateNavigation(selectedNodes[0].data._id, ['series']);
|
|
31978
32372
|
}
|
|
32373
|
+
}, {
|
|
32374
|
+
icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
|
|
32375
|
+
action: function () {
|
|
32376
|
+
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
|
|
32377
|
+
var selectedNodes, context, url;
|
|
32378
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
32379
|
+
while (1) switch (_context.prev = _context.next) {
|
|
32380
|
+
case 0:
|
|
32381
|
+
selectedNodes = _ref2.selectedNodes, context = _ref2.context;
|
|
32382
|
+
url = apiConfig.idmService + '/v3.0/catalogs/' + selectedNodes[0].data._id + '/complete';
|
|
32383
|
+
_context.next = 4;
|
|
32384
|
+
return downloadFile(url, root.dataStore.jwt, 'application/xml', selectedNodes[0].data.name + '.xml');
|
|
32385
|
+
case 4:
|
|
32386
|
+
context.refresh();
|
|
32387
|
+
case 5:
|
|
32388
|
+
case "end":
|
|
32389
|
+
return _context.stop();
|
|
32390
|
+
}
|
|
32391
|
+
}, _callee);
|
|
32392
|
+
}));
|
|
32393
|
+
function action(_x) {
|
|
32394
|
+
return _action.apply(this, arguments);
|
|
32395
|
+
}
|
|
32396
|
+
return action;
|
|
32397
|
+
}()
|
|
31979
32398
|
}],
|
|
31980
|
-
preFilter:
|
|
31981
|
-
colId: 'organizationId',
|
|
31982
|
-
filterType: 'text',
|
|
31983
|
-
type: 'equals',
|
|
31984
|
-
filter: organizationId
|
|
31985
|
-
},
|
|
32399
|
+
preFilter: preFilter,
|
|
31986
32400
|
configuration: {
|
|
31987
32401
|
type: 'dotnetSSM',
|
|
31988
32402
|
apiInterface: {
|
|
@@ -32642,9 +33056,9 @@ function useModule (currentModules) {
|
|
|
32642
33056
|
startWidth: 600,
|
|
32643
33057
|
defaultPinned: true
|
|
32644
33058
|
});
|
|
32645
|
-
root.contentStore.tools = tools;
|
|
33059
|
+
root.contentStore.rightToolBar.tools = tools;
|
|
32646
33060
|
return function () {
|
|
32647
|
-
root.contentStore.tools = [];
|
|
33061
|
+
root.contentStore.rightToolBar.tools = [];
|
|
32648
33062
|
};
|
|
32649
33063
|
}, [catalogId]);
|
|
32650
33064
|
return {
|
|
@@ -32655,18 +33069,14 @@ function useModule (currentModules) {
|
|
|
32655
33069
|
};
|
|
32656
33070
|
}
|
|
32657
33071
|
|
|
32658
|
-
function
|
|
33072
|
+
function Items(_ref) {
|
|
33073
|
+
var organizationId = _ref.organizationId,
|
|
33074
|
+
catalogId = _ref.catalogId,
|
|
33075
|
+
apiConfig = _ref.apiConfig,
|
|
33076
|
+
selectedSerie = _ref.selectedSerie;
|
|
33077
|
+
useStore();
|
|
32659
33078
|
var _useTranslation = useTranslation(),
|
|
32660
33079
|
t = _useTranslation.t;
|
|
32661
|
-
var _useModule = useModule(['items']),
|
|
32662
|
-
catalogId = _useModule.catalogId,
|
|
32663
|
-
updateNavigation = _useModule.updateNavigation,
|
|
32664
|
-
apiConfig = _useModule.apiConfig,
|
|
32665
|
-
organizationId = _useModule.organizationId;
|
|
32666
|
-
var _React$useState = React.useState(),
|
|
32667
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
32668
|
-
selectedSerie = _React$useState2[0],
|
|
32669
|
-
setSelectedSerie = _React$useState2[1];
|
|
32670
33080
|
var itemIdentification = [{
|
|
32671
33081
|
name: t('backoffice.idmCatalogEditor.items.label.catalogArticle'),
|
|
32672
33082
|
value: 'K'
|
|
@@ -32756,6 +33166,285 @@ function TableItems () {
|
|
|
32756
33166
|
name: t('backoffice.idmCatalogEditor.items.label.sonstiges'),
|
|
32757
33167
|
value: '26'
|
|
32758
33168
|
}];
|
|
33169
|
+
var applicationData = useMemo(function () {
|
|
33170
|
+
return {
|
|
33171
|
+
organizationId: organizationId,
|
|
33172
|
+
catalogId: catalogId,
|
|
33173
|
+
selectedSerie: selectedSerie
|
|
33174
|
+
};
|
|
33175
|
+
}, [organizationId, catalogId, selectedSerie]);
|
|
33176
|
+
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
33177
|
+
gridId: 'crud-grid_items',
|
|
33178
|
+
applicationData: applicationData,
|
|
33179
|
+
configuration: {
|
|
33180
|
+
type: 'dotnetSSM',
|
|
33181
|
+
idCol: 'typeNo',
|
|
33182
|
+
apiInterface: {
|
|
33183
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${selectedSerie}/items',
|
|
33184
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${selectedSerie}/items',
|
|
33185
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${selectedSerie}/items/${typeNo}',
|
|
33186
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${selectedSerie}/items/${typeNo}',
|
|
33187
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${selectedSerie}/items/${typeNo}'
|
|
33188
|
+
},
|
|
33189
|
+
dateFormat: 'LL',
|
|
33190
|
+
floatingFilter: true,
|
|
33191
|
+
colDef: [{
|
|
33192
|
+
field: 'typeNo',
|
|
33193
|
+
required: true,
|
|
33194
|
+
unique: true
|
|
33195
|
+
}, {
|
|
33196
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.priceTypeRef',
|
|
33197
|
+
field: 'priceTypeRef',
|
|
33198
|
+
cellDataType: 'number',
|
|
33199
|
+
required: true
|
|
33200
|
+
}, {
|
|
33201
|
+
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
33202
|
+
field: 'sequenceNo',
|
|
33203
|
+
cellDataType: 'number'
|
|
33204
|
+
}, {
|
|
33205
|
+
headerName: 'backoffice.idmCatalog.common.label.texts',
|
|
33206
|
+
children: [{
|
|
33207
|
+
headerName: 'backoffice.idmCatalog.general.label.shortText',
|
|
33208
|
+
marryChildren: true,
|
|
33209
|
+
children: [{
|
|
33210
|
+
field: 'shortText.DE',
|
|
33211
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33212
|
+
isDictionary: true,
|
|
33213
|
+
required: true
|
|
33214
|
+
}, {
|
|
33215
|
+
field: 'shortText.EN',
|
|
33216
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33217
|
+
isDictionary: true
|
|
33218
|
+
}, {
|
|
33219
|
+
field: 'shortText.FR',
|
|
33220
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33221
|
+
isDictionary: true
|
|
33222
|
+
}, {
|
|
33223
|
+
field: 'shortText.IT',
|
|
33224
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33225
|
+
isDictionary: true
|
|
33226
|
+
}]
|
|
33227
|
+
}, {
|
|
33228
|
+
headerName: 'backoffice.idmCatalog.general.label.planningAdvice',
|
|
33229
|
+
marryChildren: true,
|
|
33230
|
+
children: [{
|
|
33231
|
+
field: 'planningAdvice.DE',
|
|
33232
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33233
|
+
isDictionary: true
|
|
33234
|
+
}, {
|
|
33235
|
+
field: 'planningAdvice.EN',
|
|
33236
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33237
|
+
isDictionary: true
|
|
33238
|
+
}, {
|
|
33239
|
+
field: 'planningAdvice.FR',
|
|
33240
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33241
|
+
isDictionary: true
|
|
33242
|
+
}, {
|
|
33243
|
+
field: 'planningAdvice.IT',
|
|
33244
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33245
|
+
isDictionary: true
|
|
33246
|
+
}]
|
|
33247
|
+
}]
|
|
33248
|
+
}, {
|
|
33249
|
+
headerName: 'backoffice.idmCatalog.items.label.articleNumbers',
|
|
33250
|
+
children: [{
|
|
33251
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.edpNumber',
|
|
33252
|
+
field: 'edpNumber'
|
|
33253
|
+
}, {
|
|
33254
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.eanNumber',
|
|
33255
|
+
field: 'eanNumber'
|
|
33256
|
+
}, {
|
|
33257
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.salesNumber',
|
|
33258
|
+
field: 'salesNumber'
|
|
33259
|
+
}, {
|
|
33260
|
+
headerName: 'backoffice.idmCatalog.general.items.itemIdentification',
|
|
33261
|
+
field: 'itemIdentification',
|
|
33262
|
+
cellDataType: 'enum',
|
|
33263
|
+
customParams: {
|
|
33264
|
+
enumData: itemIdentification,
|
|
33265
|
+
displayLabelTemplate: '${name} (${value})'
|
|
33266
|
+
},
|
|
33267
|
+
required: true
|
|
33268
|
+
}]
|
|
33269
|
+
}, {
|
|
33270
|
+
headerName: 'backoffice.idmCatalog.items.label.common',
|
|
33271
|
+
children: [{
|
|
33272
|
+
headerName: 'backoffice.idmCatalog.general.items.typeKey',
|
|
33273
|
+
field: 'typeKey',
|
|
33274
|
+
cellDataType: 'enum',
|
|
33275
|
+
customParams: {
|
|
33276
|
+
enumData: typeKey,
|
|
33277
|
+
displayLabelTemplate: '${name} (${value})'
|
|
33278
|
+
},
|
|
33279
|
+
required: true
|
|
33280
|
+
}, {
|
|
33281
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.featureClassRefNo',
|
|
33282
|
+
field: 'featureClassRefNo',
|
|
33283
|
+
cellDataType: 'number',
|
|
33284
|
+
required: true
|
|
33285
|
+
}, {
|
|
33286
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.eClassNo',
|
|
33287
|
+
field: 'eClassNo',
|
|
33288
|
+
cellDataType: 'number'
|
|
33289
|
+
}, {
|
|
33290
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.catalogPage',
|
|
33291
|
+
field: 'catalogPage'
|
|
33292
|
+
}, {
|
|
33293
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.minimumDeliveryTime',
|
|
33294
|
+
field: 'minimumDeliveryTime',
|
|
33295
|
+
cellDataType: 'number'
|
|
33296
|
+
}]
|
|
33297
|
+
}, {
|
|
33298
|
+
headerName: 'backoffice.idmCatalog.items.label.configurator',
|
|
33299
|
+
children: [{
|
|
33300
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.partListExclusive',
|
|
33301
|
+
field: 'partListExclusive',
|
|
33302
|
+
cellDataType: 'boolean'
|
|
33303
|
+
}, {
|
|
33304
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.partlist',
|
|
33305
|
+
field: 'partListRef',
|
|
33306
|
+
cellDataType: 'lookup',
|
|
33307
|
+
customParams: {
|
|
33308
|
+
nameField: 'partListRef',
|
|
33309
|
+
apiInterface: {
|
|
33310
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/partlists'
|
|
33311
|
+
},
|
|
33312
|
+
lookupValue: 'partlistKey',
|
|
33313
|
+
lookupKey: 'partlistKey'
|
|
33314
|
+
}
|
|
33315
|
+
}, {
|
|
33316
|
+
field: 'decisionRefs',
|
|
33317
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.decisionRefs',
|
|
33318
|
+
cellDataType: 'lookup',
|
|
33319
|
+
editable: true,
|
|
33320
|
+
customParams: {
|
|
33321
|
+
nameField: 'decisionRefsDisplayTexts',
|
|
33322
|
+
filterCellType: 'number',
|
|
33323
|
+
displayLabelTemplate: '${name} (${value})',
|
|
33324
|
+
apiInterface: {
|
|
33325
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/decisions'
|
|
33326
|
+
},
|
|
33327
|
+
lookupValue: 'decisionText',
|
|
33328
|
+
lookupKey: 'decisionNo',
|
|
33329
|
+
lookupKeyFilterType: {
|
|
33330
|
+
type: 'equals',
|
|
33331
|
+
filterType: 'number'
|
|
33332
|
+
},
|
|
33333
|
+
multiple: true,
|
|
33334
|
+
translated: true
|
|
33335
|
+
},
|
|
33336
|
+
additionalFields: ['decisionRefsDisplayTexts'],
|
|
33337
|
+
isDictionary: true
|
|
33338
|
+
}]
|
|
33339
|
+
}, {
|
|
33340
|
+
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
33341
|
+
children: [{
|
|
33342
|
+
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
33343
|
+
field: 'validFromDate',
|
|
33344
|
+
cellDataType: 'dateString'
|
|
33345
|
+
}, {
|
|
33346
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
33347
|
+
field: 'validUntilDate',
|
|
33348
|
+
cellDataType: 'dateString'
|
|
33349
|
+
}]
|
|
33350
|
+
}, {
|
|
33351
|
+
headerName: 'backoffice.idmCatalog.items.label.measurements',
|
|
33352
|
+
children: [{
|
|
33353
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.weightBrutto',
|
|
33354
|
+
field: 'weightBrutto',
|
|
33355
|
+
cellDataType: 'number'
|
|
33356
|
+
}, {
|
|
33357
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.weightNetto',
|
|
33358
|
+
field: 'weightNetto',
|
|
33359
|
+
cellDataType: 'number'
|
|
33360
|
+
}, {
|
|
33361
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.volume',
|
|
33362
|
+
field: 'volume',
|
|
33363
|
+
cellDataType: 'number'
|
|
33364
|
+
}, {
|
|
33365
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeNominalValue',
|
|
33366
|
+
field: 'widthBasicShapeNominalValue',
|
|
33367
|
+
cellDataType: 'number'
|
|
33368
|
+
}, {
|
|
33369
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeFrom',
|
|
33370
|
+
field: 'widthBasicShapeFrom',
|
|
33371
|
+
cellDataType: 'number'
|
|
33372
|
+
}, {
|
|
33373
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeTo',
|
|
33374
|
+
field: 'widthBasicShapeTo',
|
|
33375
|
+
cellDataType: 'number'
|
|
33376
|
+
}, {
|
|
33377
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeStepSize',
|
|
33378
|
+
field: 'widthBasicShapeStepSize',
|
|
33379
|
+
cellDataType: 'number'
|
|
33380
|
+
}, {
|
|
33381
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeNominalValue',
|
|
33382
|
+
field: 'heightBasicShapeNominalValue',
|
|
33383
|
+
cellDataType: 'number'
|
|
33384
|
+
}, {
|
|
33385
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeFrom',
|
|
33386
|
+
field: 'heightBasicShapeFrom',
|
|
33387
|
+
cellDataType: 'number'
|
|
33388
|
+
}, {
|
|
33389
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeTo',
|
|
33390
|
+
field: 'heightBasicShapeTo',
|
|
33391
|
+
cellDataType: 'number'
|
|
33392
|
+
}, {
|
|
33393
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeStepSize',
|
|
33394
|
+
field: 'heightBasicShapeStepSize',
|
|
33395
|
+
cellDataType: 'number'
|
|
33396
|
+
}, {
|
|
33397
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeNominalValue',
|
|
33398
|
+
field: 'depthBasicShapeNominalValue',
|
|
33399
|
+
cellDataType: 'number'
|
|
33400
|
+
}, {
|
|
33401
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeFrom',
|
|
33402
|
+
field: 'depthBasicShapeFrom',
|
|
33403
|
+
cellDataType: 'number'
|
|
33404
|
+
}, {
|
|
33405
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeTo',
|
|
33406
|
+
field: 'depthBasicShapeTo',
|
|
33407
|
+
cellDataType: 'number'
|
|
33408
|
+
}, {
|
|
33409
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeStepSize',
|
|
33410
|
+
field: 'depthBasicShapeStepSize',
|
|
33411
|
+
cellDataType: 'number'
|
|
33412
|
+
}]
|
|
33413
|
+
}, {
|
|
33414
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
33415
|
+
field: 'lastUpdatedDate',
|
|
33416
|
+
cellDataType: 'dateString',
|
|
33417
|
+
editable: false
|
|
33418
|
+
}, {
|
|
33419
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
33420
|
+
field: 'createdDate',
|
|
33421
|
+
cellDataType: 'dateString',
|
|
33422
|
+
editable: false
|
|
33423
|
+
}, {
|
|
33424
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
33425
|
+
field: 'createdByDisplayText',
|
|
33426
|
+
editable: false
|
|
33427
|
+
}, {
|
|
33428
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
33429
|
+
field: 'lastUpdatedByDisplayText',
|
|
33430
|
+
editable: false
|
|
33431
|
+
}]
|
|
33432
|
+
}
|
|
33433
|
+
});
|
|
33434
|
+
}
|
|
33435
|
+
|
|
33436
|
+
function TableItems () {
|
|
33437
|
+
var _useTranslation = useTranslation(),
|
|
33438
|
+
t = _useTranslation.t;
|
|
33439
|
+
var _useModule = useModule(['items']),
|
|
33440
|
+
catalogId = _useModule.catalogId,
|
|
33441
|
+
updateNavigation = _useModule.updateNavigation,
|
|
33442
|
+
apiConfig = _useModule.apiConfig,
|
|
33443
|
+
organizationId = _useModule.organizationId;
|
|
33444
|
+
var _React$useState = React.useState(),
|
|
33445
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33446
|
+
selectedSerie = _React$useState2[0],
|
|
33447
|
+
setSelectedSerie = _React$useState2[1];
|
|
32759
33448
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
32760
33449
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32761
33450
|
title: /*#__PURE__*/jsxs("div", {
|
|
@@ -32779,266 +33468,11 @@ function TableItems () {
|
|
|
32779
33468
|
})]
|
|
32780
33469
|
})]
|
|
32781
33470
|
})
|
|
32782
|
-
}), selectedSerie && /*#__PURE__*/jsx(
|
|
32783
|
-
|
|
32784
|
-
|
|
32785
|
-
|
|
32786
|
-
|
|
32787
|
-
},
|
|
32788
|
-
configuration: {
|
|
32789
|
-
type: 'dotnetSSM',
|
|
32790
|
-
idCol: 'typeNo',
|
|
32791
|
-
apiInterface: {
|
|
32792
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items',
|
|
32793
|
-
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items',
|
|
32794
|
-
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items/${typeNo}',
|
|
32795
|
-
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items/${typeNo}',
|
|
32796
|
-
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items/${typeNo}'
|
|
32797
|
-
},
|
|
32798
|
-
dateFormat: 'LL',
|
|
32799
|
-
floatingFilter: true,
|
|
32800
|
-
colDef: [{
|
|
32801
|
-
field: 'typeNo',
|
|
32802
|
-
required: true,
|
|
32803
|
-
unique: true
|
|
32804
|
-
}, {
|
|
32805
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.priceTypeRef',
|
|
32806
|
-
field: 'priceTypeRef',
|
|
32807
|
-
cellDataType: 'number',
|
|
32808
|
-
required: true
|
|
32809
|
-
}, {
|
|
32810
|
-
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
32811
|
-
field: 'sequenceNo',
|
|
32812
|
-
cellDataType: 'number'
|
|
32813
|
-
}, {
|
|
32814
|
-
headerName: 'backoffice.idmCatalog.common.label.texts',
|
|
32815
|
-
children: [{
|
|
32816
|
-
headerName: 'backoffice.idmCatalog.general.label.shortText',
|
|
32817
|
-
marryChildren: true,
|
|
32818
|
-
children: [{
|
|
32819
|
-
field: 'shortText.DE',
|
|
32820
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32821
|
-
isDictionary: true,
|
|
32822
|
-
required: true
|
|
32823
|
-
}, {
|
|
32824
|
-
field: 'shortText.EN',
|
|
32825
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32826
|
-
isDictionary: true
|
|
32827
|
-
}, {
|
|
32828
|
-
field: 'shortText.FR',
|
|
32829
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32830
|
-
isDictionary: true
|
|
32831
|
-
}, {
|
|
32832
|
-
field: 'shortText.IT',
|
|
32833
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32834
|
-
isDictionary: true
|
|
32835
|
-
}]
|
|
32836
|
-
}, {
|
|
32837
|
-
headerName: 'backoffice.idmCatalog.general.label.planningAdvice',
|
|
32838
|
-
marryChildren: true,
|
|
32839
|
-
children: [{
|
|
32840
|
-
field: 'planningAdvice.DE',
|
|
32841
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32842
|
-
isDictionary: true
|
|
32843
|
-
}, {
|
|
32844
|
-
field: 'planningAdvice.EN',
|
|
32845
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32846
|
-
isDictionary: true
|
|
32847
|
-
}, {
|
|
32848
|
-
field: 'planningAdvice.FR',
|
|
32849
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32850
|
-
isDictionary: true
|
|
32851
|
-
}, {
|
|
32852
|
-
field: 'planningAdvice.IT',
|
|
32853
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32854
|
-
isDictionary: true
|
|
32855
|
-
}]
|
|
32856
|
-
}]
|
|
32857
|
-
}, {
|
|
32858
|
-
headerName: 'backoffice.idmCatalog.items.label.articleNumbers',
|
|
32859
|
-
children: [{
|
|
32860
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.edpNumber',
|
|
32861
|
-
field: 'edpNumber'
|
|
32862
|
-
}, {
|
|
32863
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.eanNumber',
|
|
32864
|
-
field: 'eanNumber'
|
|
32865
|
-
}, {
|
|
32866
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.salesNumber',
|
|
32867
|
-
field: 'salesNumber'
|
|
32868
|
-
}, {
|
|
32869
|
-
headerName: 'backoffice.idmCatalog.general.items.itemIdentification',
|
|
32870
|
-
field: 'itemIdentification',
|
|
32871
|
-
cellDataType: 'enum',
|
|
32872
|
-
customParams: {
|
|
32873
|
-
enumData: itemIdentification,
|
|
32874
|
-
displayLabelTemplate: '${name} (${value})'
|
|
32875
|
-
},
|
|
32876
|
-
required: true
|
|
32877
|
-
}]
|
|
32878
|
-
}, {
|
|
32879
|
-
headerName: 'backoffice.idmCatalog.items.label.common',
|
|
32880
|
-
children: [{
|
|
32881
|
-
headerName: 'backoffice.idmCatalog.general.items.typeKey',
|
|
32882
|
-
field: 'typeKey',
|
|
32883
|
-
cellDataType: 'enum',
|
|
32884
|
-
customParams: {
|
|
32885
|
-
enumData: typeKey,
|
|
32886
|
-
displayLabelTemplate: '${name} (${value})'
|
|
32887
|
-
},
|
|
32888
|
-
required: true
|
|
32889
|
-
}, {
|
|
32890
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.featureClassRefNo',
|
|
32891
|
-
field: 'featureClassRefNo',
|
|
32892
|
-
cellDataType: 'number',
|
|
32893
|
-
required: true
|
|
32894
|
-
}, {
|
|
32895
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.eClassNo',
|
|
32896
|
-
field: 'eClassNo',
|
|
32897
|
-
cellDataType: 'number'
|
|
32898
|
-
}, {
|
|
32899
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.catalogPage',
|
|
32900
|
-
field: 'catalogPage'
|
|
32901
|
-
}, {
|
|
32902
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.minimumDeliveryTime',
|
|
32903
|
-
field: 'minimumDeliveryTime',
|
|
32904
|
-
cellDataType: 'number'
|
|
32905
|
-
}]
|
|
32906
|
-
}, {
|
|
32907
|
-
headerName: 'backoffice.idmCatalog.items.label.configurator',
|
|
32908
|
-
children: [{
|
|
32909
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.partListExclusive',
|
|
32910
|
-
field: 'partListExclusive',
|
|
32911
|
-
cellDataType: 'boolean'
|
|
32912
|
-
}, {
|
|
32913
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.partlist',
|
|
32914
|
-
field: 'partListRef',
|
|
32915
|
-
cellDataType: 'lookup',
|
|
32916
|
-
customParams: {
|
|
32917
|
-
nameField: 'partListRef',
|
|
32918
|
-
apiInterface: {
|
|
32919
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/partlists'
|
|
32920
|
-
},
|
|
32921
|
-
lookupValue: 'partlistKey',
|
|
32922
|
-
lookupKey: 'partlistKey'
|
|
32923
|
-
}
|
|
32924
|
-
}, {
|
|
32925
|
-
field: 'decisionRefs',
|
|
32926
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.decisionRefs',
|
|
32927
|
-
cellDataType: 'lookup',
|
|
32928
|
-
editable: true,
|
|
32929
|
-
customParams: {
|
|
32930
|
-
nameField: 'decisionRefsDisplayTexts',
|
|
32931
|
-
filterCellType: 'number',
|
|
32932
|
-
displayLabelTemplate: '${name} (${value})',
|
|
32933
|
-
apiInterface: {
|
|
32934
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/decisions'
|
|
32935
|
-
},
|
|
32936
|
-
lookupValue: 'decisionText',
|
|
32937
|
-
lookupKey: 'decisionNo',
|
|
32938
|
-
lookupKeyFilterType: {
|
|
32939
|
-
type: 'equals',
|
|
32940
|
-
filterType: 'number'
|
|
32941
|
-
},
|
|
32942
|
-
multiple: true,
|
|
32943
|
-
translated: true
|
|
32944
|
-
},
|
|
32945
|
-
additionalFields: ['decisionRefsDisplayTexts'],
|
|
32946
|
-
isDictionary: true
|
|
32947
|
-
}]
|
|
32948
|
-
}, {
|
|
32949
|
-
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
32950
|
-
children: [{
|
|
32951
|
-
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
32952
|
-
field: 'validFromDate',
|
|
32953
|
-
cellDataType: 'dateString'
|
|
32954
|
-
}, {
|
|
32955
|
-
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
32956
|
-
field: 'validUntilDate',
|
|
32957
|
-
cellDataType: 'dateString'
|
|
32958
|
-
}]
|
|
32959
|
-
}, {
|
|
32960
|
-
headerName: 'backoffice.idmCatalog.items.label.measurements',
|
|
32961
|
-
children: [{
|
|
32962
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.weightBrutto',
|
|
32963
|
-
field: 'weightBrutto',
|
|
32964
|
-
cellDataType: 'number'
|
|
32965
|
-
}, {
|
|
32966
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.weightNetto',
|
|
32967
|
-
field: 'weightNetto',
|
|
32968
|
-
cellDataType: 'number'
|
|
32969
|
-
}, {
|
|
32970
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.volume',
|
|
32971
|
-
field: 'volume',
|
|
32972
|
-
cellDataType: 'number'
|
|
32973
|
-
}, {
|
|
32974
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeNominalValue',
|
|
32975
|
-
field: 'widthBasicShapeNominalValue',
|
|
32976
|
-
cellDataType: 'number'
|
|
32977
|
-
}, {
|
|
32978
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeFrom',
|
|
32979
|
-
field: 'widthBasicShapeFrom',
|
|
32980
|
-
cellDataType: 'number'
|
|
32981
|
-
}, {
|
|
32982
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeTo',
|
|
32983
|
-
field: 'widthBasicShapeTo',
|
|
32984
|
-
cellDataType: 'number'
|
|
32985
|
-
}, {
|
|
32986
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeStepSize',
|
|
32987
|
-
field: 'widthBasicShapeStepSize',
|
|
32988
|
-
cellDataType: 'number'
|
|
32989
|
-
}, {
|
|
32990
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeNominalValue',
|
|
32991
|
-
field: 'heightBasicShapeNominalValue',
|
|
32992
|
-
cellDataType: 'number'
|
|
32993
|
-
}, {
|
|
32994
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeFrom',
|
|
32995
|
-
field: 'heightBasicShapeFrom',
|
|
32996
|
-
cellDataType: 'number'
|
|
32997
|
-
}, {
|
|
32998
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeTo',
|
|
32999
|
-
field: 'heightBasicShapeTo',
|
|
33000
|
-
cellDataType: 'number'
|
|
33001
|
-
}, {
|
|
33002
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeStepSize',
|
|
33003
|
-
field: 'heightBasicShapeStepSize',
|
|
33004
|
-
cellDataType: 'number'
|
|
33005
|
-
}, {
|
|
33006
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeNominalValue',
|
|
33007
|
-
field: 'depthBasicShapeNominalValue',
|
|
33008
|
-
cellDataType: 'number'
|
|
33009
|
-
}, {
|
|
33010
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeFrom',
|
|
33011
|
-
field: 'depthBasicShapeFrom',
|
|
33012
|
-
cellDataType: 'number'
|
|
33013
|
-
}, {
|
|
33014
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeTo',
|
|
33015
|
-
field: 'depthBasicShapeTo',
|
|
33016
|
-
cellDataType: 'number'
|
|
33017
|
-
}, {
|
|
33018
|
-
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeStepSize',
|
|
33019
|
-
field: 'depthBasicShapeStepSize',
|
|
33020
|
-
cellDataType: 'number'
|
|
33021
|
-
}]
|
|
33022
|
-
}, {
|
|
33023
|
-
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
33024
|
-
field: 'lastUpdatedDate',
|
|
33025
|
-
cellDataType: 'dateString',
|
|
33026
|
-
editable: false
|
|
33027
|
-
}, {
|
|
33028
|
-
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
33029
|
-
field: 'createdDate',
|
|
33030
|
-
cellDataType: 'dateString',
|
|
33031
|
-
editable: false
|
|
33032
|
-
}, {
|
|
33033
|
-
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
33034
|
-
field: 'createdByDisplayText',
|
|
33035
|
-
editable: false
|
|
33036
|
-
}, {
|
|
33037
|
-
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
33038
|
-
field: 'lastUpdatedByDisplayText',
|
|
33039
|
-
editable: false
|
|
33040
|
-
}]
|
|
33041
|
-
}
|
|
33471
|
+
}), selectedSerie && /*#__PURE__*/jsx(Items, {
|
|
33472
|
+
organizationId: organizationId,
|
|
33473
|
+
catalogId: catalogId,
|
|
33474
|
+
selectedSerie: selectedSerie._id,
|
|
33475
|
+
apiConfig: apiConfig
|
|
33042
33476
|
})]
|
|
33043
33477
|
});
|
|
33044
33478
|
}
|
|
@@ -33046,6 +33480,7 @@ function TableItems () {
|
|
|
33046
33480
|
function TableSeries () {
|
|
33047
33481
|
var _useTranslation = useTranslation(),
|
|
33048
33482
|
t = _useTranslation.t;
|
|
33483
|
+
var root = useStore();
|
|
33049
33484
|
var _useModule = useModule(['series']),
|
|
33050
33485
|
catalogId = _useModule.catalogId,
|
|
33051
33486
|
organizationId = _useModule.organizationId,
|
|
@@ -33064,6 +33499,29 @@ function TableSeries () {
|
|
|
33064
33499
|
name: t('backoffice.idmCatalog.series.label.purchaseRetail.p3'),
|
|
33065
33500
|
value: 3
|
|
33066
33501
|
}];
|
|
33502
|
+
var _React$useState = React.useState(),
|
|
33503
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33504
|
+
selectedSerie = _React$useState2[0],
|
|
33505
|
+
setSelectedSerie = _React$useState2[1];
|
|
33506
|
+
useEffect(function () {
|
|
33507
|
+
if (selectedSerie) {
|
|
33508
|
+
root.contentStore.bottomToolBar.tools = [{
|
|
33509
|
+
id: 'options',
|
|
33510
|
+
name: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions'),
|
|
33511
|
+
element: /*#__PURE__*/jsx(Items, {
|
|
33512
|
+
organizationId: organizationId,
|
|
33513
|
+
catalogId: catalogId,
|
|
33514
|
+
selectedSerie: selectedSerie._id,
|
|
33515
|
+
apiConfig: apiConfig
|
|
33516
|
+
}),
|
|
33517
|
+
startWidth: 300,
|
|
33518
|
+
defaultPinned: false,
|
|
33519
|
+
defaultOpen: false
|
|
33520
|
+
}];
|
|
33521
|
+
} else {
|
|
33522
|
+
root.contentStore.bottomToolBar.tools = [];
|
|
33523
|
+
}
|
|
33524
|
+
}, [selectedSerie]);
|
|
33067
33525
|
var applicationData = useMemo(function () {
|
|
33068
33526
|
return {
|
|
33069
33527
|
catalogId: catalogId,
|
|
@@ -33090,6 +33548,15 @@ function TableSeries () {
|
|
|
33090
33548
|
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
33091
33549
|
gridId: 'crud-grid_series',
|
|
33092
33550
|
applicationData: applicationData,
|
|
33551
|
+
hooks: {
|
|
33552
|
+
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
|
33553
|
+
if (event.selection.length == 1) {
|
|
33554
|
+
setSelectedSerie(event.selection[0].node.data);
|
|
33555
|
+
} else {
|
|
33556
|
+
setSelectedSerie(null);
|
|
33557
|
+
}
|
|
33558
|
+
}
|
|
33559
|
+
},
|
|
33093
33560
|
configuration: {
|
|
33094
33561
|
type: 'dotnetSSM',
|
|
33095
33562
|
apiInterface: {
|
|
@@ -33233,14 +33700,162 @@ function TableSeries () {
|
|
|
33233
33700
|
});
|
|
33234
33701
|
}
|
|
33235
33702
|
|
|
33236
|
-
function
|
|
33703
|
+
function Options(_ref) {
|
|
33704
|
+
var organizationId = _ref.organizationId,
|
|
33705
|
+
catalogId = _ref.catalogId,
|
|
33706
|
+
selectedFeature = _ref.selectedFeature,
|
|
33707
|
+
apiConfig = _ref.apiConfig;
|
|
33708
|
+
var applicationData = useMemo(function () {
|
|
33709
|
+
return {
|
|
33710
|
+
organizationId: organizationId,
|
|
33711
|
+
catalogId: catalogId,
|
|
33712
|
+
selectedFeature: selectedFeature
|
|
33713
|
+
};
|
|
33714
|
+
}, [organizationId, catalogId, selectedFeature]);
|
|
33715
|
+
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
33716
|
+
gridId: 'crud-grid_options',
|
|
33717
|
+
applicationData: applicationData,
|
|
33718
|
+
configuration: {
|
|
33719
|
+
type: 'dotnetSSM',
|
|
33720
|
+
idCol: 'optionKey',
|
|
33721
|
+
apiInterface: {
|
|
33722
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${selectedFeature}/options',
|
|
33723
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${selectedFeature}/options',
|
|
33724
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${selectedFeature}/options/${optionKey}',
|
|
33725
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${selectedFeature}/options/${optionKey}',
|
|
33726
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${selectedFeature}/options/${optionKey}'
|
|
33727
|
+
},
|
|
33728
|
+
dateFormat: 'LL',
|
|
33729
|
+
floatingFilter: true,
|
|
33730
|
+
colDef: [{
|
|
33731
|
+
field: 'optionKey',
|
|
33732
|
+
required: true,
|
|
33733
|
+
unique: true
|
|
33734
|
+
}, {
|
|
33735
|
+
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
33736
|
+
field: 'sequenceNo',
|
|
33737
|
+
cellDataType: 'number'
|
|
33738
|
+
}, {
|
|
33739
|
+
headerName: 'backoffice.idmCatalog.common.label.texts',
|
|
33740
|
+
children: [{
|
|
33741
|
+
headerName: 'backoffice.idmCatalog.options.label.optionText',
|
|
33742
|
+
marryChildren: true,
|
|
33743
|
+
children: [{
|
|
33744
|
+
field: 'optionText.DE',
|
|
33745
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33746
|
+
isDictionary: true,
|
|
33747
|
+
required: true
|
|
33748
|
+
}, {
|
|
33749
|
+
field: 'optionText.EN',
|
|
33750
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33751
|
+
isDictionary: true
|
|
33752
|
+
}, {
|
|
33753
|
+
field: 'optionText.FR',
|
|
33754
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33755
|
+
isDictionary: true
|
|
33756
|
+
}, {
|
|
33757
|
+
field: 'optionText.IT',
|
|
33758
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33759
|
+
isDictionary: true
|
|
33760
|
+
}]
|
|
33761
|
+
}, {
|
|
33762
|
+
headerName: 'backoffice.idmCatalog.options.label.optionCommentText',
|
|
33763
|
+
marryChildren: true,
|
|
33764
|
+
children: [{
|
|
33765
|
+
field: 'optionCommentText.DE',
|
|
33766
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33767
|
+
isDictionary: true
|
|
33768
|
+
}, {
|
|
33769
|
+
field: 'optionCommentText.EN',
|
|
33770
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33771
|
+
isDictionary: true
|
|
33772
|
+
}, {
|
|
33773
|
+
field: 'optionCommentText.FR',
|
|
33774
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33775
|
+
isDictionary: true
|
|
33776
|
+
}, {
|
|
33777
|
+
field: 'optionCommentText.IT',
|
|
33778
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33779
|
+
isDictionary: true
|
|
33780
|
+
}]
|
|
33781
|
+
}, {
|
|
33782
|
+
headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
|
|
33783
|
+
field: 'optionFreeText',
|
|
33784
|
+
cellDataType: 'boolean'
|
|
33785
|
+
}]
|
|
33786
|
+
}, {
|
|
33787
|
+
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
33788
|
+
children: [{
|
|
33789
|
+
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
33790
|
+
field: 'validFromDate',
|
|
33791
|
+
cellDataType: 'dateString'
|
|
33792
|
+
}, {
|
|
33793
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
33794
|
+
field: 'validUntilDate',
|
|
33795
|
+
cellDataType: 'dateString'
|
|
33796
|
+
}]
|
|
33797
|
+
}, {
|
|
33798
|
+
headerName: 'backoffice.idmCatalog.options.label.material',
|
|
33799
|
+
children: [{
|
|
33800
|
+
headerName: 'backoffice.idmCatalog.options.label.materialNo',
|
|
33801
|
+
field: 'materialNo'
|
|
33802
|
+
}, {
|
|
33803
|
+
headerName: 'backoffice.idmCatalog.options.label.materialColorR',
|
|
33804
|
+
field: 'materialColorR',
|
|
33805
|
+
cellDataType: 'number'
|
|
33806
|
+
}, {
|
|
33807
|
+
headerName: 'backoffice.idmCatalog.options.label.materialColorG',
|
|
33808
|
+
field: 'materialColorG',
|
|
33809
|
+
cellDataType: 'number'
|
|
33810
|
+
}, {
|
|
33811
|
+
headerName: 'backoffice.idmCatalog.options.label.materialColorB',
|
|
33812
|
+
field: 'materialColorR',
|
|
33813
|
+
cellDataType: 'number'
|
|
33814
|
+
}]
|
|
33815
|
+
}, {
|
|
33816
|
+
headerName: 'backoffice.idmCatalog.options.label.measurement',
|
|
33817
|
+
children: [{
|
|
33818
|
+
headerName: 'backoffice.idmCatalog.options.label.measureNo',
|
|
33819
|
+
field: 'measureNo'
|
|
33820
|
+
}, {
|
|
33821
|
+
headerName: 'backoffice.idmCatalog.options.label.measureValue',
|
|
33822
|
+
field: 'measureValue',
|
|
33823
|
+
cellDataType: 'number'
|
|
33824
|
+
}, {
|
|
33825
|
+
headerName: 'backoffice.idmCatalog.options.label.measureUnit',
|
|
33826
|
+
field: 'measureUnit'
|
|
33827
|
+
}]
|
|
33828
|
+
}, {
|
|
33829
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
33830
|
+
field: 'lastUpdatedDate',
|
|
33831
|
+
cellDataType: 'dateString',
|
|
33832
|
+
editable: false
|
|
33833
|
+
}, {
|
|
33834
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
33835
|
+
field: 'lastUpdatedByDisplayText',
|
|
33836
|
+
editable: false
|
|
33837
|
+
}, {
|
|
33838
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
33839
|
+
field: 'createdDate',
|
|
33840
|
+
cellDataType: 'dateString',
|
|
33841
|
+
editable: false
|
|
33842
|
+
}, {
|
|
33843
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
33844
|
+
field: 'createdByDisplayText',
|
|
33845
|
+
editable: false
|
|
33846
|
+
}]
|
|
33847
|
+
}
|
|
33848
|
+
});
|
|
33849
|
+
}
|
|
33850
|
+
|
|
33851
|
+
function Features(_ref) {
|
|
33852
|
+
var organizationId = _ref.organizationId,
|
|
33853
|
+
catalogId = _ref.catalogId,
|
|
33854
|
+
featureClassId = _ref.featureClassId,
|
|
33855
|
+
apiConfig = _ref.apiConfig,
|
|
33856
|
+
hooks = _ref.hooks;
|
|
33237
33857
|
var _useTranslation = useTranslation(),
|
|
33238
33858
|
t = _useTranslation.t;
|
|
33239
|
-
var _useModule = useModule(['features']),
|
|
33240
|
-
catalogId = _useModule.catalogId,
|
|
33241
|
-
organizationId = _useModule.organizationId,
|
|
33242
|
-
updateNavigation = _useModule.updateNavigation,
|
|
33243
|
-
apiConfig = _useModule.apiConfig;
|
|
33244
33859
|
var headerPosVariationType = [{
|
|
33245
33860
|
name: t('backoffice.idmCatalog.features.label.vt.I'),
|
|
33246
33861
|
value: 'I'
|
|
@@ -33264,9 +33879,184 @@ function TableFeatures () {
|
|
|
33264
33879
|
var applicationData = useMemo(function () {
|
|
33265
33880
|
return {
|
|
33266
33881
|
catalogId: catalogId,
|
|
33267
|
-
organizationId: organizationId
|
|
33882
|
+
organizationId: organizationId,
|
|
33883
|
+
featureClassId: featureClassId
|
|
33268
33884
|
};
|
|
33269
|
-
}, [catalogId]);
|
|
33885
|
+
}, [catalogId, featureClassId, organizationId]);
|
|
33886
|
+
var apiInterface = featureClassId ? {
|
|
33887
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
|
|
33888
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
|
|
33889
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
|
|
33890
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features/${_id}',
|
|
33891
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features/${_id}'
|
|
33892
|
+
} : {
|
|
33893
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features',
|
|
33894
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features',
|
|
33895
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}',
|
|
33896
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}',
|
|
33897
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}'
|
|
33898
|
+
};
|
|
33899
|
+
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
33900
|
+
gridId: 'crud-grid_features' + (featureClassId ? '_featureClass' : ''),
|
|
33901
|
+
applicationData: applicationData,
|
|
33902
|
+
hooks: hooks,
|
|
33903
|
+
configuration: {
|
|
33904
|
+
type: 'dotnetSSM',
|
|
33905
|
+
apiInterface: apiInterface,
|
|
33906
|
+
dateFormat: 'LL',
|
|
33907
|
+
colDef: [].concat(_toConsumableArray(featureClassId ? [{
|
|
33908
|
+
field: 'visible',
|
|
33909
|
+
headerName: 'backoffice.idmCatalog.features.label.visible',
|
|
33910
|
+
cellDataType: 'boolean',
|
|
33911
|
+
required: true,
|
|
33912
|
+
pinned: true,
|
|
33913
|
+
lockPinned: true,
|
|
33914
|
+
defaultValue: false
|
|
33915
|
+
}, {
|
|
33916
|
+
field: 'featureNo',
|
|
33917
|
+
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
33918
|
+
required: true,
|
|
33919
|
+
cellDataType: 'lookup',
|
|
33920
|
+
doRefresh: true,
|
|
33921
|
+
unique: true,
|
|
33922
|
+
customParams: {
|
|
33923
|
+
apiInterface: {
|
|
33924
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
33925
|
+
},
|
|
33926
|
+
lookupValue: 'featureText',
|
|
33927
|
+
lookupKey: 'featureNo',
|
|
33928
|
+
translated: true,
|
|
33929
|
+
lookupLabelTemplate: '${name} (${value})',
|
|
33930
|
+
insertLookup: true,
|
|
33931
|
+
allowToAdd: true
|
|
33932
|
+
}
|
|
33933
|
+
}] : [{
|
|
33934
|
+
field: 'featureNo',
|
|
33935
|
+
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
33936
|
+
required: true,
|
|
33937
|
+
unique: true
|
|
33938
|
+
}]), [{
|
|
33939
|
+
headerName: 'backoffice.idmCatalog.features.label.featureText',
|
|
33940
|
+
marryChildren: true,
|
|
33941
|
+
children: [{
|
|
33942
|
+
field: 'featureText.DE',
|
|
33943
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33944
|
+
isDictionary: true,
|
|
33945
|
+
required: true
|
|
33946
|
+
}, {
|
|
33947
|
+
field: 'featureText.EN',
|
|
33948
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33949
|
+
isDictionary: true
|
|
33950
|
+
}, {
|
|
33951
|
+
field: 'featureText.FR',
|
|
33952
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33953
|
+
isDictionary: true
|
|
33954
|
+
}, {
|
|
33955
|
+
field: 'featureText.IT',
|
|
33956
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33957
|
+
isDictionary: true
|
|
33958
|
+
}]
|
|
33959
|
+
}, {
|
|
33960
|
+
field: 'sequenceNo',
|
|
33961
|
+
headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
|
|
33962
|
+
required: true,
|
|
33963
|
+
cellDataType: 'number'
|
|
33964
|
+
}, {
|
|
33965
|
+
field: 'headerPosVariationType',
|
|
33966
|
+
headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
|
|
33967
|
+
required: true,
|
|
33968
|
+
cellDataType: 'enum',
|
|
33969
|
+
customParams: {
|
|
33970
|
+
enumData: headerPosVariationType,
|
|
33971
|
+
displayLabelTemplate: '${name} (${value})'
|
|
33972
|
+
}
|
|
33973
|
+
}, {
|
|
33974
|
+
field: 'featureT',
|
|
33975
|
+
headerName: 'backoffice.idmCatalog.features.label.featureT',
|
|
33976
|
+
cellDataType: 'enum',
|
|
33977
|
+
customParams: {
|
|
33978
|
+
enumData: featureT,
|
|
33979
|
+
displayLabelTemplate: '${name} (${value})'
|
|
33980
|
+
}
|
|
33981
|
+
}, {
|
|
33982
|
+
field: 'measureUnit',
|
|
33983
|
+
headerName: 'backoffice.idmCatalog.features.label.measureUnit'
|
|
33984
|
+
}, {
|
|
33985
|
+
field: 'measureParameter',
|
|
33986
|
+
headerName: 'backoffice.idmCatalog.features.label.measureParameter'
|
|
33987
|
+
}, {
|
|
33988
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
33989
|
+
field: 'lastUpdatedDate',
|
|
33990
|
+
cellDataType: 'dateString',
|
|
33991
|
+
editable: false
|
|
33992
|
+
}, {
|
|
33993
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
33994
|
+
field: 'createdDate',
|
|
33995
|
+
cellDataType: 'dateString',
|
|
33996
|
+
editable: false
|
|
33997
|
+
}, {
|
|
33998
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
33999
|
+
field: 'createdByDisplayText',
|
|
34000
|
+
editable: false
|
|
34001
|
+
}, {
|
|
34002
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
34003
|
+
field: 'lastUpdatedByDisplayText',
|
|
34004
|
+
editable: false
|
|
34005
|
+
}, {
|
|
34006
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
34007
|
+
field: '_id',
|
|
34008
|
+
editable: false
|
|
34009
|
+
}, {
|
|
34010
|
+
field: 'organizationId',
|
|
34011
|
+
editable: false,
|
|
34012
|
+
hide: true,
|
|
34013
|
+
lockVisible: true,
|
|
34014
|
+
suppressColumnsToolPanel: true,
|
|
34015
|
+
defaultValue: '${organizationId}'
|
|
34016
|
+
}, {
|
|
34017
|
+
field: 'catalogId',
|
|
34018
|
+
editable: false,
|
|
34019
|
+
hide: true,
|
|
34020
|
+
lockVisible: true,
|
|
34021
|
+
suppressColumnsToolPanel: true,
|
|
34022
|
+
defaultValue: '${catalogId}'
|
|
34023
|
+
}])
|
|
34024
|
+
}
|
|
34025
|
+
});
|
|
34026
|
+
}
|
|
34027
|
+
|
|
34028
|
+
function TableFeatures () {
|
|
34029
|
+
var _useTranslation = useTranslation(),
|
|
34030
|
+
t = _useTranslation.t;
|
|
34031
|
+
var root = useStore();
|
|
34032
|
+
var _useModule = useModule(['features']),
|
|
34033
|
+
catalogId = _useModule.catalogId,
|
|
34034
|
+
organizationId = _useModule.organizationId,
|
|
34035
|
+
updateNavigation = _useModule.updateNavigation,
|
|
34036
|
+
apiConfig = _useModule.apiConfig;
|
|
34037
|
+
var _React$useState = React.useState(),
|
|
34038
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
34039
|
+
selectedFeature = _React$useState2[0],
|
|
34040
|
+
setSelectedFeature = _React$useState2[1];
|
|
34041
|
+
useEffect(function () {
|
|
34042
|
+
if (selectedFeature) {
|
|
34043
|
+
root.contentStore.bottomToolBar.tools = [{
|
|
34044
|
+
id: 'options',
|
|
34045
|
+
name: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions'),
|
|
34046
|
+
element: /*#__PURE__*/jsx(Options, {
|
|
34047
|
+
organizationId: organizationId,
|
|
34048
|
+
catalogId: catalogId,
|
|
34049
|
+
selectedFeature: selectedFeature._id,
|
|
34050
|
+
apiConfig: apiConfig
|
|
34051
|
+
}),
|
|
34052
|
+
startWidth: 300,
|
|
34053
|
+
defaultPinned: false,
|
|
34054
|
+
defaultOpen: false
|
|
34055
|
+
}];
|
|
34056
|
+
} else {
|
|
34057
|
+
root.contentStore.bottomToolBar.tools = [];
|
|
34058
|
+
}
|
|
34059
|
+
}, [selectedFeature]);
|
|
33270
34060
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
33271
34061
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
33272
34062
|
title: /*#__PURE__*/jsxs("div", {
|
|
@@ -33284,109 +34074,18 @@ function TableFeatures () {
|
|
|
33284
34074
|
})
|
|
33285
34075
|
})]
|
|
33286
34076
|
})
|
|
33287
|
-
}), /*#__PURE__*/jsx(
|
|
33288
|
-
|
|
33289
|
-
|
|
33290
|
-
|
|
33291
|
-
|
|
33292
|
-
|
|
33293
|
-
|
|
33294
|
-
|
|
33295
|
-
|
|
33296
|
-
|
|
33297
|
-
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}'
|
|
33298
|
-
},
|
|
33299
|
-
dateFormat: 'LL',
|
|
33300
|
-
colDef: [{
|
|
33301
|
-
field: 'featureNo',
|
|
33302
|
-
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
33303
|
-
required: true
|
|
33304
|
-
}, {
|
|
33305
|
-
headerName: 'backoffice.idmCatalog.features.label.featureText',
|
|
33306
|
-
marryChildren: true,
|
|
33307
|
-
children: [{
|
|
33308
|
-
field: 'featureText.DE',
|
|
33309
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33310
|
-
isDictionary: true,
|
|
33311
|
-
required: true
|
|
33312
|
-
}, {
|
|
33313
|
-
field: 'featureText.EN',
|
|
33314
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33315
|
-
isDictionary: true
|
|
33316
|
-
}, {
|
|
33317
|
-
field: 'featureText.FR',
|
|
33318
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33319
|
-
isDictionary: true
|
|
33320
|
-
}, {
|
|
33321
|
-
field: 'featureText.IT',
|
|
33322
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33323
|
-
isDictionary: true
|
|
33324
|
-
}]
|
|
33325
|
-
}, {
|
|
33326
|
-
field: 'sequenceNo',
|
|
33327
|
-
headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
|
|
33328
|
-
required: true,
|
|
33329
|
-
cellDataType: 'number'
|
|
33330
|
-
}, {
|
|
33331
|
-
field: 'headerPosVariationType',
|
|
33332
|
-
headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
|
|
33333
|
-
required: true,
|
|
33334
|
-
cellDataType: 'enum',
|
|
33335
|
-
customParams: {
|
|
33336
|
-
enumData: headerPosVariationType,
|
|
33337
|
-
displayLabelTemplate: '${name} (${value})'
|
|
33338
|
-
}
|
|
33339
|
-
}, {
|
|
33340
|
-
field: 'featureT',
|
|
33341
|
-
headerName: 'backoffice.idmCatalog.features.label.featureT',
|
|
33342
|
-
cellDataType: 'enum',
|
|
33343
|
-
customParams: {
|
|
33344
|
-
enumData: featureT,
|
|
33345
|
-
displayLabelTemplate: '${name} (${value})'
|
|
34077
|
+
}), /*#__PURE__*/jsx(Features, {
|
|
34078
|
+
organizationId: organizationId,
|
|
34079
|
+
catalogId: catalogId,
|
|
34080
|
+
apiConfig: apiConfig,
|
|
34081
|
+
hooks: {
|
|
34082
|
+
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
|
34083
|
+
if (event.selection.length == 1) {
|
|
34084
|
+
setSelectedFeature(event.selection[0].node.data);
|
|
34085
|
+
} else {
|
|
34086
|
+
setSelectedFeature(null);
|
|
33346
34087
|
}
|
|
33347
|
-
}
|
|
33348
|
-
field: 'measureUnit',
|
|
33349
|
-
headerName: 'backoffice.idmCatalog.features.label.measureUnit'
|
|
33350
|
-
}, {
|
|
33351
|
-
field: 'measureParameter',
|
|
33352
|
-
headerName: 'backoffice.idmCatalog.features.label.measureParameter'
|
|
33353
|
-
}, {
|
|
33354
|
-
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
33355
|
-
field: 'lastUpdatedDate',
|
|
33356
|
-
cellDataType: 'dateString',
|
|
33357
|
-
editable: false
|
|
33358
|
-
}, {
|
|
33359
|
-
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
33360
|
-
field: 'createdDate',
|
|
33361
|
-
cellDataType: 'dateString',
|
|
33362
|
-
editable: false
|
|
33363
|
-
}, {
|
|
33364
|
-
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
33365
|
-
field: 'createdByDisplayText',
|
|
33366
|
-
editable: false
|
|
33367
|
-
}, {
|
|
33368
|
-
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
33369
|
-
field: 'lastUpdatedByDisplayText',
|
|
33370
|
-
editable: false
|
|
33371
|
-
}, {
|
|
33372
|
-
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
33373
|
-
field: '_id',
|
|
33374
|
-
editable: false
|
|
33375
|
-
}, {
|
|
33376
|
-
field: 'organizationId',
|
|
33377
|
-
editable: false,
|
|
33378
|
-
hide: true,
|
|
33379
|
-
lockVisible: true,
|
|
33380
|
-
suppressColumnsToolPanel: true,
|
|
33381
|
-
defaultValue: '${organizationId}'
|
|
33382
|
-
}, {
|
|
33383
|
-
field: 'catalogId',
|
|
33384
|
-
editable: false,
|
|
33385
|
-
hide: true,
|
|
33386
|
-
lockVisible: true,
|
|
33387
|
-
suppressColumnsToolPanel: true,
|
|
33388
|
-
defaultValue: '${catalogId}'
|
|
33389
|
-
}]
|
|
34088
|
+
}
|
|
33390
34089
|
}
|
|
33391
34090
|
})]
|
|
33392
34091
|
});
|
|
@@ -33427,154 +34126,48 @@ function TableOptions () {
|
|
|
33427
34126
|
})]
|
|
33428
34127
|
})]
|
|
33429
34128
|
})
|
|
33430
|
-
}), selectedFeature && /*#__PURE__*/jsx(
|
|
33431
|
-
|
|
33432
|
-
|
|
33433
|
-
|
|
33434
|
-
|
|
33435
|
-
},
|
|
33436
|
-
configuration: {
|
|
33437
|
-
type: 'dotnetSSM',
|
|
33438
|
-
idCol: 'optionKey',
|
|
33439
|
-
apiInterface: {
|
|
33440
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options',
|
|
33441
|
-
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options',
|
|
33442
|
-
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options/${optionKey}',
|
|
33443
|
-
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options/${optionKey}',
|
|
33444
|
-
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options/${optionKey}'
|
|
33445
|
-
},
|
|
33446
|
-
dateFormat: 'LL',
|
|
33447
|
-
floatingFilter: true,
|
|
33448
|
-
colDef: [{
|
|
33449
|
-
field: 'optionKey',
|
|
33450
|
-
required: true,
|
|
33451
|
-
unique: true
|
|
33452
|
-
}, {
|
|
33453
|
-
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
33454
|
-
field: 'sequenceNo',
|
|
33455
|
-
cellDataType: 'number'
|
|
33456
|
-
}, {
|
|
33457
|
-
headerName: 'backoffice.idmCatalog.common.label.texts',
|
|
33458
|
-
children: [{
|
|
33459
|
-
headerName: 'backoffice.idmCatalog.options.label.optionText',
|
|
33460
|
-
marryChildren: true,
|
|
33461
|
-
children: [{
|
|
33462
|
-
field: 'optionText.DE',
|
|
33463
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33464
|
-
isDictionary: true,
|
|
33465
|
-
required: true
|
|
33466
|
-
}, {
|
|
33467
|
-
field: 'optionText.EN',
|
|
33468
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33469
|
-
isDictionary: true
|
|
33470
|
-
}, {
|
|
33471
|
-
field: 'optionText.FR',
|
|
33472
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33473
|
-
isDictionary: true
|
|
33474
|
-
}, {
|
|
33475
|
-
field: 'optionText.IT',
|
|
33476
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33477
|
-
isDictionary: true
|
|
33478
|
-
}]
|
|
33479
|
-
}, {
|
|
33480
|
-
headerName: 'backoffice.idmCatalog.options.label.optionCommentText',
|
|
33481
|
-
marryChildren: true,
|
|
33482
|
-
children: [{
|
|
33483
|
-
field: 'optionCommentText.DE',
|
|
33484
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
33485
|
-
isDictionary: true
|
|
33486
|
-
}, {
|
|
33487
|
-
field: 'optionCommentText.EN',
|
|
33488
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
33489
|
-
isDictionary: true
|
|
33490
|
-
}, {
|
|
33491
|
-
field: 'optionCommentText.FR',
|
|
33492
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
33493
|
-
isDictionary: true
|
|
33494
|
-
}, {
|
|
33495
|
-
field: 'optionCommentText.IT',
|
|
33496
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
33497
|
-
isDictionary: true
|
|
33498
|
-
}]
|
|
33499
|
-
}, {
|
|
33500
|
-
headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
|
|
33501
|
-
field: 'optionFreeText',
|
|
33502
|
-
cellDataType: 'boolean'
|
|
33503
|
-
}]
|
|
33504
|
-
}, {
|
|
33505
|
-
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
33506
|
-
children: [{
|
|
33507
|
-
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
33508
|
-
field: 'validFromDate',
|
|
33509
|
-
cellDataType: 'dateString'
|
|
33510
|
-
}, {
|
|
33511
|
-
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
33512
|
-
field: 'validUntilDate',
|
|
33513
|
-
cellDataType: 'dateString'
|
|
33514
|
-
}]
|
|
33515
|
-
}, {
|
|
33516
|
-
headerName: 'backoffice.idmCatalog.options.label.material',
|
|
33517
|
-
children: [{
|
|
33518
|
-
headerName: 'backoffice.idmCatalog.options.label.materialNo',
|
|
33519
|
-
field: 'materialNo'
|
|
33520
|
-
}, {
|
|
33521
|
-
headerName: 'backoffice.idmCatalog.options.label.materialColorR',
|
|
33522
|
-
field: 'materialColorR',
|
|
33523
|
-
cellDataType: 'number'
|
|
33524
|
-
}, {
|
|
33525
|
-
headerName: 'backoffice.idmCatalog.options.label.materialColorG',
|
|
33526
|
-
field: 'materialColorG',
|
|
33527
|
-
cellDataType: 'number'
|
|
33528
|
-
}, {
|
|
33529
|
-
headerName: 'backoffice.idmCatalog.options.label.materialColorB',
|
|
33530
|
-
field: 'materialColorR',
|
|
33531
|
-
cellDataType: 'number'
|
|
33532
|
-
}]
|
|
33533
|
-
}, {
|
|
33534
|
-
headerName: 'backoffice.idmCatalog.options.label.measurement',
|
|
33535
|
-
children: [{
|
|
33536
|
-
headerName: 'backoffice.idmCatalog.options.label.measureNo',
|
|
33537
|
-
field: 'measureNo'
|
|
33538
|
-
}, {
|
|
33539
|
-
headerName: 'backoffice.idmCatalog.options.label.measureValue',
|
|
33540
|
-
field: 'measureValue',
|
|
33541
|
-
cellDataType: 'number'
|
|
33542
|
-
}, {
|
|
33543
|
-
headerName: 'backoffice.idmCatalog.options.label.measureUnit',
|
|
33544
|
-
field: 'measureUnit'
|
|
33545
|
-
}]
|
|
33546
|
-
}, {
|
|
33547
|
-
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
33548
|
-
field: 'lastUpdatedDate',
|
|
33549
|
-
cellDataType: 'dateString',
|
|
33550
|
-
editable: false
|
|
33551
|
-
}, {
|
|
33552
|
-
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
33553
|
-
field: 'lastUpdatedByDisplayText',
|
|
33554
|
-
editable: false
|
|
33555
|
-
}, {
|
|
33556
|
-
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
33557
|
-
field: 'createdDate',
|
|
33558
|
-
cellDataType: 'dateString',
|
|
33559
|
-
editable: false
|
|
33560
|
-
}, {
|
|
33561
|
-
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
33562
|
-
field: 'createdByDisplayText',
|
|
33563
|
-
editable: false
|
|
33564
|
-
}]
|
|
33565
|
-
}
|
|
34129
|
+
}), selectedFeature && /*#__PURE__*/jsx(Options, {
|
|
34130
|
+
organizationId: organizationId,
|
|
34131
|
+
catalogId: catalogId,
|
|
34132
|
+
selectedFeature: selectedFeature._id,
|
|
34133
|
+
apiConfig: apiConfig
|
|
33566
34134
|
})]
|
|
33567
34135
|
});
|
|
33568
34136
|
}
|
|
33569
34137
|
|
|
33570
34138
|
function TableFeatureClasses () {
|
|
34139
|
+
var _root$contentStore$bo, _root$contentStore$ri;
|
|
33571
34140
|
var _useTranslation = useTranslation(),
|
|
33572
34141
|
t = _useTranslation.t;
|
|
34142
|
+
var root = useStore();
|
|
33573
34143
|
var _useModule = useModule(['featureclasses']),
|
|
33574
34144
|
catalogId = _useModule.catalogId,
|
|
33575
34145
|
organizationId = _useModule.organizationId,
|
|
33576
34146
|
updateNavigation = _useModule.updateNavigation,
|
|
33577
34147
|
apiConfig = _useModule.apiConfig;
|
|
34148
|
+
var _React$useState = React.useState(),
|
|
34149
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
34150
|
+
selectedFeatureClass = _React$useState2[0],
|
|
34151
|
+
setSelectedFeatureClass = _React$useState2[1];
|
|
34152
|
+
useEffect(function () {
|
|
34153
|
+
if (selectedFeatureClass) {
|
|
34154
|
+
root.contentStore.bottomToolBar.tools = [{
|
|
34155
|
+
id: 'options',
|
|
34156
|
+
name: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
|
|
34157
|
+
element: /*#__PURE__*/jsx(Features, {
|
|
34158
|
+
organizationId: organizationId,
|
|
34159
|
+
catalogId: catalogId,
|
|
34160
|
+
apiConfig: apiConfig,
|
|
34161
|
+
featureClassId: selectedFeatureClass._id
|
|
34162
|
+
}),
|
|
34163
|
+
startWidth: 300,
|
|
34164
|
+
defaultPinned: false,
|
|
34165
|
+
defaultOpen: false
|
|
34166
|
+
}];
|
|
34167
|
+
} else {
|
|
34168
|
+
root.contentStore.bottomToolBar.tools = [];
|
|
34169
|
+
}
|
|
34170
|
+
}, [selectedFeatureClass]);
|
|
33578
34171
|
var applicationData = useMemo(function () {
|
|
33579
34172
|
return {
|
|
33580
34173
|
catalogId: catalogId,
|
|
@@ -33601,6 +34194,15 @@ function TableFeatureClasses () {
|
|
|
33601
34194
|
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
33602
34195
|
gridId: 'crud-grid_featureclasses',
|
|
33603
34196
|
applicationData: applicationData,
|
|
34197
|
+
hooks: {
|
|
34198
|
+
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
|
34199
|
+
if (event.selection.length == 1) {
|
|
34200
|
+
setSelectedFeatureClass(event.selection[0].node.data);
|
|
34201
|
+
} else {
|
|
34202
|
+
setSelectedFeatureClass(null);
|
|
34203
|
+
}
|
|
34204
|
+
}
|
|
34205
|
+
},
|
|
33604
34206
|
configuration: {
|
|
33605
34207
|
type: 'dotnetSSM',
|
|
33606
34208
|
apiInterface: {
|
|
@@ -33671,8 +34273,13 @@ function TableFeatureClasses () {
|
|
|
33671
34273
|
lockVisible: true,
|
|
33672
34274
|
suppressColumnsToolPanel: true,
|
|
33673
34275
|
defaultValue: '${catalogId}'
|
|
34276
|
+
}, {
|
|
34277
|
+
field: 'featureRefs'
|
|
33674
34278
|
}]
|
|
33675
|
-
}
|
|
34279
|
+
},
|
|
34280
|
+
refSecondaryGrids: [(_root$contentStore$bo = root.contentStore.bottomToolBar.toolbarElement) !== null && _root$contentStore$bo !== void 0 ? _root$contentStore$bo : undefined, (_root$contentStore$ri = root.contentStore.rightToolBar.toolbarElement) !== null && _root$contentStore$ri !== void 0 ? _root$contentStore$ri : undefined].filter(function (element) {
|
|
34281
|
+
return element !== undefined;
|
|
34282
|
+
})
|
|
33676
34283
|
})]
|
|
33677
34284
|
});
|
|
33678
34285
|
}
|
|
@@ -33879,8 +34486,8 @@ function Content$1() {
|
|
|
33879
34486
|
});
|
|
33880
34487
|
}
|
|
33881
34488
|
|
|
33882
|
-
function ownKeys$
|
|
33883
|
-
function _objectSpread$
|
|
34489
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34490
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33884
34491
|
var ContentWrapper = function ContentWrapper(_ref) {
|
|
33885
34492
|
var id = _ref.id;
|
|
33886
34493
|
var root = useStore();
|
|
@@ -33953,14 +34560,13 @@ var ContentCard = observer(function (_ref3) {
|
|
|
33953
34560
|
var root = useStore();
|
|
33954
34561
|
var configuration = root.configurationStore.getConfiguration(configId);
|
|
33955
34562
|
return /*#__PURE__*/jsxs("div", {
|
|
33956
|
-
style: _objectSpread$
|
|
34563
|
+
style: _objectSpread$4(_objectSpread$4({}, !inGroup ? {
|
|
33957
34564
|
height: '100%'
|
|
33958
34565
|
} : {
|
|
33959
34566
|
maxHeight: '60vh'
|
|
33960
34567
|
}), {}, {
|
|
33961
34568
|
maxWidth: '100%',
|
|
33962
34569
|
padding: direction == 'horizontal' ? 0 : 16,
|
|
33963
|
-
backgroundColor: root.contentStore.theme == 'lightmode' ? '#fff' : '#000',
|
|
33964
34570
|
display: 'flex',
|
|
33965
34571
|
flexDirection: 'column'
|
|
33966
34572
|
}),
|
|
@@ -34000,7 +34606,7 @@ var Content = observer(ContentWrapper);
|
|
|
34000
34606
|
var layout = "layout-gqKsp";
|
|
34001
34607
|
var contentWrapper = "content-wrapper-mQSc0";
|
|
34002
34608
|
var detail = "detail-WeK8Q";
|
|
34003
|
-
var css_248z$5 = ".layout-gqKsp {\n height: 100%;\n position: relative;\n overflow: hidden;\n}\n\n.content-wrapper-mQSc0 {\n overflow: auto;\n height: 100%;\n}\n\n.detail-WeK8Q .ant-drawer-content-wrapper {\n max-width: 100%;\n}\n\n.darkmode .layout
|
|
34609
|
+
var css_248z$5 = ".layout-gqKsp {\n height: 100%;\n position: relative;\n overflow: hidden;\n}\n\n.content-wrapper-mQSc0 {\n overflow: auto;\n height: 100%;\n}\n\n.detail-WeK8Q .ant-drawer-content-wrapper {\n max-width: 100%;\n}\n\n.darkmode .ant-layout {\n background-color: rgb(20, 20, 20);\n}\n\n.lightmode .ant-layout {\n background-color: rgb(255, 255, 255);\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode {\n background-color: #001529 !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode .arrows {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%2225%22 height%3D%2224%22 viewBox%3D%220 0 25 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M10.5 7L15.5 12L10.5 17%22 stroke%3D%22%23fff%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(270deg, rgba(0, 21, 41, 1) 0%, rgba(0, 21, 41, 1) 72%, rgba(0, 21, 41, 0) 100%) !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode #Profile > div {\n border-left: 1px solid black;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode #welcomeText {\n border-right: 1px solid black;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode #Profile {\n background-color: #001529 !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.lightmode {\n background-color: #fff !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.darkmode * {\n color: rgb(255, 255, 255);\n}\n.diva-component-DIVA_BACKOFFICE_NEW #diva-header.lightmode * {\n color: rgb(0, 0, 0);\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW ::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .darkmode ::-webkit-scrollbar-track {\n box-shadow: inset 0 0 10px 10px #021129;\n border: solid 3px transparent;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .darkmode ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px rgb(130, 130, 130);\n border: solid 3px transparent;\n border-radius: 10px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .lightmode ::-webkit-scrollbar-track {\n box-shadow: inset 0 0 10px 10px #ffffff;\n border: solid 3px transparent;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .lightmode ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px #bdbdbd;\n border: solid 3px transparent;\n border-radius: 10px;\n}\n";
|
|
34004
34610
|
styleInject(css_248z$5);
|
|
34005
34611
|
|
|
34006
34612
|
function Detail(_ref) {
|
|
@@ -34493,15 +35099,28 @@ var MenuWrapper = function MenuWrapper() {
|
|
|
34493
35099
|
};
|
|
34494
35100
|
var Navigation = observer(MenuWrapper);
|
|
34495
35101
|
|
|
34496
|
-
var
|
|
34497
|
-
var
|
|
35102
|
+
var container$1 = "container-BucHG";
|
|
35103
|
+
var right = "right--XETU";
|
|
35104
|
+
var unpinnedRight = "unpinned-right-tbnNb";
|
|
35105
|
+
var draghandle = "draghandle-f5b0N";
|
|
35106
|
+
var bottom = "bottom-cqyfS";
|
|
35107
|
+
var midHandle = "mid-handle--qh50";
|
|
35108
|
+
var toolsSelector = "tools-selector-BHV3Z";
|
|
35109
|
+
var toolItem = "tool-item-KyKgQ";
|
|
35110
|
+
var sel = "sel-iUm8X";
|
|
35111
|
+
var button = "button-K-0KR";
|
|
35112
|
+
var css_248z$3 = ".container-BucHG {\n height: 100%;\n width: 100%;\n position: relative;\n z-index: 1001;\n overflow: auto;\n}\n\n.right--XETU .container-BucHG {\n z-index: 1003;\n}\n\n.unpinned-right-tbnNb.container-BucHG {\n right: 37px;\n position: absolute;\n}\n\n.draghandle-f5b0N {\n position: absolute;\n top: 0px;\n background-color: rgba(128, 128, 128, 0.3);\n z-index: 1002;\n}\n\n.right--XETU .draghandle-f5b0N {\n height: 100%;\n width: 2px;\n left: -1px;\n cursor: ew-resize;\n z-index: 1004;\n}\n\n.bottom-cqyfS .draghandle-f5b0N {\n height: 2px;\n width: 100%;\n cursor: ns-resize;\n}\n\n.mid-handle--qh50 {\n position: absolute;\n background-color: rgba(128, 128, 128, 0.3);\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.right--XETU .mid-handle--qh50 {\n width: 5px;\n height: 32px;\n border-left: 2px solid grey;\n border-right: 2px solid grey;\n}\n\n.bottom-cqyfS .mid-handle--qh50 {\n height: 5px;\n width: 32px;\n border-top: 2px solid gray;\n border-bottom: 2px solid gray;\n}\n\n.tools-selector-BHV3Z {\n z-index: 1000;\n display: flex;\n position: relative;\n gap: 16px;\n align-items: center;\n background-color: #f5f5f5;\n}\n\n.darkmode .tools-selector-BHV3Z {\n background-color: #001529;\n color: rgba(255, 255, 255, 0.85);\n}\n\n.right--XETU .tools-selector-BHV3Z {\n width: 36px;\n height: 100%;\n padding-top: 16px;\n flex-direction: column;\n}\n\n.bottom-cqyfS .tools-selector-BHV3Z {\n width: 100%;\n height: 36px;\n padding-top: 0;\n flex-direction: row;\n}\n\n.tool-item-KyKgQ {\n padding: 10px;\n cursor: pointer;\n position: relative;\n}\n\n.right--XETU .tool-item-KyKgQ {\n writing-mode: vertical-lr;\n text-orientation: mixed;\n}\n\n.tool-item-KyKgQ::after {\n content: '';\n position: absolute;\n background-color: #0088ff;\n transition: all ease-in-out 0.2s;\n}\n\n.right--XETU .tool-item-KyKgQ::after {\n width: 3px;\n height: 0px;\n left: 1px;\n bottom: 50%;\n}\n\n.right--XETU .tool-item-KyKgQ:hover::after,\n.right--XETU .sel-iUm8X::after {\n height: 100%;\n bottom: 0;\n}\n\n.bottom-cqyfS .tool-item-KyKgQ::after {\n width: 0px;\n height: 3px;\n bottom: 1px;\n left: 50%;\n}\n\n.bottom-cqyfS .tool-item-KyKgQ:hover::after,\n.bottom-cqyfS .sel-iUm8X::after {\n width: 100%;\n left: 0;\n}\n\n.button-K-0KR {\n width: 40px;\n justify-content: center;\n}\n";
|
|
34498
35113
|
styleInject(css_248z$3);
|
|
34499
35114
|
|
|
35115
|
+
var wrapper$1 = "wrapper-Q13-g";
|
|
35116
|
+
var confContainer = "conf-container-Sm5LL";
|
|
35117
|
+
var css_248z$2 = ".wrapper-Q13-g {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.conf-container-Sm5LL {\n padding-top: 10px;\n background: white;\n color: black;\n height: calc(100% - 40px);\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n position: relative;\n overflow: hidden;\n}\n\n.darkmode .conf-container-Sm5LL {\n border-color: #424242;\n}\n";
|
|
35118
|
+
styleInject(css_248z$2);
|
|
35119
|
+
|
|
34500
35120
|
var wrapper = "wrapper-IcNC5";
|
|
34501
35121
|
var select = "select-jVMz-";
|
|
34502
|
-
var
|
|
34503
|
-
|
|
34504
|
-
styleInject(css_248z$2);
|
|
35122
|
+
var css_248z$1 = ".wrapper-IcNC5 {\n display: flex;\n gap: 16px;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.select-jVMz- {\n z-index: 1000;\n flex: 1;\n}\n";
|
|
35123
|
+
styleInject(css_248z$1);
|
|
34505
35124
|
|
|
34506
35125
|
var ArticleSelection = function ArticleSelection(_ref) {
|
|
34507
35126
|
var _ref$state = _ref.state,
|
|
@@ -34509,26 +35128,9 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
|
34509
35128
|
articleCodex = _ref$state.articleCodex,
|
|
34510
35129
|
setArticleCodex = _ref$state.setArticleCodex,
|
|
34511
35130
|
setDoReset = _ref$state.setDoReset;
|
|
34512
|
-
var
|
|
34513
|
-
|
|
34514
|
-
|
|
34515
|
-
var _useState = useState([]),
|
|
34516
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
34517
|
-
groupedArticles = _useState2[0],
|
|
34518
|
-
setGroupedArticles = _useState2[1];
|
|
34519
|
-
var root = useStore();
|
|
34520
|
-
var formatGroupLabel = function formatGroupLabel(data) {
|
|
34521
|
-
return /*#__PURE__*/jsxs("div", {
|
|
34522
|
-
style: groupStyles,
|
|
34523
|
-
children: [/*#__PURE__*/jsx("span", {
|
|
34524
|
-
children: data.label
|
|
34525
|
-
}), /*#__PURE__*/jsx("span", {
|
|
34526
|
-
style: groupBadgeStyles,
|
|
34527
|
-
children: data.options.length
|
|
34528
|
-
})]
|
|
34529
|
-
});
|
|
34530
|
-
};
|
|
34531
|
-
useEffect(function () {
|
|
35131
|
+
var _useTranslation = useTranslation(),
|
|
35132
|
+
t = _useTranslation.t;
|
|
35133
|
+
var groupedArticles = useMemo(function () {
|
|
34532
35134
|
var groups = [];
|
|
34533
35135
|
var _loop = function _loop() {
|
|
34534
35136
|
var article = articleList[i];
|
|
@@ -34540,6 +35142,7 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
|
34540
35142
|
group.options.push(article);
|
|
34541
35143
|
} else {
|
|
34542
35144
|
groups.push({
|
|
35145
|
+
title: article.groupName,
|
|
34543
35146
|
label: article.groupName,
|
|
34544
35147
|
options: [article]
|
|
34545
35148
|
});
|
|
@@ -34548,60 +35151,31 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
|
34548
35151
|
for (var i = 0; i < articleList.length; i++) {
|
|
34549
35152
|
_loop();
|
|
34550
35153
|
}
|
|
34551
|
-
|
|
35154
|
+
return groups;
|
|
34552
35155
|
}, [articleList]);
|
|
34553
35156
|
return /*#__PURE__*/jsxs("div", {
|
|
34554
35157
|
className: wrapper,
|
|
34555
|
-
children: [
|
|
34556
|
-
|
|
34557
|
-
|
|
34558
|
-
},
|
|
34559
|
-
className: button
|
|
34560
|
-
}), root.contentStore.toolPinned && /*#__PURE__*/jsx(PushpinFilled, {
|
|
34561
|
-
onClick: function onClick() {
|
|
34562
|
-
return root.contentStore.toolPinned = !root.contentStore.toolPinned;
|
|
34563
|
-
},
|
|
34564
|
-
className: button
|
|
34565
|
-
}), /*#__PURE__*/jsx(Select$2, {
|
|
34566
|
-
value: articleList.find(function (a) {
|
|
34567
|
-
return a.value == articleCodex;
|
|
34568
|
-
}),
|
|
35158
|
+
children: [/*#__PURE__*/jsx(Select$1, {
|
|
35159
|
+
placeholder: t('backoffice.configurator.article.placeholder'),
|
|
35160
|
+
value: articleCodex,
|
|
34569
35161
|
options: groupedArticles,
|
|
34570
|
-
|
|
34571
|
-
onChange: onChange,
|
|
35162
|
+
onChange: setArticleCodex,
|
|
34572
35163
|
className: select
|
|
34573
|
-
}), /*#__PURE__*/jsx(
|
|
35164
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
35165
|
+
icon: /*#__PURE__*/jsx(ReloadOutlined$1, {}),
|
|
34574
35166
|
onClick: function onClick() {
|
|
34575
35167
|
return setDoReset(true);
|
|
34576
|
-
}
|
|
34577
|
-
className: button
|
|
35168
|
+
}
|
|
34578
35169
|
})]
|
|
34579
35170
|
});
|
|
34580
35171
|
};
|
|
34581
|
-
var groupStyles = {
|
|
34582
|
-
display: 'flex',
|
|
34583
|
-
alignItems: 'center',
|
|
34584
|
-
justifyContent: 'space-between'
|
|
34585
|
-
};
|
|
34586
|
-
var groupBadgeStyles = {
|
|
34587
|
-
backgroundColor: '#EBECF0',
|
|
34588
|
-
borderRadius: '2em',
|
|
34589
|
-
color: '#172B4D',
|
|
34590
|
-
display: 'inline-block',
|
|
34591
|
-
fontSize: 12,
|
|
34592
|
-
fontWeight: 'normal',
|
|
34593
|
-
lineHeight: '1',
|
|
34594
|
-
minWidth: 1,
|
|
34595
|
-
padding: '0.16em 0.5em',
|
|
34596
|
-
textAlign: 'center'
|
|
34597
|
-
};
|
|
34598
35172
|
var ArticleSelection$1 = observer(ArticleSelection);
|
|
34599
35173
|
|
|
34600
|
-
function ownKeys$
|
|
34601
|
-
function _objectSpread$
|
|
35174
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35175
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34602
35176
|
function useWysiwyg$1(_ref) {
|
|
34603
35177
|
var tool = _ref.tool,
|
|
34604
|
-
|
|
35178
|
+
toolbar = _ref.toolbar;
|
|
34605
35179
|
var _useDivaCore = useDivaCore(),
|
|
34606
35180
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
34607
35181
|
subscribeEvents = _useDivaCore$actions.subscribeEvents,
|
|
@@ -34632,8 +35206,8 @@ function useWysiwyg$1(_ref) {
|
|
|
34632
35206
|
doNavigate = _useState12[0],
|
|
34633
35207
|
setDoNavigate = _useState12[1];
|
|
34634
35208
|
useEffect(function () {
|
|
34635
|
-
if (
|
|
34636
|
-
}, [
|
|
35209
|
+
if (!toolbar.hidden) setDoReset(true);
|
|
35210
|
+
}, [toolbar.hidden]);
|
|
34637
35211
|
var loadMask = /*#__PURE__*/function () {
|
|
34638
35212
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
|
|
34639
35213
|
var jwt, d;
|
|
@@ -34644,7 +35218,7 @@ function useWysiwyg$1(_ref) {
|
|
|
34644
35218
|
_context.next = 3;
|
|
34645
35219
|
return fetch(root.configurationStore.apiConfig.enricherService + '/packages/' + id + '/mask', {
|
|
34646
35220
|
method: 'GET',
|
|
34647
|
-
headers: _objectSpread$
|
|
35221
|
+
headers: _objectSpread$3({}, jwt ? {
|
|
34648
35222
|
Authorization: 'Bearer ' + jwt
|
|
34649
35223
|
} : {})
|
|
34650
35224
|
}).then(function (r) {
|
|
@@ -34851,18 +35425,17 @@ var FallbackComponent = function FallbackComponent(_ref2) {
|
|
|
34851
35425
|
});
|
|
34852
35426
|
};
|
|
34853
35427
|
|
|
34854
|
-
function ownKeys$
|
|
34855
|
-
function _objectSpread$
|
|
35428
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35429
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34856
35430
|
var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
34857
35431
|
var _state$articleCodex;
|
|
34858
35432
|
var tool = _ref.tool,
|
|
34859
|
-
|
|
35433
|
+
toolbar = _ref.toolbar;
|
|
34860
35434
|
var _useDivaCore = useDivaCore(),
|
|
34861
35435
|
organizationId = _useDivaCore.state.organization._id;
|
|
34862
|
-
var root = useStore();
|
|
34863
35436
|
var state = useWysiwyg$1({
|
|
34864
35437
|
tool: tool,
|
|
34865
|
-
|
|
35438
|
+
toolbar: toolbar
|
|
34866
35439
|
});
|
|
34867
35440
|
var _useTranslation = useTranslation(),
|
|
34868
35441
|
t = _useTranslation.t;
|
|
@@ -34879,12 +35452,10 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
34879
35452
|
state: state
|
|
34880
35453
|
}), state.pack && !state.doReset && /*#__PURE__*/jsx("div", {
|
|
34881
35454
|
hidden: !state.articleCodex,
|
|
34882
|
-
|
|
34883
|
-
height: 'calc(100% - 71px)'
|
|
34884
|
-
},
|
|
35455
|
+
className: confContainer,
|
|
34885
35456
|
children: /*#__PURE__*/jsx(WebPlannerReact, {
|
|
34886
35457
|
settings: state.settings,
|
|
34887
|
-
parameters: _objectSpread$
|
|
35458
|
+
parameters: _objectSpread$2(_objectSpread$2({
|
|
34888
35459
|
articleCodexes: (_state$articleCodex = state.articleCodex) !== null && _state$articleCodex !== void 0 ? _state$articleCodex : '',
|
|
34889
35460
|
variantValues: '',
|
|
34890
35461
|
resetArticle: '',
|
|
@@ -34903,7 +35474,9 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
34903
35474
|
internal: {
|
|
34904
35475
|
catalogMask: state.pack,
|
|
34905
35476
|
actions: {
|
|
34906
|
-
toggleLoading:
|
|
35477
|
+
toggleLoading: function toggleLoading(subId, _, toggle) {
|
|
35478
|
+
return toolbar.toggleLoading(tool.id, subId, toggle);
|
|
35479
|
+
}
|
|
34907
35480
|
}
|
|
34908
35481
|
},
|
|
34909
35482
|
isVisible: !!state.articleCodex
|
|
@@ -34914,8 +35487,8 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
34914
35487
|
};
|
|
34915
35488
|
|
|
34916
35489
|
function useWysiwyg(_ref) {
|
|
34917
|
-
var tool = _ref.tool
|
|
34918
|
-
_ref.
|
|
35490
|
+
var tool = _ref.tool,
|
|
35491
|
+
toolbar = _ref.toolbar;
|
|
34919
35492
|
tool.parameters;
|
|
34920
35493
|
_objectDestructuringEmpty(useDivaCore());
|
|
34921
35494
|
var root = useStore();
|
|
@@ -34925,7 +35498,7 @@ function useWysiwyg(_ref) {
|
|
|
34925
35498
|
setData = _useState2[1];
|
|
34926
35499
|
useEffect(function () {
|
|
34927
35500
|
var _tool$parameters$data, _tool$parameters, _root$resetErrorBound;
|
|
34928
|
-
var newData = _resoveLanguage(toJS((_tool$parameters$data = (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 || (_tool$parameters = _tool$parameters.data) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.content) !== null && _tool$parameters$data !== void 0 ? _tool$parameters$data : []),
|
|
35501
|
+
var newData = _resoveLanguage(toJS((_tool$parameters$data = (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 || (_tool$parameters = _tool$parameters.data) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.content) !== null && _tool$parameters$data !== void 0 ? _tool$parameters$data : []), toolbar.currentLanguage);
|
|
34929
35502
|
setData(newData);
|
|
34930
35503
|
(_root$resetErrorBound = root.resetErrorBoundary) === null || _root$resetErrorBound === void 0 || _root$resetErrorBound.call(root);
|
|
34931
35504
|
}, [tool.parameters, tool.parameters.data]);
|
|
@@ -34966,99 +35539,52 @@ var getTranslation = function getTranslation(text, lang) {
|
|
|
34966
35539
|
}
|
|
34967
35540
|
};
|
|
34968
35541
|
|
|
35542
|
+
var container = "container-Xbv0B";
|
|
35543
|
+
var css_248z = ".container-Xbv0B {\n background: white;\n color: black;\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n position: relative;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.darkmode .container-Xbv0B {\n border-color: #424242;\n}\n";
|
|
35544
|
+
styleInject(css_248z);
|
|
35545
|
+
|
|
34969
35546
|
var WsyiwygContentItem = function WsyiwygContentItem(_ref) {
|
|
34970
35547
|
var tool = _ref.tool,
|
|
34971
|
-
|
|
35548
|
+
toolbar = _ref.toolbar;
|
|
34972
35549
|
var _useWysiwygContentIte = useWysiwyg({
|
|
34973
35550
|
tool: tool,
|
|
34974
|
-
|
|
35551
|
+
toolbar: toolbar
|
|
34975
35552
|
}),
|
|
34976
35553
|
data = _useWysiwygContentIte.data;
|
|
34977
35554
|
return /*#__PURE__*/jsx(ErrorBoundary, {
|
|
34978
35555
|
errorCode: "BACKO_0004",
|
|
34979
35556
|
addToErrorLog: data,
|
|
34980
|
-
children: /*#__PURE__*/
|
|
34981
|
-
|
|
34982
|
-
|
|
34983
|
-
flexDirection: 'column',
|
|
34984
|
-
height: '100%'
|
|
34985
|
-
},
|
|
34986
|
-
children: [/*#__PURE__*/jsx(ContentItemComponent, {
|
|
35557
|
+
children: /*#__PURE__*/jsx("div", {
|
|
35558
|
+
className: container,
|
|
35559
|
+
children: /*#__PURE__*/jsx(ContentItemComponent, {
|
|
34987
35560
|
settings: {
|
|
34988
35561
|
contentItems: data !== null && data !== void 0 ? data : []
|
|
34989
35562
|
}
|
|
34990
|
-
})
|
|
35563
|
+
})
|
|
34991
35564
|
})
|
|
34992
35565
|
});
|
|
34993
35566
|
};
|
|
34994
35567
|
|
|
34995
|
-
var toolsSelector = "tools-selector-BHV3Z";
|
|
34996
|
-
var container = "container-BucHG";
|
|
34997
|
-
var pinned = "pinned-vk2AT";
|
|
34998
|
-
var draghandle = "draghandle-f5b0N";
|
|
34999
|
-
var midHandle = "mid-handle--qh50";
|
|
35000
|
-
var toolItem = "tool-item-KyKgQ";
|
|
35001
|
-
var sel = "sel-iUm8X";
|
|
35002
|
-
var css_248z$1 = ".wrapper-njnwX {\n position: absolute;\n top: 0px;\n}\n.tools-selector-BHV3Z {\n z-index: 2000;\n width: 36px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 16px;\n align-items: center;\n background-color: #001529;\n color: rgba(255, 255, 255, 0.85);\n padding-top: 16px;\n height: 100%;\n}\n\n.container-BucHG {\n right: 37px;\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: #fff;\n z-index: 10001;\n overflow: auto;\n}\n\n.pinned-vk2AT.container-BucHG {\n position: relative;\n right: auto;\n right: initial;\n}\n\n.draghandle-f5b0N {\n position: absolute;\n height: 100%;\n top: 0px;\n left: 0;\n width: 2px;\n cursor: ew-resize;\n background-color: gray;\n}\n\n.mid-handle--qh50 {\n position: absolute;\n width: 5px;\n height: 32px;\n background-color: #fff;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-left: 2px solid grey;\n border-right: 2px solid grey;\n}\n\n.tool-item-KyKgQ {\n writing-mode: vertical-lr;\n padding: 10px;\n text-orientation: mixed;\n cursor: pointer;\n position: relative;\n}\n\n.tool-item-KyKgQ::after {\n content: '';\n position: absolute;\n width: 3px;\n height: 0px;\n left: 0;\n bottom: 50%;\n background-color: rgba(255, 255, 255, 0.85);\n transition: all ease-in-out 0.2s;\n}\n.tool-item-KyKgQ:hover::after,\n.sel-iUm8X::after {\n height: 100%;\n bottom: 0;\n}\n";
|
|
35003
|
-
styleInject(css_248z$1);
|
|
35004
|
-
|
|
35005
|
-
var overlay = "overlay-Dr5pn";
|
|
35006
|
-
var loading = "loading-Ed3rZ";
|
|
35007
|
-
var css_248z = ".overlay-Dr5pn {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 10000;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.loading-Ed3rZ {\n margin: 0 auto;\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n.loading-Ed3rZ div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 8px solid #b6b6b6;\n border-radius: 50%;\n animation: loading-Ed3rZ 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #b6b6b6 transparent transparent transparent;\n}\n.loading-Ed3rZ div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.loading-Ed3rZ div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.loading-Ed3rZ div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes loading-Ed3rZ {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
35008
|
-
styleInject(css_248z);
|
|
35009
|
-
|
|
35010
|
-
function Spinner() {
|
|
35011
|
-
var _useState = useState(false),
|
|
35012
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
35013
|
-
showSpinner = _useState2[0],
|
|
35014
|
-
setShowSpinner = _useState2[1];
|
|
35015
|
-
var root = useStore();
|
|
35016
|
-
useEffect(function () {
|
|
35017
|
-
if (root.contentStore.isToolLoading) {
|
|
35018
|
-
setShowSpinner(true);
|
|
35019
|
-
} else if (!root.contentStore.isToolLoading) {
|
|
35020
|
-
setShowSpinner(false);
|
|
35021
|
-
}
|
|
35022
|
-
}, [root.contentStore.isToolLoading]);
|
|
35023
|
-
if (!showSpinner) {
|
|
35024
|
-
return /*#__PURE__*/jsx(Fragment, {});
|
|
35025
|
-
}
|
|
35026
|
-
return /*#__PURE__*/jsx("div", {
|
|
35027
|
-
className: overlay,
|
|
35028
|
-
id: "diva-loader",
|
|
35029
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
35030
|
-
className: loading,
|
|
35031
|
-
children: [/*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("div", {})]
|
|
35032
|
-
})
|
|
35033
|
-
});
|
|
35034
|
-
}
|
|
35035
|
-
var Spinner$1 = observer(Spinner);
|
|
35036
|
-
|
|
35037
|
-
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35038
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35039
35568
|
var Toolbar = function Toolbar(_ref) {
|
|
35040
|
-
|
|
35569
|
+
var position = _ref.position;
|
|
35041
35570
|
var root = useStore();
|
|
35042
|
-
var
|
|
35043
|
-
|
|
35044
|
-
|
|
35045
|
-
|
|
35046
|
-
var _useState3 = useState(false),
|
|
35047
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
35048
|
-
mouseDown = _useState4[0],
|
|
35049
|
-
setMouseDown = _useState4[1];
|
|
35050
|
-
var handler = function handler(mouseDownEvent) {
|
|
35051
|
-
var startWidth = width;
|
|
35571
|
+
var toolBar = position === 'bottom' ? root.contentStore.bottomToolBar : root.contentStore.rightToolBar;
|
|
35572
|
+
var onMouseDown = function onMouseDown(mouseDownEvent) {
|
|
35573
|
+
mouseDownEvent.preventDefault();
|
|
35574
|
+
var startWidth = toolBar.width;
|
|
35052
35575
|
var startPosition = {
|
|
35053
35576
|
x: mouseDownEvent.pageX,
|
|
35054
35577
|
y: mouseDownEvent.pageY
|
|
35055
35578
|
};
|
|
35056
|
-
setMouseDown(true);
|
|
35057
35579
|
function onMouseMove(mouseMoveEvent) {
|
|
35058
|
-
|
|
35580
|
+
mouseMoveEvent.preventDefault();
|
|
35581
|
+
if (position === 'bottom') {
|
|
35582
|
+
toolBar.width = startWidth + startPosition.y - mouseMoveEvent.pageY;
|
|
35583
|
+
} else {
|
|
35584
|
+
toolBar.width = startWidth + startPosition.x - mouseMoveEvent.pageX;
|
|
35585
|
+
}
|
|
35059
35586
|
}
|
|
35060
35587
|
function onMouseUp() {
|
|
35061
|
-
setMouseDown(false);
|
|
35062
35588
|
document.body.removeEventListener('mousemove', onMouseMove);
|
|
35063
35589
|
}
|
|
35064
35590
|
document.body.addEventListener('mousemove', onMouseMove);
|
|
@@ -35066,91 +35592,115 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
35066
35592
|
once: true
|
|
35067
35593
|
});
|
|
35068
35594
|
};
|
|
35069
|
-
|
|
35070
|
-
|
|
35071
|
-
return
|
|
35072
|
-
}
|
|
35073
|
-
|
|
35074
|
-
|
|
35075
|
-
|
|
35076
|
-
|
|
35077
|
-
|
|
35078
|
-
|
|
35079
|
-
}
|
|
35080
|
-
|
|
35081
|
-
|
|
35082
|
-
|
|
35595
|
+
return /*#__PURE__*/jsxs("div", {
|
|
35596
|
+
ref: function ref(el) {
|
|
35597
|
+
return toolBar.toolbarElement = el;
|
|
35598
|
+
},
|
|
35599
|
+
className: classnames(_defineProperty(_defineProperty({}, right, position === 'right'), bottom, position === 'bottom')),
|
|
35600
|
+
style: {
|
|
35601
|
+
position: 'relative',
|
|
35602
|
+
display: toolBar.tools.length === 0 ? 'none' : 'flex',
|
|
35603
|
+
flexDirection: position === 'right' ? 'row' : 'column-reverse',
|
|
35604
|
+
height: !toolBar.pinned && position === 'bottom' ? 5 : undefined
|
|
35605
|
+
},
|
|
35606
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
35607
|
+
className: draghandle,
|
|
35608
|
+
onMouseDown: onMouseDown,
|
|
35609
|
+
style: {
|
|
35610
|
+
left: position === 'right' && !toolBar.pinned ? toolBar.width * -1 - 1 : undefined,
|
|
35611
|
+
top: position === 'bottom' && !toolBar.pinned ? toolBar.width * -1 - 31 : undefined
|
|
35612
|
+
},
|
|
35613
|
+
children: /*#__PURE__*/jsx("div", {
|
|
35614
|
+
className: midHandle
|
|
35615
|
+
})
|
|
35616
|
+
}), !toolBar.hidden && toolBar.currentOpenTool && /*#__PURE__*/jsx("div", {
|
|
35617
|
+
className: classnames(container$1, _defineProperty({}, unpinnedRight, !toolBar.pinned && position === 'right')),
|
|
35618
|
+
hidden: toolBar.hidden,
|
|
35619
|
+
style: {
|
|
35620
|
+
width: position === 'right' ? toolBar.width : undefined,
|
|
35621
|
+
minWidth: position === 'right' ? toolBar.width : undefined,
|
|
35622
|
+
height: position === 'bottom' ? toolBar.width : undefined,
|
|
35623
|
+
minHeight: position === 'bottom' ? toolBar.width : undefined
|
|
35624
|
+
},
|
|
35625
|
+
children: /*#__PURE__*/jsx(ToolElement, {
|
|
35626
|
+
tool: toolBar.currentOpenTool,
|
|
35627
|
+
toolbar: toolBar,
|
|
35628
|
+
loading: toolBar.isLoading(toolBar.currentOpenTool.id)
|
|
35629
|
+
})
|
|
35630
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
35631
|
+
className: classnames(toolsSelector),
|
|
35632
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
35633
|
+
children: [!toolBar.pinned && /*#__PURE__*/jsx(PushpinOutlined, {
|
|
35634
|
+
onClick: function onClick() {
|
|
35635
|
+
return toolBar.pinned = !toolBar.pinned;
|
|
35636
|
+
},
|
|
35637
|
+
className: button
|
|
35638
|
+
}), toolBar.pinned && /*#__PURE__*/jsx(PushpinFilled, {
|
|
35639
|
+
onClick: function onClick() {
|
|
35640
|
+
return toolBar.pinned = !toolBar.pinned;
|
|
35641
|
+
},
|
|
35642
|
+
className: button,
|
|
35643
|
+
rotate: 315
|
|
35644
|
+
})]
|
|
35645
|
+
}), toolBar.tools.map(function (t) {
|
|
35646
|
+
var _toolBar$currentOpenT;
|
|
35647
|
+
return /*#__PURE__*/jsx("div", {
|
|
35648
|
+
className: classnames(toolItem, _defineProperty({}, sel, t.id === ((_toolBar$currentOpenT = toolBar.currentOpenTool) === null || _toolBar$currentOpenT === void 0 ? void 0 : _toolBar$currentOpenT.id))),
|
|
35649
|
+
onClick: function onClick() {
|
|
35650
|
+
var _toolBar$currentOpenT2;
|
|
35651
|
+
if (((_toolBar$currentOpenT2 = toolBar.currentOpenTool) === null || _toolBar$currentOpenT2 === void 0 ? void 0 : _toolBar$currentOpenT2.id) != t.id) {
|
|
35652
|
+
toolBar.openTool(t.id);
|
|
35653
|
+
toolBar.hidden = false;
|
|
35654
|
+
} else {
|
|
35655
|
+
toolBar.hidden = !toolBar.hidden;
|
|
35656
|
+
}
|
|
35657
|
+
},
|
|
35658
|
+
children: t.name
|
|
35659
|
+
}, t.id);
|
|
35660
|
+
})]
|
|
35661
|
+
})]
|
|
35083
35662
|
});
|
|
35084
|
-
|
|
35085
|
-
|
|
35663
|
+
};
|
|
35664
|
+
var Toolbar$1 = observer(Toolbar);
|
|
35665
|
+
function ToolElement(_ref2) {
|
|
35666
|
+
var _tool$element;
|
|
35667
|
+
var tool = _ref2.tool,
|
|
35668
|
+
toolbar = _ref2.toolbar,
|
|
35669
|
+
loading = _ref2.loading;
|
|
35670
|
+
var Tool = (_tool$element = tool.element) !== null && _tool$element !== void 0 ? _tool$element : /*#__PURE__*/jsx(Fragment, {});
|
|
35671
|
+
switch (tool.type) {
|
|
35086
35672
|
case 'Configurator':
|
|
35087
|
-
|
|
35673
|
+
Tool = /*#__PURE__*/jsx(Wsyiwyg, {
|
|
35088
35674
|
tool: tool,
|
|
35089
|
-
|
|
35675
|
+
toolbar: toolbar
|
|
35090
35676
|
});
|
|
35091
35677
|
break;
|
|
35092
35678
|
case 'ContentItem':
|
|
35093
|
-
|
|
35679
|
+
Tool = /*#__PURE__*/jsx(WsyiwygContentItem, {
|
|
35094
35680
|
tool: tool,
|
|
35095
|
-
|
|
35681
|
+
toolbar: toolbar
|
|
35096
35682
|
});
|
|
35097
35683
|
break;
|
|
35098
35684
|
}
|
|
35099
|
-
|
|
35100
|
-
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35106
|
-
|
|
35107
|
-
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
|
|
35111
|
-
|
|
35112
|
-
|
|
35113
|
-
|
|
35114
|
-
}
|
|
35115
|
-
}, [root.contentStore.tools]);
|
|
35116
|
-
if (root.contentStore.tools.length === 0) return /*#__PURE__*/jsx(Fragment, {});
|
|
35117
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
35118
|
-
children: [ToolElement && /*#__PURE__*/jsxs("div", {
|
|
35119
|
-
className: classnames(container, root.contentStore.toolPinned ? pinned : undefined),
|
|
35120
|
-
hidden: root.contentStore.hideTools,
|
|
35121
|
-
style: _objectSpread$2({
|
|
35122
|
-
width: width
|
|
35123
|
-
}, tool !== null && tool !== void 0 && tool.offsetRight ? {
|
|
35124
|
-
right: tool.offsetRight
|
|
35125
|
-
} : {}),
|
|
35126
|
-
children: [/*#__PURE__*/jsx(Spinner$1, {}), ToolElement, /*#__PURE__*/jsx("div", {
|
|
35127
|
-
className: draghandle,
|
|
35128
|
-
onMouseDown: handler,
|
|
35129
|
-
children: /*#__PURE__*/jsx("div", {
|
|
35130
|
-
className: midHandle
|
|
35131
|
-
})
|
|
35132
|
-
})]
|
|
35133
|
-
}), /*#__PURE__*/jsx("div", {
|
|
35134
|
-
className: toolsSelector,
|
|
35135
|
-
children: root.contentStore.tools.map(function (t) {
|
|
35136
|
-
return /*#__PURE__*/jsx("div", {
|
|
35137
|
-
className: classnames(toolItem, t.id === root.contentStore.openedToolId ? sel : undefined),
|
|
35138
|
-
onClick: function onClick() {
|
|
35139
|
-
if (root.contentStore.openedToolId != t.id) {
|
|
35140
|
-
root.contentStore.openedToolId = t.id;
|
|
35141
|
-
root.contentStore.toolPinned = !!t.defaultPinned;
|
|
35142
|
-
root.contentStore.hideTools = false;
|
|
35143
|
-
} else {
|
|
35144
|
-
root.contentStore.hideTools = !root.contentStore.hideTools;
|
|
35145
|
-
}
|
|
35146
|
-
},
|
|
35147
|
-
children: t.name
|
|
35148
|
-
}, t.id);
|
|
35685
|
+
return /*#__PURE__*/jsx(Layout$1, {
|
|
35686
|
+
style: {
|
|
35687
|
+
height: '100%',
|
|
35688
|
+
width: '100%'
|
|
35689
|
+
},
|
|
35690
|
+
children: /*#__PURE__*/jsx(Spin$1, {
|
|
35691
|
+
spinning: loading,
|
|
35692
|
+
size: "large",
|
|
35693
|
+
children: /*#__PURE__*/jsx(Layout$1.Content, {
|
|
35694
|
+
style: {
|
|
35695
|
+
height: '100%',
|
|
35696
|
+
width: '100%',
|
|
35697
|
+
padding: 32
|
|
35698
|
+
},
|
|
35699
|
+
children: Tool
|
|
35149
35700
|
})
|
|
35150
|
-
})
|
|
35701
|
+
})
|
|
35151
35702
|
});
|
|
35152
|
-
}
|
|
35153
|
-
var Toolbar$1 = observer(Toolbar);
|
|
35703
|
+
}
|
|
35154
35704
|
|
|
35155
35705
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35156
35706
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -35216,10 +35766,10 @@ var MainLayout = function MainLayout() {
|
|
|
35216
35766
|
position: 'relative',
|
|
35217
35767
|
overflowX: 'hidden'
|
|
35218
35768
|
},
|
|
35219
|
-
children: [/*#__PURE__*/jsx(Navigation, {}), /*#__PURE__*/
|
|
35769
|
+
children: [/*#__PURE__*/jsx(Navigation, {}), /*#__PURE__*/jsxs(Layout, {
|
|
35220
35770
|
className: layout,
|
|
35221
35771
|
ref: containerRef,
|
|
35222
|
-
children: /*#__PURE__*/jsxs(ErrorBoundary, {
|
|
35772
|
+
children: [/*#__PURE__*/jsxs(ErrorBoundary, {
|
|
35223
35773
|
children: [/*#__PURE__*/jsx("div", {
|
|
35224
35774
|
className: contentWrapper,
|
|
35225
35775
|
children: /*#__PURE__*/jsx(Router$1, {})
|
|
@@ -35229,8 +35779,12 @@ var MainLayout = function MainLayout() {
|
|
|
35229
35779
|
container: containerRef,
|
|
35230
35780
|
left: true
|
|
35231
35781
|
})]
|
|
35232
|
-
})
|
|
35233
|
-
|
|
35782
|
+
}), /*#__PURE__*/jsx(Toolbar$1, {
|
|
35783
|
+
position: "bottom"
|
|
35784
|
+
})]
|
|
35785
|
+
}), /*#__PURE__*/jsx(Toolbar$1, {
|
|
35786
|
+
position: "right"
|
|
35787
|
+
}), /*#__PURE__*/jsx(Modal$1, {})]
|
|
35234
35788
|
})
|
|
35235
35789
|
});
|
|
35236
35790
|
};
|