@telia-ace/alliance-ui 1.0.10-next.0 → 1.0.10

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @telia-ace/alliance-ui
2
2
 
3
+ ## 1.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ea5886: Set `app` property to required in `<alliance-link>`.
8
+ - 1ea5886: Add `<telia-counter-badge>` and `<telia-search-input>`.
9
+ - 1ea5886: Add `<alliance-link>`.
10
+ - 1ea5886: Use internal property `_href` in `<alliance-link>`.
11
+
12
+ ## 1.0.10-next.1
13
+
14
+ ### Patch Changes
15
+
16
+ - 9f57f2f: Set `app` property to required in `<alliance-link>`.
17
+ - 9f57f2f: Use internal property `_href` in `<alliance-link>`.
18
+
3
19
  ## 1.0.10-next.0
4
20
 
5
21
  ### Patch Changes
@@ -0,0 +1,270 @@
1
+ import { e as s, a as y, s as f, x as v } from "./query-assigned-elements-024d0918.js";
2
+ var g = Object.defineProperty, m = (e, t, r) => t in e ? g(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, l = (e, t, r) => (m(e, typeof t != "symbol" ? t + "" : t, r), r);
3
+ function w(e) {
4
+ const t = Object.entries(e).reduce((r, a) => {
5
+ const [i, n] = a;
6
+ return typeof n > "u" || (typeof n == "object" && n !== null ? r[i] = JSON.stringify(n) : r[i] = n), r;
7
+ }, {});
8
+ return Object.keys(t).length ? `?${new URLSearchParams(t)}` : "";
9
+ }
10
+ function A(e) {
11
+ return e.replaceAll(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
12
+ }
13
+ function S(e = "", t = "", r = {}) {
14
+ const a = k().replace(location.origin, ""), i = w(r);
15
+ return e ? t ? `${a}/${e}/${t}${i}` : `${a}/${e}${i}` : `${a}${i}`;
16
+ }
17
+ function b(e, t) {
18
+ const r = A(e);
19
+ return new RegExp(`^${r.replaceAll("\\?", ".?").replaceAll("\\*", ".*")}`, "i").test(t);
20
+ }
21
+ function C() {
22
+ const { origin: e, pathname: t } = window.location;
23
+ if (b("https://alliance*.ace.teliacompany.net", e)) {
24
+ const [r] = t.split("/").filter((a) => !!a);
25
+ return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${e}/${r}`;
26
+ }
27
+ return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = e;
28
+ }
29
+ function k() {
30
+ return globalThis.__ALLIANCE_RUNTIME_ROOT_URL || C(), globalThis.__ALLIANCE_RUNTIME_ROOT_URL;
31
+ }
32
+ var d = /* @__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.Done = 14] = "Done", e[e.FetchPackageVersionError = 15] = "FetchPackageVersionError", e[e.ManifestEntryBuildOptionDescription = 16] = "ManifestEntryBuildOptionDescription", e[e.MissingTranslationKey = 17] = "MissingTranslationKey", e[e.NoAppName = 18] = "NoAppName", e[e.NoAppNameFound = 19] = "NoAppNameFound", e[e.NoAppOrWorkspaceInCurrentDirectory = 20] = "NoAppOrWorkspaceInCurrentDirectory", e[e.NoWorkspaceName = 21] = "NoWorkspaceName", e[e.OperationCancelled = 22] = "OperationCancelled", e[e.ServeDescription = 23] = "ServeDescription", e[e.ServedStopped = 24] = "ServedStopped", e[e.ServerGatewayMode = 25] = "ServerGatewayMode", e[e.ServerMode = 26] = "ServerMode", e[e.ServerModeInquiry = 27] = "ServerModeInquiry", e[e.ServerProxyMode = 28] = "ServerProxyMode", e[e.StopServerInstructions = 29] = "StopServerInstructions", e[e.TemplateFrameworkInquiry = 30] = "TemplateFrameworkInquiry", e[e.TemplateLanguageInquiry = 31] = "TemplateLanguageInquiry", e[e.UnrecognizedCommand = 32] = "UnrecognizedCommand", e[e.WorkspaceCreated = 33] = "WorkspaceCreated", e[e.WorkspaceNameInquiry = 34] = "WorkspaceNameInquiry", e))(d || {});
33
+ const D = {
34
+ [
35
+ 14
36
+ /* Done */
37
+ ]: "Done",
38
+ [
39
+ 21
40
+ /* NoWorkspaceName */
41
+ ]: "No workspace name provided!",
42
+ [
43
+ 18
44
+ /* NoAppName */
45
+ ]: "No app name provided!",
46
+ [
47
+ 0
48
+ /* AlreadyExists */
49
+ ]: "File or directory '{0}' already exists!",
50
+ [
51
+ 20
52
+ /* NoAppOrWorkspaceInCurrentDirectory */
53
+ ]: "Could not find any app entry file at '{0}'!",
54
+ [
55
+ 32
56
+ /* UnrecognizedCommand */
57
+ ]: "Unrecognized command(s) {0}!",
58
+ [
59
+ 33
60
+ /* WorkspaceCreated */
61
+ ]: "Workspace was created at path '{0}'!",
62
+ [
63
+ 4
64
+ /* AppCreated */
65
+ ]: "App was created at path '{0}'!",
66
+ [
67
+ 24
68
+ /* ServedStopped */
69
+ ]: "Server stopped.",
70
+ [
71
+ 11
72
+ /* CreateWorkspaceDescription */
73
+ ]: "Creates an Alliance Workspace in the current directory.",
74
+ [
75
+ 10
76
+ /* CreateAppDescription */
77
+ ]: "Creates an Alliance Application in the current directory or Alliance Workspace.",
78
+ [
79
+ 23
80
+ /* ServeDescription */
81
+ ]: "Starts a Alliance development server using the current directory package.json.",
82
+ [
83
+ 7
84
+ /* BuildDescription */
85
+ ]: "Builds an Alliance Application using Vite.",
86
+ [
87
+ 34
88
+ /* WorkspaceNameInquiry */
89
+ ]: "Enter the name of your workspace",
90
+ [
91
+ 27
92
+ /* ServerModeInquiry */
93
+ ]: "Which server mode do you want to use?",
94
+ [
95
+ 6
96
+ /* AppNameInquiry */
97
+ ]: "Enter the name of your app",
98
+ [
99
+ 17
100
+ /* MissingTranslationKey */
101
+ ]: "No translation key provided!",
102
+ [
103
+ 22
104
+ /* OperationCancelled */
105
+ ]: "Operation cancelled.",
106
+ [
107
+ 29
108
+ /* StopServerInstructions */
109
+ ]: `Press CTRL + C to stop the server.
110
+ `,
111
+ [
112
+ 31
113
+ /* TemplateLanguageInquiry */
114
+ ]: "Select preferred language",
115
+ [
116
+ 30
117
+ /* TemplateFrameworkInquiry */
118
+ ]: "Select preferred framework template",
119
+ [
120
+ 13
121
+ /* DevServerPortDescription */
122
+ ]: "The port that the dev server should use.",
123
+ [
124
+ 1
125
+ /* ApiGatewayPortDescription */
126
+ ]: "The port that the api gateway should use.",
127
+ [
128
+ 2
129
+ /* ApiServerModeDescription */
130
+ ]: "Which components to start. [server|server-proxy|server-gateway].",
131
+ [
132
+ 12
133
+ /* DevServerOpenDescription */
134
+ ]: "Whether the dev server should automatically open in your browser or not.",
135
+ [
136
+ 9
137
+ /* BuildWatchDescription */
138
+ ]: "Whether the build should start watching and rebuild when files change or not.",
139
+ [
140
+ 5
141
+ /* AppEntryBuildOptionDescription */
142
+ ]: "The entry file for the app (./src/app).",
143
+ [
144
+ 16
145
+ /* ManifestEntryBuildOptionDescription */
146
+ ]: "The entry file for the app manifest (./src/manifest).",
147
+ [
148
+ 8
149
+ /* BuildModeOptionDescription */
150
+ ]: "Which mode to use when building the app.",
151
+ [
152
+ 15
153
+ /* FetchPackageVersionError */
154
+ ]: "Failed to fetch package info from the NPM registry for package '${0}'!",
155
+ [
156
+ 19
157
+ /* NoAppNameFound */
158
+ ]: "Could not find app name in manifest.",
159
+ [
160
+ 3
161
+ /* AppConfigurationPath */
162
+ ]: "The path to the app configuration file.",
163
+ [
164
+ 26
165
+ /* ServerMode */
166
+ ]: "Server",
167
+ [
168
+ 28
169
+ /* ServerProxyMode */
170
+ ]: "Server with proxy",
171
+ [
172
+ 25
173
+ /* ServerGatewayMode */
174
+ ]: "Server with gateway"
175
+ }, h = class {
176
+ };
177
+ let u = h;
178
+ l(u, "getTranslations", () => D), l(u, "getTranslation", (e, ...t) => {
179
+ const r = h.getTranslations()[e];
180
+ if (!r)
181
+ throw new Error(`Could not find text with given key '${e}'.`);
182
+ return t.reduce(
183
+ (a, i, n) => a.toString().replace(`{${n}}`, i.toString()),
184
+ r
185
+ ).toString();
186
+ }), l(u, "get", (e = d.MissingTranslationKey, ...t) => h.getTranslation(e, ...t));
187
+ function _(e) {
188
+ return (t) => {
189
+ t.key === "Enter" && e(t);
190
+ };
191
+ }
192
+ var N = Object.defineProperty, O = Object.getOwnPropertyDescriptor, p = (e, t, r, a) => {
193
+ for (var i = a > 1 ? void 0 : a ? O(t, r) : t, n = e.length - 1, c; n >= 0; n--)
194
+ (c = e[n]) && (i = (a ? c(t, r, i) : c(i)) || i);
195
+ return a && i && N(t, r, i), i;
196
+ };
197
+ function T(e = "") {
198
+ return location.href.replace(location.origin, "").startsWith(e);
199
+ }
200
+ let o = class extends f {
201
+ constructor() {
202
+ super(...arguments), this.capability = "", this.app = "", this.args = {}, this.navigate = () => {
203
+ history.pushState(this.args, "", this._href), window.dispatchEvent(new Event("popstate"));
204
+ }, this.clickHandler = (e) => {
205
+ this.href || this.download || (e.preventDefault(), this.navigate());
206
+ }, this.updateActive = () => {
207
+ this.active = T(this._href);
208
+ }, this._href = "", this.active = !1, this.computeHref = () => {
209
+ if (this.href)
210
+ return this._href = this.href;
211
+ if (!this.app)
212
+ throw new Error("The app property is required when creating a capability link!");
213
+ this._href = S(this.app, this.capability, this.args), this.updateActive();
214
+ };
215
+ }
216
+ connectedCallback() {
217
+ super.connectedCallback(), window.addEventListener("popstate", this.updateActive), this.computeHref();
218
+ }
219
+ disconnectedCallback() {
220
+ window.removeEventListener("popstate", this.updateActive), super.disconnectedCallback();
221
+ }
222
+ attributeChangedCallback(e, t, r) {
223
+ super.attributeChangedCallback(e, t, r), setTimeout(() => this.computeHref());
224
+ }
225
+ render() {
226
+ return v`<a
227
+ part="anchor"
228
+ target=${this.target}
229
+ rel=${this.rel}
230
+ download=${this.download}
231
+ .href=${this._href}
232
+ ?active=${this.active}
233
+ @click=${this.clickHandler}
234
+ @keydown=${_(this.clickHandler)}
235
+ >
236
+ <slot></slot>
237
+ </a>`;
238
+ }
239
+ };
240
+ p([
241
+ s({ type: String, attribute: !0, reflect: !0 })
242
+ ], o.prototype, "capability", 2);
243
+ p([
244
+ s({ type: String, attribute: !0, reflect: !0 })
245
+ ], o.prototype, "app", 2);
246
+ p([
247
+ s({ type: Object, attribute: !0, reflect: !0 })
248
+ ], o.prototype, "args", 2);
249
+ p([
250
+ s({ type: String, attribute: !0, reflect: !0 })
251
+ ], o.prototype, "href", 2);
252
+ p([
253
+ s({ type: String })
254
+ ], o.prototype, "target", 2);
255
+ p([
256
+ s({ type: String, attribute: !0, reflect: !0 })
257
+ ], o.prototype, "rel", 2);
258
+ p([
259
+ s({ type: String, attribute: !0, reflect: !0 })
260
+ ], o.prototype, "download", 2);
261
+ p([
262
+ s({ type: String, attribute: !1, reflect: !1 })
263
+ ], o.prototype, "_href", 2);
264
+ p([
265
+ s({ type: Boolean, attribute: "active", reflect: !0 })
266
+ ], o.prototype, "active", 2);
267
+ o = p([
268
+ y("alliance-link")
269
+ ], o);
270
+ //# sourceMappingURL=alliance-link-5a0b06bd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alliance-link-5a0b06bd.js","sources":["../../utilities/frontend/index.js","../src/components/alliance-link/alliance-link.ts"],"sourcesContent":["var s = Object.defineProperty;\nvar g = (e, r, t) => r in e ? s(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;\nvar u = (e, r, t) => (g(e, typeof r != \"symbol\" ? r + \"\" : r, t), t);\nfunction m(e) {\n const t = Object.entries(e).reduce((i, o) => {\n const [p, c] = o;\n return typeof c > \"u\" || (typeof c == \"object\" && c !== null ? i[p] = JSON.stringify(c) : i[p] = c), i;\n }, {});\n return Object.keys(t).length ? `?${new URLSearchParams(t)}` : \"\";\n}\nfunction v() {\n const e = a(), { href: r, search: t } = window.location;\n return r.replace(e, \"\").replace(t, \"\");\n}\nfunction A(e) {\n return e.replaceAll(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n}\nfunction E(e = \"\", r = \"\", t = {}) {\n const i = a().replace(location.origin, \"\"), o = m(t);\n return e ? r ? `${i}/${e}/${r}${o}` : `${i}/${e}${o}` : `${i}${o}`;\n}\nfunction O() {\n const e = v(), [r = \"\", t = \"\"] = e.split(\"/\").filter((i) => !!i);\n return {\n app: r,\n capability: t\n };\n}\nfunction S(e, r) {\n const t = A(e);\n return new RegExp(`^${t.replaceAll(\"\\\\?\", \".?\").replaceAll(\"\\\\*\", \".*\")}`, \"i\").test(r);\n}\nfunction N() {\n const { origin: e, pathname: r } = window.location;\n if (S(\"https://alliance*.ace.teliacompany.net\", e)) {\n const [t] = r.split(\"/\").filter((i) => !!i);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${e}/${t}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = e;\n}\nfunction a() {\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL || N(), globalThis.__ALLIANCE_RUNTIME_ROOT_URL;\n}\nvar h = /* @__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.Done = 14] = \"Done\", e[e.FetchPackageVersionError = 15] = \"FetchPackageVersionError\", e[e.ManifestEntryBuildOptionDescription = 16] = \"ManifestEntryBuildOptionDescription\", e[e.MissingTranslationKey = 17] = \"MissingTranslationKey\", e[e.NoAppName = 18] = \"NoAppName\", e[e.NoAppNameFound = 19] = \"NoAppNameFound\", e[e.NoAppOrWorkspaceInCurrentDirectory = 20] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.NoWorkspaceName = 21] = \"NoWorkspaceName\", e[e.OperationCancelled = 22] = \"OperationCancelled\", e[e.ServeDescription = 23] = \"ServeDescription\", e[e.ServedStopped = 24] = \"ServedStopped\", e[e.ServerGatewayMode = 25] = \"ServerGatewayMode\", e[e.ServerMode = 26] = \"ServerMode\", e[e.ServerModeInquiry = 27] = \"ServerModeInquiry\", e[e.ServerProxyMode = 28] = \"ServerProxyMode\", e[e.StopServerInstructions = 29] = \"StopServerInstructions\", e[e.TemplateFrameworkInquiry = 30] = \"TemplateFrameworkInquiry\", e[e.TemplateLanguageInquiry = 31] = \"TemplateLanguageInquiry\", e[e.UnrecognizedCommand = 32] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 33] = \"WorkspaceCreated\", e[e.WorkspaceNameInquiry = 34] = \"WorkspaceNameInquiry\", e))(h || {});\nconst w = {\n [\n 14\n /* Done */\n ]: \"Done\",\n [\n 21\n /* NoWorkspaceName */\n ]: \"No workspace name provided!\",\n [\n 18\n /* NoAppName */\n ]: \"No app name provided!\",\n [\n 0\n /* AlreadyExists */\n ]: \"File or directory '{0}' already exists!\",\n [\n 20\n /* NoAppOrWorkspaceInCurrentDirectory */\n ]: \"Could not find any app entry file at '{0}'!\",\n [\n 32\n /* UnrecognizedCommand */\n ]: \"Unrecognized command(s) {0}!\",\n [\n 33\n /* WorkspaceCreated */\n ]: \"Workspace was created at path '{0}'!\",\n [\n 4\n /* AppCreated */\n ]: \"App was created at path '{0}'!\",\n [\n 24\n /* ServedStopped */\n ]: \"Server stopped.\",\n [\n 11\n /* CreateWorkspaceDescription */\n ]: \"Creates an Alliance Workspace in the current directory.\",\n [\n 10\n /* CreateAppDescription */\n ]: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n [\n 23\n /* ServeDescription */\n ]: \"Starts a Alliance development server using the current directory package.json.\",\n [\n 7\n /* BuildDescription */\n ]: \"Builds an Alliance Application using Vite.\",\n [\n 34\n /* WorkspaceNameInquiry */\n ]: \"Enter the name of your workspace\",\n [\n 27\n /* ServerModeInquiry */\n ]: \"Which server mode do you want to use?\",\n [\n 6\n /* AppNameInquiry */\n ]: \"Enter the name of your app\",\n [\n 17\n /* MissingTranslationKey */\n ]: \"No translation key provided!\",\n [\n 22\n /* OperationCancelled */\n ]: \"Operation cancelled.\",\n [\n 29\n /* StopServerInstructions */\n ]: `Press CTRL + C to stop the server.\n`,\n [\n 31\n /* TemplateLanguageInquiry */\n ]: \"Select preferred language\",\n [\n 30\n /* TemplateFrameworkInquiry */\n ]: \"Select preferred framework template\",\n [\n 13\n /* DevServerPortDescription */\n ]: \"The port that the dev server should use.\",\n [\n 1\n /* ApiGatewayPortDescription */\n ]: \"The port that the api gateway should use.\",\n [\n 2\n /* ApiServerModeDescription */\n ]: \"Which components to start. [server|server-proxy|server-gateway].\",\n [\n 12\n /* DevServerOpenDescription */\n ]: \"Whether the dev server should automatically open in your browser or not.\",\n [\n 9\n /* BuildWatchDescription */\n ]: \"Whether the build should start watching and rebuild when files change or not.\",\n [\n 5\n /* AppEntryBuildOptionDescription */\n ]: \"The entry file for the app (./src/app).\",\n [\n 16\n /* ManifestEntryBuildOptionDescription */\n ]: \"The entry file for the app manifest (./src/manifest).\",\n [\n 8\n /* BuildModeOptionDescription */\n ]: \"Which mode to use when building the app.\",\n [\n 15\n /* FetchPackageVersionError */\n ]: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n [\n 19\n /* NoAppNameFound */\n ]: \"Could not find app name in manifest.\",\n [\n 3\n /* AppConfigurationPath */\n ]: \"The path to the app configuration file.\",\n [\n 26\n /* ServerMode */\n ]: \"Server\",\n [\n 28\n /* ServerProxyMode */\n ]: \"Server with proxy\",\n [\n 25\n /* ServerGatewayMode */\n ]: \"Server with gateway\"\n}, d = class {\n};\nlet n = d;\nu(n, \"getTranslations\", () => w), u(n, \"getTranslation\", (r, ...t) => {\n const o = d.getTranslations()[r];\n if (!o)\n throw new Error(`Could not find text with given key '${r}'.`);\n return t.reduce(\n (c, l, f) => c.toString().replace(`{${f}}`, l.toString()),\n o\n ).toString();\n}), u(n, \"get\", (r = h.MissingTranslationKey, ...t) => d.getTranslation(r, ...t));\nfunction I(e, r) {\n return C(Object.values(e), ({ name: t }) => ({\n label: t,\n value: t,\n selected: r === t\n }));\n}\nvar D = /* @__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))(D || {});\nfunction W(e, r) {\n return Object.values(e).find((i) => i.name === r);\n}\nfunction C(e, r) {\n return e.reduce(\n (t, i) => (t.push({\n disabled: !1,\n selected: !1,\n ...r(i)\n }), t),\n [\n {\n label: \"Choose...\",\n value: \"\",\n disabled: !0,\n selected: !0\n }\n ]\n );\n}\nfunction R(e) {\n return (r) => {\n r.key === \"Enter\" && e(r);\n };\n}\nfunction M(e, r = \"all\") {\n const { email: t, displayName: i } = e, o = i && i !== \"unknown\", p = !!t;\n switch (r) {\n case \"all\": {\n if (o && p)\n return `${i} (${t})`;\n if (o)\n return i;\n if (p)\n return t;\n }\n case \"single\": {\n if (o)\n return i;\n if (p)\n return t;\n }\n }\n return \"<UNKNOWN USER>\";\n}\nfunction P(...e) {\n return e.filter((r) => !!r).join(\" \");\n}\nexport {\n n as Texts,\n h as TranslationsKey,\n D as VocaButtonVariant,\n P as classNames,\n E as createCapabilityPath,\n M as friendlyUserName,\n O as getCurrentLocationInfo,\n a as getRuntimeRootUrl,\n W as getVocaIcon,\n C as mapToVocaOptions,\n S as matchRegExpLike,\n R as onEnter,\n N as setRuntimeRootUrl,\n I as vocaIconsToOptions\n};\n//# sourceMappingURL=index.js.map\n","import {\n SerializeableObject,\n createCapabilityPath,\n onEnter,\n} from '@telia-ace/alliance-utilities/frontend';\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":["s","g","r","t","u","m","i","o","p","c","E","a","S","N","h","w","d","n","l","f","R","isOnCurrentPath","path","Link","LitElement","event","createCapabilityPath","_1","_2","_3","html","onEnter","__decorateClass","property","customElement"],"mappings":";AAAA,IAAIA,IAAI,OAAO,gBACXC,IAAI,CAAC,GAAGC,GAAGC,MAAMD,KAAK,IAAIF,EAAE,GAAGE,GAAG,EAAE,YAAY,IAAI,cAAc,IAAI,UAAU,IAAI,OAAOC,EAAC,CAAE,IAAI,EAAED,CAAC,IAAIC,GACzGC,IAAI,CAAC,GAAGF,GAAGC,OAAOF,EAAE,GAAG,OAAOC,KAAK,WAAWA,IAAI,KAAKA,GAAGC,CAAC,GAAGA;AAClE,SAASE,EAAE,GAAG;AACZ,QAAM,IAAI,OAAO,QAAQ,CAAC,EAAE,OAAO,CAACC,GAAGC,MAAM;AAC3C,UAAM,CAACC,GAAGC,CAAC,IAAIF;AACf,WAAO,OAAOE,IAAI,QAAQ,OAAOA,KAAK,YAAYA,MAAM,OAAOH,EAAEE,CAAC,IAAI,KAAK,U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I5C;AACJ;AAhGIC,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;"}
@@ -4,7 +4,6 @@ export declare class Link extends LitElement {
4
4
  capability: string;
5
5
  app: string;
6
6
  args: SerializeableObject;
7
- private active;
8
7
  /**
9
8
  * Link properties
10
9
  */
@@ -13,11 +12,16 @@ export declare class Link extends LitElement {
13
12
  rel?: string;
14
13
  download?: string;
15
14
  navigate: () => void;
16
- onclick: (event: MouseEvent) => void;
17
- updateIfActive: () => void;
15
+ clickHandler: (event: MouseEvent) => void;
16
+ updateActive: () => void;
18
17
  connectedCallback(): void;
19
18
  disconnectedCallback(): void;
20
- attributeChangedCallback(property: string, oldValue: string | null, newValue: string | null): void;
19
+ attributeChangedCallback(_1: string, _2: string | null, _3: string | null): void;
20
+ /**
21
+ * Internal properties
22
+ */
23
+ private _href;
24
+ private active;
21
25
  private computeHref;
22
26
  render(): import("lit").TemplateResult<1>;
23
27
  }
@@ -1,3 +1,3 @@
1
- import "../chunks/alliance-link-4e9f5dd5.js";
1
+ import "../chunks/alliance-link-5a0b06bd.js";
2
2
  import "../chunks/query-assigned-elements-024d0918.js";
3
3
  //# sourceMappingURL=alliance-link.js.map
@@ -1,4 +1,4 @@
1
- import "../chunks/alliance-link-4e9f5dd5.js";
1
+ import "../chunks/alliance-link-5a0b06bd.js";
2
2
  import "../chunks/alliance-modal-06ec7d6a.js";
3
3
  import "../chunks/alliance-paginator-button-4cc1a5cf.js";
4
4
  import "../chunks/alliance-table-row-ec104b1e.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/alliance-ui",
3
- "version": "1.0.10-next.0",
3
+ "version": "1.0.10",
4
4
  "description": "UI components used by ACE Alliance apps.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -41,8 +41,7 @@
41
41
  }
42
42
  },
43
43
  "devDependencies": {
44
- "@telia-ace/alliance-framework": "1.0.10-next.0",
45
- "@telia-ace/alliance-utilities": "1.0.10-next.0",
44
+ "@telia-ace/alliance-utilities": "1.0.10",
46
45
  "@teliads/components": "^21.3.1",
47
46
  "@types/fs-extra": "^11.0.1",
48
47
  "fs-extra": "^11.1.1",
@@ -1,454 +0,0 @@
1
- import { e as s, a as D, s as S, x as A } from "./query-assigned-elements-024d0918.js";
2
- var w = Object.defineProperty, k = (e, t, r) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, l = (e, t, r) => (k(e, typeof t != "symbol" ? t + "" : t, r), r), f = /* @__PURE__ */ ((e) => (e[e.Done = 0] = "Done", e[e.NoWorkspaceName = 1] = "NoWorkspaceName", e[e.NoAppName = 2] = "NoAppName", e[e.AlreadyExists = 3] = "AlreadyExists", e[e.NoAppOrWorkspaceInCurrentDirectory = 4] = "NoAppOrWorkspaceInCurrentDirectory", e[e.UnrecognizedCommand = 5] = "UnrecognizedCommand", e[e.WorkspaceCreated = 6] = "WorkspaceCreated", e[e.AppCreated = 7] = "AppCreated", e[e.ServedStopped = 8] = "ServedStopped", e[e.WorkspaceNameInquiry = 9] = "WorkspaceNameInquiry", e[e.AppNameInquiry = 10] = "AppNameInquiry", e[e.ServerModeInquiry = 11] = "ServerModeInquiry", e[e.CreateWorkspaceDescription = 12] = "CreateWorkspaceDescription", e[e.CreateAppDescription = 13] = "CreateAppDescription", e[e.ServeDescription = 14] = "ServeDescription", e[e.BuildDescription = 15] = "BuildDescription", e[e.MissingTranslationKey = 16] = "MissingTranslationKey", e[e.OperationCancelled = 17] = "OperationCancelled", e[e.StopServerInstructions = 18] = "StopServerInstructions", e[e.TemplateLanguageInquiry = 19] = "TemplateLanguageInquiry", e[e.TemplateFrameworkInquiry = 20] = "TemplateFrameworkInquiry", e[e.DevServerPortDescription = 21] = "DevServerPortDescription", e[e.ApiGatewayPortDescription = 22] = "ApiGatewayPortDescription", e[e.ApiServerModeDescription = 23] = "ApiServerModeDescription", e[e.DevServerOpenDescription = 24] = "DevServerOpenDescription", e[e.BuildWatchDescription = 25] = "BuildWatchDescription", e[e.CouldNotStartGatewayInDocker = 26] = "CouldNotStartGatewayInDocker", e[e.PullingLatestImage = 27] = "PullingLatestImage", e[e.AppEntryBuildOptionDescription = 28] = "AppEntryBuildOptionDescription", e[e.ManifestEntryBuildOptionDescription = 29] = "ManifestEntryBuildOptionDescription", e[e.BuildModeOptionDescription = 30] = "BuildModeOptionDescription", e[e.FetchPackageVersionError = 31] = "FetchPackageVersionError", e[e.DockerNotStartedOrInstalled = 32] = "DockerNotStartedOrInstalled", e[e.EnableDevAuthentication = 33] = "EnableDevAuthentication", e[e.NoAppNameFound = 34] = "NoAppNameFound", e[e.AppConfigurationPath = 35] = "AppConfigurationPath", e[e.ServerGatewayMode = 36] = "ServerGatewayMode", e[e.ServerProxyMode = 37] = "ServerProxyMode", e[e.ServerMode = 38] = "ServerMode", e[e.DevLoginUrl = 39] = "DevLoginUrl", e))(f || {});
3
- const C = {
4
- [
5
- 0
6
- /* Done */
7
- ]: "Done",
8
- [
9
- 1
10
- /* NoWorkspaceName */
11
- ]: "No workspace name provided!",
12
- [
13
- 2
14
- /* NoAppName */
15
- ]: "No app name provided!",
16
- [
17
- 3
18
- /* AlreadyExists */
19
- ]: "File or directory '{0}' already exists!",
20
- [
21
- 4
22
- /* NoAppOrWorkspaceInCurrentDirectory */
23
- ]: "Could not find any app entry file at '{0}' or any apps under the alliance.apps property in '{1}'!",
24
- [
25
- 5
26
- /* UnrecognizedCommand */
27
- ]: "Unrecognized command(s) {0}!",
28
- [
29
- 6
30
- /* WorkspaceCreated */
31
- ]: "Workspace was created at path '{0}'!",
32
- [
33
- 7
34
- /* AppCreated */
35
- ]: "App was created at path '{0}'!",
36
- [
37
- 8
38
- /* ServedStopped */
39
- ]: "Server stopped.",
40
- [
41
- 12
42
- /* CreateWorkspaceDescription */
43
- ]: "Creates an Alliance Workspace in the current directory.",
44
- [
45
- 13
46
- /* CreateAppDescription */
47
- ]: "Creates an Alliance Application in the current directory or Alliance Workspace.",
48
- [
49
- 14
50
- /* ServeDescription */
51
- ]: "Starts a Alliance development server using the current directory package.json.",
52
- [
53
- 15
54
- /* BuildDescription */
55
- ]: "Builds an Alliance Application using Vite.",
56
- [
57
- 9
58
- /* WorkspaceNameInquiry */
59
- ]: "Enter the name of your workspace",
60
- [
61
- 11
62
- /* ServerModeInquiry */
63
- ]: "Which server mode do you want to use?",
64
- [
65
- 10
66
- /* AppNameInquiry */
67
- ]: "Enter the name of your app",
68
- [
69
- 16
70
- /* MissingTranslationKey */
71
- ]: "No translation key provided!",
72
- [
73
- 17
74
- /* OperationCancelled */
75
- ]: "Operation cancelled.",
76
- [
77
- 18
78
- /* StopServerInstructions */
79
- ]: `Press CTRL + C to stop the server.
80
- `,
81
- [
82
- 19
83
- /* TemplateLanguageInquiry */
84
- ]: "Select preferred language",
85
- [
86
- 20
87
- /* TemplateFrameworkInquiry */
88
- ]: "Select preferred framework template",
89
- [
90
- 21
91
- /* DevServerPortDescription */
92
- ]: "The port that the dev server should use.",
93
- [
94
- 22
95
- /* ApiGatewayPortDescription */
96
- ]: "The port that the api gateway should use.",
97
- [
98
- 23
99
- /* ApiServerModeDescription */
100
- ]: "Which components to start. [server|server-proxy|server-gateway].",
101
- [
102
- 24
103
- /* DevServerOpenDescription */
104
- ]: "Whether the dev server should automatically open in your browser or not.",
105
- [
106
- 25
107
- /* BuildWatchDescription */
108
- ]: "Whether the build should start watching and rebuild when files change or not.",
109
- [
110
- 26
111
- /* CouldNotStartGatewayInDocker */
112
- ]: "Could not start Docker container with Alliance gateway.",
113
- [
114
- 27
115
- /* PullingLatestImage */
116
- ]: "Pulling latest image...",
117
- [
118
- 28
119
- /* AppEntryBuildOptionDescription */
120
- ]: "The entry file for the app (./src/app).",
121
- [
122
- 29
123
- /* ManifestEntryBuildOptionDescription */
124
- ]: "The entry file for the app manifest (./src/manifest).",
125
- [
126
- 30
127
- /* BuildModeOptionDescription */
128
- ]: "Which mode to use when building the app. [production|development]",
129
- [
130
- 31
131
- /* FetchPackageVersionError */
132
- ]: "Failed to fetch package info from the NPM registry for package '${0}'!",
133
- [
134
- 32
135
- /* DockerNotStartedOrInstalled */
136
- ]: "Docker not started or not installed.",
137
- [
138
- 33
139
- /* EnableDevAuthentication */
140
- ]: "Whether user authentication should be enabled or not.",
141
- [
142
- 34
143
- /* NoAppNameFound */
144
- ]: "Could not find app name in manifest.",
145
- [
146
- 35
147
- /* AppConfigurationPath */
148
- ]: "The path to the app configuration file.",
149
- [
150
- 38
151
- /* ServerMode */
152
- ]: "Server",
153
- [
154
- 37
155
- /* ServerProxyMode */
156
- ]: "Server with proxy",
157
- [
158
- 36
159
- /* ServerGatewayMode */
160
- ]: "Server with gateway",
161
- [
162
- 39
163
- /* DevLoginUrl */
164
- ]: "Log in using http://localhost:{0}/-/dev/login"
165
- }, v = class {
166
- };
167
- let d = v;
168
- l(d, "getTranslations", () => C), l(d, "getTranslation", (e, ...t) => {
169
- const r = v.getTranslations()[e];
170
- if (!r)
171
- throw new Error(`Could not find text with given key '${e}'.`);
172
- return t.reduce(
173
- (n, o, a) => n.toString().replace(`{${a}}`, o.toString()),
174
- r
175
- ).toString();
176
- }), l(d, "get", (e = f.MissingTranslationKey, ...t) => v.getTranslation(e, ...t));
177
- function N() {
178
- try {
179
- return ALLIANCE_APP_MANIFEST;
180
- } catch {
181
- }
182
- }
183
- var b = Object.defineProperty, I = (e, t, r) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, u = (e, t, r) => (I(e, typeof t != "symbol" ? t + "" : t, r), r);
184
- function h(e) {
185
- const t = Object.entries(e).reduce((r, n) => {
186
- const [o, a] = n;
187
- return typeof a > "u" || (typeof a == "object" && a !== null ? r[o] = JSON.stringify(a) : r[o] = a), r;
188
- }, {});
189
- return Object.keys(t).length ? `?${new URLSearchParams(t)}` : "";
190
- }
191
- function W(e = "", t = "", r = {}) {
192
- return e ? t ? `/${e}/${t}${h(r)}` : `/${e}${h(r)}` : h(r);
193
- }
194
- var m = /* @__PURE__ */ ((e) => (e[e.Done = 0] = "Done", e[e.NoWorkspaceName = 1] = "NoWorkspaceName", e[e.NoAppName = 2] = "NoAppName", e[e.AlreadyExists = 3] = "AlreadyExists", e[e.NoAppOrWorkspaceInCurrentDirectory = 4] = "NoAppOrWorkspaceInCurrentDirectory", e[e.UnrecognizedCommand = 5] = "UnrecognizedCommand", e[e.WorkspaceCreated = 6] = "WorkspaceCreated", e[e.AppCreated = 7] = "AppCreated", e[e.ServedStopped = 8] = "ServedStopped", e[e.WorkspaceNameInquiry = 9] = "WorkspaceNameInquiry", e[e.AppNameInquiry = 10] = "AppNameInquiry", e[e.ServerModeInquiry = 11] = "ServerModeInquiry", e[e.CreateWorkspaceDescription = 12] = "CreateWorkspaceDescription", e[e.CreateAppDescription = 13] = "CreateAppDescription", e[e.ServeDescription = 14] = "ServeDescription", e[e.BuildDescription = 15] = "BuildDescription", e[e.MissingTranslationKey = 16] = "MissingTranslationKey", e[e.OperationCancelled = 17] = "OperationCancelled", e[e.StopServerInstructions = 18] = "StopServerInstructions", e[e.TemplateLanguageInquiry = 19] = "TemplateLanguageInquiry", e[e.TemplateFrameworkInquiry = 20] = "TemplateFrameworkInquiry", e[e.DevServerPortDescription = 21] = "DevServerPortDescription", e[e.ApiGatewayPortDescription = 22] = "ApiGatewayPortDescription", e[e.ApiServerModeDescription = 23] = "ApiServerModeDescription", e[e.DevServerOpenDescription = 24] = "DevServerOpenDescription", e[e.BuildWatchDescription = 25] = "BuildWatchDescription", e[e.CouldNotStartGatewayInDocker = 26] = "CouldNotStartGatewayInDocker", e[e.PullingLatestImage = 27] = "PullingLatestImage", e[e.AppEntryBuildOptionDescription = 28] = "AppEntryBuildOptionDescription", e[e.ManifestEntryBuildOptionDescription = 29] = "ManifestEntryBuildOptionDescription", e[e.BuildModeOptionDescription = 30] = "BuildModeOptionDescription", e[e.FetchPackageVersionError = 31] = "FetchPackageVersionError", e[e.DockerNotStartedOrInstalled = 32] = "DockerNotStartedOrInstalled", e[e.EnableDevAuthentication = 33] = "EnableDevAuthentication", e[e.NoAppNameFound = 34] = "NoAppNameFound", e[e.AppConfigurationPath = 35] = "AppConfigurationPath", e[e.ServerGatewayMode = 36] = "ServerGatewayMode", e[e.ServerProxyMode = 37] = "ServerProxyMode", e[e.ServerMode = 38] = "ServerMode", e[e.DevLoginUrl = 39] = "DevLoginUrl", e))(m || {});
195
- const P = {
196
- [
197
- 0
198
- /* Done */
199
- ]: "Done",
200
- [
201
- 1
202
- /* NoWorkspaceName */
203
- ]: "No workspace name provided!",
204
- [
205
- 2
206
- /* NoAppName */
207
- ]: "No app name provided!",
208
- [
209
- 3
210
- /* AlreadyExists */
211
- ]: "File or directory '{0}' already exists!",
212
- [
213
- 4
214
- /* NoAppOrWorkspaceInCurrentDirectory */
215
- ]: "Could not find any app entry file at '{0}' or any apps under the alliance.apps property in '{1}'!",
216
- [
217
- 5
218
- /* UnrecognizedCommand */
219
- ]: "Unrecognized command(s) {0}!",
220
- [
221
- 6
222
- /* WorkspaceCreated */
223
- ]: "Workspace was created at path '{0}'!",
224
- [
225
- 7
226
- /* AppCreated */
227
- ]: "App was created at path '{0}'!",
228
- [
229
- 8
230
- /* ServedStopped */
231
- ]: "Server stopped.",
232
- [
233
- 12
234
- /* CreateWorkspaceDescription */
235
- ]: "Creates an Alliance Workspace in the current directory.",
236
- [
237
- 13
238
- /* CreateAppDescription */
239
- ]: "Creates an Alliance Application in the current directory or Alliance Workspace.",
240
- [
241
- 14
242
- /* ServeDescription */
243
- ]: "Starts a Alliance development server using the current directory package.json.",
244
- [
245
- 15
246
- /* BuildDescription */
247
- ]: "Builds an Alliance Application using Vite.",
248
- [
249
- 9
250
- /* WorkspaceNameInquiry */
251
- ]: "Enter the name of your workspace",
252
- [
253
- 11
254
- /* ServerModeInquiry */
255
- ]: "Which server mode do you want to use?",
256
- [
257
- 10
258
- /* AppNameInquiry */
259
- ]: "Enter the name of your app",
260
- [
261
- 16
262
- /* MissingTranslationKey */
263
- ]: "No translation key provided!",
264
- [
265
- 17
266
- /* OperationCancelled */
267
- ]: "Operation cancelled.",
268
- [
269
- 18
270
- /* StopServerInstructions */
271
- ]: `Press CTRL + C to stop the server.
272
- `,
273
- [
274
- 19
275
- /* TemplateLanguageInquiry */
276
- ]: "Select preferred language",
277
- [
278
- 20
279
- /* TemplateFrameworkInquiry */
280
- ]: "Select preferred framework template",
281
- [
282
- 21
283
- /* DevServerPortDescription */
284
- ]: "The port that the dev server should use.",
285
- [
286
- 22
287
- /* ApiGatewayPortDescription */
288
- ]: "The port that the api gateway should use.",
289
- [
290
- 23
291
- /* ApiServerModeDescription */
292
- ]: "Which components to start. [server|server-proxy|server-gateway].",
293
- [
294
- 24
295
- /* DevServerOpenDescription */
296
- ]: "Whether the dev server should automatically open in your browser or not.",
297
- [
298
- 25
299
- /* BuildWatchDescription */
300
- ]: "Whether the build should start watching and rebuild when files change or not.",
301
- [
302
- 26
303
- /* CouldNotStartGatewayInDocker */
304
- ]: "Could not start Docker container with Alliance gateway.",
305
- [
306
- 27
307
- /* PullingLatestImage */
308
- ]: "Pulling latest image...",
309
- [
310
- 28
311
- /* AppEntryBuildOptionDescription */
312
- ]: "The entry file for the app (./src/app).",
313
- [
314
- 29
315
- /* ManifestEntryBuildOptionDescription */
316
- ]: "The entry file for the app manifest (./src/manifest).",
317
- [
318
- 30
319
- /* BuildModeOptionDescription */
320
- ]: "Which mode to use when building the app. [production|development]",
321
- [
322
- 31
323
- /* FetchPackageVersionError */
324
- ]: "Failed to fetch package info from the NPM registry for package '${0}'!",
325
- [
326
- 32
327
- /* DockerNotStartedOrInstalled */
328
- ]: "Docker not started or not installed.",
329
- [
330
- 33
331
- /* EnableDevAuthentication */
332
- ]: "Whether user authentication should be enabled or not.",
333
- [
334
- 34
335
- /* NoAppNameFound */
336
- ]: "Could not find app name in manifest.",
337
- [
338
- 35
339
- /* AppConfigurationPath */
340
- ]: "The path to the app configuration file.",
341
- [
342
- 38
343
- /* ServerMode */
344
- ]: "Server",
345
- [
346
- 37
347
- /* ServerProxyMode */
348
- ]: "Server with proxy",
349
- [
350
- 36
351
- /* ServerGatewayMode */
352
- ]: "Server with gateway",
353
- [
354
- 39
355
- /* DevLoginUrl */
356
- ]: "Log in using http://localhost:{0}/-/dev/login"
357
- }, g = class {
358
- };
359
- let y = g;
360
- u(y, "getTranslations", () => P), u(y, "getTranslation", (e, ...t) => {
361
- const r = g.getTranslations()[e];
362
- if (!r)
363
- throw new Error(`Could not find text with given key '${e}'.`);
364
- return t.reduce(
365
- (n, o, a) => n.toString().replace(`{${a}}`, o.toString()),
366
- r
367
- ).toString();
368
- }), u(y, "get", (e = m.MissingTranslationKey, ...t) => g.getTranslation(e, ...t));
369
- function O(e) {
370
- return (t) => {
371
- t.key === "Enter" && e(t);
372
- };
373
- }
374
- var M = Object.defineProperty, T = Object.getOwnPropertyDescriptor, p = (e, t, r, n) => {
375
- for (var o = n > 1 ? void 0 : n ? T(t, r) : t, a = e.length - 1, c; a >= 0; a--)
376
- (c = e[a]) && (o = (n ? c(t, r, o) : c(o)) || o);
377
- return n && o && M(t, r, o), o;
378
- };
379
- function E(e = "") {
380
- return location.href.replace(location.origin, "").startsWith(e);
381
- }
382
- let i = class extends S {
383
- constructor() {
384
- super(...arguments), this.capability = "", this.app = "", this.args = {}, this.active = !1, this.navigate = () => {
385
- if (this.active)
386
- return;
387
- const e = this.computeHref();
388
- history.pushState(this.args, "", e), window.dispatchEvent(new Event("popstate"));
389
- }, this.onclick = (e) => {
390
- this.href || this.download || (e.preventDefault(), this.navigate());
391
- }, this.updateIfActive = () => {
392
- const e = this.computeHref();
393
- this.active = E(e);
394
- }, this.computeHref = () => {
395
- var t;
396
- let e = "";
397
- return this.href ? e = this.href : e = W(
398
- this.app || ((t = N()) == null ? void 0 : t.name),
399
- this.capability,
400
- this.args
401
- ), e;
402
- };
403
- }
404
- connectedCallback() {
405
- super.connectedCallback(), window.addEventListener("popstate", this.updateIfActive);
406
- }
407
- disconnectedCallback() {
408
- window.removeEventListener("popstate", this.updateIfActive), super.disconnectedCallback();
409
- }
410
- attributeChangedCallback(e, t, r) {
411
- super.attributeChangedCallback(e, t, r), this.updateIfActive();
412
- }
413
- render() {
414
- return A`<a
415
- part="anchor"
416
- href=${this.computeHref()}
417
- target=${this.target}
418
- rel=${this.rel}
419
- download=${this.download}
420
- @click=${this.onclick}
421
- @keydown=${O(this.onclick)}
422
- >
423
- <slot></slot>
424
- </a>`;
425
- }
426
- };
427
- p([
428
- s({ type: String, attribute: !0, reflect: !0 })
429
- ], i.prototype, "capability", 2);
430
- p([
431
- s({ type: String, attribute: !0, reflect: !0 })
432
- ], i.prototype, "app", 2);
433
- p([
434
- s({ type: Object, attribute: !0, reflect: !1 })
435
- ], i.prototype, "args", 2);
436
- p([
437
- s({ type: Boolean, attribute: "active", reflect: !0 })
438
- ], i.prototype, "active", 2);
439
- p([
440
- s({ type: String, attribute: !0, reflect: !0 })
441
- ], i.prototype, "href", 2);
442
- p([
443
- s({ type: String })
444
- ], i.prototype, "target", 2);
445
- p([
446
- s({ type: String, attribute: !0, reflect: !0 })
447
- ], i.prototype, "rel", 2);
448
- p([
449
- s({ type: String, attribute: !0, reflect: !0 })
450
- ], i.prototype, "download", 2);
451
- i = p([
452
- D("alliance-link")
453
- ], i);
454
- //# sourceMappingURL=alliance-link-4e9f5dd5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alliance-link-4e9f5dd5.js","sources":["../../framework/dist/chunks/capabilities-80356799.js","../../utilities/frontend/index.js","../src/components/alliance-link/alliance-link.ts"],"sourcesContent":["var R = Object.defineProperty;\nvar W = (e, t, r) => t in e ? R(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;\nvar m = (e, t, r) => (W(e, typeof t != \"symbol\" ? t + \"\" : t, r), r);\nlet E = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, r) => (r &= 63, r < 36 ? t += r.toString(36) : r < 62 ? t += (r - 26).toString(36).toUpperCase() : r > 62 ? t += \"-\" : t += \"_\", t), \"\");\nvar $ = Object.defineProperty, x = (e, t, r) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, h = (e, t, r) => (x(e, typeof t != \"symbol\" ? t + \"\" : t, r), r);\nfunction g(e) {\n const t = Object.entries(e).reduce((r, i) => {\n const [o, n] = i;\n return typeof n > \"u\" || (typeof n == \"object\" && n !== null ? r[o] = JSON.stringify(n) : r[o] = n), r;\n }, {});\n return Object.keys(t).length ? `?${new URLSearchParams(t)}` : \"\";\n}\nfunction V(e = \"\", t = \"\", r = {}) {\n return e ? t ? `/${e}/${t}${g(r)}` : `/${e}${g(r)}` : g(r);\n}\nvar D = /* @__PURE__ */ ((e) => (e[e.Done = 0] = \"Done\", e[e.NoWorkspaceName = 1] = \"NoWorkspaceName\", e[e.NoAppName = 2] = \"NoAppName\", e[e.AlreadyExists = 3] = \"AlreadyExists\", e[e.NoAppOrWorkspaceInCurrentDirectory = 4] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.UnrecognizedCommand = 5] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 6] = \"WorkspaceCreated\", e[e.AppCreated = 7] = \"AppCreated\", e[e.ServedStopped = 8] = \"ServedStopped\", e[e.WorkspaceNameInquiry = 9] = \"WorkspaceNameInquiry\", e[e.AppNameInquiry = 10] = \"AppNameInquiry\", e[e.ServerModeInquiry = 11] = \"ServerModeInquiry\", e[e.CreateWorkspaceDescription = 12] = \"CreateWorkspaceDescription\", e[e.CreateAppDescription = 13] = \"CreateAppDescription\", e[e.ServeDescription = 14] = \"ServeDescription\", e[e.BuildDescription = 15] = \"BuildDescription\", e[e.MissingTranslationKey = 16] = \"MissingTranslationKey\", e[e.OperationCancelled = 17] = \"OperationCancelled\", e[e.StopServerInstructions = 18] = \"StopServerInstructions\", e[e.TemplateLanguageInquiry = 19] = \"TemplateLanguageInquiry\", e[e.TemplateFrameworkInquiry = 20] = \"TemplateFrameworkInquiry\", e[e.DevServerPortDescription = 21] = \"DevServerPortDescription\", e[e.ApiGatewayPortDescription = 22] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 23] = \"ApiServerModeDescription\", e[e.DevServerOpenDescription = 24] = \"DevServerOpenDescription\", e[e.BuildWatchDescription = 25] = \"BuildWatchDescription\", e[e.CouldNotStartGatewayInDocker = 26] = \"CouldNotStartGatewayInDocker\", e[e.PullingLatestImage = 27] = \"PullingLatestImage\", e[e.AppEntryBuildOptionDescription = 28] = \"AppEntryBuildOptionDescription\", e[e.ManifestEntryBuildOptionDescription = 29] = \"ManifestEntryBuildOptionDescription\", e[e.BuildModeOptionDescription = 30] = \"BuildModeOptionDescription\", e[e.FetchPackageVersionError = 31] = \"FetchPackageVersionError\", e[e.DockerNotStartedOrInstalled = 32] = \"DockerNotStartedOrInstalled\", e[e.EnableDevAuthentication = 33] = \"EnableDevAuthentication\", e[e.NoAppNameFound = 34] = \"NoAppNameFound\", e[e.AppConfigurationPath = 35] = \"AppConfigurationPath\", e[e.ServerGatewayMode = 36] = \"ServerGatewayMode\", e[e.ServerProxyMode = 37] = \"ServerProxyMode\", e[e.ServerMode = 38] = \"ServerMode\", e[e.DevLoginUrl = 39] = \"DevLoginUrl\", e))(D || {});\nconst B = {\n [\n 0\n /* Done */\n ]: \"Done\",\n [\n 1\n /* NoWorkspaceName */\n ]: \"No workspace name provided!\",\n [\n 2\n /* NoAppName */\n ]: \"No app name provided!\",\n [\n 3\n /* AlreadyExists */\n ]: \"File or directory '{0}' already exists!\",\n [\n 4\n /* NoAppOrWorkspaceInCurrentDirectory */\n ]: \"Could not find any app entry file at '{0}' or any apps under the alliance.apps property in '{1}'!\",\n [\n 5\n /* UnrecognizedCommand */\n ]: \"Unrecognized command(s) {0}!\",\n [\n 6\n /* WorkspaceCreated */\n ]: \"Workspace was created at path '{0}'!\",\n [\n 7\n /* AppCreated */\n ]: \"App was created at path '{0}'!\",\n [\n 8\n /* ServedStopped */\n ]: \"Server stopped.\",\n [\n 12\n /* CreateWorkspaceDescription */\n ]: \"Creates an Alliance Workspace in the current directory.\",\n [\n 13\n /* CreateAppDescription */\n ]: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n [\n 14\n /* ServeDescription */\n ]: \"Starts a Alliance development server using the current directory package.json.\",\n [\n 15\n /* BuildDescription */\n ]: \"Builds an Alliance Application using Vite.\",\n [\n 9\n /* WorkspaceNameInquiry */\n ]: \"Enter the name of your workspace\",\n [\n 11\n /* ServerModeInquiry */\n ]: \"Which server mode do you want to use?\",\n [\n 10\n /* AppNameInquiry */\n ]: \"Enter the name of your app\",\n [\n 16\n /* MissingTranslationKey */\n ]: \"No translation key provided!\",\n [\n 17\n /* OperationCancelled */\n ]: \"Operation cancelled.\",\n [\n 18\n /* StopServerInstructions */\n ]: `Press CTRL + C to stop the server.\n`,\n [\n 19\n /* TemplateLanguageInquiry */\n ]: \"Select preferred language\",\n [\n 20\n /* TemplateFrameworkInquiry */\n ]: \"Select preferred framework template\",\n [\n 21\n /* DevServerPortDescription */\n ]: \"The port that the dev server should use.\",\n [\n 22\n /* ApiGatewayPortDescription */\n ]: \"The port that the api gateway should use.\",\n [\n 23\n /* ApiServerModeDescription */\n ]: \"Which components to start. [server|server-proxy|server-gateway].\",\n [\n 24\n /* DevServerOpenDescription */\n ]: \"Whether the dev server should automatically open in your browser or not.\",\n [\n 25\n /* BuildWatchDescription */\n ]: \"Whether the build should start watching and rebuild when files change or not.\",\n [\n 26\n /* CouldNotStartGatewayInDocker */\n ]: \"Could not start Docker container with Alliance gateway.\",\n [\n 27\n /* PullingLatestImage */\n ]: \"Pulling latest image...\",\n [\n 28\n /* AppEntryBuildOptionDescription */\n ]: \"The entry file for the app (./src/app).\",\n [\n 29\n /* ManifestEntryBuildOptionDescription */\n ]: \"The entry file for the app manifest (./src/manifest).\",\n [\n 30\n /* BuildModeOptionDescription */\n ]: \"Which mode to use when building the app. [production|development]\",\n [\n 31\n /* FetchPackageVersionError */\n ]: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n [\n 32\n /* DockerNotStartedOrInstalled */\n ]: \"Docker not started or not installed.\",\n [\n 33\n /* EnableDevAuthentication */\n ]: \"Whether user authentication should be enabled or not.\",\n [\n 34\n /* NoAppNameFound */\n ]: \"Could not find app name in manifest.\",\n [\n 35\n /* AppConfigurationPath */\n ]: \"The path to the app configuration file.\",\n [\n 38\n /* ServerMode */\n ]: \"Server\",\n [\n 37\n /* ServerProxyMode */\n ]: \"Server with proxy\",\n [\n 36\n /* ServerGatewayMode */\n ]: \"Server with gateway\",\n [\n 39\n /* DevLoginUrl */\n ]: \"Log in using http://localhost:{0}/-/dev/login\"\n}, v = class {\n};\nlet A = v;\nh(A, \"getTranslations\", () => B), h(A, \"getTranslation\", (e, ...t) => {\n const r = v.getTranslations()[e];\n if (!r)\n throw new Error(`Could not find text with given key '${e}'.`);\n return t.reduce(\n (i, o, n) => i.toString().replace(`{${n}}`, o.toString()),\n r\n ).toString();\n}), h(A, \"get\", (e = D.MissingTranslationKey, ...t) => v.getTranslation(e, ...t));\nfunction b(e) {\n return e.type === C.View;\n}\nvar y = /* @__PURE__ */ ((e) => (e.Main = \"main\", e.Aside = \"aside\", e.Body = \"body\", e))(y || {});\nclass N {\n constructor(t, r) {\n m(this, \"type\", C.View);\n m(this, \"execute\");\n this.container = r, this.execute = t;\n }\n}\nfunction U() {\n const e = ALLIANCE_APP_NAME, t = /* @__PURE__ */ new Map(), r = async (o) => {\n const n = t.get(o);\n if (!n)\n throw new Error(\n `Could not find view with id ${o} on view controller for app ${e}.`\n );\n n.unmount && await n.unmount(), n.element.replaceChildren(), n.element.removeAttribute(\"app\"), n.element.removeAttribute(\"view-id\"), t.delete(o), n.element.remove();\n };\n return {\n unmount: r,\n mount: async (o, n, p, c) => {\n if (o.container === \"main\") {\n const s = V(e, p, c), f = location.href.replace(location.origin, \"\");\n s !== f && history.pushState(c, \"\", s);\n }\n if (o.container === \"aside\" || o.container === \"main\") {\n const [s] = Array.from(document.getElementsByTagName(o.container)), f = s == null ? void 0 : s.getAttribute(\"app\"), S = s == null ? void 0 : s.getAttribute(\"view-id\");\n f && S && await (await I(f)).views.unmount(S);\n }\n let a;\n const d = K();\n o.container === \"aside\" ? (a = document.createElement(\n \"aside\"\n /* Aside */\n ), d.prepend(a)) : o.container === \"body\" ? (a = document.createElement(\"div\"), d.append(a)) : (a = document.createElement(\n \"main\"\n /* Main */\n ), d.append(a));\n const l = E(8);\n a.setAttribute(\"app\", e), a.setAttribute(\"view-id\", l);\n const _ = {\n element: a,\n unmount: await o.execute(a, (s) => {\n n(s), r(l);\n })\n };\n t.set(l, _);\n }\n };\n}\nfunction J(e) {\n return new N(e, y.Main);\n}\nfunction Z(e) {\n return new N(e, y.Body);\n}\nfunction H(e) {\n return new N(e, y.Aside);\n}\nfunction Q(e) {\n return new F(e);\n}\nfunction q(e) {\n return e.replaceAll(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n}\nfunction X(e, t) {\n const r = q(e);\n return new RegExp(`^${r.replaceAll(\"\\\\?\", \".?\").replaceAll(\"\\\\*\", \".*\")}`, \"i\").test(t);\n}\nvar C = /* @__PURE__ */ ((e) => (e.View = \"View\", e.Logic = \"Logic\", e))(C || {});\nclass F {\n constructor(t) {\n m(this, \"type\", \"Logic\");\n m(this, \"execute\");\n this.execute = t;\n }\n}\nfunction P(e) {\n return e.type === \"Logic\";\n}\nfunction ee() {\n try {\n return ALLIANCE_APP_MANIFEST;\n } catch {\n }\n}\nfunction te() {\n const e = {\n useNodeJsGateway: !1\n };\n try {\n return ALLIANCE_DEV_ENVIRONMENT || e;\n } catch {\n return e;\n }\n}\nfunction z() {\n if (w())\n return Promise.resolve();\n const e = 2e4, t = 5;\n return new Promise((r, i) => {\n const o = () => {\n clearInterval(p), clearTimeout(n);\n }, n = setTimeout(() => {\n o(), i(new Error(`Runtime not initialized after ${e}ms`));\n }, e), p = setInterval(() => {\n w() && (o(), r());\n }, t);\n });\n}\nfunction w() {\n return u(\n \"RUNTIME_INITIALIZED\"\n /* RuntimeInitialized */\n );\n}\nfunction u(e = \"\") {\n return globalThis[L(e)];\n}\nfunction k(e, t) {\n return globalThis[L(e)] = t;\n}\nfunction L(e) {\n return `__ALLIANCE_${e}`;\n}\nfunction M(e) {\n return `APP_CONTROLLER_KEY_${e}`;\n}\nvar O = /* @__PURE__ */ ((e) => (e.RuntimeInitialized = \"RUNTIME_INITIALIZED\", e.RuntimeApps = \"RUNTIME_APPS\", e))(O || {});\nfunction re() {\n const e = document.createElement(\"div\");\n return e.id = \"root\", document.body.append(e), e;\n}\nfunction K() {\n const e = document.getElementById(\"root\");\n if (!e)\n throw new Error(\"Could not find root element\");\n return e;\n}\nfunction G() {\n if (!ALLIANCE_APP_NAME || !ALLIANCE_APP_KEY)\n throw new Error(\"No app name or app key environment variables defined.\");\n const e = M(ALLIANCE_APP_NAME);\n if (u(e))\n return u(e);\n const t = ALLIANCE_APP_KEY;\n return k(e, t), t;\n}\nfunction T() {\n const e = G();\n if (u(e))\n return u(e);\n const t = {\n name: ALLIANCE_APP_NAME,\n capabilities: {\n app: /* @__PURE__ */ new Map(),\n system: /* @__PURE__ */ new Map()\n },\n managedObjects: {\n providers: /* @__PURE__ */ new Map(),\n watchers: /* @__PURE__ */ new Map()\n },\n views: U()\n };\n return k(e, t), t;\n}\nasync function I(e) {\n await z();\n const t = M(e), r = u(t);\n if (!r)\n throw new Error(`No read key defined on the global scope for ${e}.`);\n const i = u(r);\n if (!i)\n throw new Error(`No app controller defined on the global scope for ${e}.`);\n return i;\n}\nfunction ne(e, t, r) {\n return {\n id: E(8),\n result: new Promise(async (i, o) => {\n const n = await I(e), p = n.capabilities.app.get(t);\n if (!p)\n return o(`No capability with name '${t}' found on app '${e}'.`);\n const c = await p(r);\n P(c) ? await c.execute(i) : b(c) && await n.views.mount(c, i, t, r);\n })\n };\n}\nfunction oe(e, t) {\n if (w())\n throw new Error(\"Runtime already initialized.\");\n T().capabilities.app.set(e, t);\n}\nfunction ie(e, t) {\n if (w())\n throw new Error(\"Runtime already initialized.\");\n T().capabilities.system.set(e, t);\n}\nfunction ae(e, t, r) {\n const i = [], o = u(O.RuntimeApps);\n for (const n of o) {\n if (r && n !== r)\n continue;\n const p = new Promise(async (c) => {\n const a = await I(n), d = a.capabilities.system.get(e);\n if (d) {\n const l = await d(t);\n P(l) ? await l.execute(c) : b(l) && await a.views.mount(l, c, e, t);\n }\n });\n i.push({\n id: E(8),\n result: p\n });\n }\n return i;\n}\nexport {\n O as S,\n I as a,\n ee as b,\n ie as c,\n ne as d,\n oe as e,\n ae as f,\n T as g,\n H as h,\n w as i,\n Z as j,\n Q as k,\n J as l,\n X as m,\n te as n,\n re as o,\n u as r,\n k as w\n};\n//# sourceMappingURL=capabilities-80356799.js.map\n","var f = Object.defineProperty;\nvar m = (e, r, t) => r in e ? f(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;\nvar n = (e, r, t) => (m(e, typeof r != \"symbol\" ? r + \"\" : r, t), t);\nfunction h(e) {\n const t = Object.entries(e).reduce((i, o) => {\n const [p, c] = o;\n return typeof c > \"u\" || (typeof c == \"object\" && c !== null ? i[p] = JSON.stringify(c) : i[p] = c), i;\n }, {});\n return Object.keys(t).length ? `?${new URLSearchParams(t)}` : \"\";\n}\nfunction w(e = \"\", r = \"\", t = {}) {\n return e ? r ? `/${e}/${r}${h(t)}` : `/${e}${h(t)}` : h(t);\n}\nvar a = /* @__PURE__ */ ((e) => (e[e.Done = 0] = \"Done\", e[e.NoWorkspaceName = 1] = \"NoWorkspaceName\", e[e.NoAppName = 2] = \"NoAppName\", e[e.AlreadyExists = 3] = \"AlreadyExists\", e[e.NoAppOrWorkspaceInCurrentDirectory = 4] = \"NoAppOrWorkspaceInCurrentDirectory\", e[e.UnrecognizedCommand = 5] = \"UnrecognizedCommand\", e[e.WorkspaceCreated = 6] = \"WorkspaceCreated\", e[e.AppCreated = 7] = \"AppCreated\", e[e.ServedStopped = 8] = \"ServedStopped\", e[e.WorkspaceNameInquiry = 9] = \"WorkspaceNameInquiry\", e[e.AppNameInquiry = 10] = \"AppNameInquiry\", e[e.ServerModeInquiry = 11] = \"ServerModeInquiry\", e[e.CreateWorkspaceDescription = 12] = \"CreateWorkspaceDescription\", e[e.CreateAppDescription = 13] = \"CreateAppDescription\", e[e.ServeDescription = 14] = \"ServeDescription\", e[e.BuildDescription = 15] = \"BuildDescription\", e[e.MissingTranslationKey = 16] = \"MissingTranslationKey\", e[e.OperationCancelled = 17] = \"OperationCancelled\", e[e.StopServerInstructions = 18] = \"StopServerInstructions\", e[e.TemplateLanguageInquiry = 19] = \"TemplateLanguageInquiry\", e[e.TemplateFrameworkInquiry = 20] = \"TemplateFrameworkInquiry\", e[e.DevServerPortDescription = 21] = \"DevServerPortDescription\", e[e.ApiGatewayPortDescription = 22] = \"ApiGatewayPortDescription\", e[e.ApiServerModeDescription = 23] = \"ApiServerModeDescription\", e[e.DevServerOpenDescription = 24] = \"DevServerOpenDescription\", e[e.BuildWatchDescription = 25] = \"BuildWatchDescription\", e[e.CouldNotStartGatewayInDocker = 26] = \"CouldNotStartGatewayInDocker\", e[e.PullingLatestImage = 27] = \"PullingLatestImage\", e[e.AppEntryBuildOptionDescription = 28] = \"AppEntryBuildOptionDescription\", e[e.ManifestEntryBuildOptionDescription = 29] = \"ManifestEntryBuildOptionDescription\", e[e.BuildModeOptionDescription = 30] = \"BuildModeOptionDescription\", e[e.FetchPackageVersionError = 31] = \"FetchPackageVersionError\", e[e.DockerNotStartedOrInstalled = 32] = \"DockerNotStartedOrInstalled\", e[e.EnableDevAuthentication = 33] = \"EnableDevAuthentication\", e[e.NoAppNameFound = 34] = \"NoAppNameFound\", e[e.AppConfigurationPath = 35] = \"AppConfigurationPath\", e[e.ServerGatewayMode = 36] = \"ServerGatewayMode\", e[e.ServerProxyMode = 37] = \"ServerProxyMode\", e[e.ServerMode = 38] = \"ServerMode\", e[e.DevLoginUrl = 39] = \"DevLoginUrl\", e))(a || {});\nconst g = {\n [\n 0\n /* Done */\n ]: \"Done\",\n [\n 1\n /* NoWorkspaceName */\n ]: \"No workspace name provided!\",\n [\n 2\n /* NoAppName */\n ]: \"No app name provided!\",\n [\n 3\n /* AlreadyExists */\n ]: \"File or directory '{0}' already exists!\",\n [\n 4\n /* NoAppOrWorkspaceInCurrentDirectory */\n ]: \"Could not find any app entry file at '{0}' or any apps under the alliance.apps property in '{1}'!\",\n [\n 5\n /* UnrecognizedCommand */\n ]: \"Unrecognized command(s) {0}!\",\n [\n 6\n /* WorkspaceCreated */\n ]: \"Workspace was created at path '{0}'!\",\n [\n 7\n /* AppCreated */\n ]: \"App was created at path '{0}'!\",\n [\n 8\n /* ServedStopped */\n ]: \"Server stopped.\",\n [\n 12\n /* CreateWorkspaceDescription */\n ]: \"Creates an Alliance Workspace in the current directory.\",\n [\n 13\n /* CreateAppDescription */\n ]: \"Creates an Alliance Application in the current directory or Alliance Workspace.\",\n [\n 14\n /* ServeDescription */\n ]: \"Starts a Alliance development server using the current directory package.json.\",\n [\n 15\n /* BuildDescription */\n ]: \"Builds an Alliance Application using Vite.\",\n [\n 9\n /* WorkspaceNameInquiry */\n ]: \"Enter the name of your workspace\",\n [\n 11\n /* ServerModeInquiry */\n ]: \"Which server mode do you want to use?\",\n [\n 10\n /* AppNameInquiry */\n ]: \"Enter the name of your app\",\n [\n 16\n /* MissingTranslationKey */\n ]: \"No translation key provided!\",\n [\n 17\n /* OperationCancelled */\n ]: \"Operation cancelled.\",\n [\n 18\n /* StopServerInstructions */\n ]: `Press CTRL + C to stop the server.\n`,\n [\n 19\n /* TemplateLanguageInquiry */\n ]: \"Select preferred language\",\n [\n 20\n /* TemplateFrameworkInquiry */\n ]: \"Select preferred framework template\",\n [\n 21\n /* DevServerPortDescription */\n ]: \"The port that the dev server should use.\",\n [\n 22\n /* ApiGatewayPortDescription */\n ]: \"The port that the api gateway should use.\",\n [\n 23\n /* ApiServerModeDescription */\n ]: \"Which components to start. [server|server-proxy|server-gateway].\",\n [\n 24\n /* DevServerOpenDescription */\n ]: \"Whether the dev server should automatically open in your browser or not.\",\n [\n 25\n /* BuildWatchDescription */\n ]: \"Whether the build should start watching and rebuild when files change or not.\",\n [\n 26\n /* CouldNotStartGatewayInDocker */\n ]: \"Could not start Docker container with Alliance gateway.\",\n [\n 27\n /* PullingLatestImage */\n ]: \"Pulling latest image...\",\n [\n 28\n /* AppEntryBuildOptionDescription */\n ]: \"The entry file for the app (./src/app).\",\n [\n 29\n /* ManifestEntryBuildOptionDescription */\n ]: \"The entry file for the app manifest (./src/manifest).\",\n [\n 30\n /* BuildModeOptionDescription */\n ]: \"Which mode to use when building the app. [production|development]\",\n [\n 31\n /* FetchPackageVersionError */\n ]: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n [\n 32\n /* DockerNotStartedOrInstalled */\n ]: \"Docker not started or not installed.\",\n [\n 33\n /* EnableDevAuthentication */\n ]: \"Whether user authentication should be enabled or not.\",\n [\n 34\n /* NoAppNameFound */\n ]: \"Could not find app name in manifest.\",\n [\n 35\n /* AppConfigurationPath */\n ]: \"The path to the app configuration file.\",\n [\n 38\n /* ServerMode */\n ]: \"Server\",\n [\n 37\n /* ServerProxyMode */\n ]: \"Server with proxy\",\n [\n 36\n /* ServerGatewayMode */\n ]: \"Server with gateway\",\n [\n 39\n /* DevLoginUrl */\n ]: \"Log in using http://localhost:{0}/-/dev/login\"\n}, u = class {\n};\nlet d = u;\nn(d, \"getTranslations\", () => g), n(d, \"getTranslation\", (r, ...t) => {\n const o = u.getTranslations()[r];\n if (!o)\n throw new Error(`Could not find text with given key '${r}'.`);\n return t.reduce(\n (c, l, v) => c.toString().replace(`{${v}}`, l.toString()),\n o\n ).toString();\n}), n(d, \"get\", (r = a.MissingTranslationKey, ...t) => u.getTranslation(r, ...t));\nfunction A(e, r) {\n return S(Object.values(e), ({ name: t }) => ({\n label: t,\n value: t,\n selected: r === t\n }));\n}\nvar D = /* @__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))(D || {});\nfunction N(e, r) {\n return Object.values(e).find((i) => i.name === r);\n}\nfunction S(e, r) {\n return e.reduce(\n (t, i) => (t.push({\n disabled: !1,\n selected: !1,\n ...r(i)\n }), t),\n [\n {\n label: \"Choose...\",\n value: \"\",\n disabled: !0,\n selected: !0\n }\n ]\n );\n}\nfunction s(e) {\n return (r) => {\n r.key === \"Enter\" && e(r);\n };\n}\nfunction C(e, r = \"all\") {\n const { email: t, displayName: i } = e, o = i && i !== \"unknown\", p = !!t;\n switch (r) {\n case \"all\": {\n if (o && p)\n return `${i} (${t})`;\n if (o)\n return i;\n if (p)\n return t;\n }\n case \"single\": {\n if (o)\n return i;\n if (p)\n return t;\n }\n }\n return \"<UNKNOWN USER>\";\n}\nfunction W(...e) {\n return e.filter((r) => !!r).join(\" \");\n}\nexport {\n d as Texts,\n a as TranslationsKey,\n D as VocaButtonVariant,\n W as classNames,\n w as createCapabilityPath,\n C as friendlyUserName,\n N as getVocaIcon,\n S as mapToVocaOptions,\n s as onEnter,\n A as vocaIconsToOptions\n};\n//# sourceMappingURL=index.js.map\n","import { getAppManifest } from '@telia-ace/alliance-framework';\nimport {\n SerializeableObject,\n createCapabilityPath,\n onEnter,\n} from '@telia-ace/alliance-utilities/frontend';\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: false })\n args: SerializeableObject = {};\n\n @property({ type: Boolean, attribute: 'active', reflect: true })\n private active: boolean = false;\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 if (this.active) {\n return;\n }\n const path = this.computeHref();\n history.pushState(this.args, '', path);\n window.dispatchEvent(new Event('popstate'));\n };\n\n onclick = (event: MouseEvent) => {\n if (this.href || this.download) {\n return;\n }\n\n event.preventDefault();\n\n this.navigate();\n };\n\n updateIfActive = () => {\n const path = this.computeHref();\n this.active = isOnCurrentPath(path);\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener('popstate', this.updateIfActive);\n }\n\n disconnectedCallback() {\n window.removeEventListener('popstate', this.updateIfActive);\n super.disconnectedCallback();\n }\n\n attributeChangedCallback(property: string, oldValue: string | null, newValue: string | null) {\n super.attributeChangedCallback(property, oldValue, newValue);\n this.updateIfActive();\n }\n\n // FUTURE TODO: Try to figure out why this cant be state value\n // Doesnt seem to update args / query strings if its a state / property value\n // Should we use https://lit.dev/docs/components/properties/#accessors-noaccessor ?\n private computeHref = () => {\n let path = '';\n\n if (this.href) {\n path = this.href;\n } else {\n path = createCapabilityPath(\n this.app || getAppManifest()?.name,\n this.capability,\n this.args\n );\n }\n\n return path;\n };\n\n render() {\n return html`<a\n part=\"anchor\"\n href=${this.computeHref()}\n target=${this.target}\n rel=${this.rel}\n download=${this.download}\n @click=${this.onclick}\n @keydown=${onEnter(this.onclick)}\n >\n <slot></slot>\n </a>`;\n }\n}\n"],"names":["$","x","h","D","B","A","i","n","ee","f","m","r","t","o","p","c","w","a","g","u","d","l","v","s","isOnCurrentPath","path","Link","LitElement","event","createCapabilityPath","getAppManifest","property","oldValue","newValue","html","onEnter","__decorateClass","customElement"],"mappings":";AAIA,IAAIA,IAAI,OAAO,gBAAgBC,IAAI,CAAC,GAAG,GAAG,MAAM,KAAK,IAAID,EAAE,GAAG,GAAG,EAAE,YAAY,IAAI,cAAc,IAAI,UAAU,IAAI,OAAO,EAAG,CAAA,IAAI,EAAE,CAAC,IAAI,GAAGE,IAAI,CAAC,GAAG,GAAG,OAAOD,EAAE,GAAG,OAAO,KAAK,WAAW,IAAI,KAAK,GAAG,CAAC,GAAG,IA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