@kosdev-code/kos-ui-plugin 2.0.24 → 2.0.26

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/utils.js CHANGED
@@ -1,324 +1,326 @@
1
- import { a as N, m as B } from "./resolve-best-extension-DAJIkfJh.js";
2
- import { c as he, g as ve, b as we, i as Ce, l as Xe, r as Re } from "./resolve-best-extension-DAJIkfJh.js";
3
- const b = "ddk.cui", k = "ddk.cui.view", y = "ddk.cui.settings.config", L = (i, e) => (t, s) => {
4
- const o = s, n = e[s], d = i[n.experienceId] || {};
5
- t[b] = t[b] || {}, t[b][o] = {
6
- id: o,
1
+ import { a as N, m as A } from "./resolve-best-extension-DAJIkfJh.js";
2
+ import { c as Te, g as me, b as be, i as ke, l as ye, r as Pe } from "./resolve-best-extension-DAJIkfJh.js";
3
+ const b = "ddk.cui", k = "ddk.cui.view", y = "ddk.cui.settings.config", $ = (s, e) => (t, i) => {
4
+ const n = i, o = e[i], r = s[o.experienceId] || {};
5
+ t[b] = t[b] || {}, t[b][n] = {
6
+ id: n,
7
7
  type: "cui.definition",
8
- data: n,
9
- remote: n.remote,
10
- sectionId: n.sectionId
11
- }, d.id && (t[k] = t[k] || {}, t[k][o] = {
12
- id: o,
8
+ data: o,
9
+ remote: o.remote,
10
+ sectionId: o.sectionId
11
+ }, r.id && (t[k] = t[k] || {}, t[k][n] = {
12
+ id: n,
13
13
  type: "cui.view",
14
- data: d,
15
- remote: n.remote,
16
- sectionId: n.sectionId
14
+ data: r,
15
+ remote: o.remote,
16
+ sectionId: o.sectionId
17
17
  }), t[y] = t[y] || {};
18
- const a = {
19
- id: o,
18
+ const u = {
19
+ id: n,
20
20
  type: "cui",
21
- data: n,
22
- view: d,
23
- remote: n.remote,
24
- sectionId: n.sectionId
21
+ data: o,
22
+ view: r,
23
+ remote: o.remote,
24
+ sectionId: o.sectionId
25
25
  };
26
- return t[y][o] = a, t;
27
- }, f = ({
28
- contributionKey: i,
26
+ return t[y][n] = u, t;
27
+ }, E = ({
28
+ contributionKey: s,
29
29
  basePluginType: e,
30
- keys: { EXTENSION_POINT: t, EXTENSION_POINT_DEF: s, EXTENSION_POINT_VIEW: o }
31
- }) => (n, d) => (r, a) => {
32
- const u = a, c = d[i][a], I = n[c.experienceId] || {};
33
- s && (r[s] = r[s] || {}, r[s][u] = {
34
- id: u,
30
+ keys: { EXTENSION_POINT: t, EXTENSION_POINT_DEF: i, EXTENSION_POINT_VIEW: n }
31
+ }) => (o, r) => (d, u) => {
32
+ const l = u, a = r[s][u], c = o[a.experienceId] || {};
33
+ i && (d[i] = d[i] || {}, d[i][l] = {
34
+ id: l,
35
35
  type: `${e}.definition`,
36
- data: c,
37
- remote: c.remote,
38
- sectionId: c.sectionId
39
- }), I.id && o && (r[o] = r[o] || {}, r[o][u] = {
40
- id: u,
36
+ data: a,
37
+ remote: a.remote,
38
+ sectionId: a.sectionId
39
+ }), c.id && n && (d[n] = d[n] || {}, d[n][l] = {
40
+ id: l,
41
41
  type: `${e}.view`,
42
- data: I,
43
- remote: c.remote,
44
- sectionId: c.sectionId
45
- }), r[t] = r[t] || {};
42
+ data: c,
43
+ remote: a.remote,
44
+ sectionId: a.sectionId
45
+ }), d[t] = d[t] || {};
46
46
  const g = {
47
- id: u,
47
+ id: l,
48
48
  type: `${e}`,
49
- data: c,
50
- view: I,
51
- remote: c.remote,
52
- sectionId: c.sectionId
49
+ data: a,
50
+ view: c,
51
+ remote: a.remote,
52
+ sectionId: a.sectionId
53
53
  };
54
- return r[t][u] = g, r;
55
- }, H = "ddk.dashboard.detail", M = "ddk.dashboard.detail.view", G = "ddk.ncui.dashboard.detail.config", z = f({
54
+ return d[t][l] = g, d;
55
+ }, U = "ddk.dashboard.detail", q = "ddk.dashboard.detail.view", x = "ddk.ncui.dashboard.detail.config", K = E({
56
56
  basePluginType: "dashboard.detail",
57
57
  contributionKey: "dashboardDetailDefinitions",
58
58
  keys: {
59
- EXTENSION_POINT: G,
60
- EXTENSION_POINT_DEF: H,
61
- EXTENSION_POINT_VIEW: M
59
+ EXTENSION_POINT: x,
60
+ EXTENSION_POINT_DEF: U,
61
+ EXTENSION_POINT_VIEW: q
62
62
  }
63
- }), Y = "ddk.dashboard.pump.detail", Q = "ddk.dashboard.pump.detail.view", J = "ddk.dashboard.pump.detail.config", Z = f({
63
+ }), F = "ddk.dashboard.pump.detail", W = "ddk.dashboard.pump.detail.view", B = "ddk.dashboard.pump.detail.config", L = E({
64
64
  basePluginType: "dashboard.pump.detail",
65
65
  contributionKey: "dashboardPumpDetailDefinitions",
66
66
  keys: {
67
- EXTENSION_POINT: J,
68
- EXTENSION_POINT_DEF: Y,
69
- EXTENSION_POINT_VIEW: Q
67
+ EXTENSION_POINT: B,
68
+ EXTENSION_POINT_DEF: F,
69
+ EXTENSION_POINT_VIEW: W
70
70
  }
71
- }), ee = "ddk.ncui.dashboard.config", te = f({
71
+ }), H = "ddk.ncui.dashboard.config", j = E({
72
72
  basePluginType: "dashboard",
73
73
  contributionKey: "dashboardDefinitions",
74
74
  keys: {
75
- EXTENSION_POINT: ee
75
+ EXTENSION_POINT: H
76
76
  }
77
- }), ie = "ddk.dashboard.summary", se = "ddk.dashboard.summary.view", ne = "ddk.ncui.dashboard.summary.config", oe = f({
77
+ }), M = "ddk.dashboard.summary", G = "ddk.dashboard.summary.view", z = "ddk.ncui.dashboard.summary.config", Y = E({
78
78
  basePluginType: "dashboard.summary",
79
79
  contributionKey: "dashboardSummaryDefinitions",
80
80
  keys: {
81
- EXTENSION_POINT: ne,
82
- EXTENSION_POINT_DEF: ie,
83
- EXTENSION_POINT_VIEW: se
81
+ EXTENSION_POINT: z,
82
+ EXTENSION_POINT_DEF: M,
83
+ EXTENSION_POINT_VIEW: G
84
84
  }
85
- }), re = "cui.control.pour", de = "cui.control.pour.view", ae = "cui.control.pour.config", ue = f({
85
+ }), Q = "cui.control.pour", J = "cui.control.pour.view", Z = "cui.control.pour.config", ee = E({
86
86
  basePluginType: "control.pour",
87
87
  contributionKey: "controlPourDefinitions",
88
88
  keys: {
89
- EXTENSION_POINT: ae,
90
- EXTENSION_POINT_DEF: re,
91
- EXTENSION_POINT_VIEW: de
89
+ EXTENSION_POINT: Z,
90
+ EXTENSION_POINT_DEF: Q,
91
+ EXTENSION_POINT_VIEW: J
92
92
  }
93
- }), le = "ddk.nav.view", ce = "ddk.nav.view.view", Ie = "ddk.ncui.nav.view.config", Ne = f({
93
+ }), te = "ddk.nav.view", ie = "ddk.nav.view.view", se = "ddk.ncui.nav.view.config", ne = E({
94
94
  basePluginType: "nav.view",
95
95
  contributionKey: "navViewDefinitions",
96
96
  keys: {
97
- EXTENSION_POINT: Ie,
98
- EXTENSION_POINT_DEF: le,
99
- EXTENSION_POINT_VIEW: ce
97
+ EXTENSION_POINT: se,
98
+ EXTENSION_POINT_DEF: te,
99
+ EXTENSION_POINT_VIEW: ie
100
100
  }
101
- }), p = "ddk.settings", P = "ddk.settings.view", m = "ddk.settings.group", V = "ddk.ncui.settings.config", Ee = (i, e, t) => (s, o) => {
102
- const n = t[o];
103
- return s[m] = s[m] || {}, s[m][o] = {
104
- id: o,
101
+ }), P = "ddk.settings", V = "ddk.settings.view", O = "ddk.settings.group", S = "ddk.ncui.settings.config", oe = (s, e, t) => (i, n) => {
102
+ const o = t[n];
103
+ return i[O] = i[O] || {}, i[O][n] = {
104
+ id: n,
105
105
  type: "settings.group",
106
- data: t[o],
107
- remote: n.remote,
108
- sectionId: n.sectionId
109
- }, Object.entries(e).filter(([, r]) => r.settingsGroup === o).map(([r]) => r).forEach((r) => {
110
- const a = r, u = e[r], E = i[u.experienceId] || {};
111
- s[m][o].data.settings = [
112
- ...s[m][o].data.settings,
113
- a
114
- ], s[p] = s[p] || {}, s[p][a] = {
115
- id: a,
106
+ data: t[n],
107
+ remote: o.remote,
108
+ sectionId: o.sectionId
109
+ }, Object.entries(e).filter(([, d]) => d.settingsGroup === n).map(([d]) => d).forEach((d) => {
110
+ const u = d, l = e[d], f = s[l.experienceId] || {};
111
+ i[O][n].data.settings = [
112
+ ...i[O][n].data.settings,
113
+ u
114
+ ], i[P] = i[P] || {}, i[P][u] = {
115
+ id: u,
116
116
  type: "settings.definition",
117
- data: u,
118
- remote: u.remote,
119
- sectionId: u.sectionId
120
- }, E.id && (s[P] = s[P] || {}, s[P][a] = {
121
- id: a,
117
+ data: l,
118
+ remote: l.remote,
119
+ sectionId: l.sectionId
120
+ }, f.id && (i[V] = i[V] || {}, i[V][u] = {
121
+ id: u,
122
122
  type: "settings.view",
123
- data: E,
124
- remote: u.remote,
125
- sectionId: u.sectionId
126
- }), s[V] = s[V] || {};
127
- const I = {
128
- id: a,
123
+ data: f,
124
+ remote: l.remote,
125
+ sectionId: l.sectionId
126
+ }), i[S] = i[S] || {};
127
+ const c = {
128
+ id: u,
129
129
  type: "settings",
130
- data: u,
131
- view: E,
132
- remote: u.remote,
133
- sectionId: u.sectionId
130
+ data: l,
131
+ view: f,
132
+ remote: l.remote,
133
+ sectionId: l.sectionId
134
134
  };
135
- s[V][a] = I;
136
- }), s;
137
- }, D = "ddk.setup", S = "ddk.setup.view", h = "ddk.ncui.setup.config", ge = (i, e) => (t, s) => {
138
- const o = s, n = e[s], d = i[n.experienceId] || {};
139
- t[D] = t[D] || {}, t[D][o] = {
140
- id: o,
135
+ i[S][u] = c;
136
+ }), i;
137
+ }, h = "ddk.setup", D = "ddk.setup.view", p = "ddk.ncui.setup.config", re = (s, e) => (t, i) => {
138
+ const n = i, o = e[i], r = s[o.experienceId] || {};
139
+ t[h] = t[h] || {}, t[h][n] = {
140
+ id: n,
141
141
  type: "setup.definition",
142
- data: n,
143
- remote: n.remote,
144
- sectionId: n.sectionId
145
- }, d.id && (t[S] = t[S] || {}, t[S][o] = {
146
- id: o,
142
+ data: o,
143
+ remote: o.remote,
144
+ sectionId: o.sectionId
145
+ }, r.id && (t[D] = t[D] || {}, t[D][n] = {
146
+ id: n,
147
147
  type: "setup.view",
148
- data: d,
149
- remote: n.remote,
150
- sectionId: n.sectionId
151
- }), t[h] = t[h] || {};
152
- const a = {
153
- id: o,
148
+ data: r,
149
+ remote: o.remote,
150
+ sectionId: o.sectionId
151
+ }), t[p] = t[p] || {};
152
+ const u = {
153
+ id: n,
154
154
  type: "setup",
155
- data: n,
156
- view: d,
157
- remote: n.remote,
158
- sectionId: n.sectionId
155
+ data: o,
156
+ view: r,
157
+ remote: o.remote,
158
+ sectionId: o.sectionId
159
159
  };
160
- return t[h][o] = a, t;
161
- }, fe = "ddk.trouble.action", Oe = "ddk.trouble.action.view", _e = "ddk.ncui.trouble.action.config", Te = f({
160
+ return t[p][n] = u, t;
161
+ }, de = "ddk.trouble.action", ae = "ddk.trouble.action.view", ue = "ddk.ncui.trouble.action.config", le = E({
162
162
  basePluginType: "trouble.action",
163
163
  contributionKey: "troubleActionDefinitions",
164
164
  keys: {
165
- EXTENSION_POINT: _e,
166
- EXTENSION_POINT_DEF: fe,
167
- EXTENSION_POINT_VIEW: Oe
165
+ EXTENSION_POINT: ue,
166
+ EXTENSION_POINT_DEF: de,
167
+ EXTENSION_POINT_VIEW: ae
168
168
  }
169
- }), v = "ddk.utilities", w = "ddk.utilities.view", C = "ddk.ncui.utils.config", me = (i, e) => (t, s) => {
170
- const o = s, n = e[s], d = i[n.experienceId] || {};
171
- t[v] = t[v] || {}, t[v][o] = {
172
- id: o,
169
+ }), v = "ddk.utilities", w = "ddk.utilities.view", C = "ddk.ncui.utils.config", ce = (s, e) => (t, i) => {
170
+ const n = i, o = e[i], r = s[o.experienceId] || {};
171
+ t[v] = t[v] || {}, t[v][n] = {
172
+ id: n,
173
173
  type: "utility.definition",
174
- data: n,
175
- remote: n.remote,
176
- sectionId: n.sectionId
177
- }, d.id && (t[w] = t[w] || {}, t[w][o] = {
178
- id: o,
174
+ data: o,
175
+ remote: o.remote,
176
+ sectionId: o.sectionId
177
+ }, r.id && (t[w] = t[w] || {}, t[w][n] = {
178
+ id: n,
179
179
  type: "utilities.view",
180
- data: d,
181
- remote: n.remote,
182
- sectionId: n.sectionId
180
+ data: r,
181
+ remote: o.remote,
182
+ sectionId: o.sectionId
183
183
  }), t[C] = t[C] || {};
184
- const a = {
185
- id: o,
184
+ const u = {
185
+ id: n,
186
186
  type: "utility",
187
- data: n,
188
- view: d,
189
- remote: n.remote,
190
- sectionId: n.sectionId
187
+ data: o,
188
+ view: r,
189
+ remote: o.remote,
190
+ sectionId: o.sectionId
191
191
  };
192
- return t[C][o] = a, t;
192
+ return t[C][n] = u, t;
193
193
  };
194
194
  N(
195
- (i, e, t) => Object.keys(e.cuiDefinitions).reduce(L(t, e.cuiDefinitions), i)
195
+ (s, e, t) => Object.keys(e.cuiDefinitions).reduce($(t, e.cuiDefinitions), s)
196
196
  );
197
197
  N(
198
- (i, e, t) => Object.keys(e.utilDefinitions).reduce(me(t, e.utilDefinitions), i)
198
+ (s, e, t) => Object.keys(e.utilDefinitions).reduce(ce(t, e.utilDefinitions), s)
199
199
  );
200
200
  N(
201
- (i, e, t) => Object.keys(e.setupDefinitions).reduce(
202
- ge(t, e.setupDefinitions),
203
- i
201
+ (s, e, t) => Object.keys(e.setupDefinitions).reduce(
202
+ re(t, e.setupDefinitions),
203
+ s
204
204
  )
205
205
  );
206
206
  N(
207
- (i, e, t) => Object.keys(e.troubleActionDefinitions).reduce(
208
- Te(t, e),
209
- i
207
+ (s, e, t) => Object.keys(e.troubleActionDefinitions).reduce(
208
+ le(t, e),
209
+ s
210
210
  )
211
211
  );
212
212
  N(
213
- (i, e, t) => Object.keys(e.navViewDefinitions).reduce(Ne(t, e), i)
213
+ (s, e, t) => Object.keys(e.navViewDefinitions).reduce(ne(t, e), s)
214
214
  );
215
215
  N(
216
- (i, e, t) => Object.keys(e.dashboardSummaryDefinitions).reduce(
217
- oe(t, e),
218
- i
216
+ (s, e, t) => Object.keys(e.dashboardSummaryDefinitions).reduce(
217
+ Y(t, e),
218
+ s
219
219
  )
220
220
  );
221
221
  N(
222
- (i, e, t) => Object.keys(e.dashboardDetailDefinitions).reduce(
223
- z(t, e),
224
- i
222
+ (s, e, t) => Object.keys(e.dashboardDetailDefinitions).reduce(
223
+ K(t, e),
224
+ s
225
225
  )
226
226
  );
227
227
  N(
228
- (i, e, t) => Object.keys(e.dashboardPumpDetailDefinitions).reduce(
229
- Z(t, e),
230
- i
228
+ (s, e, t) => Object.keys(e.dashboardPumpDetailDefinitions).reduce(
229
+ L(t, e),
230
+ s
231
231
  )
232
232
  );
233
233
  N(
234
- (i, e, t) => Object.keys(e.dashboardDefinitions).reduce(te(t, e), i)
234
+ (s, e, t) => Object.keys(e.dashboardDefinitions).reduce(j(t, e), s)
235
235
  );
236
236
  N(
237
- (i, e, t) => Object.keys(e.settingsGroupDefinitions).reduce(
238
- Ee(t, e.settingsDefinitions, e.settingsGroupDefinitions),
239
- i
237
+ (s, e, t) => Object.keys(e.settingsGroupDefinitions).reduce(
238
+ oe(t, e.settingsDefinitions, e.settingsGroupDefinitions),
239
+ s
240
240
  )
241
241
  );
242
242
  N(
243
- (i, e, t) => Object.keys(e.controlPourDefinitions).reduce(ue(t, e), i)
243
+ (s, e, t) => Object.keys(e.controlPourDefinitions).reduce(ee(t, e), s)
244
244
  );
245
- const be = (i = null) => (i || window.location.search.replace("?", "")).split("&").map((e) => {
246
- const [t, s] = e.split("=");
247
- return [t, decodeURIComponent(s || "")];
248
- }).reduce((e, [t, s]) => (e[t] = s, e), {}), ke = () => {
249
- const i = window.location.origin, e = be();
250
- return (e == null ? void 0 : e.host) || i;
251
- }, Pe = async (i) => {
252
- const e = ke(), t = i ?? {}, {
253
- pluginBaseUrl: s = e,
254
- pluginApiPath: o = "/api/app/kosdev.ddk/ncui/plugins",
255
- overrides: n = {},
256
- pluginContext: d
257
- } = t, r = !!d, a = r ? `${s}/api/kos/ui/plugins/context/${d.context}` : `${s}${o}`;
245
+ const Ie = (s = null) => (s || window.location.search.replace("?", "")).split("&").map((e) => {
246
+ const [t, i] = e.split("=");
247
+ return [t, decodeURIComponent(i || "")];
248
+ }).reduce((e, [t, i]) => (e[t] = i, e), {}), Ne = () => {
249
+ const s = window.location.origin, e = Ie();
250
+ return (e == null ? void 0 : e.host) || s;
251
+ }, ge = async (s) => {
252
+ var g, X;
253
+ const e = Ne(), t = s ?? {}, {
254
+ pluginBaseUrl: i = e,
255
+ pluginApiPath: n = "/api/app/kosdev.ddk/ncui/plugins",
256
+ overrides: o = {},
257
+ pluginContext: r
258
+ } = t, d = !!r, u = d ? `${i}/api/kos/ui/plugins/context/${r.context}` : `${i}${n}`;
258
259
  console.log(
259
- `initialize-plugins: Using Plugin Framework: ${r}: Fetching plugins from ${a}`
260
+ `initialize-plugins: Using Plugin Framework: ${d}: Fetching plugins from ${u}`
260
261
  );
261
- const E = await (await fetch(a)).json(), I = (r ? E.data.groups[d.group] : E.data).reduce((g, l) => {
262
- const _ = (n == null ? void 0 : n[l.id]) ?? r ? `${s}${l.path}` : `${s}${l.baseUrl}`;
263
- return l.descriptor ? g[l.id] = {
264
- basePath: `${_}remoteEntry.js`,
265
- extensions: l.descriptor.extensions,
266
- contributes: l.descriptor.contributes,
267
- remote: l.descriptor.id,
268
- init: !!l.descriptor.init
262
+ const f = await (await fetch(u)).json(), a = d ? ((X = (g = f.data) == null ? void 0 : g.groups) == null ? void 0 : X[r.group]) ?? [] : f.data ?? [], c = a == null ? void 0 : a.reduce((_, I) => {
263
+ const m = (o == null ? void 0 : o[I.id]) ?? d ? `${i}${I.path}` : `${i}${I.baseUrl}`;
264
+ return I.descriptor ? _[I.id] = {
265
+ basePath: `${m}remoteEntry.js`,
266
+ extensions: I.descriptor.extensions,
267
+ contributes: I.descriptor.contributes,
268
+ remote: I.descriptor.id,
269
+ init: !!I.descriptor.init
269
270
  } : console.error(
270
- `initialize-plugins: Plugin ${l.id} does not have a descriptor`
271
- ), g;
271
+ `initialize-plugins: Plugin ${I.id} does not have a descriptor`
272
+ ), _;
272
273
  }, {});
273
- window.KosPlugins = window.KosPlugins || {}, window.KosPlugins.__dynamicRemotes = I;
274
- const O = Object.keys(I).reduce((g, l) => {
275
- const _ = I[l].remote;
276
- return g[_] = I[l].basePath, g;
274
+ window.KosPlugins = window.KosPlugins || {}, window.KosPlugins.__dynamicRemotes = c;
275
+ const T = Object.keys(c).reduce((_, I) => {
276
+ const m = c[I].remote;
277
+ return _[m] = c[I].basePath, _;
277
278
  }, {});
278
- return B.setRemoteDefinitions(O), O;
279
+ return A.setRemoteDefinitions(T), T;
279
280
  };
280
- function F(i) {
281
- const e = i.match(/^(\d+)\.(\d+)\.\d+(?:-\S+)?$/);
281
+ function R(s) {
282
+ const e = s.match(/^(\d+)\.(\d+)\.\d+(?:-\S+)?$/);
282
283
  if (!e)
283
- throw new Error(`Invalid version format: ${i}`);
284
- const [t, s, o] = e;
285
- return `${s}.${o}.0`;
284
+ throw new Error(`Invalid version format: ${s}`);
285
+ const [t, i, n] = e;
286
+ return `${i}.${n}.0`;
286
287
  }
287
- function Ve(i, e) {
288
- var r, a, u, E, c, I, O, g, l, _, X, R, A, U, $, q, j, x;
288
+ function Ee(s, e) {
289
+ var l, f;
289
290
  e != null && e.sdkVersion && console.log("sdkVersion", e.sdkVersion), e != null && e.ddkVersion && console.log("ddkVersion", e.ddkVersion);
290
- const t = F((e == null ? void 0 : e.sdkVersion) || "0.2.0"), s = F((e == null ? void 0 : e.ddkVersion) || "0.2.0");
291
- console.log(`Using DDK version: ${s}`), console.log(`Using SDK version: ${t}`);
292
- const o = i == null ? void 0 : i.name;
293
- if (!o)
291
+ const t = R((e == null ? void 0 : e.sdkVersion) || "0.2.0"), i = R((e == null ? void 0 : e.ddkVersion) || "0.2.0");
292
+ console.log(`Using DDK version: ${i}`), console.log(`Using SDK version: ${t}`);
293
+ const n = s == null ? void 0 : s.name;
294
+ if (!n)
294
295
  throw new Error(
295
296
  "KOS Configuration should be added. Project name not found in config"
296
297
  );
297
- const n = (E = (u = (a = (r = i == null ? void 0 : i.kosdev) == null ? void 0 : r.ddk) == null ? void 0 : a.ncui) == null ? void 0 : u.plugin) == null ? void 0 : E.id;
298
- if (!n)
298
+ const r = ((e == null ? void 0 : e.pluginPath) || "kosdev.ddk.ncui.plugin").split(".").reduce((a, c) => (console.log(`Accessing key: ${c}`), a && a[c] ? a[c] : void 0), s), d = r == null ? void 0 : r.id;
299
+ if (!d)
299
300
  throw new Error(
300
301
  "KOS Configuration should be added. Plugin ID not found in config"
301
302
  );
302
- const d = Object.keys(
303
- ((l = (g = (O = (I = (c = i == null ? void 0 : i.kosdev) == null ? void 0 : c.ddk) == null ? void 0 : I.ncui) == null ? void 0 : O.plugin) == null ? void 0 : g.contributes) == null ? void 0 : l.views) || {}
304
- ).reduce((T, W) => (i.kosdev.ddk.ncui.plugin.contributes.views[W].forEach((K) => {
305
- T[`./${K.component}`] = K.location;
306
- }), T), {});
307
- return Object.values(
308
- ((U = (A = (R = (X = (_ = i == null ? void 0 : i.kosdev) == null ? void 0 : _.ddk) == null ? void 0 : X.ncui) == null ? void 0 : R.plugin) == null ? void 0 : A.contributes) == null ? void 0 : U.experiences) || {}
309
- ).forEach((T) => {
310
- d[`./${T.component}`] = T.location;
311
- }), (x = (j = (q = ($ = i == null ? void 0 : i.kosdev) == null ? void 0 : $.ddk) == null ? void 0 : q.ncui) == null ? void 0 : j.plugin) != null && x.init && (d["./InitPlugin"] = "./src/app/init.ts"), {
312
- name: o,
313
- exposes: d,
314
- library: { type: "var", name: n },
303
+ const u = Object.keys(((l = r == null ? void 0 : r.contributes) == null ? void 0 : l.views) || {}).reduce(
304
+ (a, c) => (r.contributes.views[c].forEach((g) => {
305
+ a[`./${g.component}`] = g.location;
306
+ }), a),
307
+ {}
308
+ );
309
+ return Object.values(((f = r == null ? void 0 : r.contributes) == null ? void 0 : f.experiences) || {}).forEach(
310
+ (a) => {
311
+ u[`./${a.component}`] = a.location;
312
+ }
313
+ ), r != null && r.init && (u["./InitPlugin"] = "./src/app/init.ts"), {
314
+ name: n,
315
+ exposes: u,
316
+ library: { type: "var", name: d },
315
317
  additionalShared: [
316
318
  {
317
319
  libraryName: "@kosdev-code/kos-ui-plugin",
318
320
  sharedConfig: {
319
321
  singleton: !0,
320
322
  eager: !1,
321
- requiredVersion: `~${s}`
323
+ requiredVersion: `~${i}`
322
324
  }
323
325
  },
324
326
  {
@@ -372,7 +374,7 @@ function Ve(i, e) {
372
374
  singleton: !0,
373
375
  eager: !1,
374
376
  strictVersion: !1,
375
- requiredVersion: `~${s}`
377
+ requiredVersion: `~${i}`
376
378
  }
377
379
  },
378
380
  {
@@ -381,7 +383,7 @@ function Ve(i, e) {
381
383
  singleton: !0,
382
384
  eager: !1,
383
385
  strictVersion: !1,
384
- requiredVersion: `~${s}`
386
+ requiredVersion: `~${i}`
385
387
  }
386
388
  },
387
389
  {
@@ -390,7 +392,7 @@ function Ve(i, e) {
390
392
  singleton: !0,
391
393
  eager: !1,
392
394
  strictVersion: !1,
393
- requiredVersion: `~${s}`
395
+ requiredVersion: `~${i}`
394
396
  }
395
397
  },
396
398
  {
@@ -399,7 +401,7 @@ function Ve(i, e) {
399
401
  singleton: !0,
400
402
  eager: !1,
401
403
  strictVersion: !1,
402
- requiredVersion: `~${s}`
404
+ requiredVersion: `~${i}`
403
405
  }
404
406
  },
405
407
  {
@@ -408,7 +410,7 @@ function Ve(i, e) {
408
410
  singleton: !0,
409
411
  eager: !1,
410
412
  strictVersion: !1,
411
- requiredVersion: `~${s}`
413
+ requiredVersion: `~${i}`
412
414
  }
413
415
  },
414
416
  {
@@ -526,50 +528,50 @@ export {
526
528
  y as EXTENSION_POINT_CUI,
527
529
  b as EXTENSION_POINT_CUI_DEF,
528
530
  k as EXTENSION_POINT_CUI_VIEW,
529
- ee as EXTENSION_POINT_DASHBOARD,
530
- G as EXTENSION_POINT_DASHBOARD_DETAIL,
531
- H as EXTENSION_POINT_DASHBOARD_DETAIL_DEF,
532
- M as EXTENSION_POINT_DASHBOARD_DETAIL_VIEW,
533
- J as EXTENSION_POINT_DASHBOARD_PUMP_DETAIL,
534
- Y as EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_DEF,
535
- Q as EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_VIEW,
536
- ne as EXTENSION_POINT_DASHBOARD_SUMMARY,
537
- ie as EXTENSION_POINT_DASHBOARD_SUMMARY_DEF,
538
- se as EXTENSION_POINT_DASHBOARD_SUMMARY_VIEW,
539
- Ie as EXTENSION_POINT_NAV_VIEW,
540
- le as EXTENSION_POINT_NAV_VIEW_DEF,
541
- ce as EXTENSION_POINT_NAV_VIEW_VIEW,
542
- V as EXTENSION_POINT_SETTINGS,
543
- p as EXTENSION_POINT_SETTINGS_DEF,
544
- m as EXTENSION_POINT_SETTINGS_GROUP_DEF,
545
- P as EXTENSION_POINT_SETTINGS_VIEW,
546
- h as EXTENSION_POINT_SETUP,
547
- D as EXTENSION_POINT_SETUP_DEF,
548
- S as EXTENSION_POINT_SETUP_VIEW,
549
- _e as EXTENSION_POINT_TROUBLE_ACTION,
550
- fe as EXTENSION_POINT_TROUBLE_ACTION_DEF,
551
- Oe as EXTENSION_POINT_TROUBLE_ACTION_VIEW,
531
+ H as EXTENSION_POINT_DASHBOARD,
532
+ x as EXTENSION_POINT_DASHBOARD_DETAIL,
533
+ U as EXTENSION_POINT_DASHBOARD_DETAIL_DEF,
534
+ q as EXTENSION_POINT_DASHBOARD_DETAIL_VIEW,
535
+ B as EXTENSION_POINT_DASHBOARD_PUMP_DETAIL,
536
+ F as EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_DEF,
537
+ W as EXTENSION_POINT_DASHBOARD_PUMP_DETAIL_VIEW,
538
+ z as EXTENSION_POINT_DASHBOARD_SUMMARY,
539
+ M as EXTENSION_POINT_DASHBOARD_SUMMARY_DEF,
540
+ G as EXTENSION_POINT_DASHBOARD_SUMMARY_VIEW,
541
+ se as EXTENSION_POINT_NAV_VIEW,
542
+ te as EXTENSION_POINT_NAV_VIEW_DEF,
543
+ ie as EXTENSION_POINT_NAV_VIEW_VIEW,
544
+ S as EXTENSION_POINT_SETTINGS,
545
+ P as EXTENSION_POINT_SETTINGS_DEF,
546
+ O as EXTENSION_POINT_SETTINGS_GROUP_DEF,
547
+ V as EXTENSION_POINT_SETTINGS_VIEW,
548
+ p as EXTENSION_POINT_SETUP,
549
+ h as EXTENSION_POINT_SETUP_DEF,
550
+ D as EXTENSION_POINT_SETUP_VIEW,
551
+ ue as EXTENSION_POINT_TROUBLE_ACTION,
552
+ de as EXTENSION_POINT_TROUBLE_ACTION_DEF,
553
+ ae as EXTENSION_POINT_TROUBLE_ACTION_VIEW,
552
554
  C as EXTENSION_POINT_UTIL,
553
555
  v as EXTENSION_POINT_UTIL_DEF,
554
556
  w as EXTENSION_POINT_UTIL_VIEW,
555
- he as contributionReducer,
556
- L as cuiReducer,
557
- z as dashboardDetailReducer,
558
- Z as dashboardPumpDetailReducer,
559
- te as dashboardReducer,
560
- oe as dashboardSummaryReducer,
561
- Ve as generatePluginConfiguration,
562
- ve as getContributions,
563
- we as getExtensions,
564
- be as getQueryParams,
565
- Ce as initPluginManager,
566
- Pe as initializeKosPlugins,
567
- Xe as loadExtensions,
568
- Ne as navViewReducer,
569
- Re as resolveBestExtension,
570
- Ee as settingsReducer,
571
- ge as setupReducer,
572
- Te as troubleActionReducer,
573
- me as utilReducer
557
+ Te as contributionReducer,
558
+ $ as cuiReducer,
559
+ K as dashboardDetailReducer,
560
+ L as dashboardPumpDetailReducer,
561
+ j as dashboardReducer,
562
+ Y as dashboardSummaryReducer,
563
+ Ee as generatePluginConfiguration,
564
+ me as getContributions,
565
+ be as getExtensions,
566
+ Ie as getQueryParams,
567
+ ke as initPluginManager,
568
+ ge as initializeKosPlugins,
569
+ ye as loadExtensions,
570
+ ne as navViewReducer,
571
+ Pe as resolveBestExtension,
572
+ oe as settingsReducer,
573
+ re as setupReducer,
574
+ le as troubleActionReducer,
575
+ ce as utilReducer
574
576
  };
575
577
  //# sourceMappingURL=utils.js.map