@commercetools-frontend/application-shell 22.30.3 → 22.32.0
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/dist/{application-entry-point-2365588d.esm.js → application-entry-point-44f059a0.esm.js} +3 -3
- package/dist/{application-entry-point-257a1cbc.cjs.prod.js → application-entry-point-654951a6.cjs.prod.js} +2 -2
- package/dist/{application-entry-point-a403a123.cjs.dev.js → application-entry-point-c2f77f23.cjs.dev.js} +3 -3
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +11 -5
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +11 -5
- package/dist/commercetools-frontend-application-shell.esm.js +5 -5
- package/dist/{custom-view-dev-host-4e28e0f9.cjs.prod.js → custom-view-dev-host-50d585ab.cjs.prod.js} +12 -16
- package/dist/{custom-view-dev-host-e57a61c2.esm.js → custom-view-dev-host-8c058d60.esm.js} +12 -15
- package/dist/{custom-view-dev-host-2cc66e5d.cjs.dev.js → custom-view-dev-host-d7d6a676.cjs.dev.js} +12 -16
- package/dist/declarations/src/components/application-page-title/application-page-title.d.ts +16 -0
- package/dist/declarations/src/components/application-shell/application-shell.d.ts +17 -0
- package/dist/declarations/src/components/application-shell-authenticated/application-shell-authenticated.d.ts +4 -0
- package/dist/declarations/src/components/navbar/menu-items.d.ts +1 -0
- package/dist/declarations/src/components/navbar/menu-items.styles.d.ts +5 -1
- package/dist/declarations/src/components/navbar/navbar.d.ts +4 -0
- package/dist/declarations/src/components/navbar/use-navbar-state-manager.d.ts +6 -0
- package/dist/declarations/src/components/workspaces-navigation-button/index.d.ts +1 -0
- package/dist/declarations/src/components/workspaces-navigation-button/messages.d.ts +8 -0
- package/dist/declarations/src/components/workspaces-navigation-button/workspaces-navigation-button.d.ts +3 -0
- package/dist/declarations/src/configure-store.d.ts +3 -0
- package/dist/declarations/src/hooks/use-routes-creator/use-routes-creator.d.ts +3 -0
- package/dist/declarations/src/index.d.ts +16 -1
- package/dist/declarations/src/types/generated/ctp.d.ts +562 -0
- package/dist/declarations/src/types/generated/mc.d.ts +5 -0
- package/dist/declarations/src/types/generated/proxy.d.ts +3 -0
- package/dist/declarations/src/types/generated/settings.d.ts +22 -0
- package/dist/declarations/src/utils/get-mc-origin/get-mc-origin.d.ts +16 -0
- package/dist/{index-01054d41.esm.js → index-30d34b7f.esm.js} +185 -154
- package/dist/{index-986cb2e3.cjs.prod.js → index-312ee159.cjs.prod.js} +175 -144
- package/dist/{index-9ad54c23.cjs.dev.js → index-89389085.cjs.dev.js} +190 -153
- package/dist/{index-055ebc13.cjs.prod.js → index-91985d64.cjs.prod.js} +2 -2
- package/dist/{index-ca730730.cjs.dev.js → index-b1476d46.cjs.dev.js} +2 -2
- package/dist/{index-4e5248df.esm.js → index-b6081c20.esm.js} +2 -2
- package/dist/navbar-3b9c6b6b.esm.js +1394 -0
- package/dist/{navbar-ced649a9.cjs.prod.js → navbar-9da45ea7.cjs.prod.js} +172 -111
- package/dist/navbar-b18bb556.cjs.dev.js +1426 -0
- package/dist/oidc-6c6599a2.cjs.dev.js +98 -0
- package/dist/oidc-8275c04f.esm.js +84 -0
- package/dist/{oidc-callback-64f9a790.cjs.prod.js → oidc-callback-0e597d85.cjs.prod.js} +11 -12
- package/dist/{oidc-callback-bc478925.esm.js → oidc-callback-427bb1fe.esm.js} +11 -12
- package/dist/{oidc-callback-651f63e0.cjs.dev.js → oidc-callback-cb22ccb9.cjs.dev.js} +11 -12
- package/dist/oidc-d02d4ab8.cjs.prod.js +98 -0
- package/dist/{project-container-7b970853.cjs.prod.js → project-container-8ea3157d.cjs.prod.js} +14 -16
- package/dist/{project-container-7f10329f.cjs.dev.js → project-container-a3583d97.cjs.dev.js} +14 -16
- package/dist/{project-container-e9061cf4.esm.js → project-container-e40ef9d5.esm.js} +14 -16
- package/dist/{project-expired-7b154842.cjs.dev.js → project-expired-5fcc5f07.cjs.dev.js} +8 -8
- package/dist/{project-expired-1cb50976.esm.js → project-expired-d577ae18.esm.js} +8 -8
- package/dist/{project-expired-08aee9c1.cjs.prod.js → project-expired-dfccc21f.cjs.prod.js} +8 -8
- package/dist/{project-not-found-d1bc7cf2.cjs.prod.js → project-not-found-2278758f.cjs.prod.js} +7 -7
- package/dist/{project-not-found-1b3a3444.cjs.dev.js → project-not-found-4604d59d.cjs.dev.js} +7 -7
- package/dist/{project-not-found-3dc52680.esm.js → project-not-found-fd3a1f58.esm.js} +7 -7
- package/dist/{project-not-initialized-3ca17563.esm.js → project-not-initialized-b34c95c9.esm.js} +8 -8
- package/dist/{project-not-initialized-f314f99a.cjs.prod.js → project-not-initialized-cb1d4d19.cjs.prod.js} +8 -8
- package/dist/{project-not-initialized-72ca9efb.cjs.dev.js → project-not-initialized-d85c316d.cjs.dev.js} +8 -8
- package/dist/{project-suspended-944c20e8.esm.js → project-suspended-56e0ee3b.esm.js} +7 -7
- package/dist/{project-suspended-f767d4f0.cjs.dev.js → project-suspended-5e490e56.cjs.dev.js} +7 -7
- package/dist/{project-suspended-c5ae709a.cjs.prod.js → project-suspended-ec44d7fc.cjs.prod.js} +7 -7
- package/dist/{quick-access-ee9ef366.cjs.dev.js → quick-access-809ff4ff.cjs.dev.js} +204 -133
- package/dist/{quick-access-30cee256.esm.js → quick-access-a19e4dc0.esm.js} +204 -132
- package/dist/{quick-access-c4f74cba.cjs.prod.js → quick-access-cbb7a118.cjs.prod.js} +204 -133
- package/dist/{redirect-to-login-3ebce35d.cjs.dev.js → redirect-to-login-32ebe009.cjs.dev.js} +10 -13
- package/dist/{redirect-to-login-3c5a3f4a.cjs.prod.js → redirect-to-login-60a00442.cjs.prod.js} +10 -13
- package/dist/{redirect-to-login-af9860c8.esm.js → redirect-to-login-b69fb5ce.esm.js} +10 -13
- package/dist/{redirect-to-logout-e365ba72.cjs.prod.js → redirect-to-logout-1ffebbfe.cjs.prod.js} +9 -10
- package/dist/{redirect-to-logout-fff4cb7c.cjs.dev.js → redirect-to-logout-371cc9b1.cjs.dev.js} +9 -10
- package/dist/{redirect-to-logout-f3172701.esm.js → redirect-to-logout-7b502bb5.esm.js} +9 -10
- package/dist/{redirector-0a16c1d1.cjs.prod.js → redirector-01f35da8.cjs.prod.js} +3 -4
- package/dist/{redirector-d2fd2b5e.esm.js → redirector-76670a54.esm.js} +3 -4
- package/dist/{redirector-e58b9bc3.cjs.dev.js → redirector-98dfc5f0.cjs.dev.js} +3 -4
- package/dist/{requests-in-flight-loader-171a2177.cjs.prod.js → requests-in-flight-loader-49463178.cjs.prod.js} +7 -7
- package/dist/{requests-in-flight-loader-dd3f8cbb.cjs.dev.js → requests-in-flight-loader-7d5f946c.cjs.dev.js} +7 -7
- package/dist/{requests-in-flight-loader-acb4dbaa.esm.js → requests-in-flight-loader-e45b9001.esm.js} +7 -7
- package/dist/{service-page-project-switcher-6c523761.cjs.dev.js → service-page-project-switcher-679fa3be.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-65755fa9.esm.js → service-page-project-switcher-9bebaaa0.esm.js} +1 -1
- package/dist/{service-page-project-switcher-2b3f4d1d.cjs.prod.js → service-page-project-switcher-d3bc9ef6.cjs.prod.js} +1 -1
- package/dist/{use-applications-menu-2fe3d465.cjs.dev.js → use-applications-menu-222b9106.cjs.prod.js} +40 -49
- package/dist/{use-applications-menu-0d3f4ffc.cjs.prod.js → use-applications-menu-302a0ac8.cjs.dev.js} +40 -49
- package/dist/{use-applications-menu-03759eab.esm.js → use-applications-menu-b583e9c3.esm.js} +38 -46
- package/dist/{user-settings-menu-bbc43c88.cjs.dev.js → user-settings-menu-7c17f227.cjs.dev.js} +22 -29
- package/dist/{user-settings-menu-3f86267c.cjs.prod.js → user-settings-menu-8bba9f50.cjs.prod.js} +22 -29
- package/dist/{user-settings-menu-36bea559.esm.js → user-settings-menu-ff4a6c63.esm.js} +22 -29
- package/dist/{version-tracker-2ce61357.esm.js → version-tracker-58df65c0.esm.js} +6 -6
- package/dist/{version-tracker-ab883166.cjs.dev.js → version-tracker-66d5d210.cjs.dev.js} +6 -6
- package/dist/{version-tracker-b049fca7.cjs.prod.js → version-tracker-a984dbbe.cjs.prod.js} +6 -6
- package/package.json +17 -16
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +1 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +1 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +1 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +21 -26
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +21 -26
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +16 -20
- package/dist/navbar-e3ee2a76.esm.js +0 -1325
- package/dist/navbar-f981de75.cjs.dev.js +0 -1358
- package/dist/oidc-63e926e1.cjs.dev.js +0 -115
- package/dist/oidc-cfa56c46.cjs.prod.js +0 -115
- package/dist/oidc-ff53dfd3.esm.js +0 -100
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _taggedTemplateLiteral = require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
4
3
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
5
4
|
var _pt = require('prop-types');
|
|
6
5
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
7
6
|
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
8
7
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
9
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
10
8
|
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
11
9
|
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
12
10
|
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
@@ -40,11 +38,11 @@ var designSystem = require('@commercetools-uikit/design-system');
|
|
|
40
38
|
var icons = require('@commercetools-uikit/icons');
|
|
41
39
|
var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
|
|
42
40
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
43
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
41
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-89389085.cjs.dev.js');
|
|
44
42
|
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
45
43
|
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
46
44
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
47
|
-
require('./index-
|
|
45
|
+
require('./index-b1476d46.cjs.dev.js');
|
|
48
46
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
47
|
require('@babel/runtime-corejs3/core-js-stable/reflect/has');
|
|
50
48
|
require('@reduxjs/toolkit');
|
|
@@ -59,7 +57,7 @@ require('redux-logger');
|
|
|
59
57
|
require('@emotion/styled/base');
|
|
60
58
|
require('@commercetools-frontend/application-components');
|
|
61
59
|
require('@commercetools-frontend/i18n');
|
|
62
|
-
require('./oidc-
|
|
60
|
+
require('./oidc-6c6599a2.cjs.dev.js');
|
|
63
61
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
64
62
|
require('@commercetools-uikit/spacings');
|
|
65
63
|
require('@commercetools-uikit/flat-button');
|
|
@@ -69,6 +67,8 @@ require('react-select');
|
|
|
69
67
|
require('@commercetools-uikit/accessible-hidden');
|
|
70
68
|
require('@commercetools-uikit/select-input');
|
|
71
69
|
require('@commercetools-uikit/text');
|
|
70
|
+
require('@commercetools-uikit/secondary-button');
|
|
71
|
+
require('@commercetools-uikit/tooltip');
|
|
72
72
|
require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
73
73
|
require('@commercetools-frontend/browser-history');
|
|
74
74
|
require('@commercetools-frontend/l10n');
|
|
@@ -98,7 +98,6 @@ var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
|
98
98
|
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
99
99
|
var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
100
100
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
101
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
102
101
|
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
103
102
|
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
104
103
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
@@ -139,26 +138,26 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
139
138
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1dGxlci1jb21tYW5kLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQ2MiLCJmaWxlIjoiYnV0bGVyLWNvbW1hbmQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTW91c2VFdmVudEhhbmRsZXIgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjdXN0b21Qcm9wZXJ0aWVzIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvZGVzaWduLXN5c3RlbSc7XG5pbXBvcnQgeyBBbmdsZVRoaW5SaWdodEljb24gfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9pY29ucyc7XG5pbXBvcnQgdHlwZSB7IENvbW1hbmQgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIGNvbW1hbmQ6IENvbW1hbmQ7XG4gIGlzU2VsZWN0ZWQ/OiBib29sZWFuO1xuICBvbkNsaWNrOiBNb3VzZUV2ZW50SGFuZGxlcjxIVE1MRGl2RWxlbWVudD47XG4gIG9uTW91c2VFbnRlcjogTW91c2VFdmVudEhhbmRsZXI8SFRNTERpdkVsZW1lbnQ+O1xufTtcblxuY29uc3QgQnV0bGVyQ29tbWFuZCA9IChwcm9wczogUHJvcHMpID0+IChcbiAgPGRpdlxuICAgIGtleT17cHJvcHMuY29tbWFuZC5pZH1cbiAgICBkYXRhLXRlc3RpZD17YHF1aWNrLWFjY2Vzcy1yZXN1bHQoJHtwcm9wcy5jb21tYW5kLmlkfSlgfVxuICAgIGFyaWEtY3VycmVudD17cHJvcHMuaXNTZWxlY3RlZCA9PT0gdHJ1ZSA/ICd0cnVlJyA6ICdmYWxzZSd9XG4gICAgY3NzPXtjc3NgXG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgcGFkZGluZzogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ019O1xuICAgICAgaGVpZ2h0OiAzNnB4O1xuICAgICAgZm9udC1zaXplOiAxNnB4O1xuICAgICAgZm9udC13ZWlnaHQ6IDIwMDtcbiAgICAgIGxpbmUtaGVpZ2h0OiAzNnB4O1xuICAgICAgY3Vyc29yOiBkZWZhdWx0O1xuICAgICAgJHtwcm9wcy5pc1NlbGVjdGVkID09PSB0cnVlXG4gICAgICAgID8gYFxuICAgICAgICAgICAgYmFja2dyb3VuZDogJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yQWNjZW50fTtcbiAgICAgICAgICAgIGNvbG9yOiAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICBgXG4gICAgICAgIDogJyd9XG4gICAgYH1cbiAgICBvbk1vdXNlRW50ZXI9e3Byb3BzLm9uTW91c2VFbnRlcn1cbiAgICBvbkNsaWNrPXtwcm9wcy5vbkNsaWNrfVxuICA+XG4gICAgPGRpdlxuICAgICAgY3NzPXtjc3NgXG4gICAgICAgIGZsZXg6IDEgYXV0bztcbiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gICAgICBgfVxuICAgID5cbiAgICAgIHtwcm9wcy5jb21tYW5kLnRleHR9XG4gICAgPC9kaXY+XG4gICAgeygoQXJyYXkuaXNBcnJheShwcm9wcy5jb21tYW5kLnN1YkNvbW1hbmRzKSAmJlxuICAgICAgcHJvcHMuY29tbWFuZC5zdWJDb21tYW5kcy5sZW5ndGggPiAwKSB8fFxuICAgICAgdHlwZW9mIHByb3BzLmNvbW1hbmQuc3ViQ29tbWFuZHMgPT09ICdmdW5jdGlvbicpICYmIChcbiAgICAgIDxkaXZcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgYWxpZ24tc2VsZjogY2VudGVyO1xuICAgICAgICAgID4gKiB7XG4gICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgICB9XG4gICAgICAgIGB9XG4gICAgICA+XG4gICAgICAgIDxBbmdsZVRoaW5SaWdodEljb25cbiAgICAgICAgICBzaXplPVwibWVkaXVtXCJcbiAgICAgICAgICBjb2xvcj17cHJvcHMuaXNTZWxlY3RlZCA/ICdzdXJmYWNlJyA6ICduZXV0cmFsNjAnfVxuICAgICAgICAvPlxuICAgICAgPC9kaXY+XG4gICAgKX1cbiAgPC9kaXY+XG4pO1xuXG5CdXRsZXJDb21tYW5kLmRpc3BsYXlOYW1lID0gJ0J1dGxlckNvbW1hbmQnO1xuXG5leHBvcnQgZGVmYXVsdCBCdXRsZXJDb21tYW5kO1xuIl19 */",
|
|
140
139
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
141
140
|
};
|
|
142
|
-
const ButlerCommand = props => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
})
|
|
160
|
-
}
|
|
161
|
-
};
|
|
141
|
+
const ButlerCommand = props => jsxRuntime.jsxs("div", {
|
|
142
|
+
"data-testid": `quick-access-result(${props.command.id})`,
|
|
143
|
+
"aria-current": props.isSelected === true ? 'true' : 'false',
|
|
144
|
+
css: /*#__PURE__*/react.css("display:flex;padding:0 ", designSystem.customProperties.spacingM, ";height:36px;font-size:16px;font-weight:200;line-height:36px;cursor:default;", props.isSelected === true ? `
|
|
145
|
+
background: ${designSystem.customProperties.colorAccent};
|
|
146
|
+
color: ${designSystem.customProperties.colorSurface};
|
|
147
|
+
` : '', ";" + (process.env.NODE_ENV === "production" ? "" : ";label:ButlerCommand;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1dGxlci1jb21tYW5kLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQlkiLCJmaWxlIjoiYnV0bGVyLWNvbW1hbmQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTW91c2VFdmVudEhhbmRsZXIgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjdXN0b21Qcm9wZXJ0aWVzIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvZGVzaWduLXN5c3RlbSc7XG5pbXBvcnQgeyBBbmdsZVRoaW5SaWdodEljb24gfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9pY29ucyc7XG5pbXBvcnQgdHlwZSB7IENvbW1hbmQgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIGNvbW1hbmQ6IENvbW1hbmQ7XG4gIGlzU2VsZWN0ZWQ/OiBib29sZWFuO1xuICBvbkNsaWNrOiBNb3VzZUV2ZW50SGFuZGxlcjxIVE1MRGl2RWxlbWVudD47XG4gIG9uTW91c2VFbnRlcjogTW91c2VFdmVudEhhbmRsZXI8SFRNTERpdkVsZW1lbnQ+O1xufTtcblxuY29uc3QgQnV0bGVyQ29tbWFuZCA9IChwcm9wczogUHJvcHMpID0+IChcbiAgPGRpdlxuICAgIGtleT17cHJvcHMuY29tbWFuZC5pZH1cbiAgICBkYXRhLXRlc3RpZD17YHF1aWNrLWFjY2Vzcy1yZXN1bHQoJHtwcm9wcy5jb21tYW5kLmlkfSlgfVxuICAgIGFyaWEtY3VycmVudD17cHJvcHMuaXNTZWxlY3RlZCA9PT0gdHJ1ZSA/ICd0cnVlJyA6ICdmYWxzZSd9XG4gICAgY3NzPXtjc3NgXG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgcGFkZGluZzogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ019O1xuICAgICAgaGVpZ2h0OiAzNnB4O1xuICAgICAgZm9udC1zaXplOiAxNnB4O1xuICAgICAgZm9udC13ZWlnaHQ6IDIwMDtcbiAgICAgIGxpbmUtaGVpZ2h0OiAzNnB4O1xuICAgICAgY3Vyc29yOiBkZWZhdWx0O1xuICAgICAgJHtwcm9wcy5pc1NlbGVjdGVkID09PSB0cnVlXG4gICAgICAgID8gYFxuICAgICAgICAgICAgYmFja2dyb3VuZDogJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yQWNjZW50fTtcbiAgICAgICAgICAgIGNvbG9yOiAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICBgXG4gICAgICAgIDogJyd9XG4gICAgYH1cbiAgICBvbk1vdXNlRW50ZXI9e3Byb3BzLm9uTW91c2VFbnRlcn1cbiAgICBvbkNsaWNrPXtwcm9wcy5vbkNsaWNrfVxuICA+XG4gICAgPGRpdlxuICAgICAgY3NzPXtjc3NgXG4gICAgICAgIGZsZXg6IDEgYXV0bztcbiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gICAgICBgfVxuICAgID5cbiAgICAgIHtwcm9wcy5jb21tYW5kLnRleHR9XG4gICAgPC9kaXY+XG4gICAgeygoQXJyYXkuaXNBcnJheShwcm9wcy5jb21tYW5kLnN1YkNvbW1hbmRzKSAmJlxuICAgICAgcHJvcHMuY29tbWFuZC5zdWJDb21tYW5kcy5sZW5ndGggPiAwKSB8fFxuICAgICAgdHlwZW9mIHByb3BzLmNvbW1hbmQuc3ViQ29tbWFuZHMgPT09ICdmdW5jdGlvbicpICYmIChcbiAgICAgIDxkaXZcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgYWxpZ24tc2VsZjogY2VudGVyO1xuICAgICAgICAgID4gKiB7XG4gICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgICB9XG4gICAgICAgIGB9XG4gICAgICA+XG4gICAgICAgIDxBbmdsZVRoaW5SaWdodEljb25cbiAgICAgICAgICBzaXplPVwibWVkaXVtXCJcbiAgICAgICAgICBjb2xvcj17cHJvcHMuaXNTZWxlY3RlZCA/ICdzdXJmYWNlJyA6ICduZXV0cmFsNjAnfVxuICAgICAgICAvPlxuICAgICAgPC9kaXY+XG4gICAgKX1cbiAgPC9kaXY+XG4pO1xuXG5CdXRsZXJDb21tYW5kLmRpc3BsYXlOYW1lID0gJ0J1dGxlckNvbW1hbmQnO1xuXG5leHBvcnQgZGVmYXVsdCBCdXRsZXJDb21tYW5kO1xuIl19 */"),
|
|
148
|
+
onMouseEnter: props.onMouseEnter,
|
|
149
|
+
onClick: props.onClick,
|
|
150
|
+
children: [jsxRuntime.jsx("div", {
|
|
151
|
+
css: _ref2,
|
|
152
|
+
children: props.command.text
|
|
153
|
+
}), (_Array$isArray__default["default"](props.command.subCommands) && props.command.subCommands.length > 0 || typeof props.command.subCommands === 'function') && jsxRuntime.jsx("div", {
|
|
154
|
+
css: _ref$1,
|
|
155
|
+
children: jsxRuntime.jsx(icons.AngleThinRightIcon, {
|
|
156
|
+
size: "medium",
|
|
157
|
+
color: props.isSelected ? 'surface' : 'neutral60'
|
|
158
|
+
})
|
|
159
|
+
})]
|
|
160
|
+
}, props.command.id);
|
|
162
161
|
ButlerCommand.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
163
162
|
command: _pt__default["default"].any.isRequired,
|
|
164
163
|
isSelected: _pt__default["default"].bool,
|
|
@@ -416,7 +415,6 @@ var messages = reactIntl.defineMessages({
|
|
|
416
415
|
}
|
|
417
416
|
});
|
|
418
417
|
|
|
419
|
-
var _templateObject$3, _templateObject2$2;
|
|
420
418
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
421
419
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context12, _context13; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context12 = ownKeys(Object(t), !0)).call(_context12, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context13 = ownKeys(Object(t))).call(_context13, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
422
420
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
@@ -439,7 +437,24 @@ const hasNewWindowModifier = event => {
|
|
|
439
437
|
return event.ctrlKey;
|
|
440
438
|
}
|
|
441
439
|
};
|
|
442
|
-
const shakeAnimation = react.keyframes
|
|
440
|
+
const shakeAnimation = react.keyframes`
|
|
441
|
+
from,
|
|
442
|
+
to {
|
|
443
|
+
transform: translate3d(0, 0, 0);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
14%,
|
|
447
|
+
42%,
|
|
448
|
+
70% {
|
|
449
|
+
transform: translate3d(-3px, 0, 0);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
28%,
|
|
453
|
+
56%,
|
|
454
|
+
84% {
|
|
455
|
+
transform: translate3d(3px, 0, 0);
|
|
456
|
+
}
|
|
457
|
+
`;
|
|
443
458
|
const initialState = {
|
|
444
459
|
hasNetworkError: false,
|
|
445
460
|
isLoading: false,
|
|
@@ -939,7 +954,11 @@ const ButlerWithAnimation = props => jsxRuntime.jsx(react.ClassNames, {
|
|
|
939
954
|
children: _ref2 => {
|
|
940
955
|
let css = _ref2.css;
|
|
941
956
|
return jsxRuntime.jsx(Butler, _objectSpread(_objectSpread({}, props), {}, {
|
|
942
|
-
classNameShakeAnimation: css
|
|
957
|
+
classNameShakeAnimation: css`
|
|
958
|
+
animation-duration: 0.45s;
|
|
959
|
+
animation-fill-mode: both;
|
|
960
|
+
animation-name: ${shakeAnimation};
|
|
961
|
+
`
|
|
943
962
|
}));
|
|
944
963
|
}
|
|
945
964
|
});
|
|
@@ -975,7 +994,6 @@ const actionTypes = {
|
|
|
975
994
|
go: 'go'
|
|
976
995
|
};
|
|
977
996
|
|
|
978
|
-
var _templateObject$2;
|
|
979
997
|
function nonNullable(value) {
|
|
980
998
|
return value !== null && value !== undefined && typeof value !== 'boolean';
|
|
981
999
|
}
|
|
@@ -991,7 +1009,7 @@ const createCommands = _ref => {
|
|
|
991
1009
|
keywords: ['Go to Dashboard'],
|
|
992
1010
|
action: {
|
|
993
1011
|
type: actionTypes.go,
|
|
994
|
-
to:
|
|
1012
|
+
to: `/${applicationContext.project.key}/dashboard`
|
|
995
1013
|
}
|
|
996
1014
|
}, applicationContext.project && applicationContext.permissions && permissions$1.hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && {
|
|
997
1015
|
id: 'go/products',
|
|
@@ -999,35 +1017,35 @@ const createCommands = _ref => {
|
|
|
999
1017
|
keywords: ['Go to Products'],
|
|
1000
1018
|
action: {
|
|
1001
1019
|
type: actionTypes.go,
|
|
1002
|
-
to:
|
|
1020
|
+
to: `/${applicationContext.project.key}/products`
|
|
1003
1021
|
},
|
|
1004
1022
|
subCommands: _filterInstanceProperty__default["default"](_context2 = [permissions$1.hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && {
|
|
1005
1023
|
id: 'go/products/list',
|
|
1006
1024
|
text: intl.formatMessage(messages.openProductList),
|
|
1007
1025
|
action: {
|
|
1008
1026
|
type: actionTypes.go,
|
|
1009
|
-
to:
|
|
1027
|
+
to: `/${applicationContext.project.key}/products`
|
|
1010
1028
|
}
|
|
1011
1029
|
}, permissions$1.hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && {
|
|
1012
1030
|
id: 'go/products/modified',
|
|
1013
1031
|
text: intl.formatMessage(messages.openModifiedProducts),
|
|
1014
1032
|
action: {
|
|
1015
1033
|
type: actionTypes.go,
|
|
1016
|
-
to:
|
|
1034
|
+
to: `/${applicationContext.project.key}/products/modified`
|
|
1017
1035
|
}
|
|
1018
1036
|
}, permissions$1.hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && featureToggles.pimSearch && {
|
|
1019
1037
|
id: 'go/products/pim-search',
|
|
1020
1038
|
text: intl.formatMessage(messages.openPimSearch),
|
|
1021
1039
|
action: {
|
|
1022
1040
|
type: actionTypes.go,
|
|
1023
|
-
to:
|
|
1041
|
+
to: `/${applicationContext.project.key}/products`
|
|
1024
1042
|
}
|
|
1025
1043
|
}, permissions$1.hasSomePermissions([permissions.ManageProducts], applicationContext.permissions) && {
|
|
1026
1044
|
id: 'go/products/add',
|
|
1027
1045
|
text: intl.formatMessage(messages.openAddProducts),
|
|
1028
1046
|
action: {
|
|
1029
1047
|
type: actionTypes.go,
|
|
1030
|
-
to:
|
|
1048
|
+
to: `/${applicationContext.project.key}/products/new`
|
|
1031
1049
|
}
|
|
1032
1050
|
}]).call(_context2, nonNullable)
|
|
1033
1051
|
}, applicationContext.project && applicationContext.permissions && permissions$1.hasSomePermissions([permissions.ViewCategories], applicationContext.permissions) && {
|
|
@@ -1036,28 +1054,28 @@ const createCommands = _ref => {
|
|
|
1036
1054
|
keywords: ['Go to Categories'],
|
|
1037
1055
|
action: {
|
|
1038
1056
|
type: actionTypes.go,
|
|
1039
|
-
to:
|
|
1057
|
+
to: `/${applicationContext.project.key}/categories`
|
|
1040
1058
|
},
|
|
1041
1059
|
subCommands: _filterInstanceProperty__default["default"](_context3 = [permissions$1.hasSomePermissions([permissions.ViewCategories], applicationContext.permissions) && {
|
|
1042
1060
|
id: 'go/categories/list',
|
|
1043
1061
|
text: intl.formatMessage(messages.openCategoriesList),
|
|
1044
1062
|
action: {
|
|
1045
1063
|
type: actionTypes.go,
|
|
1046
|
-
to:
|
|
1064
|
+
to: `/${applicationContext.project.key}/categories?mode=list`
|
|
1047
1065
|
}
|
|
1048
1066
|
}, permissions$1.hasSomePermissions([permissions.ViewCategories], applicationContext.permissions) && {
|
|
1049
1067
|
id: 'go/categories/search',
|
|
1050
1068
|
text: intl.formatMessage(messages.openCategoriesSearch),
|
|
1051
1069
|
action: {
|
|
1052
1070
|
type: actionTypes.go,
|
|
1053
|
-
to:
|
|
1071
|
+
to: `/${applicationContext.project.key}/categories?mode=search`
|
|
1054
1072
|
}
|
|
1055
1073
|
}, permissions$1.hasSomePermissions([permissions.ManageCategories], applicationContext.permissions) && {
|
|
1056
1074
|
id: 'go/categories/add',
|
|
1057
1075
|
text: intl.formatMessage(messages.openAddCategory),
|
|
1058
1076
|
action: {
|
|
1059
1077
|
type: actionTypes.go,
|
|
1060
|
-
to:
|
|
1078
|
+
to: `/${applicationContext.project.key}/categories/new`
|
|
1061
1079
|
}
|
|
1062
1080
|
}]).call(_context3, nonNullable)
|
|
1063
1081
|
}, applicationContext.project && applicationContext.permissions && permissions$1.hasSomePermissions([permissions.ViewCustomers, permissions.ViewCustomerGroups], applicationContext.permissions) && {
|
|
@@ -1066,35 +1084,35 @@ const createCommands = _ref => {
|
|
|
1066
1084
|
keywords: ['Go to Customers'],
|
|
1067
1085
|
action: {
|
|
1068
1086
|
type: actionTypes.go,
|
|
1069
|
-
to:
|
|
1087
|
+
to: `/${applicationContext.project.key}/customers`
|
|
1070
1088
|
},
|
|
1071
1089
|
subCommands: _filterInstanceProperty__default["default"](_context4 = [permissions$1.hasSomePermissions([permissions.ViewCustomers], applicationContext.permissions) && {
|
|
1072
1090
|
id: 'go/customers/list',
|
|
1073
1091
|
text: intl.formatMessage(messages.openCustomersList),
|
|
1074
1092
|
action: {
|
|
1075
1093
|
type: actionTypes.go,
|
|
1076
|
-
to:
|
|
1094
|
+
to: `/${applicationContext.project.key}/customers`
|
|
1077
1095
|
}
|
|
1078
1096
|
}, permissions$1.hasSomePermissions([permissions.ManageCustomers], applicationContext.permissions) && {
|
|
1079
1097
|
id: 'go/customers/new',
|
|
1080
1098
|
text: intl.formatMessage(messages.openAddCustomer),
|
|
1081
1099
|
action: {
|
|
1082
1100
|
type: actionTypes.go,
|
|
1083
|
-
to:
|
|
1101
|
+
to: `/${applicationContext.project.key}/customers/new`
|
|
1084
1102
|
}
|
|
1085
1103
|
}, permissions$1.hasSomePermissions([permissions.ViewCustomerGroups], applicationContext.permissions) && {
|
|
1086
1104
|
id: 'go/customer/customer-groups',
|
|
1087
1105
|
text: intl.formatMessage(messages.openCustomerGroupsList),
|
|
1088
1106
|
action: {
|
|
1089
1107
|
type: actionTypes.go,
|
|
1090
|
-
to:
|
|
1108
|
+
to: `/${applicationContext.project.key}/customers/customer-groups`
|
|
1091
1109
|
}
|
|
1092
1110
|
}, permissions$1.hasSomePermissions([permissions.ManageCustomerGroups], applicationContext.permissions) && {
|
|
1093
1111
|
id: 'go/customers/customer-groups/add',
|
|
1094
1112
|
text: intl.formatMessage(messages.openAddCustomerGroup),
|
|
1095
1113
|
action: {
|
|
1096
1114
|
type: actionTypes.go,
|
|
1097
|
-
to:
|
|
1115
|
+
to: `/${applicationContext.project.key}/customers/customer-groups/new`
|
|
1098
1116
|
}
|
|
1099
1117
|
}]).call(_context4, nonNullable)
|
|
1100
1118
|
}, applicationContext.project && applicationContext.permissions && permissions$1.hasSomePermissions([permissions.ViewOrders], applicationContext.permissions) && {
|
|
@@ -1103,21 +1121,21 @@ const createCommands = _ref => {
|
|
|
1103
1121
|
keywords: ['Go to Orders'],
|
|
1104
1122
|
action: {
|
|
1105
1123
|
type: actionTypes.go,
|
|
1106
|
-
to:
|
|
1124
|
+
to: `/${applicationContext.project.key}/orders`
|
|
1107
1125
|
},
|
|
1108
1126
|
subCommands: _filterInstanceProperty__default["default"](_context5 = [permissions$1.hasSomePermissions([permissions.ViewOrders], applicationContext.permissions) && {
|
|
1109
1127
|
id: 'go/orders/list',
|
|
1110
1128
|
text: intl.formatMessage(messages.openOrdersList),
|
|
1111
1129
|
action: {
|
|
1112
1130
|
type: actionTypes.go,
|
|
1113
|
-
to:
|
|
1131
|
+
to: `/${applicationContext.project.key}/orders`
|
|
1114
1132
|
}
|
|
1115
1133
|
}, permissions$1.hasSomePermissions([permissions.ManageOrders], applicationContext.permissions) && {
|
|
1116
1134
|
id: 'go/orders/add',
|
|
1117
1135
|
text: intl.formatMessage(messages.openAddOrder),
|
|
1118
1136
|
action: {
|
|
1119
1137
|
type: actionTypes.go,
|
|
1120
|
-
to:
|
|
1138
|
+
to: `/${applicationContext.project.key}/orders/new`
|
|
1121
1139
|
}
|
|
1122
1140
|
}]).call(_context5, nonNullable)
|
|
1123
1141
|
}, applicationContext.project && applicationContext.permissions && permissions$1.hasSomePermissions([permissions.ViewDiscountCodes, permissions.ViewProductDiscounts, permissions.ViewCartDiscounts], applicationContext.permissions) && {
|
|
@@ -1126,56 +1144,56 @@ const createCommands = _ref => {
|
|
|
1126
1144
|
keywords: ['Go to Discounts'],
|
|
1127
1145
|
action: {
|
|
1128
1146
|
type: actionTypes.go,
|
|
1129
|
-
to:
|
|
1147
|
+
to: `/${applicationContext.project.key}/discounts`
|
|
1130
1148
|
},
|
|
1131
1149
|
subCommands: _filterInstanceProperty__default["default"](_context6 = [permissions$1.hasSomePermissions([permissions.ViewProductDiscounts], applicationContext.permissions) && {
|
|
1132
1150
|
id: 'go/discounts/products/list',
|
|
1133
1151
|
text: intl.formatMessage(messages.openProductDiscountsList),
|
|
1134
1152
|
action: {
|
|
1135
1153
|
type: actionTypes.go,
|
|
1136
|
-
to:
|
|
1154
|
+
to: `/${applicationContext.project.key}/discounts/products`
|
|
1137
1155
|
}
|
|
1138
1156
|
}, permissions$1.hasSomePermissions([permissions.ViewCartDiscounts], applicationContext.permissions) && {
|
|
1139
1157
|
id: 'go/discounts/carts/list',
|
|
1140
1158
|
text: intl.formatMessage(messages.openCartDiscountsList),
|
|
1141
1159
|
action: {
|
|
1142
1160
|
type: actionTypes.go,
|
|
1143
|
-
to:
|
|
1161
|
+
to: `/${applicationContext.project.key}/discounts/carts`
|
|
1144
1162
|
}
|
|
1145
1163
|
}, permissions$1.hasSomePermissions([permissions.ViewDiscountCodes], applicationContext.permissions) && {
|
|
1146
1164
|
id: 'go/discounts/codes/list',
|
|
1147
1165
|
text: intl.formatMessage(messages.openDiscountCodesList),
|
|
1148
1166
|
action: {
|
|
1149
1167
|
type: actionTypes.go,
|
|
1150
|
-
to:
|
|
1168
|
+
to: `/${applicationContext.project.key}/discounts/codes`
|
|
1151
1169
|
}
|
|
1152
1170
|
}, permissions$1.hasSomePermissions([permissions.ManageProductDiscounts, permissions.ManageDiscountCodes, permissions.ManageCartDiscounts], applicationContext.permissions) && {
|
|
1153
1171
|
id: 'go/discounts/add',
|
|
1154
1172
|
text: intl.formatMessage(messages.openAddDiscount),
|
|
1155
1173
|
action: {
|
|
1156
1174
|
type: actionTypes.go,
|
|
1157
|
-
to:
|
|
1175
|
+
to: `/${applicationContext.project.key}/discounts/new`
|
|
1158
1176
|
},
|
|
1159
1177
|
subCommands: _filterInstanceProperty__default["default"](_context7 = [permissions$1.hasSomePermissions([permissions.ManageProductDiscounts], applicationContext.permissions) && {
|
|
1160
1178
|
id: 'go/discounts/product/add',
|
|
1161
1179
|
text: intl.formatMessage(messages.openAddProductDiscount),
|
|
1162
1180
|
action: {
|
|
1163
1181
|
type: actionTypes.go,
|
|
1164
|
-
to:
|
|
1182
|
+
to: `/${applicationContext.project.key}/discounts/products/new`
|
|
1165
1183
|
}
|
|
1166
1184
|
}, permissions$1.hasSomePermissions([permissions.ManageCartDiscounts], applicationContext.permissions) && {
|
|
1167
1185
|
id: 'go/discounts/cart/add',
|
|
1168
1186
|
text: intl.formatMessage(messages.openAddCartDiscount),
|
|
1169
1187
|
action: {
|
|
1170
1188
|
type: actionTypes.go,
|
|
1171
|
-
to:
|
|
1189
|
+
to: `/${applicationContext.project.key}/discounts/carts/new`
|
|
1172
1190
|
}
|
|
1173
1191
|
}, permissions$1.hasSomePermissions([permissions.ManageDiscountCodes], applicationContext.permissions) && {
|
|
1174
1192
|
id: 'go/discounts/code/add',
|
|
1175
1193
|
text: intl.formatMessage(messages.openAddCartDiscount),
|
|
1176
1194
|
action: {
|
|
1177
1195
|
type: actionTypes.go,
|
|
1178
|
-
to:
|
|
1196
|
+
to: `/${applicationContext.project.key}/discounts/codes/new`
|
|
1179
1197
|
}
|
|
1180
1198
|
}]).call(_context7, nonNullable)
|
|
1181
1199
|
}]).call(_context6, nonNullable)
|
|
@@ -1185,49 +1203,49 @@ const createCommands = _ref => {
|
|
|
1185
1203
|
keywords: ['Go to Settings'],
|
|
1186
1204
|
action: {
|
|
1187
1205
|
type: actionTypes.go,
|
|
1188
|
-
to:
|
|
1206
|
+
to: `/${applicationContext.project.key}/settings/project`
|
|
1189
1207
|
},
|
|
1190
1208
|
subCommands: _filterInstanceProperty__default["default"](_context8 = [permissions$1.hasSomePermissions([permissions.ViewProjectSettings, permissions.ManageProjectSettings], applicationContext.permissions) && {
|
|
1191
1209
|
id: 'go/settings/project',
|
|
1192
1210
|
text: intl.formatMessage(messages.openProjectSettings),
|
|
1193
1211
|
action: {
|
|
1194
1212
|
type: actionTypes.go,
|
|
1195
|
-
to:
|
|
1213
|
+
to: `/${applicationContext.project.key}/settings/project`
|
|
1196
1214
|
},
|
|
1197
1215
|
subCommands: _filterInstanceProperty__default["default"](_context9 = [{
|
|
1198
1216
|
id: 'go/settings/project/international',
|
|
1199
1217
|
text: intl.formatMessage(messages.openProjectSettingsInternationalTab),
|
|
1200
1218
|
action: {
|
|
1201
1219
|
type: actionTypes.go,
|
|
1202
|
-
to:
|
|
1220
|
+
to: `/${applicationContext.project.key}/settings/project/international`
|
|
1203
1221
|
}
|
|
1204
1222
|
}, {
|
|
1205
1223
|
id: 'go/settings/project/taxes',
|
|
1206
1224
|
text: intl.formatMessage(messages.openProjectSettingsTaxesTab),
|
|
1207
1225
|
action: {
|
|
1208
1226
|
type: actionTypes.go,
|
|
1209
|
-
to:
|
|
1227
|
+
to: `/${applicationContext.project.key}/settings/project/taxes`
|
|
1210
1228
|
}
|
|
1211
1229
|
}, {
|
|
1212
1230
|
id: 'go/settings/project/shipping-methods',
|
|
1213
1231
|
text: intl.formatMessage(messages.openProjectSettingsShippingMethodsTab),
|
|
1214
1232
|
action: {
|
|
1215
1233
|
type: actionTypes.go,
|
|
1216
|
-
to:
|
|
1234
|
+
to: `/${applicationContext.project.key}/settings/project/shipping-methods`
|
|
1217
1235
|
}
|
|
1218
1236
|
}, {
|
|
1219
1237
|
id: 'go/settings/project/channels',
|
|
1220
1238
|
text: intl.formatMessage(messages.openProjectSettingsChannelsTab),
|
|
1221
1239
|
action: {
|
|
1222
1240
|
type: actionTypes.go,
|
|
1223
|
-
to:
|
|
1241
|
+
to: `/${applicationContext.project.key}/settings/project/channels`
|
|
1224
1242
|
}
|
|
1225
1243
|
}, {
|
|
1226
1244
|
id: 'go/settings/project/stores',
|
|
1227
1245
|
text: intl.formatMessage(messages.openProjectSettingsStoresTab),
|
|
1228
1246
|
action: {
|
|
1229
1247
|
type: actionTypes.go,
|
|
1230
|
-
to:
|
|
1248
|
+
to: `/${applicationContext.project.key}/settings/project/stores`
|
|
1231
1249
|
}
|
|
1232
1250
|
}]).call(_context9, nonNullable)
|
|
1233
1251
|
}, permissions$1.hasSomePermissions([permissions.ViewProductTypes], applicationContext.permissions) && {
|
|
@@ -1235,28 +1253,28 @@ const createCommands = _ref => {
|
|
|
1235
1253
|
text: intl.formatMessage(messages.openProductTypesSettings),
|
|
1236
1254
|
action: {
|
|
1237
1255
|
type: actionTypes.go,
|
|
1238
|
-
to:
|
|
1256
|
+
to: `/${applicationContext.project.key}/settings/product-types`
|
|
1239
1257
|
}
|
|
1240
1258
|
}, permissions$1.hasSomePermissions([permissions.ViewDeveloperSettings], applicationContext.permissions) && {
|
|
1241
1259
|
id: 'go/settings/developer',
|
|
1242
1260
|
text: intl.formatMessage(messages.openDeveloperSettings),
|
|
1243
1261
|
action: {
|
|
1244
1262
|
type: actionTypes.go,
|
|
1245
|
-
to:
|
|
1263
|
+
to: `/${applicationContext.project.key}/settings/developer`
|
|
1246
1264
|
},
|
|
1247
1265
|
subCommands: _filterInstanceProperty__default["default"](_context10 = [permissions$1.hasSomePermissions([permissions.ViewDeveloperSettings], applicationContext.permissions) && {
|
|
1248
1266
|
id: 'go/settings/developer/api-clients/list',
|
|
1249
1267
|
text: intl.formatMessage(messages.openApiClientsList),
|
|
1250
1268
|
action: {
|
|
1251
1269
|
type: actionTypes.go,
|
|
1252
|
-
to:
|
|
1270
|
+
to: `/${applicationContext.project.key}/settings/developer/api-clients`
|
|
1253
1271
|
}
|
|
1254
1272
|
}, permissions$1.hasSomePermissions([permissions.ManageDeveloperSettings], applicationContext.permissions) && {
|
|
1255
1273
|
id: 'go/settings/developer/api-clients/add',
|
|
1256
1274
|
text: intl.formatMessage(messages.openAddApiClient),
|
|
1257
1275
|
action: {
|
|
1258
1276
|
type: actionTypes.go,
|
|
1259
|
-
to:
|
|
1277
|
+
to: `/${applicationContext.project.key}/settings/developer/api-clients/new`
|
|
1260
1278
|
}
|
|
1261
1279
|
}]).call(_context10, nonNullable)
|
|
1262
1280
|
}, featureToggles.customApplications && permissions$1.hasSomePermissions([permissions.ManageProjectSettings], applicationContext.permissions) && {
|
|
@@ -1264,7 +1282,7 @@ const createCommands = _ref => {
|
|
|
1264
1282
|
text: intl.formatMessage(messages.openCustomApplicationsSettings),
|
|
1265
1283
|
action: {
|
|
1266
1284
|
type: actionTypes.go,
|
|
1267
|
-
to:
|
|
1285
|
+
to: `/${applicationContext.project.key}/settings/custom-applications`
|
|
1268
1286
|
}
|
|
1269
1287
|
}]).call(_context8, nonNullable)
|
|
1270
1288
|
}, applicationContext.project && applicationContext.project.languages && applicationContext.project.languages.length > 1 && {
|
|
@@ -1277,8 +1295,11 @@ const createCommands = _ref => {
|
|
|
1277
1295
|
subCommands: () => {
|
|
1278
1296
|
var _context11, _context12;
|
|
1279
1297
|
return _Promise__default["default"].resolve(_filterInstanceProperty__default["default"](_context11 = _mapInstanceProperty__default["default"](_context12 = applicationContext.project ? applicationContext.project.languages : []).call(_context12, language => changeProjectDataLocale && {
|
|
1280
|
-
id:
|
|
1281
|
-
text: commonTags.oneLineTrim
|
|
1298
|
+
id: `action/set-resource-language/${language}`,
|
|
1299
|
+
text: commonTags.oneLineTrim`
|
|
1300
|
+
${language}
|
|
1301
|
+
${language === applicationContext.dataLocale ? ' (active)' : ''}
|
|
1302
|
+
`,
|
|
1282
1303
|
action: () => {
|
|
1283
1304
|
changeProjectDataLocale(language);
|
|
1284
1305
|
|
|
@@ -1305,7 +1326,7 @@ const createCommands = _ref => {
|
|
|
1305
1326
|
keywords: ['Go to user account', 'Go to profile', 'Open profile'],
|
|
1306
1327
|
action: {
|
|
1307
1328
|
type: actionTypes.go,
|
|
1308
|
-
to:
|
|
1329
|
+
to: `/account/profile`
|
|
1309
1330
|
}
|
|
1310
1331
|
}, {
|
|
1311
1332
|
id: 'go/privacy-policy',
|
|
@@ -1321,7 +1342,7 @@ const createCommands = _ref => {
|
|
|
1321
1342
|
keywords: ['Sign out'],
|
|
1322
1343
|
action: {
|
|
1323
1344
|
type: actionTypes.go,
|
|
1324
|
-
to:
|
|
1345
|
+
to: `/logout?reason=${constants.LOGOUT_REASONS.USER}`
|
|
1325
1346
|
}
|
|
1326
1347
|
}, {
|
|
1327
1348
|
id: 'go/manage-projects',
|
|
@@ -1329,7 +1350,7 @@ const createCommands = _ref => {
|
|
|
1329
1350
|
keywords: ['Go to manage projects', 'Go to projects', 'Open projects list'],
|
|
1330
1351
|
action: {
|
|
1331
1352
|
type: actionTypes.go,
|
|
1332
|
-
to:
|
|
1353
|
+
to: `/account/projects`
|
|
1333
1354
|
}
|
|
1334
1355
|
}, {
|
|
1335
1356
|
id: 'go/manage-organizations',
|
|
@@ -1337,10 +1358,10 @@ const createCommands = _ref => {
|
|
|
1337
1358
|
keywords: ['Go to manage organizations', 'Go to organizations', 'Open organizations list'],
|
|
1338
1359
|
action: {
|
|
1339
1360
|
type: actionTypes.go,
|
|
1340
|
-
to:
|
|
1361
|
+
to: `/account/organizations`
|
|
1341
1362
|
}
|
|
1342
1363
|
}, ...(applicationContext.user ? _mapInstanceProperty__default["default"](_context13 = applicationContext.user.projects.results).call(_context13, userProject => ({
|
|
1343
|
-
id:
|
|
1364
|
+
id: `go/project(${userProject.key})`,
|
|
1344
1365
|
text: intl.formatMessage(messages.useProject, {
|
|
1345
1366
|
projectName: userProject.name
|
|
1346
1367
|
}),
|
|
@@ -1348,7 +1369,7 @@ const createCommands = _ref => {
|
|
|
1348
1369
|
action: () => {
|
|
1349
1370
|
// Switching projects needs a full redirect so that
|
|
1350
1371
|
// the feature flags are reloaded (and things caches get destroyed)
|
|
1351
|
-
window.location.href =
|
|
1372
|
+
window.location.href = `/${userProject.key}`;
|
|
1352
1373
|
}
|
|
1353
1374
|
})) : [])]).call(_context, nonNullable);
|
|
1354
1375
|
};
|
|
@@ -1371,10 +1392,8 @@ const loadHistoryEntries = () => {
|
|
|
1371
1392
|
}
|
|
1372
1393
|
};
|
|
1373
1394
|
|
|
1374
|
-
var _templateObject$1, _templateObject2$1, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
1375
1395
|
var QuickAccessProductQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "QuickAccessProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "product" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productId" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "staged" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allVariants" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "sku" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 208, source: { body: "query QuickAccessProduct($productId: String!) {\n product(id: $productId) {\n id\n masterData {\n staged {\n allVariants {\n id\n key\n sku\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1376
1396
|
const createProductVariantSubCommands = _ref => {
|
|
1377
|
-
var _context, _context2, _context3, _context4;
|
|
1378
1397
|
let intl = _ref.intl,
|
|
1379
1398
|
applicationContext = _ref.applicationContext,
|
|
1380
1399
|
productId = _ref.productId,
|
|
@@ -1382,32 +1401,60 @@ const createProductVariantSubCommands = _ref => {
|
|
|
1382
1401
|
const canViewProducts = permissions$1.hasSomePermissions([permissions.ViewProducts], applicationContext.permissions);
|
|
1383
1402
|
if (!canViewProducts || !applicationContext.project) return [];
|
|
1384
1403
|
return [{
|
|
1385
|
-
id:
|
|
1404
|
+
id: `go/product(${productId})/variant(${variantId})/attributes`,
|
|
1386
1405
|
text: intl.formatMessage(messages.showProductVariantAttributes),
|
|
1387
1406
|
action: {
|
|
1388
1407
|
type: actionTypes.go,
|
|
1389
|
-
to: commonTags.oneLineTrim
|
|
1408
|
+
to: commonTags.oneLineTrim`
|
|
1409
|
+
/${applicationContext.project.key}
|
|
1410
|
+
/products
|
|
1411
|
+
/${productId}
|
|
1412
|
+
/variants
|
|
1413
|
+
/${variantId}
|
|
1414
|
+
/attributes
|
|
1415
|
+
`
|
|
1390
1416
|
}
|
|
1391
1417
|
}, {
|
|
1392
|
-
id:
|
|
1418
|
+
id: `go/product(${productId})/variant${variantId}/images`,
|
|
1393
1419
|
text: intl.formatMessage(messages.showProductVariantImages),
|
|
1394
1420
|
action: {
|
|
1395
1421
|
type: actionTypes.go,
|
|
1396
|
-
to: commonTags.oneLineTrim
|
|
1422
|
+
to: commonTags.oneLineTrim`
|
|
1423
|
+
/${applicationContext.project.key}
|
|
1424
|
+
/products
|
|
1425
|
+
/${productId}
|
|
1426
|
+
/variants
|
|
1427
|
+
/${variantId}
|
|
1428
|
+
/images
|
|
1429
|
+
`
|
|
1397
1430
|
}
|
|
1398
1431
|
}, {
|
|
1399
|
-
id:
|
|
1432
|
+
id: `go/product(${productId})/variant(${variantId})/prices`,
|
|
1400
1433
|
text: intl.formatMessage(messages.showProductVariantPrices),
|
|
1401
1434
|
action: {
|
|
1402
1435
|
type: actionTypes.go,
|
|
1403
|
-
to: commonTags.oneLineTrim
|
|
1436
|
+
to: commonTags.oneLineTrim`
|
|
1437
|
+
/${applicationContext.project.key}
|
|
1438
|
+
/products
|
|
1439
|
+
/${productId}
|
|
1440
|
+
/variants
|
|
1441
|
+
/${variantId}
|
|
1442
|
+
/prices
|
|
1443
|
+
`
|
|
1404
1444
|
}
|
|
1405
1445
|
}, {
|
|
1406
|
-
id:
|
|
1446
|
+
id: `go/product(${productId})/variant(${variantId})/inventory`,
|
|
1407
1447
|
text: intl.formatMessage(messages.showProductVariantInventory),
|
|
1408
1448
|
action: {
|
|
1409
1449
|
type: actionTypes.go,
|
|
1410
|
-
to: commonTags.oneLineTrim
|
|
1450
|
+
to: commonTags.oneLineTrim`
|
|
1451
|
+
/${applicationContext.project.key}
|
|
1452
|
+
/products
|
|
1453
|
+
/${productId}
|
|
1454
|
+
/variants
|
|
1455
|
+
/${variantId}
|
|
1456
|
+
/inventory
|
|
1457
|
+
`
|
|
1411
1458
|
}
|
|
1412
1459
|
}];
|
|
1413
1460
|
};
|
|
@@ -1435,25 +1482,28 @@ const createProductVariantListSubCommands = async _ref2 => {
|
|
|
1435
1482
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
1436
1483
|
});
|
|
1437
1484
|
if (data && data.product && data.product.masterData && data.product.masterData.staged && applicationContext.project) {
|
|
1438
|
-
var
|
|
1485
|
+
var _context;
|
|
1439
1486
|
const projectKey = applicationContext.project.key;
|
|
1440
|
-
return _mapInstanceProperty__default["default"](
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1487
|
+
return _mapInstanceProperty__default["default"](_context = data.product.masterData.staged.allVariants).call(_context, variant => ({
|
|
1488
|
+
id: `go/product(${productId})/variant(${variant.id})`,
|
|
1489
|
+
text: formatVariantMessage(variant, intl),
|
|
1490
|
+
subCommands: createProductVariantSubCommands({
|
|
1491
|
+
intl,
|
|
1492
|
+
applicationContext,
|
|
1493
|
+
productId,
|
|
1494
|
+
variantId: variant.id
|
|
1495
|
+
}),
|
|
1496
|
+
action: {
|
|
1497
|
+
type: actionTypes.go,
|
|
1498
|
+
to: commonTags.oneLineTrim`
|
|
1499
|
+
/${projectKey}
|
|
1500
|
+
/products
|
|
1501
|
+
/${productId}
|
|
1502
|
+
/variants
|
|
1503
|
+
/${variant.id}
|
|
1504
|
+
`
|
|
1505
|
+
}
|
|
1506
|
+
}));
|
|
1457
1507
|
}
|
|
1458
1508
|
return [];
|
|
1459
1509
|
};
|
|
@@ -1464,18 +1514,28 @@ const createProductTabsSubCommands = _ref3 => {
|
|
|
1464
1514
|
const canViewProducts = permissions$1.hasSomePermissions([permissions.ViewProducts], applicationContext.permissions);
|
|
1465
1515
|
if (!canViewProducts || !applicationContext.project) return [];
|
|
1466
1516
|
return [{
|
|
1467
|
-
id:
|
|
1517
|
+
id: `go/product(${productId})/general`,
|
|
1468
1518
|
text: intl.formatMessage(messages.openProductVariantGeneral),
|
|
1469
1519
|
action: {
|
|
1470
1520
|
type: actionTypes.go,
|
|
1471
|
-
to: commonTags.oneLineTrim
|
|
1521
|
+
to: commonTags.oneLineTrim`
|
|
1522
|
+
/${applicationContext.project.key}
|
|
1523
|
+
/products
|
|
1524
|
+
/${productId}
|
|
1525
|
+
/general
|
|
1526
|
+
`
|
|
1472
1527
|
}
|
|
1473
1528
|
}, {
|
|
1474
|
-
id:
|
|
1529
|
+
id: `go/product(${productId})/variants`,
|
|
1475
1530
|
text: intl.formatMessage(messages.openProductVariantList),
|
|
1476
1531
|
action: {
|
|
1477
1532
|
type: actionTypes.go,
|
|
1478
|
-
to: commonTags.oneLineTrim
|
|
1533
|
+
to: commonTags.oneLineTrim`
|
|
1534
|
+
/${applicationContext.project.key}
|
|
1535
|
+
/products
|
|
1536
|
+
/${productId}
|
|
1537
|
+
/variants
|
|
1538
|
+
`
|
|
1479
1539
|
},
|
|
1480
1540
|
subCommands: execQuery => createProductVariantListSubCommands({
|
|
1481
1541
|
intl,
|
|
@@ -1484,11 +1544,16 @@ const createProductTabsSubCommands = _ref3 => {
|
|
|
1484
1544
|
execQuery
|
|
1485
1545
|
})
|
|
1486
1546
|
}, {
|
|
1487
|
-
id:
|
|
1547
|
+
id: `go/product(${productId})/search`,
|
|
1488
1548
|
text: intl.formatMessage(messages.openProductVariantSearch),
|
|
1489
1549
|
action: {
|
|
1490
1550
|
type: actionTypes.go,
|
|
1491
|
-
to: commonTags.oneLineTrim
|
|
1551
|
+
to: commonTags.oneLineTrim`
|
|
1552
|
+
/${applicationContext.project.key}
|
|
1553
|
+
/products
|
|
1554
|
+
/${productId}
|
|
1555
|
+
/search
|
|
1556
|
+
`
|
|
1492
1557
|
}
|
|
1493
1558
|
}];
|
|
1494
1559
|
};
|
|
@@ -1527,10 +1592,9 @@ const translate = (nameAllLocales, projectDataLocale) => {
|
|
|
1527
1592
|
return '';
|
|
1528
1593
|
};
|
|
1529
1594
|
|
|
1530
|
-
var _templateObject, _templateObject2;
|
|
1531
1595
|
var QuickAccessQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "QuickAccess" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "searchText" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "canViewProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productsWhereClause" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "includeProductsByIds" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "productsByIds" }, name: { kind: "Name", value: "products" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "productsWhereClause" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "includeProductsByIds" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "staged" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "Field", alias: { kind: "Name", value: "productById" }, name: { kind: "Name", value: "product" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "searchText" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "canViewProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "staged" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "Field", alias: { kind: "Name", value: "productByKey" }, name: { kind: "Name", value: "product" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "key" }, value: { kind: "Variable", name: { kind: "Name", value: "searchText" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "canViewProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "staged" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "Field", alias: { kind: "Name", value: "productByVariantSku" }, name: { kind: "Name", value: "product" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "sku" }, value: { kind: "Variable", name: { kind: "Name", value: "searchText" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "canViewProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "staged" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "variant" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "sku" }, value: { kind: "Variable", name: { kind: "Name", value: "searchText" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "sku" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "Field", alias: { kind: "Name", value: "productByVariantKey" }, name: { kind: "Name", value: "product" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "variantKey" }, value: { kind: "Variable", name: { kind: "Name", value: "searchText" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "canViewProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "staged" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "variant" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "key" }, value: { kind: "Variable", name: { kind: "Name", value: "searchText" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "sku" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1407, source: { body: "query QuickAccess(\n $searchText: String!\n $canViewProducts: Boolean!\n $productsWhereClause: String\n $includeProductsByIds: Boolean!\n) {\n productsByIds: products(where: $productsWhereClause)\n @include(if: $includeProductsByIds) {\n results {\n id\n masterData {\n staged {\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n\n productById: product(id: $searchText) @include(if: $canViewProducts) {\n id\n masterData {\n staged {\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n\n productByKey: product(key: $searchText) @include(if: $canViewProducts) {\n id\n masterData {\n staged {\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n\n productByVariantSku: product(sku: $searchText)\n @include(if: $canViewProducts) {\n id\n masterData {\n staged {\n nameAllLocales {\n locale\n value\n }\n variant(sku: $searchText) {\n sku\n key\n id\n }\n }\n }\n }\n\n productByVariantKey: product(variantKey: $searchText)\n @include(if: $canViewProducts) {\n id\n masterData {\n staged {\n nameAllLocales {\n locale\n value\n }\n variant(key: $searchText) {\n sku\n key\n id\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1532
1596
|
const searchProductIdsAction = (searchText, projectKey, dataLocale) => sdk.actions.post({
|
|
1533
|
-
uri:
|
|
1597
|
+
uri: `/${projectKey}/search/products`,
|
|
1534
1598
|
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.PIM_SEARCH,
|
|
1535
1599
|
payload: {
|
|
1536
1600
|
query: {
|
|
@@ -1560,7 +1624,7 @@ const pimIndexerStatusAction = (projectKey, dataLocale) =>
|
|
|
1560
1624
|
// error, so we send a regular request for now and limit to no results
|
|
1561
1625
|
// instead to keep the payload minimal
|
|
1562
1626
|
sdk.actions.post({
|
|
1563
|
-
uri:
|
|
1627
|
+
uri: `/${projectKey}/search/products`,
|
|
1564
1628
|
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.PIM_SEARCH,
|
|
1565
1629
|
payload: {
|
|
1566
1630
|
query: {
|
|
@@ -1662,26 +1726,31 @@ const QuickAccess = props => {
|
|
|
1662
1726
|
searchText: sanitize(searchText),
|
|
1663
1727
|
// Pass conditional arguments to disable some of the queries
|
|
1664
1728
|
canViewProducts,
|
|
1665
|
-
productsWhereClause:
|
|
1729
|
+
productsWhereClause: `id in (${_mapInstanceProperty__default["default"](idsOfProductsMatchingSearchText).call(idsOfProductsMatchingSearchText, id => _JSON$stringify__default["default"](id)).join(', ')})`,
|
|
1666
1730
|
includeProductsByIds: Boolean(canViewProducts && idsOfProductsMatchingSearchText.length > 0)
|
|
1667
1731
|
}, {
|
|
1668
1732
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
1669
1733
|
});
|
|
1670
1734
|
const commands = [];
|
|
1671
1735
|
if (data && data.productByVariantKey && data.productByVariantKey.masterData && data.productByVariantKey.masterData.staged && data.productByVariantKey.masterData.staged.variant && applicationContext.project && applicationContext.dataLocale) {
|
|
1672
|
-
var _context2;
|
|
1673
1736
|
const productId = data.productByVariantKey.id;
|
|
1674
1737
|
const variantId = data.productByVariantKey.masterData.staged.variant.id;
|
|
1675
1738
|
const variantKey = data.productByVariantKey.masterData.staged.variant.key;
|
|
1676
1739
|
commands.push({
|
|
1677
|
-
id:
|
|
1740
|
+
id: `go/product-variant-by-key/product(${productId}/variant(${variantId})`,
|
|
1678
1741
|
text: intl.formatMessage(messages.showProductVariant, {
|
|
1679
1742
|
variantName: translate(data.productByVariantKey.masterData.staged.nameAllLocales, applicationContext.dataLocale)
|
|
1680
1743
|
}),
|
|
1681
1744
|
keywords: variantKey ? [variantKey] : undefined,
|
|
1682
1745
|
action: {
|
|
1683
1746
|
type: actionTypes.go,
|
|
1684
|
-
to: commonTags.oneLineTrim
|
|
1747
|
+
to: commonTags.oneLineTrim`
|
|
1748
|
+
/${applicationContext.project.key}
|
|
1749
|
+
/products
|
|
1750
|
+
/${productId}
|
|
1751
|
+
/variants
|
|
1752
|
+
/${variantId}
|
|
1753
|
+
`
|
|
1685
1754
|
},
|
|
1686
1755
|
subCommands: createProductVariantSubCommands({
|
|
1687
1756
|
intl,
|
|
@@ -1692,17 +1761,22 @@ const QuickAccess = props => {
|
|
|
1692
1761
|
});
|
|
1693
1762
|
}
|
|
1694
1763
|
if (data && data.productByVariantSku && data.productByVariantSku.masterData && data.productByVariantSku.masterData.staged && data.productByVariantSku.masterData.staged.variant && applicationContext.project && applicationContext.dataLocale) {
|
|
1695
|
-
var _context3;
|
|
1696
1764
|
const productId = data.productByVariantSku.id;
|
|
1697
1765
|
const variantId = data.productByVariantSku.masterData.staged.variant.id;
|
|
1698
1766
|
commands.push({
|
|
1699
|
-
id:
|
|
1767
|
+
id: `go/product-variant-by-sku/product(${productId})/variant(${variantId})`,
|
|
1700
1768
|
text: intl.formatMessage(messages.showProductVariant, {
|
|
1701
1769
|
variantName: data.productByVariantSku.masterData.staged.variant.sku
|
|
1702
1770
|
}),
|
|
1703
1771
|
action: {
|
|
1704
1772
|
type: actionTypes.go,
|
|
1705
|
-
to: commonTags.oneLineTrim
|
|
1773
|
+
to: commonTags.oneLineTrim`
|
|
1774
|
+
/${applicationContext.project.key}
|
|
1775
|
+
/products
|
|
1776
|
+
/${productId}
|
|
1777
|
+
/variants
|
|
1778
|
+
/${variantId}
|
|
1779
|
+
`
|
|
1706
1780
|
},
|
|
1707
1781
|
subCommands: createProductVariantSubCommands({
|
|
1708
1782
|
intl,
|
|
@@ -1713,17 +1787,16 @@ const QuickAccess = props => {
|
|
|
1713
1787
|
});
|
|
1714
1788
|
}
|
|
1715
1789
|
if (data && data.productById && data.productById.masterData && data.productById.masterData.staged && data.productById.masterData.staged.nameAllLocales && applicationContext.project && applicationContext.dataLocale) {
|
|
1716
|
-
var _context4;
|
|
1717
1790
|
const productId = data.productById.id;
|
|
1718
1791
|
commands.push({
|
|
1719
|
-
id:
|
|
1792
|
+
id: `go/product-by-id/product(${productId})`,
|
|
1720
1793
|
text: intl.formatMessage(messages.showProduct, {
|
|
1721
1794
|
productName: translate(data.productById.masterData.staged.nameAllLocales, applicationContext.dataLocale)
|
|
1722
1795
|
}),
|
|
1723
1796
|
keywords: [productId],
|
|
1724
1797
|
action: {
|
|
1725
1798
|
type: actionTypes.go,
|
|
1726
|
-
to:
|
|
1799
|
+
to: `/${applicationContext.project.key}/products/${productId}`
|
|
1727
1800
|
},
|
|
1728
1801
|
subCommands: createProductTabsSubCommands({
|
|
1729
1802
|
intl,
|
|
@@ -1733,19 +1806,18 @@ const QuickAccess = props => {
|
|
|
1733
1806
|
});
|
|
1734
1807
|
}
|
|
1735
1808
|
if (data && data.productsByIds && data.productsByIds.results) {
|
|
1736
|
-
var
|
|
1737
|
-
_forEachInstanceProperty__default["default"](
|
|
1809
|
+
var _context2;
|
|
1810
|
+
_forEachInstanceProperty__default["default"](_context2 = data.productsByIds.results).call(_context2, product => {
|
|
1738
1811
|
if (product.masterData.staged && applicationContext.project && applicationContext.dataLocale) {
|
|
1739
|
-
var _context6;
|
|
1740
1812
|
commands.push({
|
|
1741
|
-
id:
|
|
1813
|
+
id: `go/product-by-search-text/product(${product.id})`,
|
|
1742
1814
|
text: intl.formatMessage(messages.showProduct, {
|
|
1743
1815
|
productName: translate(product.masterData.staged.nameAllLocales, applicationContext.dataLocale)
|
|
1744
1816
|
}),
|
|
1745
1817
|
keywords: [product.id],
|
|
1746
1818
|
action: {
|
|
1747
1819
|
type: actionTypes.go,
|
|
1748
|
-
to:
|
|
1820
|
+
to: `/${applicationContext.project.key}/products/${product.id}`
|
|
1749
1821
|
},
|
|
1750
1822
|
subCommands: createProductTabsSubCommands({
|
|
1751
1823
|
intl,
|
|
@@ -1757,16 +1829,15 @@ const QuickAccess = props => {
|
|
|
1757
1829
|
});
|
|
1758
1830
|
}
|
|
1759
1831
|
if (data && data.productByKey && applicationContext.project && applicationContext.dataLocale) {
|
|
1760
|
-
var _context7;
|
|
1761
1832
|
const productId = data.productByKey.id;
|
|
1762
1833
|
commands.push({
|
|
1763
|
-
id:
|
|
1834
|
+
id: `go/product-by-key/product(${productId})`,
|
|
1764
1835
|
text: intl.formatMessage(messages.showProduct, {
|
|
1765
1836
|
productName: searchText
|
|
1766
1837
|
}),
|
|
1767
1838
|
action: {
|
|
1768
1839
|
type: actionTypes.go,
|
|
1769
|
-
to:
|
|
1840
|
+
to: `/${applicationContext.project.key}/products/${productId}`
|
|
1770
1841
|
},
|
|
1771
1842
|
subCommands: createProductTabsSubCommands({
|
|
1772
1843
|
intl,
|
|
@@ -1811,7 +1882,7 @@ const QuickAccess = props => {
|
|
|
1811
1882
|
}
|
|
1812
1883
|
}, [applicationContext, debouncedGetProjectCommands, execQuery, intl, isCanViewDashboardEnabled, isCustomApplicationsEnabled, isPimSearchEnabled, props.onChangeProjectDataLocale]);
|
|
1813
1884
|
const executeCommand = react$1.useCallback((command, meta) => {
|
|
1814
|
-
var
|
|
1885
|
+
var _context3;
|
|
1815
1886
|
if (typeof command.action === 'function') {
|
|
1816
1887
|
// Idea: We could handle these errors and set them on status bar of Butler
|
|
1817
1888
|
// We can also handle sync/async commands by checking command.action.then
|
|
@@ -1820,7 +1891,7 @@ const QuickAccess = props => {
|
|
|
1820
1891
|
}
|
|
1821
1892
|
// open in new window
|
|
1822
1893
|
// and always open other pages in a new window
|
|
1823
|
-
if (meta.openInNewTab || !_startsWithInstanceProperty__default["default"](
|
|
1894
|
+
if (meta.openInNewTab || !_startsWithInstanceProperty__default["default"](_context3 = command.action.to).call(_context3, '/')) {
|
|
1824
1895
|
// eslint-disable-next-line no-restricted-globals
|
|
1825
1896
|
open(command.action.to, '_blank');
|
|
1826
1897
|
} else if (applicationContext.environment.useFullRedirectsForLinks) {
|