diff --git a/package-lock.json b/package-lock.json index 88b8a73b..203b9df7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", - "@hotwax/dxp-components": "1.13.0", + "@hotwax/dxp-components": "^1.15.4", "@hotwax/oms-api": "1.14.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", @@ -2802,9 +2802,9 @@ "integrity": "sha512-zpUjGoY7LBlKeiP0V7tonrmoey8HQ5THQmyixQ+IDtrjmEJNBjynW/Ef3gC0FUNNPuVqxWPZdT5CVgaETLGTwg==" }, "node_modules/@hotwax/dxp-components": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.13.0.tgz", - "integrity": "sha512-AkzHpGIWYFURIAKaqioNZdkaeJBaJHs+ep+5ibLyEj+Ex+GsyMsI9L1NVO+tl91ECkCNx02QjHPhMfpo0osQ3w==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.15.4.tgz", + "integrity": "sha512-dlgexo/QBLnLlPkq1zwfWBIPiVtmZKsRcPcCAwe+eFz9qPwyQORdzKb6YjX1WgtRU72GYMv345eA+HuaSY6H5w==", "dependencies": { "@hotwax/oms-api": "^1.8.1", "@ionic/core": "^7.6.0", @@ -2815,7 +2815,8 @@ "pinia-plugin-persistedstate": "^3.1.0", "register-service-worker": "^1.7.2", "vue": "^3.3.4", - "vue-i18n": "^9.2.2" + "vue-i18n": "^9.2.2", + "vue-markdown-render": "^2.2.1" } }, "node_modules/@hotwax/dxp-components/node_modules/@intlify/core-base": { @@ -2859,16 +2860,6 @@ "url": "https://github.com/sponsors/kazupon" } }, - "node_modules/@hotwax/dxp-components/node_modules/@ionic/core": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.8.2.tgz", - "integrity": "sha512-1Iwe4XSaEYD0u7U/AnnKYNRXmPxx/doTl6pExXq/nlEd7q0AykRkPEy5rClqrQcJOrgFogAx1FwSObfgm0xnNw==", - "dependencies": { - "@stencil/core": "^4.12.2", - "ionicons": "^7.2.2", - "tslib": "^2.1.0" - } - }, "node_modules/@hotwax/dxp-components/node_modules/pinia": { "version": "2.0.36", "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.36.tgz", @@ -2927,11 +2918,6 @@ } } }, - "node_modules/@hotwax/dxp-components/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@hotwax/dxp-components/node_modules/vue-i18n": { "version": "9.10.2", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.10.2.tgz", @@ -11683,6 +11669,14 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/linkify-it": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", + "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/listr2": { "version": "3.14.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", @@ -12097,6 +12091,37 @@ "semver": "bin/semver.js" } }, + "node_modules/markdown-it": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.2.tgz", + "integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==", + "dependencies": { + "argparse": "^2.0.1", + "entities": "~3.0.1", + "linkify-it": "^4.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -12113,6 +12138,11 @@ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -16123,6 +16153,11 @@ "node": ">=4.2.0" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -17002,6 +17037,17 @@ "node": ">=8" } }, + "node_modules/vue-markdown-render": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vue-markdown-render/-/vue-markdown-render-2.2.1.tgz", + "integrity": "sha512-XkYnC0PMdbs6Vy6j/gZXSvCuOS0787Se5COwXlepRqiqPiunyCIeTPQAO2XnB4Yl04EOHXwLx5y6IuszMWSgyQ==", + "dependencies": { + "markdown-it": "^13.0.2" + }, + "peerDependencies": { + "vue": "^3.3.4" + } + }, "node_modules/vue-router": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.5.tgz", diff --git a/package.json b/package.json index be760c54..d37bbdc8 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", - "@hotwax/dxp-components": "1.13.0", + "@hotwax/dxp-components": "^1.15.4", "@hotwax/oms-api": "1.14.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", diff --git a/src/authorization/Actions.ts b/src/authorization/Actions.ts index 1cc819ad..8e1eac09 100644 --- a/src/authorization/Actions.ts +++ b/src/authorization/Actions.ts @@ -1,3 +1,4 @@ export default { "APP_INV_CNFG_UPDT": "APP_INV_CNFG_UPDT", + "APP_COMMERCE_VIEW": "APP_COMMERCE_VIEW" } \ No newline at end of file diff --git a/src/authorization/Rules.ts b/src/authorization/Rules.ts index a94b75b9..6d91d6f9 100644 --- a/src/authorization/Rules.ts +++ b/src/authorization/Rules.ts @@ -4,7 +4,8 @@ export default { "APP_CATALOG_VIEW": "", "APP_PRDT_DTLS_VIEW": "", "APP_CTLG_PRDT_DTLS_VIEW": "", - "APP_INV_CNFG_UPDT": "COMMON_ADMIN", + "APP_COMMERCE_VIEW": "COMMERCEUSER_VIEW", "MERCHANDISING_ADMIN": "MERCHANDISING_ADMIN", - "PREORDER_APP_VIEW": "PREORDER_APP_VIEW" + "PREORDER_APP_VIEW": "PREORDER_APP_VIEW", + "APP_INV_CNFG_UPDT": "COMMON_ADMIN", } as any \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 1706a2ce..4d0c2871 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,7 +29,7 @@ import '@ionic/vue/css/display.css'; import './theme/variables.css'; import { dxpComponents } from '@hotwax/dxp-components' import { login, logout, loader } from './user-utils'; -import permissionPlugin from '@/authorization'; +import permissionPlugin, { Actions, hasPermission } from '@/authorization'; import permissionRules from '@/authorization/Rules'; import permissionActions from '@/authorization/Actions'; import { getConfig, initialise, setUserTimeZone, getAvailableTimeZones, setUserLocale} from '@/adapter' @@ -48,6 +48,7 @@ const app = createApp(App) actions: permissionActions }) .use(dxpComponents, { + Actions, defaultImgUrl: require("@/assets/images/defaultImage.png"), login, logout, @@ -58,7 +59,8 @@ const app = createApp(App) localeMessages, setUserLocale, setUserTimeZone, - getAvailableTimeZones + getAvailableTimeZones, + hasPermission }); // Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters