@vendure/admin-ui 1.4.6 → 1.4.7
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/bundles/vendure-admin-ui-catalog.umd.js +67 -27
- package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-core.umd.js +46 -12
- package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-settings.umd.js +1 -1
- package/bundles/vendure-admin-ui-settings.umd.js.map +1 -1
- package/catalog/components/facet-detail/facet-detail.component.d.ts +7 -2
- package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
- package/core/common/generated-types.d.ts +6 -6
- package/core/common/version.d.ts +1 -1
- package/core/data/utils/remove-readonly-custom-fields.d.ts +12 -3
- package/core/shared/directives/if-default-channel-active.directive.d.ts +1 -1
- package/core/shared/directives/if-multichannel.directive.d.ts +1 -1
- package/core/vendure-admin-ui-core.metadata.json +1 -1
- package/esm2015/catalog/components/facet-detail/facet-detail.component.js +44 -16
- package/esm2015/core/common/generated-types.js +1 -1
- package/esm2015/core/common/utilities/create-updated-translatable.js +1 -1
- package/esm2015/core/common/version.js +2 -2
- package/esm2015/core/data/utils/remove-readonly-custom-fields.js +15 -3
- package/esm2015/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.js +3 -2
- package/esm2015/core/shared/directives/if-default-channel-active.directive.js +2 -2
- package/esm2015/core/shared/directives/if-multichannel.directive.js +2 -2
- package/esm2015/settings/components/channel-list/channel-list.component.js +2 -2
- package/fesm2015/vendure-admin-ui-catalog.js +43 -15
- package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
- package/fesm2015/vendure-admin-ui-core.js +19 -6
- package/fesm2015/vendure-admin-ui-core.js.map +1 -1
- package/fesm2015/vendure-admin-ui-settings.js +1 -1
- package/fesm2015/vendure-admin-ui-settings.js.map +1 -1
- package/package.json +11 -11
- package/settings/vendure-admin-ui-settings.metadata.json +1 -1
|
@@ -932,13 +932,46 @@
|
|
|
932
932
|
* To be used before submitting the entity for a create or update request.
|
|
933
933
|
*/
|
|
934
934
|
function removeReadonlyCustomFields(variables, customFieldConfig) {
|
|
935
|
-
|
|
936
|
-
|
|
935
|
+
var e_2, _a, e_3, _b;
|
|
936
|
+
if (!Array.isArray(variables)) {
|
|
937
|
+
if (Array.isArray(variables.input)) {
|
|
938
|
+
try {
|
|
939
|
+
for (var _c = __values(variables.input), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
940
|
+
var input = _d.value;
|
|
941
|
+
removeReadonly(input, customFieldConfig);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
945
|
+
finally {
|
|
946
|
+
try {
|
|
947
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
948
|
+
}
|
|
949
|
+
finally { if (e_2) throw e_2.error; }
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
removeReadonly(variables.input, customFieldConfig);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
try {
|
|
958
|
+
for (var variables_1 = __values(variables), variables_1_1 = variables_1.next(); !variables_1_1.done; variables_1_1 = variables_1.next()) {
|
|
959
|
+
var input = variables_1_1.value;
|
|
960
|
+
removeReadonly(input, customFieldConfig);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
964
|
+
finally {
|
|
965
|
+
try {
|
|
966
|
+
if (variables_1_1 && !variables_1_1.done && (_b = variables_1.return)) _b.call(variables_1);
|
|
967
|
+
}
|
|
968
|
+
finally { if (e_3) throw e_3.error; }
|
|
969
|
+
}
|
|
937
970
|
}
|
|
938
971
|
return removeReadonly(variables, customFieldConfig);
|
|
939
972
|
}
|
|
940
973
|
function removeReadonly(input, customFieldConfig) {
|
|
941
|
-
var
|
|
974
|
+
var e_4, _a, e_5, _b;
|
|
942
975
|
try {
|
|
943
976
|
for (var customFieldConfig_1 = __values(customFieldConfig), customFieldConfig_1_1 = customFieldConfig_1.next(); !customFieldConfig_1_1.done; customFieldConfig_1_1 = customFieldConfig_1.next()) {
|
|
944
977
|
var field = customFieldConfig_1_1.value;
|
|
@@ -946,7 +979,7 @@
|
|
|
946
979
|
if (field.type === 'localeString') {
|
|
947
980
|
if (hasTranslations(input)) {
|
|
948
981
|
try {
|
|
949
|
-
for (var _c = (
|
|
982
|
+
for (var _c = (e_5 = void 0, __values(input.translations)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
950
983
|
var translation = _d.value;
|
|
951
984
|
if (hasCustomFields$1(translation) &&
|
|
952
985
|
translation.customFields[field.name] !== undefined) {
|
|
@@ -954,12 +987,12 @@
|
|
|
954
987
|
}
|
|
955
988
|
}
|
|
956
989
|
}
|
|
957
|
-
catch (
|
|
990
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
958
991
|
finally {
|
|
959
992
|
try {
|
|
960
993
|
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
961
994
|
}
|
|
962
|
-
finally { if (
|
|
995
|
+
finally { if (e_5) throw e_5.error; }
|
|
963
996
|
}
|
|
964
997
|
}
|
|
965
998
|
}
|
|
@@ -971,12 +1004,12 @@
|
|
|
971
1004
|
}
|
|
972
1005
|
}
|
|
973
1006
|
}
|
|
974
|
-
catch (
|
|
1007
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
975
1008
|
finally {
|
|
976
1009
|
try {
|
|
977
1010
|
if (customFieldConfig_1_1 && !customFieldConfig_1_1.done && (_a = customFieldConfig_1.return)) _a.call(customFieldConfig_1);
|
|
978
1011
|
}
|
|
979
|
-
finally { if (
|
|
1012
|
+
finally { if (e_4) throw e_4.error; }
|
|
980
1013
|
}
|
|
981
1014
|
return input;
|
|
982
1015
|
}
|
|
@@ -11304,7 +11337,8 @@
|
|
|
11304
11337
|
this.tabbedCustomFields = this.groupByTabs(this.customFields);
|
|
11305
11338
|
};
|
|
11306
11339
|
TabbedCustomFieldsComponent.prototype.customFieldIsSet = function (name) {
|
|
11307
|
-
|
|
11340
|
+
var _a;
|
|
11341
|
+
return !!((_a = this.customFieldsFormGroup) === null || _a === void 0 ? void 0 : _a.get(name));
|
|
11308
11342
|
};
|
|
11309
11343
|
TabbedCustomFieldsComponent.prototype.groupByTabs = function (customFieldConfigs) {
|
|
11310
11344
|
var e_1, _d;
|
|
@@ -11659,7 +11693,7 @@
|
|
|
11659
11693
|
}
|
|
11660
11694
|
Object.defineProperty(IfDefaultChannelActiveDirective.prototype, "vdrIfMultichannelElse", {
|
|
11661
11695
|
/**
|
|
11662
|
-
* A template to show if the current user does not have the
|
|
11696
|
+
* A template to show if the current user does not have the specified permission.
|
|
11663
11697
|
*/
|
|
11664
11698
|
set: function (templateRef) {
|
|
11665
11699
|
this.setElseTemplate(templateRef);
|
|
@@ -11718,7 +11752,7 @@
|
|
|
11718
11752
|
}
|
|
11719
11753
|
Object.defineProperty(IfMultichannelDirective.prototype, "vdrIfMultichannelElse", {
|
|
11720
11754
|
/**
|
|
11721
|
-
* A template to show if the current user does not have the
|
|
11755
|
+
* A template to show if the current user does not have the specified permission.
|
|
11722
11756
|
*/
|
|
11723
11757
|
set: function (templateRef) {
|
|
11724
11758
|
this.setElseTemplate(templateRef);
|
|
@@ -14012,7 +14046,7 @@
|
|
|
14012
14046
|
}
|
|
14013
14047
|
|
|
14014
14048
|
// Auto-generated by the set-version.js script.
|
|
14015
|
-
var ADMIN_UI_VERSION = '1.4.
|
|
14049
|
+
var ADMIN_UI_VERSION = '1.4.7';
|
|
14016
14050
|
|
|
14017
14051
|
/**
|
|
14018
14052
|
* Responsible for registering dashboard widget components and querying for layouts.
|