@telia-ace/alliance-ui 1.0.13-next.0 → 1.0.13
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/CHANGELOG.md +14 -0
- package/chunks/close-7d423291.js.map +1 -1
- package/chunks/close-ac6e4f1c.js.map +1 -1
- package/components/alliance-link.js +3 -3
- package/components/alliance-link.js.map +1 -1
- package/components/alliance-modal.js +38 -33
- package/components/alliance-modal.js.map +1 -1
- package/components/index.js +1 -1
- package/package.json +4 -6
- package/voca/components/telia-date-picker.js +1 -1
- package/voca/components/telia-notification.js +1 -1
- package/voca/icons/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @telia-ace/alliance-ui
|
|
2
2
|
|
|
3
|
+
## 1.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8763155: Remove [deprecated Voca components](https://docs.voca.teliacompany.com/?path=/story/documentation-migrations-v22--migrations).
|
|
8
|
+
- 59f0d3f: Remove unnecessary scripts.
|
|
9
|
+
- 8763155: Update all dependencies to latest.
|
|
10
|
+
|
|
11
|
+
## 1.0.13-next.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 59f0d3f: Remove unnecessary scripts.
|
|
16
|
+
|
|
3
17
|
## 1.0.13-next.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-7d423291.js","sources":["../../../node_modules/.pnpm/@teliads+components@22.1.0/node_modules/@teliads/components/
|
|
1
|
+
{"version":3,"file":"close-7d423291.js","sources":["../../../node_modules/.pnpm/@teliads+components@22.1.0/node_modules/@teliads/components/icons/main/assets/close.js"],"sourcesContent":["export default { \"name\": \"close\", \"svg\": \"<svg viewBox=\\\"0 0 64 64\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"currentColor\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M51.365 48.3012C51.9123 48.8485 52.1261 49.6462 51.9258 50.3939C51.7254 51.1415 51.1415 51.7254 50.3939 51.9258C49.6462 52.1261 48.8485 51.9123 48.3012 51.365L32.4998 35.5636L16.6984 51.365C16.1511 51.9123 15.3534 52.1261 14.6058 51.9258C13.8581 51.7254 13.2742 51.1415 13.0739 50.3939C12.8735 49.6462 13.0873 48.8485 13.6346 48.3012L29.436 32.4998L13.6346 16.6984C13.0873 16.1511 12.8735 15.3534 13.0739 14.6058C13.2742 13.8581 13.8581 13.2742 14.6058 13.0739C15.3534 12.8735 16.1511 13.0873 16.6984 13.6346L32.4998 29.436L48.3012 13.6346C49.1473 12.7885 50.519 12.7885 51.365 13.6346C52.2111 14.4806 52.2111 15.8523 51.365 16.6984L35.5636 32.4998L51.365 48.3012Z\\\"/></svg>\" };\n"],"names":["close"],"mappings":"AAAA,MAAeA,IAAA,EAAE,MAAQ,SAAS,KAAO,qyBAAkzB;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-ac6e4f1c.js","sources":["../../../node_modules/.pnpm/@teliads+components@22.1.0/node_modules/@teliads/components/
|
|
1
|
+
{"version":3,"file":"close-ac6e4f1c.js","sources":["../../../node_modules/.pnpm/@teliads+components@22.1.0/node_modules/@teliads/components/dist/components/close.js"],"sourcesContent":["const close = { \"name\": \"close\", \"svg\": \"<svg viewBox=\\\"0 0 64 64\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"currentColor\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M51.365 48.3012C51.9123 48.8485 52.1261 49.6462 51.9258 50.3939C51.7254 51.1415 51.1415 51.7254 50.3939 51.9258C49.6462 52.1261 48.8485 51.9123 48.3012 51.365L32.4998 35.5636L16.6984 51.365C16.1511 51.9123 15.3534 52.1261 14.6058 51.9258C13.8581 51.7254 13.2742 51.1415 13.0739 50.3939C12.8735 49.6462 13.0873 48.8485 13.6346 48.3012L29.436 32.4998L13.6346 16.6984C13.0873 16.1511 12.8735 15.3534 13.0739 14.6058C13.2742 13.8581 13.8581 13.2742 14.6058 13.0739C15.3534 12.8735 16.1511 13.0873 16.6984 13.6346L32.4998 29.436L48.3012 13.6346C49.1473 12.7885 50.519 12.7885 51.365 13.6346C52.2111 14.4806 52.2111 15.8523 51.365 16.6984L35.5636 32.4998L51.365 48.3012Z\\\"/></svg>\" };\n\nexport { close as c };\n"],"names":["close"],"mappings":"AAAK,MAACA,IAAQ,EAAE,MAAQ,SAAS,KAAO,qyBAAgzB;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as s, e as d, s as y, x as
|
|
2
|
-
var
|
|
1
|
+
import { n as s, e as d, s as y, x as v } from "../chunks/query-assigned-elements-ac91685f.js";
|
|
2
|
+
var f = Object.defineProperty, g = (e, t, r) => t in e ? f(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, u = (e, t, r) => (g(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
3
3
|
function m(e) {
|
|
4
4
|
const t = Object.entries(e).reduce((r, a) => {
|
|
5
5
|
const [i, o] = a;
|
|
@@ -103,7 +103,7 @@ let n = class extends y {
|
|
|
103
103
|
super.attributeChangedCallback(e, t, r), setTimeout(() => this.computeHref());
|
|
104
104
|
}
|
|
105
105
|
render() {
|
|
106
|
-
return
|
|
106
|
+
return v`<a
|
|
107
107
|
part="anchor"
|
|
108
108
|
target=${this.target}
|
|
109
109
|
rel=${this.rel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alliance-link.js","sources":["../../../internal/client-utilities/dist/index.js","../src/components/alliance-link/alliance-link.ts"],"sourcesContent":["var f = Object.defineProperty;\nvar v = (e, t, i) => t in e ? f(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;\nvar a = (e, t, i) => (v(e, typeof t != \"symbol\" ? t + \"\" : t, i), i);\nvar N = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = \"AlreadyInitialized\", e[e.NoAppNameOrKey = 1001] = \"NoAppNameOrKey\", e[e.MissingAppController = 1002] = \"MissingAppController\", e[e.MissingCapabilityOnApp = 1003] = \"MissingCapabilityOnApp\", e[e.MissingManagedObjectProvider = 1004] = \"MissingManagedObjectProvider\", e[e.NoManifest = 1005] = \"NoManifest\", e[e.NoRootElement = 1006] = \"NoRootElement\", e[e.NoView = 1007] = \"NoView\", e[e.CookieKeyNotDefined = 1008] = \"CookieKeyNotDefined\", e[e.CookieCategoryNotAllowed = 1009] = \"CookieCategoryNotAllowed\", e[e.StorageKeyNotDefined = 1010] = \"StorageKeyNotDefined\", e[e.StorageCategoryNotAllowed = 1011] = \"StorageCategoryNotAllowed\", e[e.LocalizationTemplateNotDefined = 1012] = \"LocalizationTemplateNotDefined\", e))(N || {}), A = /* @__PURE__ */ ((e) => (e[e.CurrentUserMissingProvider = 2e3] = \"CurrentUserMissingProvider\", e[e.CurrentUserGatewayNotStarted = 2001] = \"CurrentUserGatewayNotStarted\", e[e.CurrentUserMissingBackend = 2002] = \"CurrentUserMissingBackend\", e[e.CurrentUserMissingInDatabase = 2003] = \"CurrentUserMissingInDatabase\", e))(A || {});\nfunction m(e, t) {\n return Object.entries(t).reduce((i, [r, n]) => i.replaceAll(`{{${r}}}`, n), e);\n}\nconst S = {\n // framework\n 1e3: \"The runtime has already been initialized\",\n 1001: \"App name and/or app key is not defined on global scope\",\n 1002: \"No app controller registered for app '{{app}}'\",\n 1003: \"No capability '{{capability}}' enabled for app '{{app}}'\",\n 1004: \"No managed object provider registered for object '{{object}}'\",\n 1005: \"The current apps manifest is not defined on global scope\",\n 1006: \"Could not find the root element in the DOM\",\n 1007: \"Could not find view with id '{{id}}' on view controller for app '{{app}}'\",\n 1008: \"Cookie key '{{key}}' not present in manifest, cookie has not been set\",\n 1009: \"Cookies categorized as '{{category}}' are not allowed by the user, cookie '{{key}}' has not been set\",\n 1010: \"Storage key '{{key}}' not present in manifest, item has not been stored\",\n 1011: \"Storage categorized as '{{category}}' is not allowed by the user, item '{{key}}' has not been stored\",\n 1012: \"The translation template, referred by the key '{{key}}' is being used in app, but is not defined in the manifest.\",\n // utilities\n 2e3: \"No managed object provider registered for object 'currentUser'\",\n 2001: \"Could not access the gateway when querying 'currentUser'\",\n 2002: \"Could not access the required backend when querying 'currentUser'\",\n 2003: \"Could not locate the authenticated user in the Alliance database\"\n}, d = \"AllianceError\";\nclass I extends Error {\n constructor(t, i = {}) {\n const r = m(S[t], i), n = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${t}`;\n super(r), this.code = t, this.name = d, this.stack = `[${t}] - ${r}\n` + n;\n }\n}\nfunction k(e) {\n return !!e.code && e.name === d;\n}\nfunction D(e) {\n const i = Object.entries(e).reduce((r, n) => {\n const [o, p] = n;\n return typeof p > \"u\" || (typeof p == \"object\" && p !== null ? r[o] = JSON.stringify(p) : r[o] = p), r;\n }, {});\n return Object.keys(i).length ? `?${new URLSearchParams(i)}` : \"\";\n}\nfunction b() {\n const e = l(), { href: t, search: i } = window.location;\n return t.replace(e, \"\").replace(i, \"\");\n}\nfunction C(e = \"\", t = \"\", i = {}) {\n const r = l().replace(location.origin, \"\"), n = D(i);\n return e ? t ? `${r}/${e}/${t}${n}` : `${r}/${e}${n}` : `${r}${n}`;\n}\nfunction W() {\n const e = b(), [t = \"\", i = \"\"] = e.split(\"/\").filter((r) => !!r);\n return {\n app: t,\n capability: i\n };\n}\nfunction P(e) {\n const { origin: t, pathname: i } = window.location;\n if (e === \"production\") {\n const [r] = i.split(\"/\").filter((n) => !!n);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${t}/${r}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = t;\n}\nfunction l() {\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL;\n}\nvar s = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = \"AlreadyExists\", e[e.ApiGatewayPortDescription = 1] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 2] = \"ApiServerModeDescription\", e[e.AppConfigurationPath = 3] = \"AppConfigurationPath\", e[e.AppCreated = 4] = \"AppCreated\", e[e.AppEntryBuildOptionDescription = 5] = \"AppEntryBuildOptionDescription\", e[e.AppNameInquiry = 6] = \"AppNameInquiry\", e[e.BuildDescription = 7] = \"BuildDescription\", e[e.BuildModeOptionDescription = 8] = \"BuildModeOptionDescription\", e[e.BuildWatchDescription = 9] = \"BuildWatchDescription\", e[e.CreateAppDescription = 10] = \"CreateAppDescription\", e[e.CreateWorkspaceDescription = 11] = \"CreateWorkspaceDescription\", e[e.DevServerOpenDescription = 12] = \"DevServerOpenDescription\", e[e.DevServerPortDescription = 13] = \"DevServerPortDescription\", e[e.DevServerLoggingDescription = 14] = \"DevServerLoggingDescription\", e[e.Done = 15] = \"Done\", e[e.FetchPackageVersionError = 16] = \"FetchPackageVersionError\", e[e.ManifestEntryBuildOptionDescription = 17] = \"ManifestEntryBuildOptionDescription\", e[e.MissingTranslationKey = 18] = \"MissingTranslationKey\", e[e.NoAppName = 19] = \"NoAppName\", e[e.NoAppNameFound = 20] = \"NoAppNameFound\", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.NoWorkspaceName = 22] = \"NoWorkspaceName\", e[e.OperationCancelled = 23] = \"OperationCancelled\", e[e.ServeDescription = 24] = \"ServeDescription\", e[e.ServedStopped = 25] = \"ServedStopped\", e[e.ServerGatewayMode = 26] = \"ServerGatewayMode\", e[e.ServerMode = 27] = \"ServerMode\", e[e.ServerModeInquiry = 28] = \"ServerModeInquiry\", e[e.ServerProxyMode = 29] = \"ServerProxyMode\", e[e.StopServerInstructions = 30] = \"StopServerInstructions\", e[e.TemplateFrameworkInquiry = 31] = \"TemplateFrameworkInquiry\", e[e.TemplateLanguageInquiry = 32] = \"TemplateLanguageInquiry\", e[e.UnrecognizedCommand = 33] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 34] = \"WorkspaceCreated\", e[e.WorkspaceNameInquiry = 35] = \"WorkspaceNameInquiry\", e))(s || {});\nconst M = {\n 15: \"Done\",\n 22: \"No workspace name provided!\",\n 19: \"No app name provided!\",\n 0: \"File or directory '{0}' already exists!\",\n 21: \"Could not find any app entry file at '{0}'!\",\n 33: \"Unrecognized command(s) {0}!\",\n 34: \"Workspace was created at path '{0}'!\",\n 4: \"App was created at path '{0}'!\",\n 25: \"Server stopped.\",\n 11: \"Creates an Alliance Workspace in the current directory.\",\n 10: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n 24: \"Starts a Alliance development server using the current directory package.json.\",\n 7: \"Builds an Alliance Application using Vite.\",\n 35: \"Enter the name of your workspace\",\n 28: \"Which server mode do you want to use?\",\n 6: \"Enter the name of your app\",\n 18: \"No translation key provided!\",\n 23: \"Operation cancelled.\",\n 30: `Press CTRL + C to stop the server.\n`,\n 32: \"Select preferred language\",\n 31: \"Select preferred framework template\",\n 13: \"The port that the dev server should use.\",\n 14: \"Whether the dev server and browser console should output more log information or not (false).\",\n 1: \"The port that the api gateway should use.\",\n 2: \"Which components to start. [server|server-proxy|server-gateway].\",\n 12: \"Whether the dev server should automatically open in your browser or not.\",\n 9: \"Whether the build should start watching and rebuild when files change or not.\",\n 5: \"The entry file for the app (./src/app).\",\n 17: \"The entry file for the app manifest (./src/manifest).\",\n 8: \"Which mode to use when building the app.\",\n 16: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n 20: \"Could not find app name in manifest.\",\n 3: \"The path to the app configuration file.\",\n 27: \"Server\",\n 29: \"Server with proxy\",\n 26: \"Server with gateway\"\n}, c = class c {\n};\na(c, \"getTranslations\", () => M), a(c, \"getTranslation\", (t, ...i) => {\n const n = c.getTranslations()[t];\n if (!n)\n throw new Error(`Could not find text with given key '${t}'.`);\n return i.reduce(\n (p, h, g) => p.toString().replace(`{${g}}`, h.toString()),\n n\n ).toString();\n}), a(c, \"get\", (t = s.MissingTranslationKey, ...i) => c.getTranslation(t, ...i));\nlet u = c;\nfunction R(e, t) {\n return O(Object.values(e), ({ name: i }) => ({\n label: i,\n value: i,\n selected: t === i\n }));\n}\nvar y = /* @__PURE__ */ ((e) => (e.Primary = \"primary\", e.Secondary = \"secondary\", e.Expressive = \"expressive\", e.Destructive = \"destructive\", e.Text = \"text\", e.PrimaryWhite = \"primary-white\", e.SecondaryWhite = \"secondary-white\", e.ExpressiveWhite = \"expressive-white\", e.TertiaryPurple = \"tertiary-purple\", e))(y || {});\nfunction $(e, t) {\n return Object.values(e).find((r) => r.name === t);\n}\nfunction O(e, t, i = \"Choose...\") {\n return e.reduce(\n (r, n) => (r.push({\n disabled: !1,\n selected: !1,\n ...t(n)\n }), r),\n [\n {\n label: i,\n value: \"\",\n disabled: !0,\n selected: !0\n }\n ]\n );\n}\nfunction L(e) {\n return (t) => {\n t.key === \"Enter\" && e(t);\n };\n}\nfunction U(e, t = \"all\") {\n const { email: i, displayName: r } = e, n = r && r !== \"unknown\", o = !!i;\n switch (t) {\n case \"all\": {\n if (n && o)\n return `${r} (${i})`;\n if (n)\n return r;\n if (o)\n return i;\n }\n case \"single\": {\n if (n)\n return r;\n if (o)\n return i;\n }\n }\n return \"<UNKNOWN USER>\";\n}\nfunction j(...e) {\n return e.filter((t) => !!t).join(\" \");\n}\nexport {\n I as AllianceError,\n N as FrameworkErrorCodes,\n u as Texts,\n s as TranslationsKey,\n A as UtilitiesErrorCodes,\n y as VocaButtonVariant,\n j as classNames,\n C as createCapabilityPath,\n U as friendlyUserName,\n W as getCurrentLocationInfo,\n l as getRuntimeRootUrl,\n $ as getVocaIcon,\n k as isAllianceError,\n O as mapToVocaOptions,\n L as onEnter,\n P as setRuntimeRootUrl,\n R as vocaIconsToOptions\n};\n//# sourceMappingURL=index.js.map\n","import {\n SerializeableObject,\n createCapabilityPath,\n onEnter,\n} from '@telia-ace/alliance-internal-client-utilities';\nimport { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nfunction isOnCurrentPath(path: string = '') {\n const cleanedPath = location.href.replace(location.origin, '');\n return cleanedPath.startsWith(path);\n}\n\n@customElement('alliance-link')\nexport class Link extends LitElement {\n @property({ type: String, attribute: true, reflect: true })\n capability: string = '';\n\n @property({ type: String, attribute: true, reflect: true })\n app: string = '';\n\n @property({ type: Object, attribute: true, reflect: true })\n args: SerializeableObject = {};\n\n /**\n * Link properties\n */\n @property({ type: String, attribute: true, reflect: true })\n href?: string;\n\n @property({ type: String })\n target?: string;\n\n @property({ type: String, attribute: true, reflect: true })\n rel?: string;\n\n @property({ type: String, attribute: true, reflect: true })\n download?: string;\n\n navigate = () => {\n history.pushState(this.args, '', this._href);\n window.dispatchEvent(new Event('popstate'));\n };\n\n clickHandler = (event: MouseEvent) => {\n if (this.href || this.download) {\n return;\n }\n\n event.preventDefault();\n\n this.navigate();\n };\n\n updateActive = () => {\n this.active = isOnCurrentPath(this._href);\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('popstate', this.updateActive);\n this.computeHref();\n }\n\n disconnectedCallback() {\n window.removeEventListener('popstate', this.updateActive);\n super.disconnectedCallback();\n }\n\n attributeChangedCallback(_1: string, _2: string | null, _3: string | null) {\n super.attributeChangedCallback(_1, _2, _3);\n\n // FUTURE TODO: Try to figure out this timeout is needed\n // Update seems to happen too early if this is not timed\n setTimeout(() => this.computeHref());\n }\n\n /**\n * Internal properties\n */\n @property({ type: String, attribute: false, reflect: false })\n private _href: string = '';\n\n @property({ type: Boolean, attribute: 'active', reflect: true })\n private active: boolean = false;\n\n private computeHref = () => {\n if (this.href) {\n return (this._href = this.href);\n }\n\n if (!this.app) {\n throw new Error('The app property is required when creating a capability link!');\n }\n this._href = createCapabilityPath(this.app, this.capability, this.args);\n this.updateActive();\n };\n\n render() {\n return html`<a\n part=\"anchor\"\n target=${this.target}\n rel=${this.rel}\n download=${this.download}\n .href=${this._href}\n ?active=${this.active}\n @click=${this.clickHandler}\n @keydown=${onEnter(this.clickHandler)}\n >\n <slot></slot>\n </a>`;\n }\n}\n"],"names":["f","v","i","a","D","n","o","p","C","r","l","s","M","t","h","g","L","isOnCurrentPath","path","Link","LitElement","event","createCapabilityPath","_1","_2","_3","html","onEnter","__decorateClass","property","customElement"],"mappings":";AAAA,IAAIA,IAAI,OAAO,gBACXC,IAAI,CAAC,GAAG,GAAGC,MAAM,KAAK,IAAIF,EAAE,GAAG,GAAG,EAAE,YAAY,IAAI,cAAc,IAAI,UAAU,IAAI,OAAOE,EAAC,CAAE,IAAI,EAAE,CAAC,IAAIA,GACzGC,IAAI,CAAC,GAAG,GAAGD,OAAOD,EAAE,GAAG,OAAO,KAAK,WAAW,IAAI,KAAK,GAAGC,CAAC,GAAGA;AAoClE,SAASE,EAAE,GAAG;AACZ,QAAMF,IAAI,OAAO,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAGG,MAAM;AAC3C,UAAM,CAACC,GAAGC,CAAC,IAAIF;AACf,WAAO,OAAOE,IAAI,QAAQ,OAAOA,KAAK,YAAYA,MAAM,OAAO,EAAED,CAAC,IAAI,KAAK,UAAUC,CAAC,IAAI,EAAED,CAAC,IAAIC,IAAI;AAAA,EACtG,GAAE,CAAE,CAAA;AACL,SAAO,OAAO,KAAKL,CAAC,EAAE,SAAS,IAAI,IAAI,gBAAgBA,CAAC,CAAC,KAAK;AAChE;AAKA,SAASM,EAAE,IAAI,IAAI,IAAI,IAAIN,IAAI,IAAI;AACjC,QAAMO,IAAIC,IAAI,QAAQ,SAAS,QAAQ,EAAE,GAAGL,IAAID,EAAEF,CAAC;AACnD,SAAO,IAAI,IAAI,GAAGO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAGJ,CAAC,KAAK,GAAGI,CAAC,IAAI,CAAC,GAAGJ,CAAC,KAAK,GAAGI,CAAC,GAAGJ,CAAC;AAClE;AAgBA,SAASK,IAAI;AACX,SAAO,WAA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CC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAM,SAAS,IAAM;AAAA,GAtBjDV,EAuBT,WAAA,YAAA,CAAA;AA4CQS,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAO,SAAS,IAAO;AAAA,GAlEnDV,EAmED,WAAA,SAAA,CAAA;AAGAS,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,SAAS,WAAW,UAAU,SAAS,IAAM;AAAA,GArEtDV,EAsED,WAAA,UAAA,CAAA;AAtECA,IAANS,EAAA;AAAA,EADNE,EAAc,eAAe;AAAA,GACjBX,CAAA;"}
|
|
1
|
+
{"version":3,"file":"alliance-link.js","sources":["../../../internal/client-utilities/dist/index.js","../src/components/alliance-link/alliance-link.ts"],"sourcesContent":["var g = Object.defineProperty;\nvar v = (e, t, r) => t in e ? g(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;\nvar a = (e, t, r) => (v(e, typeof t != \"symbol\" ? t + \"\" : t, r), r);\nvar N = /* @__PURE__ */ ((e) => (e[e.AlreadyInitialized = 1e3] = \"AlreadyInitialized\", e[e.NoAppNameOrKey = 1001] = \"NoAppNameOrKey\", e[e.MissingAppController = 1002] = \"MissingAppController\", e[e.MissingCapabilityOnApp = 1003] = \"MissingCapabilityOnApp\", e[e.MissingManagedObjectProvider = 1004] = \"MissingManagedObjectProvider\", e[e.NoManifest = 1005] = \"NoManifest\", e[e.NoRootElement = 1006] = \"NoRootElement\", e[e.NoView = 1007] = \"NoView\", e[e.CookieKeyNotDefined = 1008] = \"CookieKeyNotDefined\", e[e.CookieCategoryNotAllowed = 1009] = \"CookieCategoryNotAllowed\", e[e.StorageKeyNotDefined = 1010] = \"StorageKeyNotDefined\", e[e.StorageCategoryNotAllowed = 1011] = \"StorageCategoryNotAllowed\", e[e.LocalizationTemplateNotDefined = 1012] = \"LocalizationTemplateNotDefined\", e))(N || {}), A = /* @__PURE__ */ ((e) => (e[e.CurrentUserMissingProvider = 2e3] = \"CurrentUserMissingProvider\", e[e.CurrentUserGatewayNotStarted = 2001] = \"CurrentUserGatewayNotStarted\", e[e.CurrentUserMissingBackend = 2002] = \"CurrentUserMissingBackend\", e[e.CurrentUserMissingInDatabase = 2003] = \"CurrentUserMissingInDatabase\", e))(A || {});\nfunction m(e, t) {\n return Object.entries(t).reduce((r, [i, n]) => r.replaceAll(`{{${i}}}`, n), e);\n}\nconst S = {\n // framework\n 1e3: \"The runtime has already been initialized\",\n 1001: \"App name and/or app key is not defined on global scope\",\n 1002: \"No app controller registered for app '{{app}}'\",\n 1003: \"No capability '{{capability}}' enabled for app '{{app}}'\",\n 1004: \"No managed object provider registered for object '{{object}}'\",\n 1005: \"The current apps manifest is not defined on global scope\",\n 1006: \"Could not find the root element in the DOM\",\n 1007: \"Could not find view with id '{{id}}' on view controller for app '{{app}}'\",\n 1008: \"Cookie key '{{key}}' not present in manifest, cookie has not been set\",\n 1009: \"Cookies categorized as '{{category}}' are not allowed by the user, cookie '{{key}}' has not been set\",\n 1010: \"Storage key '{{key}}' not present in manifest, item has not been stored\",\n 1011: \"Storage categorized as '{{category}}' is not allowed by the user, item '{{key}}' has not been stored\",\n 1012: \"The translation template, referred by the key '{{key}}' is being used in app, but is not defined in the manifest.\",\n // utilities\n 2e3: \"No managed object provider registered for object 'currentUser'\",\n 2001: \"Could not access the gateway when querying 'currentUser'\",\n 2002: \"Could not access the required backend when querying 'currentUser'\",\n 2003: \"Could not locate the authenticated user in the Alliance database\"\n}, d = \"AllianceError\";\nclass I extends Error {\n constructor(t, r = {}) {\n const i = m(S[t], r), n = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${t}`;\n super(i), this.code = t, this.name = d, this.stack = `[${t}] - ${i}\n` + n;\n }\n}\nfunction k(e) {\n return !!e.code && e.name === d;\n}\nfunction b(e) {\n const r = Object.entries(e).reduce((i, n) => {\n const [o, p] = n;\n return typeof p > \"u\" || (typeof p == \"object\" && p !== null ? i[o] = JSON.stringify(p) : i[o] = p), i;\n }, {});\n return Object.keys(r).length ? `?${new URLSearchParams(r)}` : \"\";\n}\nfunction D() {\n const e = l(), { href: t, search: r } = window.location;\n return t.replace(e, \"\").replace(r, \"\");\n}\nfunction C(e = \"\", t = \"\", r = {}) {\n const i = l().replace(location.origin, \"\"), n = b(r);\n return e ? t ? `${i}/${e}/${t}${n}` : `${i}/${e}${n}` : `${i}${n}`;\n}\nfunction W() {\n const e = D(), [t = \"\", r = \"\"] = e.split(\"/\").filter((i) => !!i);\n return {\n app: t,\n capability: r\n };\n}\nfunction P(e) {\n const { origin: t, pathname: r } = window.location;\n if (e === \"production\") {\n const [i] = r.split(\"/\").filter((n) => !!n);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${t}/${i}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = t;\n}\nfunction l() {\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL;\n}\nvar s = /* @__PURE__ */ ((e) => (e[e.AlreadyExists = 0] = \"AlreadyExists\", e[e.ApiGatewayPortDescription = 1] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 2] = \"ApiServerModeDescription\", e[e.AppConfigurationPath = 3] = \"AppConfigurationPath\", e[e.AppCreated = 4] = \"AppCreated\", e[e.AppEntryBuildOptionDescription = 5] = \"AppEntryBuildOptionDescription\", e[e.AppNameInquiry = 6] = \"AppNameInquiry\", e[e.BuildDescription = 7] = \"BuildDescription\", e[e.BuildModeOptionDescription = 8] = \"BuildModeOptionDescription\", e[e.BuildWatchDescription = 9] = \"BuildWatchDescription\", e[e.CreateAppDescription = 10] = \"CreateAppDescription\", e[e.CreateWorkspaceDescription = 11] = \"CreateWorkspaceDescription\", e[e.DevServerOpenDescription = 12] = \"DevServerOpenDescription\", e[e.DevServerPortDescription = 13] = \"DevServerPortDescription\", e[e.DevServerLoggingDescription = 14] = \"DevServerLoggingDescription\", e[e.Done = 15] = \"Done\", e[e.FetchPackageVersionError = 16] = \"FetchPackageVersionError\", e[e.ManifestEntryBuildOptionDescription = 17] = \"ManifestEntryBuildOptionDescription\", e[e.MissingTranslationKey = 18] = \"MissingTranslationKey\", e[e.NoAppName = 19] = \"NoAppName\", e[e.NoAppNameFound = 20] = \"NoAppNameFound\", e[e.NoAppOrWorkspaceInCurrentDirectory = 21] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.NoWorkspaceName = 22] = \"NoWorkspaceName\", e[e.OperationCancelled = 23] = \"OperationCancelled\", e[e.ServeDescription = 24] = \"ServeDescription\", e[e.ServedStopped = 25] = \"ServedStopped\", e[e.ServerGatewayMode = 26] = \"ServerGatewayMode\", e[e.ServerMode = 27] = \"ServerMode\", e[e.ServerModeInquiry = 28] = \"ServerModeInquiry\", e[e.ServerProxyMode = 29] = \"ServerProxyMode\", e[e.StopServerInstructions = 30] = \"StopServerInstructions\", e[e.TemplateFrameworkInquiry = 31] = \"TemplateFrameworkInquiry\", e[e.TemplateLanguageInquiry = 32] = \"TemplateLanguageInquiry\", e[e.UnrecognizedCommand = 33] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 34] = \"WorkspaceCreated\", e[e.WorkspaceNameInquiry = 35] = \"WorkspaceNameInquiry\", e))(s || {});\nconst M = {\n 15: \"Done\",\n 22: \"No workspace name provided!\",\n 19: \"No app name provided!\",\n 0: \"File or directory '{0}' already exists!\",\n 21: \"Could not find any app entry file at '{0}'!\",\n 33: \"Unrecognized command(s) {0}!\",\n 34: \"Workspace was created at path '{0}'!\",\n 4: \"App was created at path '{0}'!\",\n 25: \"Server stopped.\",\n 11: \"Creates an Alliance Workspace in the current directory.\",\n 10: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n 24: \"Starts a Alliance development server using the current directory package.json.\",\n 7: \"Builds an Alliance Application using Vite.\",\n 35: \"Enter the name of your workspace\",\n 28: \"Which server mode do you want to use?\",\n 6: \"Enter the name of your app\",\n 18: \"No translation key provided!\",\n 23: \"Operation cancelled.\",\n 30: `Press CTRL + C to stop the server.\n`,\n 32: \"Select preferred language\",\n 31: \"Select preferred framework template\",\n 13: \"The port that the dev server should use.\",\n 14: \"Whether the dev server and browser console should output more log information or not (false).\",\n 1: \"The port that the api gateway should use.\",\n 2: \"Which components to start. [server|server-proxy|server-gateway].\",\n 12: \"Whether the dev server should automatically open in your browser or not.\",\n 9: \"Whether the build should start watching and rebuild when files change or not.\",\n 5: \"The entry file for the app (./src/app).\",\n 17: \"The entry file for the app manifest (./src/manifest).\",\n 8: \"Which mode to use when building the app.\",\n 16: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n 20: \"Could not find app name in manifest.\",\n 3: \"The path to the app configuration file.\",\n 27: \"Server\",\n 29: \"Server with proxy\",\n 26: \"Server with gateway\"\n}, c = class c {\n};\na(c, \"getTranslations\", () => M), a(c, \"getTranslation\", (t, ...r) => {\n const n = c.getTranslations()[t];\n if (!n)\n throw new Error(`Could not find text with given key '${t}'.`);\n return r.reduce(\n (p, h, f) => p.toString().replace(`{${f}}`, h.toString()),\n n\n ).toString();\n}), a(c, \"get\", (t = s.MissingTranslationKey, ...r) => c.getTranslation(t, ...r));\nlet u = c;\nfunction R(e, t) {\n return O(Object.values(e), ({ name: r }) => ({\n label: r,\n value: r,\n selected: t === r\n }));\n}\nvar y = /* @__PURE__ */ ((e) => (e.Primary = \"primary\", e.Secondary = \"secondary\", e.Expressive = \"expressive\", e.Destructive = \"destructive\", e.Text = \"text\", e.PrimaryWhite = \"primary-white\", e.SecondaryWhite = \"secondary-white\", e.ExpressiveWhite = \"expressive-white\", e.TertiaryPurple = \"tertiary-purple\", e))(y || {});\nfunction $(e, t) {\n return Object.values(e).find((i) => i.name === t);\n}\nfunction O(e, t, r = \"Choose...\") {\n return e.reduce(\n (i, n) => (i.push({\n disabled: !1,\n selected: !1,\n ...t(n)\n }), i),\n [\n {\n label: r,\n value: \"\",\n disabled: !0,\n selected: !0\n }\n ]\n );\n}\nfunction L(e) {\n return (t) => {\n t.key === \"Enter\" && e(t);\n };\n}\nfunction U(e, t = \"all\") {\n const { email: r, displayName: i } = e, n = i && i !== \"unknown\", o = !!r;\n switch (t) {\n case \"all\": {\n if (n && o)\n return `${i} (${r})`;\n if (n)\n return i;\n if (o)\n return r;\n }\n case \"single\": {\n if (n)\n return i;\n if (o)\n return r;\n }\n }\n return \"<UNKNOWN USER>\";\n}\nfunction j(...e) {\n return e.filter((t) => !!t).join(\" \");\n}\nfunction q(e) {\n return Object.entries(e).reduce(\n (t, [r, i]) => (typeof i != \"object\" && typeof i != \"function\" && (t[r] = i), t),\n {}\n );\n}\nexport {\n I as AllianceError,\n N as FrameworkErrorCodes,\n u as Texts,\n s as TranslationsKey,\n A as UtilitiesErrorCodes,\n y as VocaButtonVariant,\n j as classNames,\n C as createCapabilityPath,\n U as friendlyUserName,\n W as getCurrentLocationInfo,\n l as getRuntimeRootUrl,\n $ as getVocaIcon,\n k as isAllianceError,\n O as mapToVocaOptions,\n L as onEnter,\n q as props,\n P as setRuntimeRootUrl,\n R as vocaIconsToOptions\n};\n//# sourceMappingURL=index.js.map\n","import {\n SerializeableObject,\n createCapabilityPath,\n onEnter,\n} from '@telia-ace/alliance-internal-client-utilities';\nimport { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nfunction isOnCurrentPath(path: string = '') {\n const cleanedPath = location.href.replace(location.origin, '');\n return cleanedPath.startsWith(path);\n}\n\n@customElement('alliance-link')\nexport class Link extends LitElement {\n @property({ type: String, attribute: true, reflect: true })\n capability: string = '';\n\n @property({ type: String, attribute: true, reflect: true })\n app: string = '';\n\n @property({ type: Object, attribute: true, reflect: true })\n args: SerializeableObject = {};\n\n /**\n * Link properties\n */\n @property({ type: String, attribute: true, reflect: true })\n href?: string;\n\n @property({ type: String })\n target?: string;\n\n @property({ type: String, attribute: true, reflect: true })\n rel?: string;\n\n @property({ type: String, attribute: true, reflect: true })\n download?: string;\n\n navigate = () => {\n history.pushState(this.args, '', this._href);\n window.dispatchEvent(new Event('popstate'));\n };\n\n clickHandler = (event: MouseEvent) => {\n if (this.href || this.download) {\n return;\n }\n\n event.preventDefault();\n\n this.navigate();\n };\n\n updateActive = () => {\n this.active = isOnCurrentPath(this._href);\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('popstate', this.updateActive);\n this.computeHref();\n }\n\n disconnectedCallback() {\n window.removeEventListener('popstate', this.updateActive);\n super.disconnectedCallback();\n }\n\n attributeChangedCallback(_1: string, _2: string | null, _3: string | null) {\n super.attributeChangedCallback(_1, _2, _3);\n\n // FUTURE TODO: Try to figure out this timeout is needed\n // Update seems to happen too early if this is not timed\n setTimeout(() => this.computeHref());\n }\n\n /**\n * Internal properties\n */\n @property({ type: String, attribute: false, reflect: false })\n private _href: string = '';\n\n @property({ type: Boolean, attribute: 'active', reflect: true })\n private active: boolean = false;\n\n private computeHref = () => {\n if (this.href) {\n return (this._href = this.href);\n }\n\n if (!this.app) {\n throw new Error('The app property is required when creating a capability link!');\n }\n this._href = createCapabilityPath(this.app, this.capability, this.args);\n this.updateActive();\n };\n\n render() {\n return html`<a\n part=\"anchor\"\n target=${this.target}\n rel=${this.rel}\n download=${this.download}\n .href=${this._href}\n ?active=${this.active}\n @click=${this.clickHandler}\n @keydown=${onEnter(this.clickHandler)}\n >\n <slot></slot>\n </a>`;\n }\n}\n"],"names":["g","v","a","b","r","i","n","o","p","C","l","s","M","t","h","f","L","isOnCurrentPath","path","Link","LitElement","event","createCapabilityPath","_1","_2","_3","html","onEnter","__decorateClass","property","customElement"],"mappings":";AAAA,IAAIA,IAAI,OAAO,gBACXC,IAAI,CAAC,GAAG,GAAG,MAAM,KAAK,IAAID,EAAE,GAAG,GAAG,EAAE,YAAY,IAAI,cAAc,IAAI,UAAU,IAAI,OAAO,EAAC,CAAE,IAAI,EAAE,CAAC,IAAI,GACzGE,IAAI,CAAC,GAAG,GAAG,OAAOD,EAAE,GAAG,OAAO,KAAK,WAAW,IAAI,KAAK,GAAG,CAAC,GAAG;AAoClE,SAASE,EAAE,GAAG;AACZ,QAAMC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hGIC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAM,SAAS,IAAM;AAAA,GADjDV,EAET,WAAA,cAAA,CAAA;AAGAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAM,SAAS,IAAM;AAAA,GAJjDV,EAKT,WAAA,OAAA,CAAA;AAGAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAM,SAAS,IAAM;AAAA,GAPjDV,EAQT,WAAA,QAAA,CAAA;AAMAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAM,SAAS,IAAM;AAAA,GAbjDV,EAcT,WAAA,QAAA,CAAA;AAGAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ;AAAA,GAhBjBV,EAiBT,WAAA,UAAA,CAAA;AAGAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAM,SAAS,IAAM;AAAA,GAnBjDV,EAoBT,WAAA,OAAA,CAAA;AAGAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAM,SAAS,IAAM;AAAA,GAtBjDV,EAuBT,WAAA,YAAA,CAAA;AA4CQS,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,QAAQ,WAAW,IAAO,SAAS,IAAO;AAAA,GAlEnDV,EAmED,WAAA,SAAA,CAAA;AAGAS,EAAA;AAAA,EADPC,EAAS,EAAE,MAAM,SAAS,WAAW,UAAU,SAAS,IAAM;AAAA,GArEtDV,EAsED,WAAA,UAAA,CAAA;AAtECA,IAANS,EAAA;AAAA,EADNE,EAAc,eAAe;AAAA,GACjBX,CAAA;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { i as y, r as t, n as
|
|
1
|
+
import { i as y, r as t, n as p, s as $, x as o, e as f } from "../chunks/query-assigned-elements-ac91685f.js";
|
|
2
2
|
import { t as m, c as v } from "../chunks/repeat-34adae9e.js";
|
|
3
3
|
import "../chunks/telia-button-c9ba09a9.js";
|
|
4
4
|
import "../chunks/telia-heading-38ae44ae.js";
|
|
5
5
|
import "../chunks/telia-icon-d0e7c715.js";
|
|
6
|
-
import { l as b, d as
|
|
7
|
-
import { c as x } from "../chunks/close-
|
|
6
|
+
import { l as b, d as c, b as h, a as w, c as k, s as e } from "../chunks/index-514c4fef.js";
|
|
7
|
+
import { c as x } from "../chunks/close-7d423291.js";
|
|
8
8
|
import "../chunks/index-eef143db.js";
|
|
9
9
|
import "../chunks/telia-vst2-dfb33a56.js";
|
|
10
10
|
import "../chunks/getSvgContent-f2389ce0.js";
|
|
11
|
-
var S = Object.defineProperty, C = Object.getOwnPropertyDescriptor,
|
|
12
|
-
for (var
|
|
13
|
-
(g = i[u]) && (
|
|
14
|
-
return
|
|
11
|
+
var S = Object.defineProperty, C = Object.getOwnPropertyDescriptor, n = (i, a, l, d) => {
|
|
12
|
+
for (var r = d > 1 ? void 0 : d ? C(a, l) : a, u = i.length - 1, g; u >= 0; u--)
|
|
13
|
+
(g = i[u]) && (r = (d ? g(a, l, r) : g(r)) || r);
|
|
14
|
+
return d && r && S(a, l, r), r;
|
|
15
15
|
};
|
|
16
16
|
let s = class extends $ {
|
|
17
17
|
constructor() {
|
|
@@ -51,7 +51,7 @@ let s = class extends $ {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.footer {
|
|
54
|
-
border-top: ${t(
|
|
54
|
+
border-top: ${t(h.widthXs)} solid ${t(c.gray200)};
|
|
55
55
|
padding: ${t(e.spacing24)} ${t(e.spacing32)};
|
|
56
56
|
}
|
|
57
57
|
</style>` : o`<style>
|
|
@@ -78,20 +78,25 @@ let s = class extends $ {
|
|
|
78
78
|
display: block;
|
|
79
79
|
}
|
|
80
80
|
</style>`;
|
|
81
|
-
}, this.closeButton = () => this.required ? "" : o`<telia-button
|
|
81
|
+
}, this.closeButton = () => this.required ? "" : o`<telia-button
|
|
82
|
+
size="sm"
|
|
83
|
+
variant="text"
|
|
84
|
+
data-test-id="close"
|
|
85
|
+
@click=${this.onCloseClick}
|
|
82
86
|
><telia-icon size="md" svg="${x.svg}"
|
|
83
87
|
/></telia-button>`, this.footer = () => this.actions.length ? o`
|
|
84
88
|
<div class="footer">
|
|
85
89
|
${v(
|
|
86
90
|
this.actions,
|
|
87
|
-
(i) => o`
|
|
91
|
+
({ disabled: i, variant: a, action: l, label: d }) => o`
|
|
88
92
|
<telia-button
|
|
89
|
-
disabled="${i
|
|
90
|
-
variant="${
|
|
93
|
+
disabled="${i ? "true" : "false"}"
|
|
94
|
+
variant="${a || "primary"}"
|
|
91
95
|
size="sm"
|
|
92
|
-
@click=${() => this.action(
|
|
96
|
+
@click=${() => this.action(l)}
|
|
97
|
+
data-test-id="${l}-action"
|
|
93
98
|
>
|
|
94
|
-
${
|
|
99
|
+
${d}
|
|
95
100
|
</telia-button>
|
|
96
101
|
`
|
|
97
102
|
)}
|
|
@@ -107,13 +112,13 @@ let s = class extends $ {
|
|
|
107
112
|
}, this.onSubHeaderSlotChange = () => {
|
|
108
113
|
this.hasSubHeader = !0;
|
|
109
114
|
}, this.action = (i) => {
|
|
110
|
-
const
|
|
115
|
+
const a = new CustomEvent("action", {
|
|
111
116
|
bubbles: !0,
|
|
112
117
|
composed: !0,
|
|
113
118
|
detail: { action: i },
|
|
114
119
|
cancelable: !0
|
|
115
120
|
});
|
|
116
|
-
return this.dispatchEvent(
|
|
121
|
+
return this.dispatchEvent(a);
|
|
117
122
|
};
|
|
118
123
|
}
|
|
119
124
|
connectedCallback() {
|
|
@@ -154,7 +159,7 @@ s.styles = y`
|
|
|
154
159
|
.backdrop {
|
|
155
160
|
inset: 0;
|
|
156
161
|
z-index: ${t(parseInt(b.modal) - 1)};
|
|
157
|
-
background-color: ${t(
|
|
162
|
+
background-color: ${t(c.black)};
|
|
158
163
|
opacity: 0.3;
|
|
159
164
|
}
|
|
160
165
|
|
|
@@ -167,8 +172,8 @@ s.styles = y`
|
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
dialog {
|
|
170
|
-
background-color: ${t(
|
|
171
|
-
border-radius: ${t(
|
|
175
|
+
background-color: ${t(c.white)};
|
|
176
|
+
border-radius: ${t(h.radiusLg)};
|
|
172
177
|
box-shadow: ${t(w.md)};
|
|
173
178
|
z-index: ${t(parseInt(b.modal))};
|
|
174
179
|
max-width: ${t(k.breakpointLg)};
|
|
@@ -182,7 +187,7 @@ s.styles = y`
|
|
|
182
187
|
display: flex;
|
|
183
188
|
align-items: center;
|
|
184
189
|
padding: ${t(e.spacing24)} ${t(e.spacing32)};
|
|
185
|
-
border-bottom: ${t(
|
|
190
|
+
border-bottom: ${t(h.widthXs)} solid ${t(c.gray200)};
|
|
186
191
|
min-height: 40px;
|
|
187
192
|
}
|
|
188
193
|
|
|
@@ -194,7 +199,7 @@ s.styles = y`
|
|
|
194
199
|
|
|
195
200
|
.sub-header {
|
|
196
201
|
padding: ${t(e.spacing24)} ${t(e.spacing32)};
|
|
197
|
-
border-bottom: ${t(
|
|
202
|
+
border-bottom: ${t(h.widthXs)} solid ${t(c.gray200)};
|
|
198
203
|
display: none;
|
|
199
204
|
}
|
|
200
205
|
|
|
@@ -208,25 +213,25 @@ s.styles = y`
|
|
|
208
213
|
gap: ${t(e.spacing16)};
|
|
209
214
|
}
|
|
210
215
|
`;
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
n([
|
|
217
|
+
p({ type: String, attribute: "header" })
|
|
213
218
|
], s.prototype, "header", 2);
|
|
214
|
-
|
|
215
|
-
|
|
219
|
+
n([
|
|
220
|
+
p({ type: Array })
|
|
216
221
|
], s.prototype, "actions", 2);
|
|
217
|
-
|
|
218
|
-
|
|
222
|
+
n([
|
|
223
|
+
p({ type: Boolean, attribute: "required" })
|
|
219
224
|
], s.prototype, "required", 2);
|
|
220
|
-
|
|
221
|
-
|
|
225
|
+
n([
|
|
226
|
+
p({ type: String, attribute: "scroll-mode" })
|
|
222
227
|
], s.prototype, "scrollMode", 2);
|
|
223
|
-
|
|
228
|
+
n([
|
|
224
229
|
m()
|
|
225
230
|
], s.prototype, "hasSubHeader", 2);
|
|
226
|
-
|
|
227
|
-
|
|
231
|
+
n([
|
|
232
|
+
p({ type: Boolean, attribute: "contain" })
|
|
228
233
|
], s.prototype, "contain", 2);
|
|
229
|
-
s =
|
|
234
|
+
s = n([
|
|
230
235
|
f("alliance-modal")
|
|
231
236
|
], s);
|
|
232
237
|
//# sourceMappingURL=alliance-modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alliance-modal.js","sources":["../src/components/alliance-modal/alliance-modal.ts"],"sourcesContent":["import type { ButtonVariantType } from '@teliads/components/dist/types/types/ButtonVariant';\nimport { css, html, LitElement, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\n\nimport '@/voca/components/telia-button';\nimport '@/voca/components/telia-heading';\nimport '@/voca/components/telia-icon';\nimport { borders, breakpoints, colors, layers, shadows, spacing } from '@/voca/foundations';\nimport { close } from '@/voca/icons';\n\nexport type Action = {\n variant: ButtonVariantType;\n label: string;\n action: string;\n disabled?: boolean;\n};\n\n/**\n * Event dispatched when clicking the close button, the backdrop, an action button or pressing escape.\n *\n * Event: `action`\n *\n * Detail: Object containing the property `action`.\n */\nexport type ActionEvent = CustomEvent<{ action: string }>;\n\n@customElement('alliance-modal')\nexport class Modal extends LitElement {\n static styles = css`\n :host {\n display: block;\n inset: 0;\n z-index: ${unsafeCSS(parseInt(layers.modal) - 2)};\n }\n\n .backdrop {\n inset: 0;\n z-index: ${unsafeCSS(parseInt(layers.modal) - 1)};\n background-color: ${unsafeCSS(colors.black)};\n opacity: 0.3;\n }\n\n .container {\n margin: 0 auto;\n display: flex;\n justify-content: center;\n height: 100%;\n width: 100%;\n }\n\n dialog {\n background-color: ${unsafeCSS(colors.white)};\n border-radius: ${unsafeCSS(borders.radiusLg)};\n box-shadow: ${unsafeCSS(shadows.md)};\n z-index: ${unsafeCSS(parseInt(layers.modal))};\n max-width: ${unsafeCSS(breakpoints.breakpointLg)};\n position: static;\n padding: 0;\n border: none;\n }\n\n .header {\n position: relative;\n display: flex;\n align-items: center;\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n border-bottom: ${unsafeCSS(borders.widthXs)} solid ${unsafeCSS(colors.gray200)};\n min-height: 40px;\n }\n\n .header telia-button {\n position: absolute;\n top: ${unsafeCSS(spacing.spacing20)};\n right: ${unsafeCSS(spacing.spacing24)};\n }\n\n .sub-header {\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n border-bottom: ${unsafeCSS(borders.widthXs)} solid ${unsafeCSS(colors.gray200)};\n display: none;\n }\n\n .body {\n min-width: calc(${unsafeCSS(spacing.spacing128)} * 2);\n }\n\n .footer {\n display: flex;\n justify-content: flex-end;\n gap: ${unsafeCSS(spacing.spacing16)};\n }\n `;\n\n @property({ type: String, attribute: 'header' })\n header: string = '';\n\n @property({ type: Array })\n actions: Action[] = [];\n\n @property({ type: Boolean, attribute: 'required' })\n required: boolean = false;\n\n @property({ type: String, attribute: 'scroll-mode' })\n scrollMode: 'outside' | 'inside' = 'outside';\n\n @state()\n hasSubHeader: boolean = false;\n\n // Internal usage only\n // Used in Storybook to contain modal in story\n @property({ type: Boolean, attribute: 'contain' })\n contain?: boolean;\n\n containStyling = () => {\n if (!this.contain) {\n return html`<style>\n :host {\n position: fixed;\n }\n\n .backdrop {\n position: absolute;\n }\n </style>`;\n }\n\n return html`<style>\n :host {\n height: 500px;\n position: static;\n }\n .backdrop {\n position: absolute;\n }\n </style>`;\n };\n\n scrollStyling = () => {\n if (this.scrollMode === 'inside') {\n return html`<style>\n .container {\n align-items: center;\n }\n\n dialog {\n max-height: 80%;\n display: flex;\n flex-direction: column;\n }\n\n .body {\n flex: 1;\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n height: 80%;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .footer {\n border-top: ${unsafeCSS(borders.widthXs)} solid ${unsafeCSS(colors.gray200)};\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n }\n </style>`;\n }\n\n return html`<style>\n .container {\n overflow-x: hidden;\n overflow-y: overlay;\n align-items: flex-start;\n }\n\n dialog {\n display: block;\n margin: ${unsafeCSS(spacing.spacing128)} ${unsafeCSS(spacing.spacing24)};\n }\n\n .footer,\n .body {\n margin: ${unsafeCSS(spacing.spacing24)} 0;\n padding: 0 ${unsafeCSS(spacing.spacing32)};\n }\n </style>`;\n };\n\n subHeaderStyling = () => {\n if (this.hasSubHeader) {\n return html`<style>\n div.sub-header {\n display: block;\n }\n </style>`;\n }\n };\n\n closeButton = () => {\n if (this.required) {\n return '';\n }\n\n return html`<telia-button size=\"sm\" variant=\"text\" @click=${this.onCloseClick}\n ><telia-icon size=\"md\" svg=\"${close.svg}\"\n /></telia-button>`;\n };\n\n footer = () => {\n if (!this.actions.length) {\n return '';\n }\n\n return html`\n <div class=\"footer\">\n ${repeat(\n this.actions,\n (action) => html`\n <telia-button\n disabled=\"${action.disabled ? 'true' : 'false'}\"\n variant=\"${action.variant || 'primary'}\"\n size=\"sm\"\n @click=${() => this.action(action.action)}\n >\n ${action.label}\n </telia-button>\n `\n )}\n </div>\n `;\n };\n\n onBackdropClick = () => {\n if (this.required) {\n return;\n }\n\n return this.action('close');\n };\n\n onCloseClick = () => {\n if (this.required) {\n return;\n }\n\n return this.action('close');\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n if (event.defaultPrevented) {\n return;\n }\n\n if (!this.required && event.key === 'Escape') {\n this.action('close');\n }\n };\n\n // The slotchange event is only triggered if slot changes content\n // So if event is triggered, that means sub-header is populated and should be shown\n onSubHeaderSlotChange = () => {\n this.hasSubHeader = true;\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('keydown', this.onKeyDown);\n }\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.onKeyDown);\n super.disconnectedCallback();\n }\n\n action = (action: string) => {\n const event: ActionEvent = new CustomEvent('action', {\n bubbles: true,\n composed: true,\n detail: { action },\n cancelable: true,\n });\n return this.dispatchEvent(event);\n };\n\n render() {\n return html`\n ${this.containStyling()} ${this.scrollStyling()} ${this.subHeaderStyling()}\n <div class=\"backdrop\" @click=${this.onBackdropClick}></div>\n <div class=\"container\">\n <dialog open>\n <div class=\"header\">\n <telia-heading tag=\"h3\" variant=\"title-100\">${this.header}</telia-heading>\n ${this.closeButton()}\n </div>\n <div class=\"sub-header\">\n <slot name=\"sub-header\" @slotchange=${this.onSubHeaderSlotChange}></slot>\n </div>\n <div class=\"body\">\n <slot></slot>\n </div>\n ${this.footer()}\n </dialog>\n </div>\n `;\n }\n}\n"],"names":["Modal","LitElement","html","unsafeCSS","spacing","borders","colors","close","repeat","action","event","css","layers","shadows","breakpoints","__decorateClass","property","state","customElement"],"mappings":";;;;;;;;;;;;;;;AA4Ba,IAAAA,IAAN,cAAoBC,EAAW;AAAA,EAA/B,cAAA;AAAA,UAAA,GAAA,SAAA,GAmEc,KAAA,SAAA,IAGjB,KAAA,UAAoB,IAGA,KAAA,WAAA,IAGe,KAAA,aAAA,WAGX,KAAA,eAAA,IAOxB,KAAA,iBAAiB,MACR,KAAK,UAYHC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,oBAXIA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,uBAsBf,KAAA,gBAAgB,MACR,KAAK,eAAe,WACbA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,+BAaYC,EAAUC,EAAQ,SAAS,CAAC,IAAID,EAAUC,EAAQ,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAOzDD,EAAUE,EAAQ,OAA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AA,GAnFxChB,EAoFT,WAAA,WAAA,CAAA;AApFSA,IAANe,EAAA;AAAA,EADNG,EAAc,gBAAgB;AAAA,GAClBlB,CAAA;"}
|
|
1
|
+
{"version":3,"file":"alliance-modal.js","sources":["../src/components/alliance-modal/alliance-modal.ts"],"sourcesContent":["import type { ButtonVariantType } from '@teliads/components/dist/types/types/ButtonVariant';\nimport { css, html, LitElement, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\n\nimport '@/voca/components/telia-button';\nimport '@/voca/components/telia-heading';\nimport '@/voca/components/telia-icon';\nimport { borders, breakpoints, colors, layers, shadows, spacing } from '@/voca/foundations';\nimport { close } from '@/voca/icons';\n\nexport type Action = {\n variant: ButtonVariantType;\n label: string;\n action: string;\n disabled?: boolean;\n};\n\n/**\n * Event dispatched when clicking the close button, the backdrop, an action button or pressing escape.\n *\n * Event: `action`\n *\n * Detail: Object containing the property `action`.\n */\nexport type ActionEvent = CustomEvent<{ action: string }>;\n\n@customElement('alliance-modal')\nexport class Modal extends LitElement {\n static styles = css`\n :host {\n display: block;\n inset: 0;\n z-index: ${unsafeCSS(parseInt(layers.modal) - 2)};\n }\n\n .backdrop {\n inset: 0;\n z-index: ${unsafeCSS(parseInt(layers.modal) - 1)};\n background-color: ${unsafeCSS(colors.black)};\n opacity: 0.3;\n }\n\n .container {\n margin: 0 auto;\n display: flex;\n justify-content: center;\n height: 100%;\n width: 100%;\n }\n\n dialog {\n background-color: ${unsafeCSS(colors.white)};\n border-radius: ${unsafeCSS(borders.radiusLg)};\n box-shadow: ${unsafeCSS(shadows.md)};\n z-index: ${unsafeCSS(parseInt(layers.modal))};\n max-width: ${unsafeCSS(breakpoints.breakpointLg)};\n position: static;\n padding: 0;\n border: none;\n }\n\n .header {\n position: relative;\n display: flex;\n align-items: center;\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n border-bottom: ${unsafeCSS(borders.widthXs)} solid ${unsafeCSS(colors.gray200)};\n min-height: 40px;\n }\n\n .header telia-button {\n position: absolute;\n top: ${unsafeCSS(spacing.spacing20)};\n right: ${unsafeCSS(spacing.spacing24)};\n }\n\n .sub-header {\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n border-bottom: ${unsafeCSS(borders.widthXs)} solid ${unsafeCSS(colors.gray200)};\n display: none;\n }\n\n .body {\n min-width: calc(${unsafeCSS(spacing.spacing128)} * 2);\n }\n\n .footer {\n display: flex;\n justify-content: flex-end;\n gap: ${unsafeCSS(spacing.spacing16)};\n }\n `;\n\n @property({ type: String, attribute: 'header' })\n header: string = '';\n\n @property({ type: Array })\n actions: Action[] = [];\n\n @property({ type: Boolean, attribute: 'required' })\n required: boolean = false;\n\n @property({ type: String, attribute: 'scroll-mode' })\n scrollMode: 'outside' | 'inside' = 'outside';\n\n @state()\n hasSubHeader: boolean = false;\n\n // Internal usage only\n // Used in Storybook to contain modal in story\n @property({ type: Boolean, attribute: 'contain' })\n contain?: boolean;\n\n containStyling = () => {\n if (!this.contain) {\n return html`<style>\n :host {\n position: fixed;\n }\n\n .backdrop {\n position: absolute;\n }\n </style>`;\n }\n\n return html`<style>\n :host {\n height: 500px;\n position: static;\n }\n .backdrop {\n position: absolute;\n }\n </style>`;\n };\n\n scrollStyling = () => {\n if (this.scrollMode === 'inside') {\n return html`<style>\n .container {\n align-items: center;\n }\n\n dialog {\n max-height: 80%;\n display: flex;\n flex-direction: column;\n }\n\n .body {\n flex: 1;\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n height: 80%;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .footer {\n border-top: ${unsafeCSS(borders.widthXs)} solid ${unsafeCSS(colors.gray200)};\n padding: ${unsafeCSS(spacing.spacing24)} ${unsafeCSS(spacing.spacing32)};\n }\n </style>`;\n }\n\n return html`<style>\n .container {\n overflow-x: hidden;\n overflow-y: overlay;\n align-items: flex-start;\n }\n\n dialog {\n display: block;\n margin: ${unsafeCSS(spacing.spacing128)} ${unsafeCSS(spacing.spacing24)};\n }\n\n .footer,\n .body {\n margin: ${unsafeCSS(spacing.spacing24)} 0;\n padding: 0 ${unsafeCSS(spacing.spacing32)};\n }\n </style>`;\n };\n\n subHeaderStyling = () => {\n if (this.hasSubHeader) {\n return html`<style>\n div.sub-header {\n display: block;\n }\n </style>`;\n }\n };\n\n closeButton = () => {\n if (this.required) {\n return '';\n }\n\n return html`<telia-button\n size=\"sm\"\n variant=\"text\"\n data-test-id=\"close\"\n @click=${this.onCloseClick}\n ><telia-icon size=\"md\" svg=\"${close.svg}\"\n /></telia-button>`;\n };\n\n footer = () => {\n if (!this.actions.length) {\n return '';\n }\n\n return html`\n <div class=\"footer\">\n ${repeat(\n this.actions,\n ({ disabled, variant, action, label }) => html`\n <telia-button\n disabled=\"${disabled ? 'true' : 'false'}\"\n variant=\"${variant || 'primary'}\"\n size=\"sm\"\n @click=${() => this.action(action)}\n data-test-id=\"${action}-action\"\n >\n ${label}\n </telia-button>\n `\n )}\n </div>\n `;\n };\n\n onBackdropClick = () => {\n if (this.required) {\n return;\n }\n\n return this.action('close');\n };\n\n onCloseClick = () => {\n if (this.required) {\n return;\n }\n\n return this.action('close');\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n if (event.defaultPrevented) {\n return;\n }\n\n if (!this.required && event.key === 'Escape') {\n this.action('close');\n }\n };\n\n // The slotchange event is only triggered if slot changes content\n // So if event is triggered, that means sub-header is populated and should be shown\n onSubHeaderSlotChange = () => {\n this.hasSubHeader = true;\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('keydown', this.onKeyDown);\n }\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.onKeyDown);\n super.disconnectedCallback();\n }\n\n action = (action: string) => {\n const event: ActionEvent = new CustomEvent('action', {\n bubbles: true,\n composed: true,\n detail: { action },\n cancelable: true,\n });\n return this.dispatchEvent(event);\n };\n\n render() {\n return html`\n ${this.containStyling()} ${this.scrollStyling()} ${this.subHeaderStyling()}\n <div class=\"backdrop\" @click=${this.onBackdropClick}></div>\n <div class=\"container\">\n <dialog open>\n <div class=\"header\">\n <telia-heading tag=\"h3\" variant=\"title-100\">${this.header}</telia-heading>\n ${this.closeButton()}\n </div>\n <div class=\"sub-header\">\n <slot name=\"sub-header\" @slotchange=${this.onSubHeaderSlotChange}></slot>\n </div>\n <div class=\"body\">\n <slot></slot>\n </div>\n ${this.footer()}\n </dialog>\n </div>\n `;\n }\n}\n"],"names":["Modal","LitElement","html","unsafeCSS","spacing","borders","colors","close","repeat","disabled","variant","action","label","event","css","layers","shadows","breakpoints","__decorateClass","property","state","customElement"],"mappings":";;;;;;;;;;;;;;;AA4Ba,IAAAA,IAAN,cAAoBC,EAAW;AAAA,EAA/B,cAAA;AAAA,UAAA,GAAA,SAAA,GAmEc,KAAA,SAAA,IAGjB,KAAA,UAAoB,IAGA,KAAA,WAAA,IAGe,KAAA,aAAA,WAGX,KAAA,eAAA,IAOxB,KAAA,iBAAiB,MACR,KAAK,UAYHC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,oBAXIA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,uBAsBf,KAAA,gBAAgB,MACR,KAAK,eAAe,WACbA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,+BAaYC,EAAUC,EAAQ,SAAS,CAAC,IAAID,EAAUC,EAAQ,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAOzDD,EAAUE,EAAQ,OAAO,CAAC,UAAUF,EAAUG,EAAO,OAAO,CAAC;AAAA,+BAChEH,EAAUC,EAAQ,SAAS,CAAC,IAAID,EAAUC,EAAQ,SAAS,CAAC;AAAA;AAAA,wBAK5EF;AAAAA;AAAAA;AAAAA;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EADNG,EAAc,gBAAgB;AAAA,GAClBrB,CAAA;"}
|
package/components/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import "../chunks/getSvgContent-f2389ce0.js";
|
|
|
11
11
|
import "../chunks/telia-vst2-dfb33a56.js";
|
|
12
12
|
import "../chunks/telia-heading-38ae44ae.js";
|
|
13
13
|
import "../chunks/index-514c4fef.js";
|
|
14
|
-
import "../chunks/close-
|
|
14
|
+
import "../chunks/close-7d423291.js";
|
|
15
15
|
import "../chunks/variables-ecb680f0.js";
|
|
16
16
|
import "../chunks/telia-label-f4c1eb47.js";
|
|
17
17
|
import "../chunks/chevron-right-788ce8a9.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/alliance-ui",
|
|
3
|
-
"version": "1.0.13
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "UI components used by ACE Alliance apps.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@teliads/components": "^22.1.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@telia-ace/alliance-internal-client-utilities": "1.0.
|
|
48
|
-
"@telia-ace/alliance-internal-node-utilities": "1.0.
|
|
47
|
+
"@telia-ace/alliance-internal-client-utilities": "1.0.2",
|
|
48
|
+
"@telia-ace/alliance-internal-node-utilities": "1.0.2",
|
|
49
49
|
"@types/fs-extra": "^11.0.1",
|
|
50
50
|
"fs-extra": "^11.1.1",
|
|
51
51
|
"lit": "^2.7.6",
|
|
@@ -57,9 +57,7 @@
|
|
|
57
57
|
"scripts": {
|
|
58
58
|
"dev": "rimraf chunks voca components && tsc && vite build --mode development --watch",
|
|
59
59
|
"build:dev": "rimraf chunks voca components && tsc && vite build --mode development",
|
|
60
|
-
"build:prod": "rimraf chunks voca components && tsc && vite build
|
|
61
|
-
"build:test": "rimraf chunks voca components && tsc && vite build --mode test",
|
|
62
|
-
"build:docker": "vite build",
|
|
60
|
+
"build:prod": "rimraf chunks voca components && tsc && vite build",
|
|
63
61
|
"update-voca-components-list": "node scripts/map-voca-components"
|
|
64
62
|
}
|
|
65
63
|
}
|
|
@@ -2,7 +2,7 @@ import { p as G, H as K, c as I, h as i, a as $, F as W } from "../../chunks/ind
|
|
|
2
2
|
import { u as k } from "../../chunks/uniqueId-0daf01ec.js";
|
|
3
3
|
import { s as X } from "../../chunks/stringCombiner-10b57054.js";
|
|
4
4
|
import { c as E } from "../../chunks/chevron-down-50d47dd6.js";
|
|
5
|
-
import { c as j } from "../../chunks/close-
|
|
5
|
+
import { c as j } from "../../chunks/close-ac6e4f1c.js";
|
|
6
6
|
import { d as J } from "../../chunks/telia-button-c9ba09a9.js";
|
|
7
7
|
import { d as U } from "../../chunks/telia-field-assistive-text-173ba2fb.js";
|
|
8
8
|
import { d as Q } from "../../chunks/telia-field-error-f978aeb3.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as o, H as l, c as n, h as t } from "../../chunks/index-eef143db.js";
|
|
2
2
|
import { c as r } from "../../chunks/check-circle-filled-42095247.js";
|
|
3
|
-
import { c } from "../../chunks/close-
|
|
3
|
+
import { c } from "../../chunks/close-ac6e4f1c.js";
|
|
4
4
|
import { e as s } from "../../chunks/error-filled-8de50bdd.js";
|
|
5
5
|
import { d as m } from "../../chunks/telia-button-c9ba09a9.js";
|
|
6
6
|
import { d } from "../../chunks/telia-heading-38ae44ae.js";
|