@crystaldesign/diva-backoffice 26.5.0-beta.26 → 26.5.0-beta.28
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
CHANGED
|
@@ -10407,6 +10407,15 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
10407
10407
|
value: 'Video',
|
|
10408
10408
|
label: 'Video'
|
|
10409
10409
|
}]
|
|
10410
|
+
}, {
|
|
10411
|
+
name: 'image',
|
|
10412
|
+
hidden: true
|
|
10413
|
+
}, {
|
|
10414
|
+
name: 'mediaItemRefImage',
|
|
10415
|
+
hidden: true
|
|
10416
|
+
}, {
|
|
10417
|
+
name: 'mediaItemImage',
|
|
10418
|
+
hidden: true
|
|
10410
10419
|
}, {
|
|
10411
10420
|
name: 'mediaItemImage',
|
|
10412
10421
|
type: 'media',
|
|
@@ -19128,7 +19137,6 @@ var FormList$2 = function FormList(_ref) {
|
|
|
19128
19137
|
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
|
|
19129
19138
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
19130
19139
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
19131
|
-
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
19132
19140
|
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$1l(_objectSpread$1l({}, restField), {}, {
|
|
19133
19141
|
id: n.join(),
|
|
19134
19142
|
key: n.join(),
|
|
@@ -44873,6 +44881,8 @@ function ActionsForm(_ref) {
|
|
|
44873
44881
|
var _Form$useForm = Form$2.useForm(),
|
|
44874
44882
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
44875
44883
|
form = _Form$useForm2[0];
|
|
44884
|
+
var watchedActionType = Form$2.useWatch('actionType', form);
|
|
44885
|
+
var watchedFeatureNo = Form$2.useWatch('featureNo', form);
|
|
44876
44886
|
var _useTranslation = useTranslation(),
|
|
44877
44887
|
t = _useTranslation.t,
|
|
44878
44888
|
i18n = _useTranslation.i18n;
|
|
@@ -44911,11 +44921,23 @@ function ActionsForm(_ref) {
|
|
|
44911
44921
|
read: "".concat(idmService, "/catalogs/").concat(catalogId, "/decisions")
|
|
44912
44922
|
};
|
|
44913
44923
|
}, [catalogId, idmService]);
|
|
44914
|
-
var
|
|
44924
|
+
var optionsBaseRead = useMemo(function () {
|
|
44915
44925
|
return {
|
|
44916
44926
|
read: "".concat(idmService, "/catalogs/").concat(catalogId, "/options")
|
|
44917
44927
|
};
|
|
44918
44928
|
}, [catalogId, idmService]);
|
|
44929
|
+
|
|
44930
|
+
/** When editing SET_FEATURE*, limit option reference choices to options of the selected target feature. */
|
|
44931
|
+
var optionsReadForOptionRef = useMemo(function () {
|
|
44932
|
+
var setFeature = watchedActionType === null || watchedActionType === void 0 ? void 0 : watchedActionType.startsWith('SET_FEATURE');
|
|
44933
|
+
var featureNo = setFeature ? toLookupScalar(watchedFeatureNo) : undefined;
|
|
44934
|
+
if (featureNo) {
|
|
44935
|
+
return {
|
|
44936
|
+
read: "".concat(idmService, "/catalogs/").concat(catalogId, "/options?filter=featureNos==").concat(encodeURIComponent(featureNo))
|
|
44937
|
+
};
|
|
44938
|
+
}
|
|
44939
|
+
return optionsBaseRead;
|
|
44940
|
+
}, [catalogId, idmService, optionsBaseRead, watchedActionType, watchedFeatureNo]);
|
|
44919
44941
|
var allFeaturesRead = useMemo(function () {
|
|
44920
44942
|
return {
|
|
44921
44943
|
read: "".concat(idmService, "/catalogs/").concat(catalogId, "/allfeatures")
|
|
@@ -44972,6 +44994,11 @@ function ActionsForm(_ref) {
|
|
|
44972
44994
|
};
|
|
44973
44995
|
});
|
|
44974
44996
|
}, [t]);
|
|
44997
|
+
var optionRefNeedsFeatureHint = useMemo(function () {
|
|
44998
|
+
return t("".concat(ACTIONS_FORM_I18N, ".hint.optionRefNeedsFeature"), {
|
|
44999
|
+
defaultValue: 'Select a feature first. Options are filtered by the chosen feature.'
|
|
45000
|
+
});
|
|
45001
|
+
}, [t]);
|
|
44975
45002
|
var referenceTypeChoiceOptions = useMemo(function () {
|
|
44976
45003
|
return Object.entries(REFERENCE_TYPES).map(function (_ref4) {
|
|
44977
45004
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
@@ -45144,6 +45171,14 @@ function ActionsForm(_ref) {
|
|
|
45144
45171
|
value: undefined
|
|
45145
45172
|
}]);
|
|
45146
45173
|
}
|
|
45174
|
+
} else if (fieldName === 'featureNo') {
|
|
45175
|
+
var at = form.getFieldValue('actionType');
|
|
45176
|
+
if (at !== null && at !== void 0 && at.startsWith('SET_FEATURE')) {
|
|
45177
|
+
form.setFields([{
|
|
45178
|
+
name: 'optionRefNo',
|
|
45179
|
+
value: undefined
|
|
45180
|
+
}]);
|
|
45181
|
+
}
|
|
45147
45182
|
}
|
|
45148
45183
|
}, [form]);
|
|
45149
45184
|
var handleFinish = useCallback(function () {
|
|
@@ -45164,6 +45199,7 @@ function ActionsForm(_ref) {
|
|
|
45164
45199
|
applySerializeErrors(model, ser.reason);
|
|
45165
45200
|
}, [applySerializeErrors, form, onSave, t]);
|
|
45166
45201
|
var renderReferenceField = useCallback(function (refType) {
|
|
45202
|
+
var _toLookupScalar;
|
|
45167
45203
|
var fieldMap = _defineProperty(_defineProperty(_defineProperty({}, REFERENCE_TYPES.FEATURE_REF, {
|
|
45168
45204
|
name: 'featureRefNo',
|
|
45169
45205
|
labelKey: 'featureReference'
|
|
@@ -45184,20 +45220,23 @@ function ActionsForm(_ref) {
|
|
|
45184
45220
|
children: /*#__PURE__*/jsx(Input$1, {})
|
|
45185
45221
|
});
|
|
45186
45222
|
}
|
|
45223
|
+
var optionRefNeedsFeature = refType === REFERENCE_TYPES.OPTION_REF && (watchedActionType === null || watchedActionType === void 0 ? void 0 : watchedActionType.startsWith('SET_FEATURE')) && !toLookupScalar(watchedFeatureNo);
|
|
45187
45224
|
return /*#__PURE__*/jsx(Form$2.Item, {
|
|
45188
45225
|
name: field.name,
|
|
45189
45226
|
label: label,
|
|
45190
45227
|
rules: requiredRules.select(field.labelKey),
|
|
45228
|
+
extra: optionRefNeedsFeature ? optionRefNeedsFeatureHint : undefined,
|
|
45191
45229
|
children: /*#__PURE__*/jsx(LookupSelect, {
|
|
45192
45230
|
mode: "single",
|
|
45193
45231
|
search: true,
|
|
45194
45232
|
minWidth: "100%",
|
|
45195
|
-
|
|
45233
|
+
disabled: optionRefNeedsFeature,
|
|
45234
|
+
apiInterface: refType === REFERENCE_TYPES.OPTION_REF ? optionsReadForOptionRef : allFeaturesRead,
|
|
45196
45235
|
selectMapping: refType === REFERENCE_TYPES.OPTION_REF ? optionSelectMapping : featureSelectMapping,
|
|
45197
45236
|
useValueAsData: true
|
|
45198
|
-
})
|
|
45237
|
+
}, refType === REFERENCE_TYPES.OPTION_REF ? "option-ref-".concat((_toLookupScalar = toLookupScalar(watchedFeatureNo)) !== null && _toLookupScalar !== void 0 ? _toLookupScalar : '') : undefined)
|
|
45199
45238
|
});
|
|
45200
|
-
}, [allFeaturesRead, fieldLabel, optionSelectMapping,
|
|
45239
|
+
}, [allFeaturesRead, fieldLabel, optionRefNeedsFeatureHint, optionSelectMapping, optionsReadForOptionRef, featureSelectMapping, requiredRules, watchedActionType, watchedFeatureNo]);
|
|
45201
45240
|
var editingLegacySetMessage = (value === null || value === void 0 ? void 0 : value.actionType) === ACTION_TYPES.SET_MESSAGE;
|
|
45202
45241
|
return /*#__PURE__*/jsxs("div", {
|
|
45203
45242
|
className: formContainer,
|
|
@@ -45285,7 +45324,7 @@ function ActionsForm(_ref) {
|
|
|
45285
45324
|
}), /*#__PURE__*/jsx(Form$2.Item, {
|
|
45286
45325
|
noStyle: true,
|
|
45287
45326
|
shouldUpdate: function shouldUpdate(prev, curr) {
|
|
45288
|
-
return prev.referenceType !== curr.referenceType || prev.actionType !== curr.actionType;
|
|
45327
|
+
return prev.referenceType !== curr.referenceType || prev.actionType !== curr.actionType || prev.featureNo !== curr.featureNo;
|
|
45289
45328
|
},
|
|
45290
45329
|
children: function children(_ref7) {
|
|
45291
45330
|
var getFieldValue = _ref7.getFieldValue;
|
|
@@ -49863,7 +49902,6 @@ var SERVICES = [{
|
|
|
49863
49902
|
urlKey: 'reportService',
|
|
49864
49903
|
runtime: 'dotnet',
|
|
49865
49904
|
pingPath: '/ping',
|
|
49866
|
-
refreshPath: '/Report/cache/invalidate',
|
|
49867
49905
|
noStats: true
|
|
49868
49906
|
}, {
|
|
49869
49907
|
key: 'idm',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/Form/Fields/FormList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAQ,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAgB,YAAY,EAAW,MAAM,MAAM,CAAC;AAI3D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,SAAS,MAAM,6BAA6B,CAAC;+GAcjD;IACD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,GAAG,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3C,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5C;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/Form/Fields/FormList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAQ,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAgB,YAAY,EAAW,MAAM,MAAM,CAAC;AAI3D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,SAAS,MAAM,6BAA6B,CAAC;+GAcjD;IACD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,GAAG,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3C,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5C;;;AA8ED,wBAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsForm.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/Tables/OptionCombinations/ActionsForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EAOL,KAAK,YAAY,EAGlB,MAAM,gBAAgB,CAAC;AA+DxB,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ActionsForm.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/Tables/OptionCombinations/ActionsForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EAOL,KAAK,YAAY,EAGlB,MAAM,gBAAgB,CAAC;AA+DxB,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,qBAib/F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "26.5.0-beta.
|
|
3
|
+
"version": "26.5.0-beta.28",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@ant-design/icons": "6.1.0",
|
|
17
17
|
"@babel/runtime": "7.24.7",
|
|
18
|
-
"@crystaldesign/content-box": "26.5.0-beta.
|
|
19
|
-
"@crystaldesign/content-item": "26.5.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "26.5.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "26.5.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "26.5.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "26.5.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "26.5.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "26.5.0-beta.28",
|
|
19
|
+
"@crystaldesign/content-item": "26.5.0-beta.28",
|
|
20
|
+
"@crystaldesign/diva-core": "26.5.0-beta.28",
|
|
21
|
+
"@crystaldesign/diva-utils": "26.5.0-beta.28",
|
|
22
|
+
"@crystaldesign/media-upload": "26.5.0-beta.28",
|
|
23
|
+
"@crystaldesign/rtf-editor": "26.5.0-beta.28",
|
|
24
|
+
"@crystaldesign/spreadsheet": "26.5.0-beta.28",
|
|
25
25
|
"@google/genai": "^1.22.0",
|
|
26
26
|
"@google/model-viewer": "3.5.0",
|
|
27
27
|
"ag-charts-community": "^10.1.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
},
|
|
54
54
|
"module": "build/esm/index.js",
|
|
55
55
|
"types": "./build/types/backoffice/src/index.d.ts",
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "c4145b5bfc502fb91d1354bcea015c1fc5037a12"
|
|
57
57
|
}
|