@telia-ace/alliance-ui 1.0.11-next.0 → 1.0.12-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/chunks/{alliance-link-5a0b06bd.js → alliance-link-8cb7d7d9.js} +58 -69
- package/chunks/alliance-link-8cb7d7d9.js.map +1 -0
- package/chunks/{alliance-modal-06ec7d6a.js → alliance-modal-1126a4c4.js} +76 -55
- package/chunks/alliance-modal-1126a4c4.js.map +1 -0
- package/chunks/{alliance-paginator-button-4cc1a5cf.js → alliance-paginator-button-0a0a4fd7.js} +20 -28
- package/chunks/alliance-paginator-button-0a0a4fd7.js.map +1 -0
- package/chunks/repeat-600d2fb9.js +143 -0
- package/chunks/repeat-600d2fb9.js.map +1 -0
- package/components/alliance-link.js +1 -1
- package/components/alliance-modal/alliance-modal.d.ts +4 -1
- package/components/alliance-modal.js +2 -2
- package/components/alliance-paginator.js +2 -2
- package/components/index.js +4 -4
- package/package.json +2 -2
- package/chunks/alliance-link-5a0b06bd.js.map +0 -1
- package/chunks/alliance-modal-06ec7d6a.js.map +0 -1
- package/chunks/alliance-paginator-button-4cc1a5cf.js.map +0 -1
- package/chunks/repeat-8189924a.js +0 -134
- package/chunks/repeat-8189924a.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @telia-ace/alliance-ui
|
|
2
2
|
|
|
3
|
+
## 1.0.12-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 776142c: Add support for [`sub-header` slot](https://alliance-dev.ace.teliacompany.net/-/docs/?path=/docs/ui-components-modal--documentation#sub-header) in `<alliance-modal>` (https://github.com/telia-company/ace-alliance-sdk/issues/221).
|
|
8
|
+
|
|
9
|
+
## 1.0.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c541ead: Move `@teliads/components` from dev to regular dependency since it is required for correct TypeScript typings.
|
|
14
|
+
|
|
3
15
|
## 1.0.11-next.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,46 +1,31 @@
|
|
|
1
1
|
import { e as s, a as y, s as f, x as v } from "./query-assigned-elements-024d0918.js";
|
|
2
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
|
|
3
|
+
function S(e) {
|
|
4
4
|
const t = Object.entries(e).reduce((r, a) => {
|
|
5
|
-
const [i,
|
|
6
|
-
return typeof
|
|
5
|
+
const [i, o] = a;
|
|
6
|
+
return typeof o > "u" || (typeof o == "object" && o !== null ? r[i] = JSON.stringify(o) : r[i] = o), r;
|
|
7
7
|
}, {});
|
|
8
8
|
return Object.keys(t).length ? `?${new URLSearchParams(t)}` : "";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
function S(e = "", t = "", r = {}) {
|
|
14
|
-
const a = k().replace(location.origin, ""), i = w(r);
|
|
10
|
+
function w(e = "", t = "", r = {}) {
|
|
11
|
+
const a = D().replace(location.origin, ""), i = S(r);
|
|
15
12
|
return e ? t ? `${a}/${e}/${t}${i}` : `${a}/${e}${i}` : `${a}${i}`;
|
|
16
13
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
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;
|
|
14
|
+
function D() {
|
|
15
|
+
return globalThis.__ALLIANCE_RUNTIME_ROOT_URL;
|
|
31
16
|
}
|
|
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.
|
|
33
|
-
const
|
|
17
|
+
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.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))(d || {});
|
|
18
|
+
const b = {
|
|
34
19
|
[
|
|
35
|
-
|
|
20
|
+
15
|
|
36
21
|
/* Done */
|
|
37
22
|
]: "Done",
|
|
38
23
|
[
|
|
39
|
-
|
|
24
|
+
22
|
|
40
25
|
/* NoWorkspaceName */
|
|
41
26
|
]: "No workspace name provided!",
|
|
42
27
|
[
|
|
43
|
-
|
|
28
|
+
19
|
|
44
29
|
/* NoAppName */
|
|
45
30
|
]: "No app name provided!",
|
|
46
31
|
[
|
|
@@ -48,15 +33,15 @@ const D = {
|
|
|
48
33
|
/* AlreadyExists */
|
|
49
34
|
]: "File or directory '{0}' already exists!",
|
|
50
35
|
[
|
|
51
|
-
|
|
36
|
+
21
|
|
52
37
|
/* NoAppOrWorkspaceInCurrentDirectory */
|
|
53
38
|
]: "Could not find any app entry file at '{0}'!",
|
|
54
39
|
[
|
|
55
|
-
|
|
40
|
+
33
|
|
56
41
|
/* UnrecognizedCommand */
|
|
57
42
|
]: "Unrecognized command(s) {0}!",
|
|
58
43
|
[
|
|
59
|
-
|
|
44
|
+
34
|
|
60
45
|
/* WorkspaceCreated */
|
|
61
46
|
]: "Workspace was created at path '{0}'!",
|
|
62
47
|
[
|
|
@@ -64,7 +49,7 @@ const D = {
|
|
|
64
49
|
/* AppCreated */
|
|
65
50
|
]: "App was created at path '{0}'!",
|
|
66
51
|
[
|
|
67
|
-
|
|
52
|
+
25
|
|
68
53
|
/* ServedStopped */
|
|
69
54
|
]: "Server stopped.",
|
|
70
55
|
[
|
|
@@ -76,7 +61,7 @@ const D = {
|
|
|
76
61
|
/* CreateAppDescription */
|
|
77
62
|
]: "Creates an Alliance Application in the current directory or Alliance Workspace.",
|
|
78
63
|
[
|
|
79
|
-
|
|
64
|
+
24
|
|
80
65
|
/* ServeDescription */
|
|
81
66
|
]: "Starts a Alliance development server using the current directory package.json.",
|
|
82
67
|
[
|
|
@@ -84,11 +69,11 @@ const D = {
|
|
|
84
69
|
/* BuildDescription */
|
|
85
70
|
]: "Builds an Alliance Application using Vite.",
|
|
86
71
|
[
|
|
87
|
-
|
|
72
|
+
35
|
|
88
73
|
/* WorkspaceNameInquiry */
|
|
89
74
|
]: "Enter the name of your workspace",
|
|
90
75
|
[
|
|
91
|
-
|
|
76
|
+
28
|
|
92
77
|
/* ServerModeInquiry */
|
|
93
78
|
]: "Which server mode do you want to use?",
|
|
94
79
|
[
|
|
@@ -96,30 +81,34 @@ const D = {
|
|
|
96
81
|
/* AppNameInquiry */
|
|
97
82
|
]: "Enter the name of your app",
|
|
98
83
|
[
|
|
99
|
-
|
|
84
|
+
18
|
|
100
85
|
/* MissingTranslationKey */
|
|
101
86
|
]: "No translation key provided!",
|
|
102
87
|
[
|
|
103
|
-
|
|
88
|
+
23
|
|
104
89
|
/* OperationCancelled */
|
|
105
90
|
]: "Operation cancelled.",
|
|
106
91
|
[
|
|
107
|
-
|
|
92
|
+
30
|
|
108
93
|
/* StopServerInstructions */
|
|
109
94
|
]: `Press CTRL + C to stop the server.
|
|
110
95
|
`,
|
|
111
96
|
[
|
|
112
|
-
|
|
97
|
+
32
|
|
113
98
|
/* TemplateLanguageInquiry */
|
|
114
99
|
]: "Select preferred language",
|
|
115
100
|
[
|
|
116
|
-
|
|
101
|
+
31
|
|
117
102
|
/* TemplateFrameworkInquiry */
|
|
118
103
|
]: "Select preferred framework template",
|
|
119
104
|
[
|
|
120
105
|
13
|
|
121
106
|
/* DevServerPortDescription */
|
|
122
107
|
]: "The port that the dev server should use.",
|
|
108
|
+
[
|
|
109
|
+
14
|
|
110
|
+
/* DevServerLoggingDescription */
|
|
111
|
+
]: "Whether the dev server and browser console should output more log information or not (false).",
|
|
123
112
|
[
|
|
124
113
|
1
|
|
125
114
|
/* ApiGatewayPortDescription */
|
|
@@ -141,7 +130,7 @@ const D = {
|
|
|
141
130
|
/* AppEntryBuildOptionDescription */
|
|
142
131
|
]: "The entry file for the app (./src/app).",
|
|
143
132
|
[
|
|
144
|
-
|
|
133
|
+
17
|
|
145
134
|
/* ManifestEntryBuildOptionDescription */
|
|
146
135
|
]: "The entry file for the app manifest (./src/manifest).",
|
|
147
136
|
[
|
|
@@ -149,11 +138,11 @@ const D = {
|
|
|
149
138
|
/* BuildModeOptionDescription */
|
|
150
139
|
]: "Which mode to use when building the app.",
|
|
151
140
|
[
|
|
152
|
-
|
|
141
|
+
16
|
|
153
142
|
/* FetchPackageVersionError */
|
|
154
143
|
]: "Failed to fetch package info from the NPM registry for package '${0}'!",
|
|
155
144
|
[
|
|
156
|
-
|
|
145
|
+
20
|
|
157
146
|
/* NoAppNameFound */
|
|
158
147
|
]: "Could not find app name in manifest.",
|
|
159
148
|
[
|
|
@@ -161,56 +150,56 @@ const D = {
|
|
|
161
150
|
/* AppConfigurationPath */
|
|
162
151
|
]: "The path to the app configuration file.",
|
|
163
152
|
[
|
|
164
|
-
|
|
153
|
+
27
|
|
165
154
|
/* ServerMode */
|
|
166
155
|
]: "Server",
|
|
167
156
|
[
|
|
168
|
-
|
|
157
|
+
29
|
|
169
158
|
/* ServerProxyMode */
|
|
170
159
|
]: "Server with proxy",
|
|
171
160
|
[
|
|
172
|
-
|
|
161
|
+
26
|
|
173
162
|
/* ServerGatewayMode */
|
|
174
163
|
]: "Server with gateway"
|
|
175
164
|
}, h = class {
|
|
176
165
|
};
|
|
177
166
|
let u = h;
|
|
178
|
-
l(u, "getTranslations", () =>
|
|
167
|
+
l(u, "getTranslations", () => b), l(u, "getTranslation", (e, ...t) => {
|
|
179
168
|
const r = h.getTranslations()[e];
|
|
180
169
|
if (!r)
|
|
181
170
|
throw new Error(`Could not find text with given key '${e}'.`);
|
|
182
171
|
return t.reduce(
|
|
183
|
-
(a, i,
|
|
172
|
+
(a, i, o) => a.toString().replace(`{${o}}`, i.toString()),
|
|
184
173
|
r
|
|
185
174
|
).toString();
|
|
186
175
|
}), l(u, "get", (e = d.MissingTranslationKey, ...t) => h.getTranslation(e, ...t));
|
|
187
|
-
function
|
|
176
|
+
function k(e) {
|
|
188
177
|
return (t) => {
|
|
189
178
|
t.key === "Enter" && e(t);
|
|
190
179
|
};
|
|
191
180
|
}
|
|
192
|
-
var
|
|
193
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
194
|
-
(c = e[
|
|
195
|
-
return a && i &&
|
|
181
|
+
var A = Object.defineProperty, C = Object.getOwnPropertyDescriptor, p = (e, t, r, a) => {
|
|
182
|
+
for (var i = a > 1 ? void 0 : a ? C(t, r) : t, o = e.length - 1, c; o >= 0; o--)
|
|
183
|
+
(c = e[o]) && (i = (a ? c(t, r, i) : c(i)) || i);
|
|
184
|
+
return a && i && A(t, r, i), i;
|
|
196
185
|
};
|
|
197
|
-
function
|
|
186
|
+
function N(e = "") {
|
|
198
187
|
return location.href.replace(location.origin, "").startsWith(e);
|
|
199
188
|
}
|
|
200
|
-
let
|
|
189
|
+
let n = class extends f {
|
|
201
190
|
constructor() {
|
|
202
191
|
super(...arguments), this.capability = "", this.app = "", this.args = {}, this.navigate = () => {
|
|
203
192
|
history.pushState(this.args, "", this._href), window.dispatchEvent(new Event("popstate"));
|
|
204
193
|
}, this.clickHandler = (e) => {
|
|
205
194
|
this.href || this.download || (e.preventDefault(), this.navigate());
|
|
206
195
|
}, this.updateActive = () => {
|
|
207
|
-
this.active =
|
|
196
|
+
this.active = N(this._href);
|
|
208
197
|
}, this._href = "", this.active = !1, this.computeHref = () => {
|
|
209
198
|
if (this.href)
|
|
210
199
|
return this._href = this.href;
|
|
211
200
|
if (!this.app)
|
|
212
201
|
throw new Error("The app property is required when creating a capability link!");
|
|
213
|
-
this._href =
|
|
202
|
+
this._href = w(this.app, this.capability, this.args), this.updateActive();
|
|
214
203
|
};
|
|
215
204
|
}
|
|
216
205
|
connectedCallback() {
|
|
@@ -231,7 +220,7 @@ let o = class extends f {
|
|
|
231
220
|
.href=${this._href}
|
|
232
221
|
?active=${this.active}
|
|
233
222
|
@click=${this.clickHandler}
|
|
234
|
-
@keydown=${
|
|
223
|
+
@keydown=${k(this.clickHandler)}
|
|
235
224
|
>
|
|
236
225
|
<slot></slot>
|
|
237
226
|
</a>`;
|
|
@@ -239,32 +228,32 @@ let o = class extends f {
|
|
|
239
228
|
};
|
|
240
229
|
p([
|
|
241
230
|
s({ type: String, attribute: !0, reflect: !0 })
|
|
242
|
-
],
|
|
231
|
+
], n.prototype, "capability", 2);
|
|
243
232
|
p([
|
|
244
233
|
s({ type: String, attribute: !0, reflect: !0 })
|
|
245
|
-
],
|
|
234
|
+
], n.prototype, "app", 2);
|
|
246
235
|
p([
|
|
247
236
|
s({ type: Object, attribute: !0, reflect: !0 })
|
|
248
|
-
],
|
|
237
|
+
], n.prototype, "args", 2);
|
|
249
238
|
p([
|
|
250
239
|
s({ type: String, attribute: !0, reflect: !0 })
|
|
251
|
-
],
|
|
240
|
+
], n.prototype, "href", 2);
|
|
252
241
|
p([
|
|
253
242
|
s({ type: String })
|
|
254
|
-
],
|
|
243
|
+
], n.prototype, "target", 2);
|
|
255
244
|
p([
|
|
256
245
|
s({ type: String, attribute: !0, reflect: !0 })
|
|
257
|
-
],
|
|
246
|
+
], n.prototype, "rel", 2);
|
|
258
247
|
p([
|
|
259
248
|
s({ type: String, attribute: !0, reflect: !0 })
|
|
260
|
-
],
|
|
249
|
+
], n.prototype, "download", 2);
|
|
261
250
|
p([
|
|
262
251
|
s({ type: String, attribute: !1, reflect: !1 })
|
|
263
|
-
],
|
|
252
|
+
], n.prototype, "_href", 2);
|
|
264
253
|
p([
|
|
265
254
|
s({ type: Boolean, attribute: "active", reflect: !0 })
|
|
266
|
-
],
|
|
267
|
-
|
|
255
|
+
], n.prototype, "active", 2);
|
|
256
|
+
n = p([
|
|
268
257
|
y("alliance-link")
|
|
269
|
-
],
|
|
270
|
-
//# sourceMappingURL=alliance-link-
|
|
258
|
+
], n);
|
|
259
|
+
//# sourceMappingURL=alliance-link-8cb7d7d9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alliance-link-8cb7d7d9.js","sources":["../../utilities/frontend/index.js","../src/components/alliance-link/alliance-link.ts"],"sourcesContent":["var g = Object.defineProperty;\nvar l = (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) => (l(e, typeof t != \"symbol\" ? t + \"\" : t, r), r);\nvar m = /* @__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))(m || {});\nfunction v(e, t) {\n return Object.entries(t).reduce((r, [o, i]) => r.replaceAll(`{{${o}}}`, i), e);\n}\nconst N = {\n [\n 1e3\n /* AlreadyInitialized */\n ]: \"The runtime has already been initialized\",\n [\n 1001\n /* NoAppNameOrKey */\n ]: \"App name and/or app key is not defined on global scope\",\n [\n 1002\n /* MissingAppController */\n ]: \"No app controller registered for app '{{app}}'\",\n [\n 1003\n /* MissingCapabilityOnApp */\n ]: \"No capability '{{capability}}' enabled for app '{{app}}'\",\n [\n 1004\n /* MissingManagedObjectProvider */\n ]: \"No managed object provider registered for object '{{object}}'\",\n [\n 1005\n /* NoManifest */\n ]: \"The current apps manifest is not defined on global scope\",\n [\n 1006\n /* NoRootElement */\n ]: \"Could not find the root element in the DOM\",\n [\n 1007\n /* NoView */\n ]: \"Could not find view with id '{{id}}' on view controller for app '{{app}}'\",\n [\n 1008\n /* CookieKeyNotDefined */\n ]: \"Cookie key '{{key}}' not present in manifest, cookie has not been set\",\n [\n 1009\n /* CookieCategoryNotAllowed */\n ]: \"Cookies categorized as '{{category}}' are not allowed by the user, cookie '{{key}}' has not been set\",\n [\n 1010\n /* StorageKeyNotDefined */\n ]: \"Storage key '{{key}}' not present in manifest, item has not been stored\",\n [\n 1011\n /* StorageCategoryNotAllowed */\n ]: \"Storage categorized as '{{category}}' is not allowed by the user, item '{{key}}' has not been stored\"\n};\nclass M extends Error {\n constructor(t, r = {}) {\n const o = v(N[t], r), i = `https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${t}`;\n super(o), this.name = \"AllianceException\", this.stack = `[${t}] - ${o}\n` + i;\n }\n}\nfunction S(e) {\n const r = Object.entries(e).reduce((o, i) => {\n const [p, n] = i;\n return typeof n > \"u\" || (typeof n == \"object\" && n !== null ? o[p] = JSON.stringify(n) : o[p] = n), o;\n }, {});\n return Object.keys(r).length ? `?${new URLSearchParams(r)}` : \"\";\n}\nfunction w() {\n const e = d(), { href: t, search: r } = window.location;\n return t.replace(e, \"\").replace(r, \"\");\n}\nfunction A(e = \"\", t = \"\", r = {}) {\n const o = d().replace(location.origin, \"\"), i = S(r);\n return e ? t ? `${o}/${e}/${t}${i}` : `${o}/${e}${i}` : `${o}${i}`;\n}\nfunction y() {\n const e = w(), [t = \"\", r = \"\"] = e.split(\"/\").filter((o) => !!o);\n return {\n app: t,\n capability: r\n };\n}\nfunction I(e) {\n const { origin: t, pathname: r } = window.location;\n if (e === \"production\") {\n const [o] = r.split(\"/\").filter((i) => !!i);\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = `${t}/${o}`;\n }\n return globalThis.__ALLIANCE_RUNTIME_ROOT_URL = t;\n}\nfunction d() {\n return 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.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))(h || {});\nconst k = {\n [\n 15\n /* Done */\n ]: \"Done\",\n [\n 22\n /* NoWorkspaceName */\n ]: \"No workspace name provided!\",\n [\n 19\n /* NoAppName */\n ]: \"No app name provided!\",\n [\n 0\n /* AlreadyExists */\n ]: \"File or directory '{0}' already exists!\",\n [\n 21\n /* NoAppOrWorkspaceInCurrentDirectory */\n ]: \"Could not find any app entry file at '{0}'!\",\n [\n 33\n /* UnrecognizedCommand */\n ]: \"Unrecognized command(s) {0}!\",\n [\n 34\n /* WorkspaceCreated */\n ]: \"Workspace was created at path '{0}'!\",\n [\n 4\n /* AppCreated */\n ]: \"App was created at path '{0}'!\",\n [\n 25\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 24\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 35\n /* WorkspaceNameInquiry */\n ]: \"Enter the name of your workspace\",\n [\n 28\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 18\n /* MissingTranslationKey */\n ]: \"No translation key provided!\",\n [\n 23\n /* OperationCancelled */\n ]: \"Operation cancelled.\",\n [\n 30\n /* StopServerInstructions */\n ]: `Press CTRL + C to stop the server.\n`,\n [\n 32\n /* TemplateLanguageInquiry */\n ]: \"Select preferred language\",\n [\n 31\n /* TemplateFrameworkInquiry */\n ]: \"Select preferred framework template\",\n [\n 13\n /* DevServerPortDescription */\n ]: \"The port that the dev server should use.\",\n [\n 14\n /* DevServerLoggingDescription */\n ]: \"Whether the dev server and browser console should output more log information or not (false).\",\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 17\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 16\n /* FetchPackageVersionError */\n ]: \"Failed to fetch package info from the NPM registry for package '${0}'!\",\n [\n 20\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 27\n /* ServerMode */\n ]: \"Server\",\n [\n 29\n /* ServerProxyMode */\n ]: \"Server with proxy\",\n [\n 26\n /* ServerGatewayMode */\n ]: \"Server with gateway\"\n}, u = class {\n};\nlet c = u;\na(c, \"getTranslations\", () => k), a(c, \"getTranslation\", (t, ...r) => {\n const i = u.getTranslations()[t];\n if (!i)\n throw new Error(`Could not find text with given key '${t}'.`);\n return r.reduce(\n (n, s, f) => n.toString().replace(`{${f}}`, s.toString()),\n i\n ).toString();\n}), a(c, \"get\", (t = h.MissingTranslationKey, ...r) => u.getTranslation(t, ...r));\nfunction W(e, t) {\n return b(Object.values(e), ({ name: r }) => ({\n label: r,\n value: r,\n selected: t === r\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 C(e, t) {\n return Object.values(e).find((o) => o.name === t);\n}\nfunction b(e, t) {\n return e.reduce(\n (r, o) => (r.push({\n disabled: !1,\n selected: !1,\n ...t(o)\n }), r),\n [\n {\n label: \"Choose...\",\n value: \"\",\n disabled: !0,\n selected: !0\n }\n ]\n );\n}\nfunction P(e) {\n return (t) => {\n t.key === \"Enter\" && e(t);\n };\n}\nfunction $(e, t = \"all\") {\n const { email: r, displayName: o } = e, i = o && o !== \"unknown\", p = !!r;\n switch (t) {\n case \"all\": {\n if (i && p)\n return `${o} (${r})`;\n if (i)\n return o;\n if (p)\n return r;\n }\n case \"single\": {\n if (i)\n return o;\n if (p)\n return r;\n }\n }\n return \"<UNKNOWN USER>\";\n}\nfunction R(...e) {\n return e.filter((t) => !!t).join(\" \");\n}\nexport {\n M as AllianceError,\n m as AllianceErrorCodes,\n c as Texts,\n h as TranslationsKey,\n D as VocaButtonVariant,\n R as classNames,\n A as createCapabilityPath,\n $ as friendlyUserName,\n y as getCurrentLocationInfo,\n d as getRuntimeRootUrl,\n C as getVocaIcon,\n b as mapToVocaOptions,\n P as onEnter,\n I as setRuntimeRootUrl,\n W 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":["l","a","r","o","i","p","n","A","d","h","k","u","c","t","s","f","P","isOnCurrentPath","path","Link","LitElement","event","createCapabilityPath","_1","_2","_3","html","onEnter","__decorateClass","property","customElement"],"mappings":";AAAA,IAAI,IAAI,OAAO,gBACXA,IAAI,CAAC,GAAG,GAAG,MAAM,KAAK,IAAI,EAAE,GAAG,GAAG,EAAE,YAAY,IAAI,cAAc,IAAI,UAAU,IAAI,OAAO,EAAC,CAAE,IAAI,EAAE,CAAC,IAAI,GACzGC,IAAI,CAAC,GAAG,GAAG,OAAOD,EAAE,GAAG,OAAO,KAAK,WAAW,IAAI,KAAK,GAAG,CAAC,GAAG;AA8DlE,SAAS,EAAE,GAAG;AACZ,QAAME,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,UAAUC,CAAC,IAAIH,EAAEE,CAAC,IAAIC,IAAIH;AAAA,EACtG,GAAE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AA,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,18 +1,18 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import {
|
|
1
|
+
import { i as y, r as e, e as d, s as $, x as s, a as f } from "./query-assigned-elements-024d0918.js";
|
|
2
|
+
import { t as m, c as v } from "./repeat-600d2fb9.js";
|
|
3
3
|
import "./telia-button2-7783c019.js";
|
|
4
4
|
import "./telia-heading2-38ae44ae.js";
|
|
5
5
|
import "./telia-icon2-d0e7c715.js";
|
|
6
|
-
import { l as
|
|
7
|
-
import { c as
|
|
8
|
-
var
|
|
9
|
-
for (var a =
|
|
10
|
-
(
|
|
11
|
-
return
|
|
6
|
+
import { l as b, c as l, b as p, s as w, a as k, d as t } from "./index-d925c796.js";
|
|
7
|
+
import { c as x } from "./close-7d423291.js";
|
|
8
|
+
var S = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (i, n, h, c) => {
|
|
9
|
+
for (var a = c > 1 ? void 0 : c ? C(n, h) : n, u = i.length - 1, g; u >= 0; u--)
|
|
10
|
+
(g = i[u]) && (a = (c ? g(n, h, a) : g(a)) || a);
|
|
11
|
+
return c && a && S(n, h, a), a;
|
|
12
12
|
};
|
|
13
|
-
let
|
|
13
|
+
let o = class extends $ {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.header = "", this.actions = [], this.required = !1, this.scrollMode = "outside", this.containStyling = () => this.contain ?
|
|
15
|
+
super(...arguments), this.header = "", this.actions = [], this.required = !1, this.scrollMode = "outside", this.hasSubHeader = !1, this.containStyling = () => this.contain ? s`<style>
|
|
16
16
|
:host {
|
|
17
17
|
height: 500px;
|
|
18
18
|
position: static;
|
|
@@ -20,7 +20,7 @@ let s = class extends $ {
|
|
|
20
20
|
.backdrop {
|
|
21
21
|
position: absolute;
|
|
22
22
|
}
|
|
23
|
-
</style>` :
|
|
23
|
+
</style>` : s`<style>
|
|
24
24
|
:host {
|
|
25
25
|
position: fixed;
|
|
26
26
|
}
|
|
@@ -28,7 +28,7 @@ let s = class extends $ {
|
|
|
28
28
|
.backdrop {
|
|
29
29
|
position: absolute;
|
|
30
30
|
}
|
|
31
|
-
</style>`, this.scrollStyling = () => this.scrollMode === "inside" ?
|
|
31
|
+
</style>`, this.scrollStyling = () => this.scrollMode === "inside" ? s`<style>
|
|
32
32
|
.container {
|
|
33
33
|
align-items: center;
|
|
34
34
|
}
|
|
@@ -41,17 +41,17 @@ let s = class extends $ {
|
|
|
41
41
|
|
|
42
42
|
.body {
|
|
43
43
|
flex: 1;
|
|
44
|
-
padding: ${t
|
|
44
|
+
padding: ${e(t.spacing24)} ${e(t.spacing32)};
|
|
45
45
|
height: 80%;
|
|
46
46
|
overflow-x: hidden;
|
|
47
47
|
overflow-y: auto;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.footer {
|
|
51
|
-
border-top: ${
|
|
52
|
-
padding: ${t
|
|
51
|
+
border-top: ${e(p.widthXs)} solid ${e(l.gray200)};
|
|
52
|
+
padding: ${e(t.spacing24)} ${e(t.spacing32)};
|
|
53
53
|
}
|
|
54
|
-
</style>` :
|
|
54
|
+
</style>` : s`<style>
|
|
55
55
|
.container {
|
|
56
56
|
overflow-x: hidden;
|
|
57
57
|
overflow-y: overlay;
|
|
@@ -60,21 +60,28 @@ let s = class extends $ {
|
|
|
60
60
|
|
|
61
61
|
dialog {
|
|
62
62
|
display: block;
|
|
63
|
-
margin: ${t
|
|
63
|
+
margin: ${e(t.spacing128)} ${e(t.spacing24)};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.footer,
|
|
67
67
|
.body {
|
|
68
|
-
margin: ${t
|
|
69
|
-
padding: 0 ${t
|
|
68
|
+
margin: ${e(t.spacing24)} 0;
|
|
69
|
+
padding: 0 ${e(t.spacing32)};
|
|
70
70
|
}
|
|
71
|
-
</style>`, this.
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
</style>`, this.subHeaderStyling = () => {
|
|
72
|
+
if (this.hasSubHeader)
|
|
73
|
+
return s`<style>
|
|
74
|
+
div.sub-header {
|
|
75
|
+
display: block;
|
|
76
|
+
}
|
|
77
|
+
</style>`;
|
|
78
|
+
}, this.closeButton = () => this.required ? "" : s`<telia-button size="sm" variant="text" @click=${this.onCloseClick}
|
|
79
|
+
><telia-icon size="md" svg="${x.svg}"
|
|
80
|
+
/></telia-button>`, this.footer = () => this.actions.length ? s`
|
|
74
81
|
<div class="footer">
|
|
75
|
-
${
|
|
82
|
+
${v(
|
|
76
83
|
this.actions,
|
|
77
|
-
(i) =>
|
|
84
|
+
(i) => s`
|
|
78
85
|
<telia-button
|
|
79
86
|
disabled="${i.disabled ? "true" : "false"}"
|
|
80
87
|
variant="${i.variant || "primary"}"
|
|
@@ -94,6 +101,8 @@ let s = class extends $ {
|
|
|
94
101
|
return this.action("close");
|
|
95
102
|
}, this.onKeyDown = (i) => {
|
|
96
103
|
i.defaultPrevented || !this.required && i.key === "Escape" && this.action("close");
|
|
104
|
+
}, this.onSubHeaderSlotChange = () => {
|
|
105
|
+
this.hasSubHeader = !0;
|
|
97
106
|
}, this.action = (i) => {
|
|
98
107
|
const n = new CustomEvent("action", {
|
|
99
108
|
bubbles: !0,
|
|
@@ -111,8 +120,8 @@ let s = class extends $ {
|
|
|
111
120
|
window.removeEventListener("keydown", this.onKeyDown), super.disconnectedCallback();
|
|
112
121
|
}
|
|
113
122
|
render() {
|
|
114
|
-
return
|
|
115
|
-
${this.containStyling()} ${this.scrollStyling()}
|
|
123
|
+
return s`
|
|
124
|
+
${this.containStyling()} ${this.scrollStyling()} ${this.subHeaderStyling()}
|
|
116
125
|
<div class="backdrop" @click=${this.onBackdropClick}></div>
|
|
117
126
|
<div class="container">
|
|
118
127
|
<dialog open>
|
|
@@ -120,26 +129,29 @@ let s = class extends $ {
|
|
|
120
129
|
<telia-heading tag="h3" variant="title-100">${this.header}</telia-heading>
|
|
121
130
|
${this.closeButton()}
|
|
122
131
|
</div>
|
|
132
|
+
<div class="sub-header">
|
|
133
|
+
<slot name="sub-header" @slotchange=${this.onSubHeaderSlotChange}></slot>
|
|
134
|
+
</div>
|
|
123
135
|
<div class="body">
|
|
124
136
|
<slot></slot>
|
|
125
137
|
</div>
|
|
126
|
-
${this.
|
|
138
|
+
${this.footer()}
|
|
127
139
|
</dialog>
|
|
128
140
|
</div>
|
|
129
141
|
`;
|
|
130
142
|
}
|
|
131
143
|
};
|
|
132
|
-
|
|
144
|
+
o.styles = y`
|
|
133
145
|
:host {
|
|
134
146
|
display: block;
|
|
135
147
|
inset: 0;
|
|
136
|
-
z-index: ${
|
|
148
|
+
z-index: ${e(parseInt(b.modal) - 2)};
|
|
137
149
|
}
|
|
138
150
|
|
|
139
151
|
.backdrop {
|
|
140
152
|
inset: 0;
|
|
141
|
-
z-index: ${
|
|
142
|
-
background-color: ${
|
|
153
|
+
z-index: ${e(parseInt(b.modal) - 1)};
|
|
154
|
+
background-color: ${e(l.black)};
|
|
143
155
|
opacity: 0.3;
|
|
144
156
|
}
|
|
145
157
|
|
|
@@ -152,11 +164,11 @@ s.styles = b`
|
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
dialog {
|
|
155
|
-
background-color: ${
|
|
156
|
-
border-radius: ${
|
|
157
|
-
box-shadow: ${
|
|
158
|
-
z-index: ${
|
|
159
|
-
max-width: ${
|
|
167
|
+
background-color: ${e(l.white)};
|
|
168
|
+
border-radius: ${e(p.radiusLg)};
|
|
169
|
+
box-shadow: ${e(w.md)};
|
|
170
|
+
z-index: ${e(parseInt(b.modal))};
|
|
171
|
+
max-width: ${e(k.breakpointLg)};
|
|
160
172
|
position: static;
|
|
161
173
|
padding: 0;
|
|
162
174
|
border: none;
|
|
@@ -166,43 +178,52 @@ s.styles = b`
|
|
|
166
178
|
position: relative;
|
|
167
179
|
display: flex;
|
|
168
180
|
align-items: center;
|
|
169
|
-
padding: ${t
|
|
170
|
-
border-bottom: ${
|
|
181
|
+
padding: ${e(t.spacing24)} ${e(t.spacing32)};
|
|
182
|
+
border-bottom: ${e(p.widthXs)} solid ${e(l.gray200)};
|
|
171
183
|
min-height: 40px;
|
|
172
184
|
}
|
|
173
185
|
|
|
174
186
|
.header telia-button {
|
|
175
187
|
position: absolute;
|
|
176
|
-
top: ${t
|
|
177
|
-
right: ${t
|
|
188
|
+
top: ${e(t.spacing20)};
|
|
189
|
+
right: ${e(t.spacing24)};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.sub-header {
|
|
193
|
+
padding: ${e(t.spacing24)} ${e(t.spacing32)};
|
|
194
|
+
border-bottom: ${e(p.widthXs)} solid ${e(l.gray200)};
|
|
195
|
+
display: none;
|
|
178
196
|
}
|
|
179
197
|
|
|
180
198
|
.body {
|
|
181
|
-
min-width: calc(${t
|
|
199
|
+
min-width: calc(${e(t.spacing128)} * 2);
|
|
182
200
|
}
|
|
183
201
|
|
|
184
202
|
.footer {
|
|
185
203
|
display: flex;
|
|
186
204
|
justify-content: flex-end;
|
|
187
|
-
gap: ${t
|
|
205
|
+
gap: ${e(t.spacing16)};
|
|
188
206
|
}
|
|
189
207
|
`;
|
|
190
208
|
r([
|
|
191
|
-
|
|
192
|
-
],
|
|
209
|
+
d({ type: String, attribute: "header" })
|
|
210
|
+
], o.prototype, "header", 2);
|
|
211
|
+
r([
|
|
212
|
+
d({ type: Array })
|
|
213
|
+
], o.prototype, "actions", 2);
|
|
193
214
|
r([
|
|
194
|
-
|
|
195
|
-
],
|
|
215
|
+
d({ type: Boolean, attribute: "required" })
|
|
216
|
+
], o.prototype, "required", 2);
|
|
196
217
|
r([
|
|
197
|
-
|
|
198
|
-
],
|
|
218
|
+
d({ type: String, attribute: "scroll-mode" })
|
|
219
|
+
], o.prototype, "scrollMode", 2);
|
|
199
220
|
r([
|
|
200
|
-
|
|
201
|
-
],
|
|
221
|
+
m()
|
|
222
|
+
], o.prototype, "hasSubHeader", 2);
|
|
202
223
|
r([
|
|
203
|
-
|
|
204
|
-
],
|
|
205
|
-
|
|
224
|
+
d({ type: Boolean, attribute: "contain" })
|
|
225
|
+
], o.prototype, "contain", 2);
|
|
226
|
+
o = r([
|
|
206
227
|
f("alliance-modal")
|
|
207
|
-
],
|
|
208
|
-
//# sourceMappingURL=alliance-modal-
|
|
228
|
+
], o);
|
|
229
|
+
//# sourceMappingURL=alliance-modal-1126a4c4.js.map
|