@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,10 +1,8 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from '@babel/runtime-corejs3/helpers/esm/taggedTemplateLiteral';
|
|
2
1
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
3
2
|
import _pt from 'prop-types';
|
|
4
3
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
5
4
|
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
6
5
|
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
7
|
-
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
8
6
|
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
9
7
|
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
10
8
|
import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
@@ -38,11 +36,11 @@ import { customProperties, designTokens } from '@commercetools-uikit/design-syst
|
|
|
38
36
|
import { AngleThinRightIcon, SearchIcon } from '@commercetools-uikit/icons';
|
|
39
37
|
import LoadingSpinner from '@commercetools-uikit/loading-spinner';
|
|
40
38
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
41
|
-
import { B as ButlerContainer, p as pimIndexerStates } from './index-
|
|
39
|
+
import { B as ButlerContainer, p as pimIndexerStates } from './index-30d34b7f.esm.js';
|
|
42
40
|
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
43
41
|
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
44
42
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
45
|
-
import './index-
|
|
43
|
+
import './index-b6081c20.esm.js';
|
|
46
44
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
47
45
|
import '@babel/runtime-corejs3/core-js-stable/reflect/has';
|
|
48
46
|
import '@reduxjs/toolkit';
|
|
@@ -57,7 +55,7 @@ import 'redux-logger';
|
|
|
57
55
|
import '@emotion/styled/base';
|
|
58
56
|
import '@commercetools-frontend/application-components';
|
|
59
57
|
import '@commercetools-frontend/i18n';
|
|
60
|
-
import './oidc-
|
|
58
|
+
import './oidc-8275c04f.esm.js';
|
|
61
59
|
import '@babel/runtime-corejs3/core-js-stable/url';
|
|
62
60
|
import '@commercetools-uikit/spacings';
|
|
63
61
|
import '@commercetools-uikit/flat-button';
|
|
@@ -67,6 +65,8 @@ import 'react-select';
|
|
|
67
65
|
import '@commercetools-uikit/accessible-hidden';
|
|
68
66
|
import '@commercetools-uikit/select-input';
|
|
69
67
|
import '@commercetools-uikit/text';
|
|
68
|
+
import '@commercetools-uikit/secondary-button';
|
|
69
|
+
import '@commercetools-uikit/tooltip';
|
|
70
70
|
import '@commercetools-frontend/assets/images/ct-logo.svg';
|
|
71
71
|
import '@commercetools-frontend/browser-history';
|
|
72
72
|
import '@commercetools-frontend/l10n';
|
|
@@ -109,26 +109,26 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
109
109
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1dGxlci1jb21tYW5kLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQ2MiLCJmaWxlIjoiYnV0bGVyLWNvbW1hbmQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTW91c2VFdmVudEhhbmRsZXIgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjdXN0b21Qcm9wZXJ0aWVzIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvZGVzaWduLXN5c3RlbSc7XG5pbXBvcnQgeyBBbmdsZVRoaW5SaWdodEljb24gfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9pY29ucyc7XG5pbXBvcnQgdHlwZSB7IENvbW1hbmQgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIGNvbW1hbmQ6IENvbW1hbmQ7XG4gIGlzU2VsZWN0ZWQ/OiBib29sZWFuO1xuICBvbkNsaWNrOiBNb3VzZUV2ZW50SGFuZGxlcjxIVE1MRGl2RWxlbWVudD47XG4gIG9uTW91c2VFbnRlcjogTW91c2VFdmVudEhhbmRsZXI8SFRNTERpdkVsZW1lbnQ+O1xufTtcblxuY29uc3QgQnV0bGVyQ29tbWFuZCA9IChwcm9wczogUHJvcHMpID0+IChcbiAgPGRpdlxuICAgIGtleT17cHJvcHMuY29tbWFuZC5pZH1cbiAgICBkYXRhLXRlc3RpZD17YHF1aWNrLWFjY2Vzcy1yZXN1bHQoJHtwcm9wcy5jb21tYW5kLmlkfSlgfVxuICAgIGFyaWEtY3VycmVudD17cHJvcHMuaXNTZWxlY3RlZCA9PT0gdHJ1ZSA/ICd0cnVlJyA6ICdmYWxzZSd9XG4gICAgY3NzPXtjc3NgXG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgcGFkZGluZzogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ019O1xuICAgICAgaGVpZ2h0OiAzNnB4O1xuICAgICAgZm9udC1zaXplOiAxNnB4O1xuICAgICAgZm9udC13ZWlnaHQ6IDIwMDtcbiAgICAgIGxpbmUtaGVpZ2h0OiAzNnB4O1xuICAgICAgY3Vyc29yOiBkZWZhdWx0O1xuICAgICAgJHtwcm9wcy5pc1NlbGVjdGVkID09PSB0cnVlXG4gICAgICAgID8gYFxuICAgICAgICAgICAgYmFja2dyb3VuZDogJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yQWNjZW50fTtcbiAgICAgICAgICAgIGNvbG9yOiAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICBgXG4gICAgICAgIDogJyd9XG4gICAgYH1cbiAgICBvbk1vdXNlRW50ZXI9e3Byb3BzLm9uTW91c2VFbnRlcn1cbiAgICBvbkNsaWNrPXtwcm9wcy5vbkNsaWNrfVxuICA+XG4gICAgPGRpdlxuICAgICAgY3NzPXtjc3NgXG4gICAgICAgIGZsZXg6IDEgYXV0bztcbiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gICAgICBgfVxuICAgID5cbiAgICAgIHtwcm9wcy5jb21tYW5kLnRleHR9XG4gICAgPC9kaXY+XG4gICAgeygoQXJyYXkuaXNBcnJheShwcm9wcy5jb21tYW5kLnN1YkNvbW1hbmRzKSAmJlxuICAgICAgcHJvcHMuY29tbWFuZC5zdWJDb21tYW5kcy5sZW5ndGggPiAwKSB8fFxuICAgICAgdHlwZW9mIHByb3BzLmNvbW1hbmQuc3ViQ29tbWFuZHMgPT09ICdmdW5jdGlvbicpICYmIChcbiAgICAgIDxkaXZcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgYWxpZ24tc2VsZjogY2VudGVyO1xuICAgICAgICAgID4gKiB7XG4gICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgICB9XG4gICAgICAgIGB9XG4gICAgICA+XG4gICAgICAgIDxBbmdsZVRoaW5SaWdodEljb25cbiAgICAgICAgICBzaXplPVwibWVkaXVtXCJcbiAgICAgICAgICBjb2xvcj17cHJvcHMuaXNTZWxlY3RlZCA/ICdzdXJmYWNlJyA6ICduZXV0cmFsNjAnfVxuICAgICAgICAvPlxuICAgICAgPC9kaXY+XG4gICAgKX1cbiAgPC9kaXY+XG4pO1xuXG5CdXRsZXJDb21tYW5kLmRpc3BsYXlOYW1lID0gJ0J1dGxlckNvbW1hbmQnO1xuXG5leHBvcnQgZGVmYXVsdCBCdXRsZXJDb21tYW5kO1xuIl19 */",
|
|
110
110
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
111
111
|
};
|
|
112
|
-
const ButlerCommand = props => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
})
|
|
130
|
-
}
|
|
131
|
-
};
|
|
112
|
+
const ButlerCommand = props => jsxs("div", {
|
|
113
|
+
"data-testid": `quick-access-result(${props.command.id})`,
|
|
114
|
+
"aria-current": props.isSelected === true ? 'true' : 'false',
|
|
115
|
+
css: /*#__PURE__*/css("display:flex;padding:0 ", customProperties.spacingM, ";height:36px;font-size:16px;font-weight:200;line-height:36px;cursor:default;", props.isSelected === true ? `
|
|
116
|
+
background: ${customProperties.colorAccent};
|
|
117
|
+
color: ${customProperties.colorSurface};
|
|
118
|
+
` : '', ";" + (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 */"),
|
|
119
|
+
onMouseEnter: props.onMouseEnter,
|
|
120
|
+
onClick: props.onClick,
|
|
121
|
+
children: [jsx("div", {
|
|
122
|
+
css: _ref2,
|
|
123
|
+
children: props.command.text
|
|
124
|
+
}), (_Array$isArray(props.command.subCommands) && props.command.subCommands.length > 0 || typeof props.command.subCommands === 'function') && jsx("div", {
|
|
125
|
+
css: _ref$1,
|
|
126
|
+
children: jsx(AngleThinRightIcon, {
|
|
127
|
+
size: "medium",
|
|
128
|
+
color: props.isSelected ? 'surface' : 'neutral60'
|
|
129
|
+
})
|
|
130
|
+
})]
|
|
131
|
+
}, props.command.id);
|
|
132
132
|
ButlerCommand.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
133
133
|
command: _pt.any.isRequired,
|
|
134
134
|
isSelected: _pt.bool,
|
|
@@ -386,7 +386,6 @@ var messages = defineMessages({
|
|
|
386
386
|
}
|
|
387
387
|
});
|
|
388
388
|
|
|
389
|
-
var _templateObject$3, _templateObject2$2;
|
|
390
389
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
391
390
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context12, _context13; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context12 = ownKeys(Object(t), !0)).call(_context12, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context13 = ownKeys(Object(t))).call(_context13, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
392
391
|
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)."; }
|
|
@@ -409,7 +408,24 @@ const hasNewWindowModifier = event => {
|
|
|
409
408
|
return event.ctrlKey;
|
|
410
409
|
}
|
|
411
410
|
};
|
|
412
|
-
const shakeAnimation = keyframes
|
|
411
|
+
const shakeAnimation = keyframes`
|
|
412
|
+
from,
|
|
413
|
+
to {
|
|
414
|
+
transform: translate3d(0, 0, 0);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
14%,
|
|
418
|
+
42%,
|
|
419
|
+
70% {
|
|
420
|
+
transform: translate3d(-3px, 0, 0);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
28%,
|
|
424
|
+
56%,
|
|
425
|
+
84% {
|
|
426
|
+
transform: translate3d(3px, 0, 0);
|
|
427
|
+
}
|
|
428
|
+
`;
|
|
413
429
|
const initialState = {
|
|
414
430
|
hasNetworkError: false,
|
|
415
431
|
isLoading: false,
|
|
@@ -909,7 +925,11 @@ const ButlerWithAnimation = props => jsx(ClassNames, {
|
|
|
909
925
|
children: _ref2 => {
|
|
910
926
|
let css = _ref2.css;
|
|
911
927
|
return jsx(Butler, _objectSpread(_objectSpread({}, props), {}, {
|
|
912
|
-
classNameShakeAnimation: css
|
|
928
|
+
classNameShakeAnimation: css`
|
|
929
|
+
animation-duration: 0.45s;
|
|
930
|
+
animation-fill-mode: both;
|
|
931
|
+
animation-name: ${shakeAnimation};
|
|
932
|
+
`
|
|
913
933
|
}));
|
|
914
934
|
}
|
|
915
935
|
});
|
|
@@ -945,7 +965,6 @@ const actionTypes = {
|
|
|
945
965
|
go: 'go'
|
|
946
966
|
};
|
|
947
967
|
|
|
948
|
-
var _templateObject$2;
|
|
949
968
|
function nonNullable(value) {
|
|
950
969
|
return value !== null && value !== undefined && typeof value !== 'boolean';
|
|
951
970
|
}
|
|
@@ -961,7 +980,7 @@ const createCommands = _ref => {
|
|
|
961
980
|
keywords: ['Go to Dashboard'],
|
|
962
981
|
action: {
|
|
963
982
|
type: actionTypes.go,
|
|
964
|
-
to:
|
|
983
|
+
to: `/${applicationContext.project.key}/dashboard`
|
|
965
984
|
}
|
|
966
985
|
}, applicationContext.project && applicationContext.permissions && hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && {
|
|
967
986
|
id: 'go/products',
|
|
@@ -969,35 +988,35 @@ const createCommands = _ref => {
|
|
|
969
988
|
keywords: ['Go to Products'],
|
|
970
989
|
action: {
|
|
971
990
|
type: actionTypes.go,
|
|
972
|
-
to:
|
|
991
|
+
to: `/${applicationContext.project.key}/products`
|
|
973
992
|
},
|
|
974
993
|
subCommands: _filterInstanceProperty(_context2 = [hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && {
|
|
975
994
|
id: 'go/products/list',
|
|
976
995
|
text: intl.formatMessage(messages.openProductList),
|
|
977
996
|
action: {
|
|
978
997
|
type: actionTypes.go,
|
|
979
|
-
to:
|
|
998
|
+
to: `/${applicationContext.project.key}/products`
|
|
980
999
|
}
|
|
981
1000
|
}, hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && {
|
|
982
1001
|
id: 'go/products/modified',
|
|
983
1002
|
text: intl.formatMessage(messages.openModifiedProducts),
|
|
984
1003
|
action: {
|
|
985
1004
|
type: actionTypes.go,
|
|
986
|
-
to:
|
|
1005
|
+
to: `/${applicationContext.project.key}/products/modified`
|
|
987
1006
|
}
|
|
988
1007
|
}, hasSomePermissions([permissions.ViewProducts], applicationContext.permissions) && featureToggles.pimSearch && {
|
|
989
1008
|
id: 'go/products/pim-search',
|
|
990
1009
|
text: intl.formatMessage(messages.openPimSearch),
|
|
991
1010
|
action: {
|
|
992
1011
|
type: actionTypes.go,
|
|
993
|
-
to:
|
|
1012
|
+
to: `/${applicationContext.project.key}/products`
|
|
994
1013
|
}
|
|
995
1014
|
}, hasSomePermissions([permissions.ManageProducts], applicationContext.permissions) && {
|
|
996
1015
|
id: 'go/products/add',
|
|
997
1016
|
text: intl.formatMessage(messages.openAddProducts),
|
|
998
1017
|
action: {
|
|
999
1018
|
type: actionTypes.go,
|
|
1000
|
-
to:
|
|
1019
|
+
to: `/${applicationContext.project.key}/products/new`
|
|
1001
1020
|
}
|
|
1002
1021
|
}]).call(_context2, nonNullable)
|
|
1003
1022
|
}, applicationContext.project && applicationContext.permissions && hasSomePermissions([permissions.ViewCategories], applicationContext.permissions) && {
|
|
@@ -1006,28 +1025,28 @@ const createCommands = _ref => {
|
|
|
1006
1025
|
keywords: ['Go to Categories'],
|
|
1007
1026
|
action: {
|
|
1008
1027
|
type: actionTypes.go,
|
|
1009
|
-
to:
|
|
1028
|
+
to: `/${applicationContext.project.key}/categories`
|
|
1010
1029
|
},
|
|
1011
1030
|
subCommands: _filterInstanceProperty(_context3 = [hasSomePermissions([permissions.ViewCategories], applicationContext.permissions) && {
|
|
1012
1031
|
id: 'go/categories/list',
|
|
1013
1032
|
text: intl.formatMessage(messages.openCategoriesList),
|
|
1014
1033
|
action: {
|
|
1015
1034
|
type: actionTypes.go,
|
|
1016
|
-
to:
|
|
1035
|
+
to: `/${applicationContext.project.key}/categories?mode=list`
|
|
1017
1036
|
}
|
|
1018
1037
|
}, hasSomePermissions([permissions.ViewCategories], applicationContext.permissions) && {
|
|
1019
1038
|
id: 'go/categories/search',
|
|
1020
1039
|
text: intl.formatMessage(messages.openCategoriesSearch),
|
|
1021
1040
|
action: {
|
|
1022
1041
|
type: actionTypes.go,
|
|
1023
|
-
to:
|
|
1042
|
+
to: `/${applicationContext.project.key}/categories?mode=search`
|
|
1024
1043
|
}
|
|
1025
1044
|
}, hasSomePermissions([permissions.ManageCategories], applicationContext.permissions) && {
|
|
1026
1045
|
id: 'go/categories/add',
|
|
1027
1046
|
text: intl.formatMessage(messages.openAddCategory),
|
|
1028
1047
|
action: {
|
|
1029
1048
|
type: actionTypes.go,
|
|
1030
|
-
to:
|
|
1049
|
+
to: `/${applicationContext.project.key}/categories/new`
|
|
1031
1050
|
}
|
|
1032
1051
|
}]).call(_context3, nonNullable)
|
|
1033
1052
|
}, applicationContext.project && applicationContext.permissions && hasSomePermissions([permissions.ViewCustomers, permissions.ViewCustomerGroups], applicationContext.permissions) && {
|
|
@@ -1036,35 +1055,35 @@ const createCommands = _ref => {
|
|
|
1036
1055
|
keywords: ['Go to Customers'],
|
|
1037
1056
|
action: {
|
|
1038
1057
|
type: actionTypes.go,
|
|
1039
|
-
to:
|
|
1058
|
+
to: `/${applicationContext.project.key}/customers`
|
|
1040
1059
|
},
|
|
1041
1060
|
subCommands: _filterInstanceProperty(_context4 = [hasSomePermissions([permissions.ViewCustomers], applicationContext.permissions) && {
|
|
1042
1061
|
id: 'go/customers/list',
|
|
1043
1062
|
text: intl.formatMessage(messages.openCustomersList),
|
|
1044
1063
|
action: {
|
|
1045
1064
|
type: actionTypes.go,
|
|
1046
|
-
to:
|
|
1065
|
+
to: `/${applicationContext.project.key}/customers`
|
|
1047
1066
|
}
|
|
1048
1067
|
}, hasSomePermissions([permissions.ManageCustomers], applicationContext.permissions) && {
|
|
1049
1068
|
id: 'go/customers/new',
|
|
1050
1069
|
text: intl.formatMessage(messages.openAddCustomer),
|
|
1051
1070
|
action: {
|
|
1052
1071
|
type: actionTypes.go,
|
|
1053
|
-
to:
|
|
1072
|
+
to: `/${applicationContext.project.key}/customers/new`
|
|
1054
1073
|
}
|
|
1055
1074
|
}, hasSomePermissions([permissions.ViewCustomerGroups], applicationContext.permissions) && {
|
|
1056
1075
|
id: 'go/customer/customer-groups',
|
|
1057
1076
|
text: intl.formatMessage(messages.openCustomerGroupsList),
|
|
1058
1077
|
action: {
|
|
1059
1078
|
type: actionTypes.go,
|
|
1060
|
-
to:
|
|
1079
|
+
to: `/${applicationContext.project.key}/customers/customer-groups`
|
|
1061
1080
|
}
|
|
1062
1081
|
}, hasSomePermissions([permissions.ManageCustomerGroups], applicationContext.permissions) && {
|
|
1063
1082
|
id: 'go/customers/customer-groups/add',
|
|
1064
1083
|
text: intl.formatMessage(messages.openAddCustomerGroup),
|
|
1065
1084
|
action: {
|
|
1066
1085
|
type: actionTypes.go,
|
|
1067
|
-
to:
|
|
1086
|
+
to: `/${applicationContext.project.key}/customers/customer-groups/new`
|
|
1068
1087
|
}
|
|
1069
1088
|
}]).call(_context4, nonNullable)
|
|
1070
1089
|
}, applicationContext.project && applicationContext.permissions && hasSomePermissions([permissions.ViewOrders], applicationContext.permissions) && {
|
|
@@ -1073,21 +1092,21 @@ const createCommands = _ref => {
|
|
|
1073
1092
|
keywords: ['Go to Orders'],
|
|
1074
1093
|
action: {
|
|
1075
1094
|
type: actionTypes.go,
|
|
1076
|
-
to:
|
|
1095
|
+
to: `/${applicationContext.project.key}/orders`
|
|
1077
1096
|
},
|
|
1078
1097
|
subCommands: _filterInstanceProperty(_context5 = [hasSomePermissions([permissions.ViewOrders], applicationContext.permissions) && {
|
|
1079
1098
|
id: 'go/orders/list',
|
|
1080
1099
|
text: intl.formatMessage(messages.openOrdersList),
|
|
1081
1100
|
action: {
|
|
1082
1101
|
type: actionTypes.go,
|
|
1083
|
-
to:
|
|
1102
|
+
to: `/${applicationContext.project.key}/orders`
|
|
1084
1103
|
}
|
|
1085
1104
|
}, hasSomePermissions([permissions.ManageOrders], applicationContext.permissions) && {
|
|
1086
1105
|
id: 'go/orders/add',
|
|
1087
1106
|
text: intl.formatMessage(messages.openAddOrder),
|
|
1088
1107
|
action: {
|
|
1089
1108
|
type: actionTypes.go,
|
|
1090
|
-
to:
|
|
1109
|
+
to: `/${applicationContext.project.key}/orders/new`
|
|
1091
1110
|
}
|
|
1092
1111
|
}]).call(_context5, nonNullable)
|
|
1093
1112
|
}, applicationContext.project && applicationContext.permissions && hasSomePermissions([permissions.ViewDiscountCodes, permissions.ViewProductDiscounts, permissions.ViewCartDiscounts], applicationContext.permissions) && {
|
|
@@ -1096,56 +1115,56 @@ const createCommands = _ref => {
|
|
|
1096
1115
|
keywords: ['Go to Discounts'],
|
|
1097
1116
|
action: {
|
|
1098
1117
|
type: actionTypes.go,
|
|
1099
|
-
to:
|
|
1118
|
+
to: `/${applicationContext.project.key}/discounts`
|
|
1100
1119
|
},
|
|
1101
1120
|
subCommands: _filterInstanceProperty(_context6 = [hasSomePermissions([permissions.ViewProductDiscounts], applicationContext.permissions) && {
|
|
1102
1121
|
id: 'go/discounts/products/list',
|
|
1103
1122
|
text: intl.formatMessage(messages.openProductDiscountsList),
|
|
1104
1123
|
action: {
|
|
1105
1124
|
type: actionTypes.go,
|
|
1106
|
-
to:
|
|
1125
|
+
to: `/${applicationContext.project.key}/discounts/products`
|
|
1107
1126
|
}
|
|
1108
1127
|
}, hasSomePermissions([permissions.ViewCartDiscounts], applicationContext.permissions) && {
|
|
1109
1128
|
id: 'go/discounts/carts/list',
|
|
1110
1129
|
text: intl.formatMessage(messages.openCartDiscountsList),
|
|
1111
1130
|
action: {
|
|
1112
1131
|
type: actionTypes.go,
|
|
1113
|
-
to:
|
|
1132
|
+
to: `/${applicationContext.project.key}/discounts/carts`
|
|
1114
1133
|
}
|
|
1115
1134
|
}, hasSomePermissions([permissions.ViewDiscountCodes], applicationContext.permissions) && {
|
|
1116
1135
|
id: 'go/discounts/codes/list',
|
|
1117
1136
|
text: intl.formatMessage(messages.openDiscountCodesList),
|
|
1118
1137
|
action: {
|
|
1119
1138
|
type: actionTypes.go,
|
|
1120
|
-
to:
|
|
1139
|
+
to: `/${applicationContext.project.key}/discounts/codes`
|
|
1121
1140
|
}
|
|
1122
1141
|
}, hasSomePermissions([permissions.ManageProductDiscounts, permissions.ManageDiscountCodes, permissions.ManageCartDiscounts], applicationContext.permissions) && {
|
|
1123
1142
|
id: 'go/discounts/add',
|
|
1124
1143
|
text: intl.formatMessage(messages.openAddDiscount),
|
|
1125
1144
|
action: {
|
|
1126
1145
|
type: actionTypes.go,
|
|
1127
|
-
to:
|
|
1146
|
+
to: `/${applicationContext.project.key}/discounts/new`
|
|
1128
1147
|
},
|
|
1129
1148
|
subCommands: _filterInstanceProperty(_context7 = [hasSomePermissions([permissions.ManageProductDiscounts], applicationContext.permissions) && {
|
|
1130
1149
|
id: 'go/discounts/product/add',
|
|
1131
1150
|
text: intl.formatMessage(messages.openAddProductDiscount),
|
|
1132
1151
|
action: {
|
|
1133
1152
|
type: actionTypes.go,
|
|
1134
|
-
to:
|
|
1153
|
+
to: `/${applicationContext.project.key}/discounts/products/new`
|
|
1135
1154
|
}
|
|
1136
1155
|
}, hasSomePermissions([permissions.ManageCartDiscounts], applicationContext.permissions) && {
|
|
1137
1156
|
id: 'go/discounts/cart/add',
|
|
1138
1157
|
text: intl.formatMessage(messages.openAddCartDiscount),
|
|
1139
1158
|
action: {
|
|
1140
1159
|
type: actionTypes.go,
|
|
1141
|
-
to:
|
|
1160
|
+
to: `/${applicationContext.project.key}/discounts/carts/new`
|
|
1142
1161
|
}
|
|
1143
1162
|
}, hasSomePermissions([permissions.ManageDiscountCodes], applicationContext.permissions) && {
|
|
1144
1163
|
id: 'go/discounts/code/add',
|
|
1145
1164
|
text: intl.formatMessage(messages.openAddCartDiscount),
|
|
1146
1165
|
action: {
|
|
1147
1166
|
type: actionTypes.go,
|
|
1148
|
-
to:
|
|
1167
|
+
to: `/${applicationContext.project.key}/discounts/codes/new`
|
|
1149
1168
|
}
|
|
1150
1169
|
}]).call(_context7, nonNullable)
|
|
1151
1170
|
}]).call(_context6, nonNullable)
|
|
@@ -1155,49 +1174,49 @@ const createCommands = _ref => {
|
|
|
1155
1174
|
keywords: ['Go to Settings'],
|
|
1156
1175
|
action: {
|
|
1157
1176
|
type: actionTypes.go,
|
|
1158
|
-
to:
|
|
1177
|
+
to: `/${applicationContext.project.key}/settings/project`
|
|
1159
1178
|
},
|
|
1160
1179
|
subCommands: _filterInstanceProperty(_context8 = [hasSomePermissions([permissions.ViewProjectSettings, permissions.ManageProjectSettings], applicationContext.permissions) && {
|
|
1161
1180
|
id: 'go/settings/project',
|
|
1162
1181
|
text: intl.formatMessage(messages.openProjectSettings),
|
|
1163
1182
|
action: {
|
|
1164
1183
|
type: actionTypes.go,
|
|
1165
|
-
to:
|
|
1184
|
+
to: `/${applicationContext.project.key}/settings/project`
|
|
1166
1185
|
},
|
|
1167
1186
|
subCommands: _filterInstanceProperty(_context9 = [{
|
|
1168
1187
|
id: 'go/settings/project/international',
|
|
1169
1188
|
text: intl.formatMessage(messages.openProjectSettingsInternationalTab),
|
|
1170
1189
|
action: {
|
|
1171
1190
|
type: actionTypes.go,
|
|
1172
|
-
to:
|
|
1191
|
+
to: `/${applicationContext.project.key}/settings/project/international`
|
|
1173
1192
|
}
|
|
1174
1193
|
}, {
|
|
1175
1194
|
id: 'go/settings/project/taxes',
|
|
1176
1195
|
text: intl.formatMessage(messages.openProjectSettingsTaxesTab),
|
|
1177
1196
|
action: {
|
|
1178
1197
|
type: actionTypes.go,
|
|
1179
|
-
to:
|
|
1198
|
+
to: `/${applicationContext.project.key}/settings/project/taxes`
|
|
1180
1199
|
}
|
|
1181
1200
|
}, {
|
|
1182
1201
|
id: 'go/settings/project/shipping-methods',
|
|
1183
1202
|
text: intl.formatMessage(messages.openProjectSettingsShippingMethodsTab),
|
|
1184
1203
|
action: {
|
|
1185
1204
|
type: actionTypes.go,
|
|
1186
|
-
to:
|
|
1205
|
+
to: `/${applicationContext.project.key}/settings/project/shipping-methods`
|
|
1187
1206
|
}
|
|
1188
1207
|
}, {
|
|
1189
1208
|
id: 'go/settings/project/channels',
|
|
1190
1209
|
text: intl.formatMessage(messages.openProjectSettingsChannelsTab),
|
|
1191
1210
|
action: {
|
|
1192
1211
|
type: actionTypes.go,
|
|
1193
|
-
to:
|
|
1212
|
+
to: `/${applicationContext.project.key}/settings/project/channels`
|
|
1194
1213
|
}
|
|
1195
1214
|
}, {
|
|
1196
1215
|
id: 'go/settings/project/stores',
|
|
1197
1216
|
text: intl.formatMessage(messages.openProjectSettingsStoresTab),
|
|
1198
1217
|
action: {
|
|
1199
1218
|
type: actionTypes.go,
|
|
1200
|
-
to:
|
|
1219
|
+
to: `/${applicationContext.project.key}/settings/project/stores`
|
|
1201
1220
|
}
|
|
1202
1221
|
}]).call(_context9, nonNullable)
|
|
1203
1222
|
}, hasSomePermissions([permissions.ViewProductTypes], applicationContext.permissions) && {
|
|
@@ -1205,28 +1224,28 @@ const createCommands = _ref => {
|
|
|
1205
1224
|
text: intl.formatMessage(messages.openProductTypesSettings),
|
|
1206
1225
|
action: {
|
|
1207
1226
|
type: actionTypes.go,
|
|
1208
|
-
to:
|
|
1227
|
+
to: `/${applicationContext.project.key}/settings/product-types`
|
|
1209
1228
|
}
|
|
1210
1229
|
}, hasSomePermissions([permissions.ViewDeveloperSettings], applicationContext.permissions) && {
|
|
1211
1230
|
id: 'go/settings/developer',
|
|
1212
1231
|
text: intl.formatMessage(messages.openDeveloperSettings),
|
|
1213
1232
|
action: {
|
|
1214
1233
|
type: actionTypes.go,
|
|
1215
|
-
to:
|
|
1234
|
+
to: `/${applicationContext.project.key}/settings/developer`
|
|
1216
1235
|
},
|
|
1217
1236
|
subCommands: _filterInstanceProperty(_context10 = [hasSomePermissions([permissions.ViewDeveloperSettings], applicationContext.permissions) && {
|
|
1218
1237
|
id: 'go/settings/developer/api-clients/list',
|
|
1219
1238
|
text: intl.formatMessage(messages.openApiClientsList),
|
|
1220
1239
|
action: {
|
|
1221
1240
|
type: actionTypes.go,
|
|
1222
|
-
to:
|
|
1241
|
+
to: `/${applicationContext.project.key}/settings/developer/api-clients`
|
|
1223
1242
|
}
|
|
1224
1243
|
}, hasSomePermissions([permissions.ManageDeveloperSettings], applicationContext.permissions) && {
|
|
1225
1244
|
id: 'go/settings/developer/api-clients/add',
|
|
1226
1245
|
text: intl.formatMessage(messages.openAddApiClient),
|
|
1227
1246
|
action: {
|
|
1228
1247
|
type: actionTypes.go,
|
|
1229
|
-
to:
|
|
1248
|
+
to: `/${applicationContext.project.key}/settings/developer/api-clients/new`
|
|
1230
1249
|
}
|
|
1231
1250
|
}]).call(_context10, nonNullable)
|
|
1232
1251
|
}, featureToggles.customApplications && hasSomePermissions([permissions.ManageProjectSettings], applicationContext.permissions) && {
|
|
@@ -1234,7 +1253,7 @@ const createCommands = _ref => {
|
|
|
1234
1253
|
text: intl.formatMessage(messages.openCustomApplicationsSettings),
|
|
1235
1254
|
action: {
|
|
1236
1255
|
type: actionTypes.go,
|
|
1237
|
-
to:
|
|
1256
|
+
to: `/${applicationContext.project.key}/settings/custom-applications`
|
|
1238
1257
|
}
|
|
1239
1258
|
}]).call(_context8, nonNullable)
|
|
1240
1259
|
}, applicationContext.project && applicationContext.project.languages && applicationContext.project.languages.length > 1 && {
|
|
@@ -1247,8 +1266,11 @@ const createCommands = _ref => {
|
|
|
1247
1266
|
subCommands: () => {
|
|
1248
1267
|
var _context11, _context12;
|
|
1249
1268
|
return _Promise.resolve(_filterInstanceProperty(_context11 = _mapInstanceProperty(_context12 = applicationContext.project ? applicationContext.project.languages : []).call(_context12, language => changeProjectDataLocale && {
|
|
1250
|
-
id:
|
|
1251
|
-
text: oneLineTrim
|
|
1269
|
+
id: `action/set-resource-language/${language}`,
|
|
1270
|
+
text: oneLineTrim`
|
|
1271
|
+
${language}
|
|
1272
|
+
${language === applicationContext.dataLocale ? ' (active)' : ''}
|
|
1273
|
+
`,
|
|
1252
1274
|
action: () => {
|
|
1253
1275
|
changeProjectDataLocale(language);
|
|
1254
1276
|
|
|
@@ -1275,7 +1297,7 @@ const createCommands = _ref => {
|
|
|
1275
1297
|
keywords: ['Go to user account', 'Go to profile', 'Open profile'],
|
|
1276
1298
|
action: {
|
|
1277
1299
|
type: actionTypes.go,
|
|
1278
|
-
to:
|
|
1300
|
+
to: `/account/profile`
|
|
1279
1301
|
}
|
|
1280
1302
|
}, {
|
|
1281
1303
|
id: 'go/privacy-policy',
|
|
@@ -1291,7 +1313,7 @@ const createCommands = _ref => {
|
|
|
1291
1313
|
keywords: ['Sign out'],
|
|
1292
1314
|
action: {
|
|
1293
1315
|
type: actionTypes.go,
|
|
1294
|
-
to:
|
|
1316
|
+
to: `/logout?reason=${LOGOUT_REASONS.USER}`
|
|
1295
1317
|
}
|
|
1296
1318
|
}, {
|
|
1297
1319
|
id: 'go/manage-projects',
|
|
@@ -1299,7 +1321,7 @@ const createCommands = _ref => {
|
|
|
1299
1321
|
keywords: ['Go to manage projects', 'Go to projects', 'Open projects list'],
|
|
1300
1322
|
action: {
|
|
1301
1323
|
type: actionTypes.go,
|
|
1302
|
-
to:
|
|
1324
|
+
to: `/account/projects`
|
|
1303
1325
|
}
|
|
1304
1326
|
}, {
|
|
1305
1327
|
id: 'go/manage-organizations',
|
|
@@ -1307,10 +1329,10 @@ const createCommands = _ref => {
|
|
|
1307
1329
|
keywords: ['Go to manage organizations', 'Go to organizations', 'Open organizations list'],
|
|
1308
1330
|
action: {
|
|
1309
1331
|
type: actionTypes.go,
|
|
1310
|
-
to:
|
|
1332
|
+
to: `/account/organizations`
|
|
1311
1333
|
}
|
|
1312
1334
|
}, ...(applicationContext.user ? _mapInstanceProperty(_context13 = applicationContext.user.projects.results).call(_context13, userProject => ({
|
|
1313
|
-
id:
|
|
1335
|
+
id: `go/project(${userProject.key})`,
|
|
1314
1336
|
text: intl.formatMessage(messages.useProject, {
|
|
1315
1337
|
projectName: userProject.name
|
|
1316
1338
|
}),
|
|
@@ -1318,7 +1340,7 @@ const createCommands = _ref => {
|
|
|
1318
1340
|
action: () => {
|
|
1319
1341
|
// Switching projects needs a full redirect so that
|
|
1320
1342
|
// the feature flags are reloaded (and things caches get destroyed)
|
|
1321
|
-
window.location.href =
|
|
1343
|
+
window.location.href = `/${userProject.key}`;
|
|
1322
1344
|
}
|
|
1323
1345
|
})) : [])]).call(_context, nonNullable);
|
|
1324
1346
|
};
|
|
@@ -1341,10 +1363,8 @@ const loadHistoryEntries = () => {
|
|
|
1341
1363
|
}
|
|
1342
1364
|
};
|
|
1343
1365
|
|
|
1344
|
-
var _templateObject$1, _templateObject2$1, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
1345
1366
|
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 } } } };
|
|
1346
1367
|
const createProductVariantSubCommands = _ref => {
|
|
1347
|
-
var _context, _context2, _context3, _context4;
|
|
1348
1368
|
let intl = _ref.intl,
|
|
1349
1369
|
applicationContext = _ref.applicationContext,
|
|
1350
1370
|
productId = _ref.productId,
|
|
@@ -1352,32 +1372,60 @@ const createProductVariantSubCommands = _ref => {
|
|
|
1352
1372
|
const canViewProducts = hasSomePermissions([permissions.ViewProducts], applicationContext.permissions);
|
|
1353
1373
|
if (!canViewProducts || !applicationContext.project) return [];
|
|
1354
1374
|
return [{
|
|
1355
|
-
id:
|
|
1375
|
+
id: `go/product(${productId})/variant(${variantId})/attributes`,
|
|
1356
1376
|
text: intl.formatMessage(messages.showProductVariantAttributes),
|
|
1357
1377
|
action: {
|
|
1358
1378
|
type: actionTypes.go,
|
|
1359
|
-
to: oneLineTrim
|
|
1379
|
+
to: oneLineTrim`
|
|
1380
|
+
/${applicationContext.project.key}
|
|
1381
|
+
/products
|
|
1382
|
+
/${productId}
|
|
1383
|
+
/variants
|
|
1384
|
+
/${variantId}
|
|
1385
|
+
/attributes
|
|
1386
|
+
`
|
|
1360
1387
|
}
|
|
1361
1388
|
}, {
|
|
1362
|
-
id:
|
|
1389
|
+
id: `go/product(${productId})/variant${variantId}/images`,
|
|
1363
1390
|
text: intl.formatMessage(messages.showProductVariantImages),
|
|
1364
1391
|
action: {
|
|
1365
1392
|
type: actionTypes.go,
|
|
1366
|
-
to: oneLineTrim
|
|
1393
|
+
to: oneLineTrim`
|
|
1394
|
+
/${applicationContext.project.key}
|
|
1395
|
+
/products
|
|
1396
|
+
/${productId}
|
|
1397
|
+
/variants
|
|
1398
|
+
/${variantId}
|
|
1399
|
+
/images
|
|
1400
|
+
`
|
|
1367
1401
|
}
|
|
1368
1402
|
}, {
|
|
1369
|
-
id:
|
|
1403
|
+
id: `go/product(${productId})/variant(${variantId})/prices`,
|
|
1370
1404
|
text: intl.formatMessage(messages.showProductVariantPrices),
|
|
1371
1405
|
action: {
|
|
1372
1406
|
type: actionTypes.go,
|
|
1373
|
-
to: oneLineTrim
|
|
1407
|
+
to: oneLineTrim`
|
|
1408
|
+
/${applicationContext.project.key}
|
|
1409
|
+
/products
|
|
1410
|
+
/${productId}
|
|
1411
|
+
/variants
|
|
1412
|
+
/${variantId}
|
|
1413
|
+
/prices
|
|
1414
|
+
`
|
|
1374
1415
|
}
|
|
1375
1416
|
}, {
|
|
1376
|
-
id:
|
|
1417
|
+
id: `go/product(${productId})/variant(${variantId})/inventory`,
|
|
1377
1418
|
text: intl.formatMessage(messages.showProductVariantInventory),
|
|
1378
1419
|
action: {
|
|
1379
1420
|
type: actionTypes.go,
|
|
1380
|
-
to: oneLineTrim
|
|
1421
|
+
to: oneLineTrim`
|
|
1422
|
+
/${applicationContext.project.key}
|
|
1423
|
+
/products
|
|
1424
|
+
/${productId}
|
|
1425
|
+
/variants
|
|
1426
|
+
/${variantId}
|
|
1427
|
+
/inventory
|
|
1428
|
+
`
|
|
1381
1429
|
}
|
|
1382
1430
|
}];
|
|
1383
1431
|
};
|
|
@@ -1405,25 +1453,28 @@ const createProductVariantListSubCommands = async _ref2 => {
|
|
|
1405
1453
|
target: GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
1406
1454
|
});
|
|
1407
1455
|
if (data && data.product && data.product.masterData && data.product.masterData.staged && applicationContext.project) {
|
|
1408
|
-
var
|
|
1456
|
+
var _context;
|
|
1409
1457
|
const projectKey = applicationContext.project.key;
|
|
1410
|
-
return _mapInstanceProperty(
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1458
|
+
return _mapInstanceProperty(_context = data.product.masterData.staged.allVariants).call(_context, variant => ({
|
|
1459
|
+
id: `go/product(${productId})/variant(${variant.id})`,
|
|
1460
|
+
text: formatVariantMessage(variant, intl),
|
|
1461
|
+
subCommands: createProductVariantSubCommands({
|
|
1462
|
+
intl,
|
|
1463
|
+
applicationContext,
|
|
1464
|
+
productId,
|
|
1465
|
+
variantId: variant.id
|
|
1466
|
+
}),
|
|
1467
|
+
action: {
|
|
1468
|
+
type: actionTypes.go,
|
|
1469
|
+
to: oneLineTrim`
|
|
1470
|
+
/${projectKey}
|
|
1471
|
+
/products
|
|
1472
|
+
/${productId}
|
|
1473
|
+
/variants
|
|
1474
|
+
/${variant.id}
|
|
1475
|
+
`
|
|
1476
|
+
}
|
|
1477
|
+
}));
|
|
1427
1478
|
}
|
|
1428
1479
|
return [];
|
|
1429
1480
|
};
|
|
@@ -1434,18 +1485,28 @@ const createProductTabsSubCommands = _ref3 => {
|
|
|
1434
1485
|
const canViewProducts = hasSomePermissions([permissions.ViewProducts], applicationContext.permissions);
|
|
1435
1486
|
if (!canViewProducts || !applicationContext.project) return [];
|
|
1436
1487
|
return [{
|
|
1437
|
-
id:
|
|
1488
|
+
id: `go/product(${productId})/general`,
|
|
1438
1489
|
text: intl.formatMessage(messages.openProductVariantGeneral),
|
|
1439
1490
|
action: {
|
|
1440
1491
|
type: actionTypes.go,
|
|
1441
|
-
to: oneLineTrim
|
|
1492
|
+
to: oneLineTrim`
|
|
1493
|
+
/${applicationContext.project.key}
|
|
1494
|
+
/products
|
|
1495
|
+
/${productId}
|
|
1496
|
+
/general
|
|
1497
|
+
`
|
|
1442
1498
|
}
|
|
1443
1499
|
}, {
|
|
1444
|
-
id:
|
|
1500
|
+
id: `go/product(${productId})/variants`,
|
|
1445
1501
|
text: intl.formatMessage(messages.openProductVariantList),
|
|
1446
1502
|
action: {
|
|
1447
1503
|
type: actionTypes.go,
|
|
1448
|
-
to: oneLineTrim
|
|
1504
|
+
to: oneLineTrim`
|
|
1505
|
+
/${applicationContext.project.key}
|
|
1506
|
+
/products
|
|
1507
|
+
/${productId}
|
|
1508
|
+
/variants
|
|
1509
|
+
`
|
|
1449
1510
|
},
|
|
1450
1511
|
subCommands: execQuery => createProductVariantListSubCommands({
|
|
1451
1512
|
intl,
|
|
@@ -1454,11 +1515,16 @@ const createProductTabsSubCommands = _ref3 => {
|
|
|
1454
1515
|
execQuery
|
|
1455
1516
|
})
|
|
1456
1517
|
}, {
|
|
1457
|
-
id:
|
|
1518
|
+
id: `go/product(${productId})/search`,
|
|
1458
1519
|
text: intl.formatMessage(messages.openProductVariantSearch),
|
|
1459
1520
|
action: {
|
|
1460
1521
|
type: actionTypes.go,
|
|
1461
|
-
to: oneLineTrim
|
|
1522
|
+
to: oneLineTrim`
|
|
1523
|
+
/${applicationContext.project.key}
|
|
1524
|
+
/products
|
|
1525
|
+
/${productId}
|
|
1526
|
+
/search
|
|
1527
|
+
`
|
|
1462
1528
|
}
|
|
1463
1529
|
}];
|
|
1464
1530
|
};
|
|
@@ -1497,10 +1563,9 @@ const translate = (nameAllLocales, projectDataLocale) => {
|
|
|
1497
1563
|
return '';
|
|
1498
1564
|
};
|
|
1499
1565
|
|
|
1500
|
-
var _templateObject, _templateObject2;
|
|
1501
1566
|
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 } } } };
|
|
1502
1567
|
const searchProductIdsAction = (searchText, projectKey, dataLocale) => actions.post({
|
|
1503
|
-
uri:
|
|
1568
|
+
uri: `/${projectKey}/search/products`,
|
|
1504
1569
|
mcApiProxyTarget: MC_API_PROXY_TARGETS.PIM_SEARCH,
|
|
1505
1570
|
payload: {
|
|
1506
1571
|
query: {
|
|
@@ -1530,7 +1595,7 @@ const pimIndexerStatusAction = (projectKey, dataLocale) =>
|
|
|
1530
1595
|
// error, so we send a regular request for now and limit to no results
|
|
1531
1596
|
// instead to keep the payload minimal
|
|
1532
1597
|
actions.post({
|
|
1533
|
-
uri:
|
|
1598
|
+
uri: `/${projectKey}/search/products`,
|
|
1534
1599
|
mcApiProxyTarget: MC_API_PROXY_TARGETS.PIM_SEARCH,
|
|
1535
1600
|
payload: {
|
|
1536
1601
|
query: {
|
|
@@ -1632,26 +1697,31 @@ const QuickAccess = props => {
|
|
|
1632
1697
|
searchText: sanitize(searchText),
|
|
1633
1698
|
// Pass conditional arguments to disable some of the queries
|
|
1634
1699
|
canViewProducts,
|
|
1635
|
-
productsWhereClause:
|
|
1700
|
+
productsWhereClause: `id in (${_mapInstanceProperty(idsOfProductsMatchingSearchText).call(idsOfProductsMatchingSearchText, id => _JSON$stringify(id)).join(', ')})`,
|
|
1636
1701
|
includeProductsByIds: Boolean(canViewProducts && idsOfProductsMatchingSearchText.length > 0)
|
|
1637
1702
|
}, {
|
|
1638
1703
|
target: GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
1639
1704
|
});
|
|
1640
1705
|
const commands = [];
|
|
1641
1706
|
if (data && data.productByVariantKey && data.productByVariantKey.masterData && data.productByVariantKey.masterData.staged && data.productByVariantKey.masterData.staged.variant && applicationContext.project && applicationContext.dataLocale) {
|
|
1642
|
-
var _context2;
|
|
1643
1707
|
const productId = data.productByVariantKey.id;
|
|
1644
1708
|
const variantId = data.productByVariantKey.masterData.staged.variant.id;
|
|
1645
1709
|
const variantKey = data.productByVariantKey.masterData.staged.variant.key;
|
|
1646
1710
|
commands.push({
|
|
1647
|
-
id:
|
|
1711
|
+
id: `go/product-variant-by-key/product(${productId}/variant(${variantId})`,
|
|
1648
1712
|
text: intl.formatMessage(messages.showProductVariant, {
|
|
1649
1713
|
variantName: translate(data.productByVariantKey.masterData.staged.nameAllLocales, applicationContext.dataLocale)
|
|
1650
1714
|
}),
|
|
1651
1715
|
keywords: variantKey ? [variantKey] : undefined,
|
|
1652
1716
|
action: {
|
|
1653
1717
|
type: actionTypes.go,
|
|
1654
|
-
to: oneLineTrim
|
|
1718
|
+
to: oneLineTrim`
|
|
1719
|
+
/${applicationContext.project.key}
|
|
1720
|
+
/products
|
|
1721
|
+
/${productId}
|
|
1722
|
+
/variants
|
|
1723
|
+
/${variantId}
|
|
1724
|
+
`
|
|
1655
1725
|
},
|
|
1656
1726
|
subCommands: createProductVariantSubCommands({
|
|
1657
1727
|
intl,
|
|
@@ -1662,17 +1732,22 @@ const QuickAccess = props => {
|
|
|
1662
1732
|
});
|
|
1663
1733
|
}
|
|
1664
1734
|
if (data && data.productByVariantSku && data.productByVariantSku.masterData && data.productByVariantSku.masterData.staged && data.productByVariantSku.masterData.staged.variant && applicationContext.project && applicationContext.dataLocale) {
|
|
1665
|
-
var _context3;
|
|
1666
1735
|
const productId = data.productByVariantSku.id;
|
|
1667
1736
|
const variantId = data.productByVariantSku.masterData.staged.variant.id;
|
|
1668
1737
|
commands.push({
|
|
1669
|
-
id:
|
|
1738
|
+
id: `go/product-variant-by-sku/product(${productId})/variant(${variantId})`,
|
|
1670
1739
|
text: intl.formatMessage(messages.showProductVariant, {
|
|
1671
1740
|
variantName: data.productByVariantSku.masterData.staged.variant.sku
|
|
1672
1741
|
}),
|
|
1673
1742
|
action: {
|
|
1674
1743
|
type: actionTypes.go,
|
|
1675
|
-
to: oneLineTrim
|
|
1744
|
+
to: oneLineTrim`
|
|
1745
|
+
/${applicationContext.project.key}
|
|
1746
|
+
/products
|
|
1747
|
+
/${productId}
|
|
1748
|
+
/variants
|
|
1749
|
+
/${variantId}
|
|
1750
|
+
`
|
|
1676
1751
|
},
|
|
1677
1752
|
subCommands: createProductVariantSubCommands({
|
|
1678
1753
|
intl,
|
|
@@ -1683,17 +1758,16 @@ const QuickAccess = props => {
|
|
|
1683
1758
|
});
|
|
1684
1759
|
}
|
|
1685
1760
|
if (data && data.productById && data.productById.masterData && data.productById.masterData.staged && data.productById.masterData.staged.nameAllLocales && applicationContext.project && applicationContext.dataLocale) {
|
|
1686
|
-
var _context4;
|
|
1687
1761
|
const productId = data.productById.id;
|
|
1688
1762
|
commands.push({
|
|
1689
|
-
id:
|
|
1763
|
+
id: `go/product-by-id/product(${productId})`,
|
|
1690
1764
|
text: intl.formatMessage(messages.showProduct, {
|
|
1691
1765
|
productName: translate(data.productById.masterData.staged.nameAllLocales, applicationContext.dataLocale)
|
|
1692
1766
|
}),
|
|
1693
1767
|
keywords: [productId],
|
|
1694
1768
|
action: {
|
|
1695
1769
|
type: actionTypes.go,
|
|
1696
|
-
to:
|
|
1770
|
+
to: `/${applicationContext.project.key}/products/${productId}`
|
|
1697
1771
|
},
|
|
1698
1772
|
subCommands: createProductTabsSubCommands({
|
|
1699
1773
|
intl,
|
|
@@ -1703,19 +1777,18 @@ const QuickAccess = props => {
|
|
|
1703
1777
|
});
|
|
1704
1778
|
}
|
|
1705
1779
|
if (data && data.productsByIds && data.productsByIds.results) {
|
|
1706
|
-
var
|
|
1707
|
-
_forEachInstanceProperty(
|
|
1780
|
+
var _context2;
|
|
1781
|
+
_forEachInstanceProperty(_context2 = data.productsByIds.results).call(_context2, product => {
|
|
1708
1782
|
if (product.masterData.staged && applicationContext.project && applicationContext.dataLocale) {
|
|
1709
|
-
var _context6;
|
|
1710
1783
|
commands.push({
|
|
1711
|
-
id:
|
|
1784
|
+
id: `go/product-by-search-text/product(${product.id})`,
|
|
1712
1785
|
text: intl.formatMessage(messages.showProduct, {
|
|
1713
1786
|
productName: translate(product.masterData.staged.nameAllLocales, applicationContext.dataLocale)
|
|
1714
1787
|
}),
|
|
1715
1788
|
keywords: [product.id],
|
|
1716
1789
|
action: {
|
|
1717
1790
|
type: actionTypes.go,
|
|
1718
|
-
to:
|
|
1791
|
+
to: `/${applicationContext.project.key}/products/${product.id}`
|
|
1719
1792
|
},
|
|
1720
1793
|
subCommands: createProductTabsSubCommands({
|
|
1721
1794
|
intl,
|
|
@@ -1727,16 +1800,15 @@ const QuickAccess = props => {
|
|
|
1727
1800
|
});
|
|
1728
1801
|
}
|
|
1729
1802
|
if (data && data.productByKey && applicationContext.project && applicationContext.dataLocale) {
|
|
1730
|
-
var _context7;
|
|
1731
1803
|
const productId = data.productByKey.id;
|
|
1732
1804
|
commands.push({
|
|
1733
|
-
id:
|
|
1805
|
+
id: `go/product-by-key/product(${productId})`,
|
|
1734
1806
|
text: intl.formatMessage(messages.showProduct, {
|
|
1735
1807
|
productName: searchText
|
|
1736
1808
|
}),
|
|
1737
1809
|
action: {
|
|
1738
1810
|
type: actionTypes.go,
|
|
1739
|
-
to:
|
|
1811
|
+
to: `/${applicationContext.project.key}/products/${productId}`
|
|
1740
1812
|
},
|
|
1741
1813
|
subCommands: createProductTabsSubCommands({
|
|
1742
1814
|
intl,
|
|
@@ -1781,7 +1853,7 @@ const QuickAccess = props => {
|
|
|
1781
1853
|
}
|
|
1782
1854
|
}, [applicationContext, debouncedGetProjectCommands, execQuery, intl, isCanViewDashboardEnabled, isCustomApplicationsEnabled, isPimSearchEnabled, props.onChangeProjectDataLocale]);
|
|
1783
1855
|
const executeCommand = useCallback((command, meta) => {
|
|
1784
|
-
var
|
|
1856
|
+
var _context3;
|
|
1785
1857
|
if (typeof command.action === 'function') {
|
|
1786
1858
|
// Idea: We could handle these errors and set them on status bar of Butler
|
|
1787
1859
|
// We can also handle sync/async commands by checking command.action.then
|
|
@@ -1790,7 +1862,7 @@ const QuickAccess = props => {
|
|
|
1790
1862
|
}
|
|
1791
1863
|
// open in new window
|
|
1792
1864
|
// and always open other pages in a new window
|
|
1793
|
-
if (meta.openInNewTab || !_startsWithInstanceProperty(
|
|
1865
|
+
if (meta.openInNewTab || !_startsWithInstanceProperty(_context3 = command.action.to).call(_context3, '/')) {
|
|
1794
1866
|
// eslint-disable-next-line no-restricted-globals
|
|
1795
1867
|
open(command.action.to, '_blank');
|
|
1796
1868
|
} else if (applicationContext.environment.useFullRedirectsForLinks) {
|