ng-configcat-publicapi-ui 2.3.3 → 2.5.2

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.
Files changed (58) hide show
  1. package/{esm2015/lib/_models/index.js → esm2020/lib/_models/index.mjs} +0 -0
  2. package/{esm2015/lib/_models/settingValuesModel.js → esm2020/lib/_models/settingValuesModel.mjs} +0 -0
  3. package/{esm2015/lib/_models/updateSettingValuesModel.js → esm2020/lib/_models/updateSettingValuesModel.mjs} +0 -0
  4. package/{esm2015/lib/_services/form-helper.js → esm2020/lib/_services/form-helper.mjs} +0 -0
  5. package/{esm2015/lib/_services/index.js → esm2020/lib/_services/index.mjs} +0 -0
  6. package/esm2020/lib/_services/public-api.service.mjs +68 -0
  7. package/esm2020/lib/_services/setting-list-form-helper.mjs +152 -0
  8. package/esm2020/lib/authorization/authorization.component.mjs +50 -0
  9. package/{esm2015/lib/base/base.component.js → esm2020/lib/base/base.component.mjs} +7 -4
  10. package/{esm2015/lib/configuration.js → esm2020/lib/configuration.mjs} +4 -4
  11. package/esm2020/lib/dialogs/concurrent-dialog/concurrent-dialog.component.mjs +25 -0
  12. package/esm2020/lib/dialogs/expand-dialog/expand-dialog.component.mjs +77 -0
  13. package/esm2020/lib/dialogs/reason-dialog/reason-dialog.component.mjs +36 -0
  14. package/esm2020/lib/dialogs/save-snackbar/save-snackbar.component.mjs +14 -0
  15. package/{esm2015/lib/ng-configcat-publicapi-ui.module.js → esm2020/lib/ng-configcat-publicapi-ui.module.mjs} +5 -5
  16. package/{esm2015/lib/selects/config-select/config-select.component.js → esm2020/lib/selects/config-select/config-select.component.mjs} +7 -12
  17. package/esm2020/lib/selects/environment-select/environment-select.component.mjs +43 -0
  18. package/esm2020/lib/selects/product-select/product-select.component.mjs +36 -0
  19. package/esm2020/lib/selects/setting-select/setting-select.component.mjs +43 -0
  20. package/esm2020/lib/setting-item/setting-item.component.mjs +126 -0
  21. package/esm2020/lib/setting-list/setting/rollout-percentage-items/rollout-percentage-items.component.mjs +81 -0
  22. package/esm2020/lib/setting-list/setting/rollout-rules/rollout-rules.component.mjs +295 -0
  23. package/esm2020/lib/setting-list/setting/setting.component.mjs +134 -0
  24. package/esm2020/lib/setting-list/setting/value/value.component.mjs +32 -0
  25. package/esm2020/lib/setting-list/setting-list.component.mjs +197 -0
  26. package/{esm2015/ng-configcat-publicapi-ui.js → esm2020/ng-configcat-publicapi-ui.mjs} +0 -0
  27. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  28. package/fesm2015/ng-configcat-publicapi-ui.mjs +1579 -0
  29. package/fesm2015/ng-configcat-publicapi-ui.mjs.map +1 -0
  30. package/fesm2020/ng-configcat-publicapi-ui.mjs +1560 -0
  31. package/fesm2020/ng-configcat-publicapi-ui.mjs.map +1 -0
  32. package/lib/_services/public-api.service.d.ts +2 -1
  33. package/lib/base/base.component.d.ts +1 -0
  34. package/lib/setting-item/setting-item.component.d.ts +3 -1
  35. package/lib/setting-list/setting/rollout-rules/rollout-rules.component.d.ts +10 -2
  36. package/lib/setting-list/setting/setting.component.d.ts +4 -2
  37. package/lib/setting-list/setting-list.component.d.ts +4 -1
  38. package/package.json +22 -9
  39. package/bundles/ng-configcat-publicapi-ui.umd.js +0 -1979
  40. package/bundles/ng-configcat-publicapi-ui.umd.js.map +0 -1
  41. package/esm2015/lib/_services/public-api.service.js +0 -69
  42. package/esm2015/lib/_services/setting-list-form-helper.js +0 -135
  43. package/esm2015/lib/authorization/authorization.component.js +0 -54
  44. package/esm2015/lib/dialogs/concurrent-dialog/concurrent-dialog.component.js +0 -29
  45. package/esm2015/lib/dialogs/expand-dialog/expand-dialog.component.js +0 -81
  46. package/esm2015/lib/dialogs/reason-dialog/reason-dialog.component.js +0 -40
  47. package/esm2015/lib/dialogs/save-snackbar/save-snackbar.component.js +0 -18
  48. package/esm2015/lib/selects/environment-select/environment-select.component.js +0 -47
  49. package/esm2015/lib/selects/product-select/product-select.component.js +0 -40
  50. package/esm2015/lib/selects/setting-select/setting-select.component.js +0 -47
  51. package/esm2015/lib/setting-item/setting-item.component.js +0 -121
  52. package/esm2015/lib/setting-list/setting/rollout-percentage-items/rollout-percentage-items.component.js +0 -87
  53. package/esm2015/lib/setting-list/setting/rollout-rules/rollout-rules.component.js +0 -287
  54. package/esm2015/lib/setting-list/setting/setting.component.js +0 -131
  55. package/esm2015/lib/setting-list/setting/value/value.component.js +0 -39
  56. package/esm2015/lib/setting-list/setting-list.component.js +0 -195
  57. package/fesm2015/ng-configcat-publicapi-ui.js +0 -1574
  58. package/fesm2015/ng-configcat-publicapi-ui.js.map +0 -1
@@ -1,1979 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('ng-configcat-publicapi'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/forms'), require('@angular/material/dialog'), require('@angular/material/form-field'), require('@angular/material/button'), require('@angular/material/input'), require('@angular/common'), require('@angular/router'), require('@angular/material/snack-bar'), require('@angular/material/icon'), require('@angular/cdk/drag-drop'), require('semver'), require('@angular/material/chips'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@angular/material/tooltip'), require('@angular/material/select'), require('@angular/platform-browser/animations'), require('@angular/material/menu')) :
3
- typeof define === 'function' && define.amd ? define('ng-configcat-publicapi-ui', ['exports', '@angular/core', 'ng-configcat-publicapi', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/forms', '@angular/material/dialog', '@angular/material/form-field', '@angular/material/button', '@angular/material/input', '@angular/common', '@angular/router', '@angular/material/snack-bar', '@angular/material/icon', '@angular/cdk/drag-drop', 'semver', '@angular/material/chips', '@angular/material/autocomplete', '@angular/material/core', '@angular/material/tooltip', '@angular/material/select', '@angular/platform-browser/animations', '@angular/material/menu'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ng-configcat-publicapi-ui"] = {}, global.ng.core, global["ng-configcat-publicapi"], global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.forms, global.ng.material.dialog, global.ng.material.formField, global.ng.material.button, global.ng.material.input, global.ng.common, global.ng.router, global.ng.material.snackBar, global.ng.material.icon, global.ng.cdk.dragDrop, global.semver, global.ng.material.chips, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.tooltip, global.ng.material.select, global.ng.platformBrowser.animations, global.ng.material.menu));
5
- })(this, (function (exports, i0, ngConfigcatPublicapi, i1, rxjs, operators, i2, i1$1, i3, i4, i5, i5$1, i3$1, i2$2, i2$1, i8, semver, i3$2, i4$1, i4$2, i5$2, i3$3, animations, menu) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
29
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
31
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
33
- var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
34
- var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
35
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
36
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
37
- var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
38
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
39
- var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
40
- var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
41
- var i3__namespace$3 = /*#__PURE__*/_interopNamespace(i3$3);
42
-
43
- /*! *****************************************************************************
44
- Copyright (c) Microsoft Corporation.
45
-
46
- Permission to use, copy, modify, and/or distribute this software for any
47
- purpose with or without fee is hereby granted.
48
-
49
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
50
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
51
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
52
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
53
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
54
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55
- PERFORMANCE OF THIS SOFTWARE.
56
- ***************************************************************************** */
57
- /* global Reflect, Promise */
58
- var extendStatics = function (d, b) {
59
- extendStatics = Object.setPrototypeOf ||
60
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
61
- function (d, b) { for (var p in b)
62
- if (Object.prototype.hasOwnProperty.call(b, p))
63
- d[p] = b[p]; };
64
- return extendStatics(d, b);
65
- };
66
- function __extends(d, b) {
67
- if (typeof b !== "function" && b !== null)
68
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
69
- extendStatics(d, b);
70
- function __() { this.constructor = d; }
71
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
72
- }
73
- var __assign = function () {
74
- __assign = Object.assign || function __assign(t) {
75
- for (var s, i = 1, n = arguments.length; i < n; i++) {
76
- s = arguments[i];
77
- for (var p in s)
78
- if (Object.prototype.hasOwnProperty.call(s, p))
79
- t[p] = s[p];
80
- }
81
- return t;
82
- };
83
- return __assign.apply(this, arguments);
84
- };
85
- function __rest(s, e) {
86
- var t = {};
87
- for (var p in s)
88
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
89
- t[p] = s[p];
90
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
91
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
92
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
93
- t[p[i]] = s[p[i]];
94
- }
95
- return t;
96
- }
97
- function __decorate(decorators, target, key, desc) {
98
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
99
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
100
- r = Reflect.decorate(decorators, target, key, desc);
101
- else
102
- for (var i = decorators.length - 1; i >= 0; i--)
103
- if (d = decorators[i])
104
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
105
- return c > 3 && r && Object.defineProperty(target, key, r), r;
106
- }
107
- function __param(paramIndex, decorator) {
108
- return function (target, key) { decorator(target, key, paramIndex); };
109
- }
110
- function __metadata(metadataKey, metadataValue) {
111
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
112
- return Reflect.metadata(metadataKey, metadataValue);
113
- }
114
- function __awaiter(thisArg, _arguments, P, generator) {
115
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
116
- return new (P || (P = Promise))(function (resolve, reject) {
117
- function fulfilled(value) { try {
118
- step(generator.next(value));
119
- }
120
- catch (e) {
121
- reject(e);
122
- } }
123
- function rejected(value) { try {
124
- step(generator["throw"](value));
125
- }
126
- catch (e) {
127
- reject(e);
128
- } }
129
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
130
- step((generator = generator.apply(thisArg, _arguments || [])).next());
131
- });
132
- }
133
- function __generator(thisArg, body) {
134
- var _ = { label: 0, sent: function () { if (t[0] & 1)
135
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
136
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
137
- function verb(n) { return function (v) { return step([n, v]); }; }
138
- function step(op) {
139
- if (f)
140
- throw new TypeError("Generator is already executing.");
141
- while (_)
142
- try {
143
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
144
- return t;
145
- if (y = 0, t)
146
- op = [op[0] & 2, t.value];
147
- switch (op[0]) {
148
- case 0:
149
- case 1:
150
- t = op;
151
- break;
152
- case 4:
153
- _.label++;
154
- return { value: op[1], done: false };
155
- case 5:
156
- _.label++;
157
- y = op[1];
158
- op = [0];
159
- continue;
160
- case 7:
161
- op = _.ops.pop();
162
- _.trys.pop();
163
- continue;
164
- default:
165
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
166
- _ = 0;
167
- continue;
168
- }
169
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
170
- _.label = op[1];
171
- break;
172
- }
173
- if (op[0] === 6 && _.label < t[1]) {
174
- _.label = t[1];
175
- t = op;
176
- break;
177
- }
178
- if (t && _.label < t[2]) {
179
- _.label = t[2];
180
- _.ops.push(op);
181
- break;
182
- }
183
- if (t[2])
184
- _.ops.pop();
185
- _.trys.pop();
186
- continue;
187
- }
188
- op = body.call(thisArg, _);
189
- }
190
- catch (e) {
191
- op = [6, e];
192
- y = 0;
193
- }
194
- finally {
195
- f = t = 0;
196
- }
197
- if (op[0] & 5)
198
- throw op[1];
199
- return { value: op[0] ? op[1] : void 0, done: true };
200
- }
201
- }
202
- var __createBinding = Object.create ? (function (o, m, k, k2) {
203
- if (k2 === undefined)
204
- k2 = k;
205
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
206
- }) : (function (o, m, k, k2) {
207
- if (k2 === undefined)
208
- k2 = k;
209
- o[k2] = m[k];
210
- });
211
- function __exportStar(m, o) {
212
- for (var p in m)
213
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
214
- __createBinding(o, m, p);
215
- }
216
- function __values(o) {
217
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
218
- if (m)
219
- return m.call(o);
220
- if (o && typeof o.length === "number")
221
- return {
222
- next: function () {
223
- if (o && i >= o.length)
224
- o = void 0;
225
- return { value: o && o[i++], done: !o };
226
- }
227
- };
228
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
229
- }
230
- function __read(o, n) {
231
- var m = typeof Symbol === "function" && o[Symbol.iterator];
232
- if (!m)
233
- return o;
234
- var i = m.call(o), r, ar = [], e;
235
- try {
236
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
237
- ar.push(r.value);
238
- }
239
- catch (error) {
240
- e = { error: error };
241
- }
242
- finally {
243
- try {
244
- if (r && !r.done && (m = i["return"]))
245
- m.call(i);
246
- }
247
- finally {
248
- if (e)
249
- throw e.error;
250
- }
251
- }
252
- return ar;
253
- }
254
- /** @deprecated */
255
- function __spread() {
256
- for (var ar = [], i = 0; i < arguments.length; i++)
257
- ar = ar.concat(__read(arguments[i]));
258
- return ar;
259
- }
260
- /** @deprecated */
261
- function __spreadArrays() {
262
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
263
- s += arguments[i].length;
264
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
265
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
266
- r[k] = a[j];
267
- return r;
268
- }
269
- function __spreadArray(to, from, pack) {
270
- if (pack || arguments.length === 2)
271
- for (var i = 0, l = from.length, ar; i < l; i++) {
272
- if (ar || !(i in from)) {
273
- if (!ar)
274
- ar = Array.prototype.slice.call(from, 0, i);
275
- ar[i] = from[i];
276
- }
277
- }
278
- return to.concat(ar || Array.prototype.slice.call(from));
279
- }
280
- function __await(v) {
281
- return this instanceof __await ? (this.v = v, this) : new __await(v);
282
- }
283
- function __asyncGenerator(thisArg, _arguments, generator) {
284
- if (!Symbol.asyncIterator)
285
- throw new TypeError("Symbol.asyncIterator is not defined.");
286
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
287
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
288
- function verb(n) { if (g[n])
289
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
290
- function resume(n, v) { try {
291
- step(g[n](v));
292
- }
293
- catch (e) {
294
- settle(q[0][3], e);
295
- } }
296
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
297
- function fulfill(value) { resume("next", value); }
298
- function reject(value) { resume("throw", value); }
299
- function settle(f, v) { if (f(v), q.shift(), q.length)
300
- resume(q[0][0], q[0][1]); }
301
- }
302
- function __asyncDelegator(o) {
303
- var i, p;
304
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
305
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
306
- }
307
- function __asyncValues(o) {
308
- if (!Symbol.asyncIterator)
309
- throw new TypeError("Symbol.asyncIterator is not defined.");
310
- var m = o[Symbol.asyncIterator], i;
311
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
312
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
313
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
314
- }
315
- function __makeTemplateObject(cooked, raw) {
316
- if (Object.defineProperty) {
317
- Object.defineProperty(cooked, "raw", { value: raw });
318
- }
319
- else {
320
- cooked.raw = raw;
321
- }
322
- return cooked;
323
- }
324
- ;
325
- var __setModuleDefault = Object.create ? (function (o, v) {
326
- Object.defineProperty(o, "default", { enumerable: true, value: v });
327
- }) : function (o, v) {
328
- o["default"] = v;
329
- };
330
- function __importStar(mod) {
331
- if (mod && mod.__esModule)
332
- return mod;
333
- var result = {};
334
- if (mod != null)
335
- for (var k in mod)
336
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
337
- __createBinding(result, mod, k);
338
- __setModuleDefault(result, mod);
339
- return result;
340
- }
341
- function __importDefault(mod) {
342
- return (mod && mod.__esModule) ? mod : { default: mod };
343
- }
344
- function __classPrivateFieldGet(receiver, state, kind, f) {
345
- if (kind === "a" && !f)
346
- throw new TypeError("Private accessor was defined without a getter");
347
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
348
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
349
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
350
- }
351
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
352
- if (kind === "m")
353
- throw new TypeError("Private method is not writable");
354
- if (kind === "a" && !f)
355
- throw new TypeError("Private accessor was defined without a setter");
356
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
357
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
358
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
359
- }
360
-
361
- var Configuration = /** @class */ (function () {
362
- function Configuration() {
363
- this.basePath = 'https://api.configcat.com';
364
- }
365
- return Configuration;
366
- }());
367
- Configuration.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: Configuration, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
368
- Configuration.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: Configuration });
369
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: Configuration, decorators: [{
370
- type: i0.Injectable
371
- }] });
372
-
373
- var PublicApiService = /** @class */ (function () {
374
- function PublicApiService(httpClient, configuration) {
375
- this.httpClient = httpClient;
376
- this.configuration = configuration;
377
- }
378
- PublicApiService.prototype.createMeService = function (basicAuthUsername, basicAuthPassword, basePath) {
379
- if (basicAuthUsername === void 0) { basicAuthUsername = null; }
380
- if (basicAuthPassword === void 0) { basicAuthPassword = null; }
381
- if (basePath === void 0) { basePath = null; }
382
- var _a, _b, _c;
383
- return new ngConfigcatPublicapi.MeService(this.httpClient, basePath !== null && basePath !== void 0 ? basePath : (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath, new ngConfigcatPublicapi.Configuration({
384
- username: basicAuthUsername !== null && basicAuthUsername !== void 0 ? basicAuthUsername : (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.basicAuthUsername,
385
- password: basicAuthPassword !== null && basicAuthPassword !== void 0 ? basicAuthPassword : (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.basicAuthPassword
386
- }));
387
- };
388
- PublicApiService.prototype.createProductsService = function (basicAuthUsername, basicAuthPassword, basePath) {
389
- if (basicAuthUsername === void 0) { basicAuthUsername = null; }
390
- if (basicAuthPassword === void 0) { basicAuthPassword = null; }
391
- if (basePath === void 0) { basePath = null; }
392
- var _a, _b, _c;
393
- return new ngConfigcatPublicapi.ProductsService(this.httpClient, basePath !== null && basePath !== void 0 ? basePath : (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath, new ngConfigcatPublicapi.Configuration({
394
- username: basicAuthUsername !== null && basicAuthUsername !== void 0 ? basicAuthUsername : (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.basicAuthUsername,
395
- password: basicAuthPassword !== null && basicAuthPassword !== void 0 ? basicAuthPassword : (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.basicAuthPassword
396
- }));
397
- };
398
- PublicApiService.prototype.createConfigsService = function (basicAuthUsername, basicAuthPassword, basePath) {
399
- if (basicAuthUsername === void 0) { basicAuthUsername = null; }
400
- if (basicAuthPassword === void 0) { basicAuthPassword = null; }
401
- if (basePath === void 0) { basePath = null; }
402
- var _a, _b, _c;
403
- return new ngConfigcatPublicapi.ConfigsService(this.httpClient, basePath !== null && basePath !== void 0 ? basePath : (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath, new ngConfigcatPublicapi.Configuration({
404
- username: basicAuthUsername !== null && basicAuthUsername !== void 0 ? basicAuthUsername : (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.basicAuthUsername,
405
- password: basicAuthPassword !== null && basicAuthPassword !== void 0 ? basicAuthPassword : (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.basicAuthPassword
406
- }));
407
- };
408
- PublicApiService.prototype.createEnvironmentsService = function (basicAuthUsername, basicAuthPassword, basePath) {
409
- if (basicAuthUsername === void 0) { basicAuthUsername = null; }
410
- if (basicAuthPassword === void 0) { basicAuthPassword = null; }
411
- if (basePath === void 0) { basePath = null; }
412
- var _a, _b, _c;
413
- return new ngConfigcatPublicapi.EnvironmentsService(this.httpClient, basePath !== null && basePath !== void 0 ? basePath : (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath, new ngConfigcatPublicapi.Configuration({
414
- username: basicAuthUsername !== null && basicAuthUsername !== void 0 ? basicAuthUsername : (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.basicAuthUsername,
415
- password: basicAuthPassword !== null && basicAuthPassword !== void 0 ? basicAuthPassword : (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.basicAuthPassword
416
- }));
417
- };
418
- PublicApiService.prototype.createSettingsService = function (basicAuthUsername, basicAuthPassword, basePath) {
419
- if (basicAuthUsername === void 0) { basicAuthUsername = null; }
420
- if (basicAuthPassword === void 0) { basicAuthPassword = null; }
421
- if (basePath === void 0) { basePath = null; }
422
- var _a, _b, _c;
423
- return new ngConfigcatPublicapi.FeatureFlagsSettingsService(this.httpClient, basePath !== null && basePath !== void 0 ? basePath : (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath, new ngConfigcatPublicapi.Configuration({
424
- username: basicAuthUsername !== null && basicAuthUsername !== void 0 ? basicAuthUsername : (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.basicAuthUsername,
425
- password: basicAuthPassword !== null && basicAuthPassword !== void 0 ? basicAuthPassword : (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.basicAuthPassword
426
- }));
427
- };
428
- PublicApiService.prototype.createSettingValuesService = function (basicAuthUsername, basicAuthPassword, basePath) {
429
- if (basicAuthUsername === void 0) { basicAuthUsername = null; }
430
- if (basicAuthPassword === void 0) { basicAuthPassword = null; }
431
- if (basePath === void 0) { basePath = null; }
432
- var _a, _b, _c;
433
- return new ngConfigcatPublicapi.FeatureFlagSettingValuesService(this.httpClient, basePath !== null && basePath !== void 0 ? basePath : (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath, new ngConfigcatPublicapi.Configuration({
434
- username: basicAuthUsername !== null && basicAuthUsername !== void 0 ? basicAuthUsername : (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.basicAuthUsername,
435
- password: basicAuthPassword !== null && basicAuthPassword !== void 0 ? basicAuthPassword : (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.basicAuthPassword
436
- }));
437
- };
438
- PublicApiService.prototype.createIntegrationLinksService = function (basicAuthUsername, basicAuthPassword, basePath) {
439
- if (basicAuthUsername === void 0) { basicAuthUsername = null; }
440
- if (basicAuthPassword === void 0) { basicAuthPassword = null; }
441
- if (basePath === void 0) { basePath = null; }
442
- var _a, _b, _c;
443
- return new ngConfigcatPublicapi.IntegrationLinksService(this.httpClient, basePath !== null && basePath !== void 0 ? basePath : (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath, new ngConfigcatPublicapi.Configuration({
444
- username: basicAuthUsername !== null && basicAuthUsername !== void 0 ? basicAuthUsername : (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.basicAuthUsername,
445
- password: basicAuthPassword !== null && basicAuthPassword !== void 0 ? basicAuthPassword : (_c = this.configuration) === null || _c === void 0 ? void 0 : _c.basicAuthPassword
446
- }));
447
- };
448
- return PublicApiService;
449
- }());
450
- PublicApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: PublicApiService, deps: [{ token: i1__namespace.HttpClient }, { token: Configuration, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
451
- PublicApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: PublicApiService, providedIn: 'root' });
452
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: PublicApiService, decorators: [{
453
- type: i0.Injectable,
454
- args: [{ providedIn: 'root' }]
455
- }], ctorParameters: function () {
456
- return [{ type: i1__namespace.HttpClient }, { type: Configuration, decorators: [{
457
- type: i0.Optional
458
- }] }];
459
- } });
460
-
461
- var BaseComponent = /** @class */ (function () {
462
- function BaseComponent(publicApiService) {
463
- this.publicApiService = publicApiService;
464
- this.basePath = null;
465
- this.basicAuthUsername = null;
466
- this.basicAuthPassword = null;
467
- }
468
- BaseComponent.prototype.createProductsService = function () {
469
- return this.publicApiService.createProductsService(this.basicAuthUsername, this.basicAuthPassword, this.basePath);
470
- };
471
- BaseComponent.prototype.createConfigsService = function () {
472
- return this.publicApiService.createConfigsService(this.basicAuthUsername, this.basicAuthPassword, this.basePath);
473
- };
474
- BaseComponent.prototype.createEnvironmentsService = function () {
475
- return this.publicApiService.createEnvironmentsService(this.basicAuthUsername, this.basicAuthPassword, this.basePath);
476
- };
477
- BaseComponent.prototype.createSettingsService = function () {
478
- return this.publicApiService.createSettingsService(this.basicAuthUsername, this.basicAuthPassword, this.basePath);
479
- };
480
- BaseComponent.prototype.createSettingValuesService = function () {
481
- return this.publicApiService.createSettingValuesService(this.basicAuthUsername, this.basicAuthPassword, this.basePath);
482
- };
483
- return BaseComponent;
484
- }());
485
- BaseComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: BaseComponent, deps: [{ token: PublicApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
486
- BaseComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: BaseComponent, selector: "base", inputs: { basePath: "basePath", basicAuthUsername: "basicAuthUsername", basicAuthPassword: "basicAuthPassword" }, ngImport: i0__namespace, template: '<div></div>', isInline: true });
487
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: BaseComponent, decorators: [{
488
- type: i0.Component,
489
- args: [{
490
- selector: 'base',
491
- template: '<div></div>'
492
- }]
493
- }], ctorParameters: function () { return [{ type: PublicApiService }]; }, propDecorators: { basePath: [{
494
- type: i0.Input
495
- }], basicAuthUsername: [{
496
- type: i0.Input
497
- }], basicAuthPassword: [{
498
- type: i0.Input
499
- }] } });
500
-
501
- var ReasonDialogComponent = /** @class */ (function () {
502
- function ReasonDialogComponent(dialogRef, formBuilder) {
503
- this.dialogRef = dialogRef;
504
- this.formBuilder = formBuilder;
505
- }
506
- ReasonDialogComponent.prototype.ngOnInit = function () {
507
- this.formGroup = this.formBuilder.group({
508
- reason: ['', [i2.Validators.required, i2.Validators.maxLength(1000)]]
509
- });
510
- };
511
- ReasonDialogComponent.prototype.handleSaveButton = function () {
512
- if (!this.formGroup.valid) {
513
- return;
514
- }
515
- this.dialogRef.close({ button: 'save', reason: this.formGroup.controls.reason.value });
516
- };
517
- ReasonDialogComponent.prototype.cancel = function () {
518
- this.dialogRef.close({ button: 'cancel' });
519
- };
520
- return ReasonDialogComponent;
521
- }());
522
- ReasonDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ReasonDialogComponent, deps: [{ token: i1__namespace$1.MatDialogRef }, { token: i2__namespace.FormBuilder }], target: i0__namespace.ɵɵFactoryTarget.Component });
523
- ReasonDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: ReasonDialogComponent, selector: "configcat-reason-dialog", ngImport: i0__namespace, template: "<h3 mat-dialog-title>Add notes</h3>\n<p>This will appear in the Why column of the Audit Log.</p>\n<form [formGroup]=\"formGroup\" (ngSubmit)=\"handleSaveButton()\">\n <div mat-dialog-content class=\"container\">\n <mat-form-field appearance=\"outline\">\n <mat-label></mat-label>\n <textarea matInput formControlName=\"reason\" name=\"reason\" placeholder=\"I'm changing settings because...\"\n rows=\"3\"></textarea>\n <mat-error *ngIf=\"formGroup.controls.reason.invalid\">The field is required.</mat-error>\n </mat-form-field>\n </div>\n <br>\n <div mat-dialog-actions>\n <button type=\"submit\" style=\"margin-right: 10px;\" mat-raised-button color=\"primary\">Add notes & Save</button>\n <button type=\"button\" mat-raised-button (click)=\"cancel()\">Cancel</button>\n </div>\n</form>", styles: [".container>*{width:100%}\n"], components: [{ type: i3__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3__namespace.MatLabel, selector: "mat-label" }, { type: i5__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatError, selector: "mat-error", inputs: ["id"] }, { type: i1__namespace$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
524
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ReasonDialogComponent, decorators: [{
525
- type: i0.Component,
526
- args: [{
527
- selector: 'configcat-reason-dialog',
528
- templateUrl: './reason-dialog.component.html',
529
- styleUrls: ['./reason-dialog.component.scss']
530
- }]
531
- }], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialogRef }, { type: i2__namespace.FormBuilder }]; } });
532
-
533
- var SaveSnackbarComponent = /** @class */ (function () {
534
- function SaveSnackbarComponent() {
535
- }
536
- SaveSnackbarComponent.prototype.ngOnInit = function () {
537
- };
538
- return SaveSnackbarComponent;
539
- }());
540
- SaveSnackbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SaveSnackbarComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
541
- SaveSnackbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: SaveSnackbarComponent, selector: "configcat-save-snackbar", ngImport: i0__namespace, template: "<p class=\"header\">Settings saved successfully.</p>", styles: ["p{text-align:center;font-weight:bold}.header{font-size:1.2em}\n"] });
542
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SaveSnackbarComponent, decorators: [{
543
- type: i0.Component,
544
- args: [{
545
- selector: 'configcat-save-snackbar',
546
- templateUrl: './save-snackbar.component.html',
547
- styleUrls: ['./save-snackbar.component.scss']
548
- }]
549
- }], ctorParameters: function () { return []; } });
550
-
551
- var ConcurrentDialogComponent = /** @class */ (function () {
552
- function ConcurrentDialogComponent(dialogRef) {
553
- this.dialogRef = dialogRef;
554
- }
555
- ConcurrentDialogComponent.prototype.ngOnInit = function () {
556
- };
557
- ConcurrentDialogComponent.prototype.save = function () {
558
- this.dialogRef.close({ button: 'save' });
559
- };
560
- ConcurrentDialogComponent.prototype.discard = function () {
561
- this.dialogRef.close({ button: 'discard' });
562
- };
563
- return ConcurrentDialogComponent;
564
- }());
565
- ConcurrentDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ConcurrentDialogComponent, deps: [{ token: i1__namespace$1.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
566
- ConcurrentDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: ConcurrentDialogComponent, selector: "configcat-concurrent-dialog", ngImport: i0__namespace, template: "<h3 mat-dialog-title>Concurrent update detected</h3>\n<p>\n Somebody updated the feature flags & settings while you were editing them.\n</p>\n<ul>\n <li>\n To discard your local changes and reload the updated values, click <strong>Discard my changes & reload</strong>\n </li>\n <li>\n To save you local values and overwrite the remote changes, click <strong>Save anyway</strong>\n </li>\n</ul>\n<p>For more info about the changes check the <a [routerLink]=\"['/auditlog']\" target=\"_blank\" rel=\"noopener noreferrer\" >audit logs</a> in a new tab.</p>\n<div mat-dialog-actions>\n <button type=\"button\" style=\"margin-right: 10px;\" mat-raised-button color=\"primary\" (click)=\"discard()\">Discard\n local changes & reload</button>\n <button type=\"button\" mat-raised-button (click)=\"save()\">Save anyway</button>\n</div>", styles: [""], components: [{ type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1__namespace$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
567
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ConcurrentDialogComponent, decorators: [{
568
- type: i0.Component,
569
- args: [{
570
- selector: 'configcat-concurrent-dialog',
571
- templateUrl: './concurrent-dialog.component.html',
572
- styleUrls: ['./concurrent-dialog.component.scss']
573
- }]
574
- }], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialogRef }]; } });
575
-
576
- var SettingListFormHelper = /** @class */ (function () {
577
- function SettingListFormHelper(formBuilder) {
578
- this.formBuilder = formBuilder;
579
- }
580
- SettingListFormHelper.prototype.createSettingValuesFormGroup = function (settingValuesModel) {
581
- var _this = this;
582
- var formGroup = this.formBuilder.group({
583
- settingValues: this.formBuilder.array(settingValuesModel.settingValues.map(function (sv) {
584
- return _this.createSettingValueFormGroup(sv, settingValuesModel.readOnly);
585
- })),
586
- // Decorator
587
- environment: this.formBuilder.group({
588
- environmentId: [{ value: settingValuesModel.environment.environmentId, disabled: true }],
589
- name: [{ value: settingValuesModel.environment.name, disabled: true }],
590
- }),
591
- comparisonAttributes: [[]],
592
- allRolloutRulesCount: [0]
593
- });
594
- var rolloutRules = this.getAllRolloutRules(formGroup);
595
- var comparisonAttributes = this.getComparisonAttributes(rolloutRules);
596
- formGroup.patchValue({ allRolloutRulesCount: rolloutRules.length });
597
- formGroup.patchValue({ comparisonAttributes: comparisonAttributes });
598
- return formGroup;
599
- };
600
- SettingListFormHelper.prototype.createSettingValueFormGroup = function (settingValueModel, readOnly) {
601
- var _this = this;
602
- if (!settingValueModel.setting) {
603
- return this.formBuilder.group({});
604
- }
605
- return this.formBuilder.group({
606
- settingId: [settingValueModel.setting.settingId],
607
- value: [
608
- { value: settingValueModel.value, disabled: readOnly },
609
- this.getValidatorsForSettingType(settingValueModel.setting.settingType)
610
- ],
611
- rolloutPercentageItems: settingValueModel.rolloutPercentageItems
612
- ? this.formBuilder.array(settingValueModel.rolloutPercentageItems.map(function (p) {
613
- // @ts-ignore()
614
- return _this.createRolloutPercentageItemFormGroup(p, readOnly, settingValueModel.setting.settingType);
615
- }))
616
- : this.formBuilder.array([]), rolloutRules: settingValueModel.rolloutRules
617
- ? this.formBuilder.array(settingValueModel.rolloutRules.map(function (r) {
618
- // @ts-ignore()
619
- return _this.createRolloutRuleFormGroup(r, readOnly, settingValueModel.setting.settingType);
620
- }))
621
- : this.formBuilder.array([]),
622
- updatedAt: [{ value: settingValueModel.updatedAt, disabled: true }],
623
- lastUpdaterUserEmail: [{ value: settingValueModel.lastUpdaterUserEmail, disabled: true }],
624
- lastUpdaterUserFullName: [{ value: settingValueModel.lastUpdaterUserFullName, disabled: true }],
625
- rolloutPercentageItemsSum: [{ value: 100, disabled: false }, [i2.Validators.min(100), i2.Validators.max(100)]],
626
- // Decoration
627
- setting: this.formBuilder.group({
628
- settingId: [{ value: settingValueModel.setting.settingId, disabled: true }],
629
- key: [{ value: settingValueModel.setting.key, disabled: true }],
630
- name: [{ value: settingValueModel.setting.name, disabled: true }],
631
- hint: [{ value: settingValueModel.setting.hint, disabled: true }],
632
- settingType: [{ value: settingValueModel.setting.settingType, disabled: true }],
633
- creatorEmail: [{ value: settingValueModel.setting.creatorEmail, disabled: true }],
634
- creatorFullName: [{ value: settingValueModel.setting.creatorFullName, disabled: true }],
635
- createdAt: [{ value: settingValueModel.setting.createdAt, disabled: true }]
636
- }),
637
- integrationLinks: settingValueModel.integrationLinks ? this.formBuilder.array(settingValueModel.integrationLinks.map(function (il) {
638
- return _this.formBuilder.group({
639
- key: [{ value: il.key, disabled: true }],
640
- description: [{ value: il.description, disabled: true }],
641
- integrationLinkType: [{ value: il.integrationLinkType, disabled: true }],
642
- url: [{ value: il.url, disabled: true }],
643
- });
644
- })) : this.formBuilder.array([])
645
- });
646
- };
647
- SettingListFormHelper.prototype.createRolloutPercentageItemFormGroup = function (p, readOnly, settingType) {
648
- return this.formBuilder.group({
649
- percentage: [{ value: p.percentage, disabled: readOnly }, [i2.Validators.required, i2.Validators.min(0), i2.Validators.max(100)]],
650
- value: [
651
- { value: p.value, disabled: readOnly },
652
- this.getValidatorsForSettingType(settingType)
653
- ],
654
- valueDisabled: [
655
- { value: p.value, disabled: true }, // For percentage item value
656
- ]
657
- });
658
- };
659
- SettingListFormHelper.prototype.createRolloutRuleFormGroup = function (r, readOnly, settingType) {
660
- return this.formBuilder.group({
661
- comparisonAttribute: [{ value: r.comparisonAttribute, disabled: readOnly }, [i2.Validators.required]],
662
- comparator: [{ value: r.comparator, disabled: readOnly }, [i2.Validators.required]],
663
- comparisonValue: [{ value: r.comparisonValue, disabled: readOnly }, [i2.Validators.required]],
664
- value: [
665
- { value: r.value, disabled: readOnly },
666
- this.getValidatorsForSettingType(settingType)
667
- ],
668
- });
669
- };
670
- SettingListFormHelper.prototype.getValidatorsForSettingType = function (settingType) {
671
- switch (settingType) {
672
- case ngConfigcatPublicapi.SettingType.Int:
673
- return [i2.Validators.required,
674
- i2.Validators.min(-2147483648), i2.Validators.max(2147483647), i2.Validators.pattern('^[-+]?[0-9]\\d*$')];
675
- case ngConfigcatPublicapi.SettingType.Double:
676
- return [i2.Validators.required, i2.Validators.min(-1.79769313486232E+308), i2.Validators.max(1.79769313486232E+308)];
677
- case ngConfigcatPublicapi.SettingType.String:
678
- case ngConfigcatPublicapi.SettingType.Boolean:
679
- return [i2.Validators.required];
680
- default:
681
- return [];
682
- }
683
- };
684
- SettingListFormHelper.prototype.getAllRolloutRules = function (formGroup) {
685
- var settingValues = formGroup.get('settingValues');
686
- var rolloutRules = settingValues.controls.map(function (cv) { return cv.get('rolloutRules').value; });
687
- return rolloutRules.length === 0 ? rolloutRules : rolloutRules.reduce(function (a, b) { return a.concat(b); });
688
- };
689
- SettingListFormHelper.prototype.getComparisonAttributes = function (rolloutRules) {
690
- if (rolloutRules.length > 0) {
691
- var currentComparisonAttributes = rolloutRules.map(function (r) { return r.comparisonAttribute; });
692
- var defaultComparisonAttributes_1 = ['Identifier', 'Email', 'Country'];
693
- var comparisonAttributes = currentComparisonAttributes.filter(function (c) { return defaultComparisonAttributes_1.indexOf(c) === -1; });
694
- return Array.from(new Set(comparisonAttributes));
695
- }
696
- else {
697
- return [];
698
- }
699
- };
700
- return SettingListFormHelper;
701
- }());
702
- SettingListFormHelper.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingListFormHelper, deps: [{ token: i2__namespace.FormBuilder }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
703
- SettingListFormHelper.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingListFormHelper, providedIn: 'root' });
704
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingListFormHelper, decorators: [{
705
- type: i0.Injectable,
706
- args: [{ providedIn: 'root' }]
707
- }], ctorParameters: function () { return [{ type: i2__namespace.FormBuilder }]; } });
708
-
709
- var ExpandDialogComponent = /** @class */ (function () {
710
- function ExpandDialogComponent(dialogRef, formBuilder, data) {
711
- this.dialogRef = dialogRef;
712
- this.formBuilder = formBuilder;
713
- this.data = data;
714
- }
715
- ExpandDialogComponent.prototype.ngOnInit = function () {
716
- var _this = this;
717
- if (this.data.multiline) {
718
- this.buildFormGroup();
719
- }
720
- else {
721
- this.formControlSubscription = this.data.control.valueChanges.subscribe(function (value) {
722
- _this.data.control.setValue(value, { onlySelf: true, emitEvent: false, emitModelToViewChange: true });
723
- _this.data.control.markAsDirty();
724
- }, function () { }, function () { });
725
- }
726
- };
727
- ExpandDialogComponent.prototype.values = function () {
728
- return this.formGroup.get('values');
729
- };
730
- ExpandDialogComponent.prototype.getValueControls = function () {
731
- return this.values().controls.map(function (c) { return c; });
732
- };
733
- ExpandDialogComponent.prototype.buildFormGroup = function () {
734
- var _this = this;
735
- var value = this.data.control.value ? this.data.control.value : '';
736
- var list = value.split(',').map(function (v) { return v.trim(); }).filter(function (v) { return !!v; });
737
- this.formGroup = this.formBuilder.group({
738
- values: this.formBuilder.array(list.map(function (v) { return _this.formBuilder.control(v); }))
739
- });
740
- this.formGroupSubscription = this.formGroup.valueChanges.subscribe(function (formGroupValue) {
741
- _this.data.control.setValue(formGroupValue.values
742
- .filter(function (v) { return !!v; })
743
- .join(','), { onlySelf: true, emitEvent: false, emitModelToViewChange: true });
744
- _this.data.control.updateValueAndValidity();
745
- _this.data.control.markAsDirty();
746
- });
747
- };
748
- ExpandDialogComponent.prototype.add = function () {
749
- this.formGroup.controls.values.push(this.formBuilder.control(''));
750
- };
751
- ExpandDialogComponent.prototype.remove = function (index) {
752
- this.formGroup.controls.values.removeAt(index);
753
- };
754
- ExpandDialogComponent.prototype.ngOnDestroy = function () {
755
- if (this.formControlSubscription) {
756
- this.formControlSubscription.unsubscribe();
757
- this.formControlSubscription = null;
758
- }
759
- if (this.formGroupSubscription) {
760
- this.formGroupSubscription.unsubscribe();
761
- this.formGroupSubscription = null;
762
- }
763
- };
764
- ExpandDialogComponent.prototype.close = function () {
765
- this.dialogRef.close();
766
- };
767
- return ExpandDialogComponent;
768
- }());
769
- ExpandDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ExpandDialogComponent, deps: [{ token: i1__namespace$1.MatDialogRef }, { token: i2__namespace.FormBuilder }, { token: i1$1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
770
- ExpandDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: ExpandDialogComponent, selector: "configcat-expand-dialog", ngImport: i0__namespace, template: "<div mat-dialog-content class=\"container\">\n\n <mat-form-field appearance=\"outline\" *ngIf=\"!data.multiline\">\n <mat-label></mat-label>\n <textarea matInput [formControl]=\"data.control\" rows=\"15\"></textarea>\n </mat-form-field>\n <div [formGroup]=\"formGroup\" *ngIf=\"data.multiline\">\n <div *ngFor=\"let valueControl of getValueControls(); let i = index;\"\n class=\"value-field\">\n <mat-form-field appearance=\"outline\">\n <input matInput [formControl]=\"valueControl\" rows=\"15\" />\n </mat-form-field>\n <button (click)=\"remove(i)\" mat-icon-button type=\"button\">\n <mat-icon>delete_outline</mat-icon>\n </button>\n </div>\n <button (click)=\"add()\" mat-icon-button type=\"button\">\n <mat-icon>add</mat-icon>\n </button>\n </div>\n</div>\n<div mat-dialog-actions>\n <button type=\"button\" mat-raised-button color=\"primary\" (click)=\"close()\">Done</button>\n</div>", styles: [".container>*{width:100%}.container>* .value-field{display:flex;font-size:12px;flex-wrap:nowrap}.container>* .value-field mat-form-field{flex-grow:1}\n"], components: [{ type: i3__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1__namespace$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatLabel, selector: "mat-label" }, { type: i5__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
771
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ExpandDialogComponent, decorators: [{
772
- type: i0.Component,
773
- args: [{
774
- selector: 'configcat-expand-dialog',
775
- templateUrl: './expand-dialog.component.html',
776
- styleUrls: ['./expand-dialog.component.scss']
777
- }]
778
- }], ctorParameters: function () {
779
- return [{ type: i1__namespace$1.MatDialogRef }, { type: i2__namespace.FormBuilder }, { type: undefined, decorators: [{
780
- type: i0.Inject,
781
- args: [i1$1.MAT_DIALOG_DATA]
782
- }] }];
783
- } });
784
-
785
- var ValueComponent = /** @class */ (function () {
786
- function ValueComponent(dialog) {
787
- this.dialog = dialog;
788
- this.SettingType = ngConfigcatPublicapi.SettingType;
789
- }
790
- ValueComponent.prototype.popOut = function () {
791
- this.dialog.open(ExpandDialogComponent, {
792
- width: '640px',
793
- data: { control: this.valueFormControl }
794
- });
795
- };
796
- return ValueComponent;
797
- }());
798
- ValueComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ValueComponent, deps: [{ token: i1__namespace$1.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
799
- ValueComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: ValueComponent, selector: "configcat-value", inputs: { valueFormControl: "valueFormControl", setting: "setting" }, ngImport: i0__namespace, template: "<div class=\"flex\">\n <div class=\"container\" [ngSwitch]=\"setting.settingType\">\n <div *ngSwitchCase=\"SettingType.String\" class=\"with-validation\">\n <span *ngIf=\"valueFormControl.invalid\" class=\"error\">*</span>\n <input [ngClass]=\"{'invalid': valueFormControl.invalid}\" type=\"text\"\n [formControl]=\"valueFormControl\" placeholder=\"my value\" name=\"value\">\n <div class=\"expand\" (click)=\"popOut()\" matTooltip=\"Pop-out Editor\">\n <mat-icon>height</mat-icon>\n </div>\n </div>\n <div *ngSwitchCase=\"SettingType.Int\" class=\"with-validation\">\n <span *ngIf=\"valueFormControl.invalid\" class=\"error\">*</span>\n <input [ngClass]=\"{'invalid': valueFormControl.invalid}\" type=\"number\" [formControl]=\"valueFormControl\"\n placeholder=\"42\" name=\"value\" />\n </div>\n <div *ngSwitchCase=\"SettingType.Double\" class=\"with-validation\">\n <span *ngIf=\"valueFormControl.invalid\" class=\"error\">*</span>\n <input [ngClass]=\"{'invalid': valueFormControl.invalid}\" type=\"number\" [formControl]=\"valueFormControl\"\n placeholder=\"3.14\" name=\"value\">\n </div>\n <div *ngSwitchCase=\"SettingType.Boolean\" class=\"toggle\">\n <label class=\"switch\">\n <input type=\"checkbox\" [formControl]=\"valueFormControl\" name=\"value\" />\n <span class=\"slider round\"></span>\n </label>\n </div>\n </div>\n <div *ngIf=\"setting.settingType === SettingType.Boolean\" class=\"spacer\"></div>\n\n</div>\n", styles: [".switch{position:relative;width:66px;height:30px;margin-left:4px;margin-top:0;margin-bottom:0}.switch input{display:none}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ff5252;transition:.4s;width:66px;height:30px}.slider:before{position:absolute;content:\"\";height:22px;width:22px;left:4px;bottom:4px;background-color:#fff;transition:.4s}input:checked+.slider{background-color:#9acd32}input:focus+.slider{box-shadow:0 0 1px #9acd32}input:checked+.slider:before{transform:translate(36px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}.slider:after{content:\"Off\";color:#fff;display:block;position:absolute;transform:translate(-14%,-50%);top:50%;left:50%;font-size:10px;font-family:Verdana,sans-serif}input:checked+.slider:after{content:\"On\";transform:translate(-91%,-50%)}\n", ".flex{display:flex;margin-right:20px;align-items:center}.flex .spacer{width:15px}.flex .container .with-validation{display:flex;flex-wrap:nowrap}.flex .container .toggle{width:66px;height:30px}.flex .container input{background-color:#fff;border:1px solid #e5e5e5;min-height:28px;font-size:15px;padding:0 30px 0 10px;font-family:Montserrat,Roboto,\"Helvetica Neue\",sans-serif;font-weight:300;min-width:170px}.flex .container .invalid{border:1px solid #ff5252}.flex .container .error{color:#ff5252;margin-right:5px}@media (max-width: 1200px){.flex .container input{min-width:auto}}.flex .variationId{margin-left:5px;cursor:pointer;color:#888;display:flex;align-items:center}.flex .expand{position:relative;top:2px;height:24px;cursor:pointer;margin-left:-28px;z-index:1;color:#b3b3b3;background-color:#fff}.flex .expand mat-icon{transform:rotate(45deg)}\n"], components: [{ type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i2__namespace.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2__namespace.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }] });
800
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ValueComponent, decorators: [{
801
- type: i0.Component,
802
- args: [{
803
- selector: 'configcat-value',
804
- templateUrl: './value.component.html',
805
- styleUrls: [
806
- './slider.scss',
807
- './value.component.scss'
808
- ]
809
- }]
810
- }], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialog }]; }, propDecorators: { valueFormControl: [{
811
- type: i0.Input
812
- }], setting: [{
813
- type: i0.Input
814
- }] } });
815
-
816
- var RolloutRulesComponent = /** @class */ (function () {
817
- function RolloutRulesComponent(dialog) {
818
- this.dialog = dialog;
819
- this.readOnly = false;
820
- this.SettingType = ngConfigcatPublicapi.SettingType;
821
- this.defaultComparisonAttributes = ['Identifier', 'Email', 'Country'];
822
- this.rolloutRuleComparators = [
823
- { value: ngConfigcatPublicapi.RolloutRuleComparator.IsOneOf, label: 'IS ONE OF' },
824
- { value: ngConfigcatPublicapi.RolloutRuleComparator.IsNotOneOf, label: 'IS NOT ONE OF' },
825
- { value: ngConfigcatPublicapi.RolloutRuleComparator.Contains, label: 'CONTAINS' },
826
- { value: ngConfigcatPublicapi.RolloutRuleComparator.DoesNotContain, label: 'DOES NOT CONTAIN' },
827
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsOneOf, label: 'IS ONE OF (SemVer)' },
828
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsNotOneOf, label: 'IS NOT ONE OF (SemVer)' },
829
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SemVerLess, label: '< (SemVer)' },
830
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SemVerLessOrEquals, label: '<= (SemVer)' },
831
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SemVerGreater, label: '> (SemVer)' },
832
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SemVerGreaterOrEquals, label: '>= (SemVer)' },
833
- { value: ngConfigcatPublicapi.RolloutRuleComparator.NumberEquals, label: '= (Number)' },
834
- { value: ngConfigcatPublicapi.RolloutRuleComparator.NumberDoesNotEqual, label: '!= (Number)' },
835
- { value: ngConfigcatPublicapi.RolloutRuleComparator.NumberLess, label: '< (Number)' },
836
- { value: ngConfigcatPublicapi.RolloutRuleComparator.NumberLessOrEquals, label: '<= (Number)' },
837
- { value: ngConfigcatPublicapi.RolloutRuleComparator.NumberGreater, label: '> (Number)' },
838
- { value: ngConfigcatPublicapi.RolloutRuleComparator.NumberGreaterOrEquals, label: '>= (Number)' },
839
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsOneOf, label: 'IS ONE OF (Sensitive)' },
840
- { value: ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsNotOneOf, label: 'IS NOT ONE OF (Sensitive)' },
841
- ];
842
- }
843
- RolloutRulesComponent.prototype.onlyFirstTooltip = function () {
844
- var _a;
845
- return ((_a = this.formGroup.root.get('allRolloutRulesCount')) === null || _a === void 0 ? void 0 : _a.value) > 20 || this.rolloutRules().controls.length > 10;
846
- };
847
- RolloutRulesComponent.prototype.setting = function () {
848
- var _a;
849
- return (_a = this.formGroup.get('setting')) === null || _a === void 0 ? void 0 : _a.value;
850
- };
851
- RolloutRulesComponent.prototype.rolloutRules = function () {
852
- return this.formGroup.get('rolloutRules');
853
- };
854
- RolloutRulesComponent.prototype.comparisonAttributes = function () {
855
- var _a;
856
- return (_a = this.formGroup.root.get('comparisonAttributes')) === null || _a === void 0 ? void 0 : _a.value;
857
- };
858
- RolloutRulesComponent.prototype.removeRule = function (index) {
859
- this.rolloutRules().removeAt(index);
860
- this.rolloutRules().markAsDirty();
861
- };
862
- RolloutRulesComponent.prototype.onDrop = function (event) {
863
- var rolloutRules = this.rolloutRules().controls;
864
- i8.moveItemInArray(rolloutRules, event.previousIndex, event.currentIndex);
865
- this.formGroup.markAsDirty();
866
- };
867
- RolloutRulesComponent.prototype.attributeChanged = function (event, comparisonAttribute) {
868
- if (this.defaultComparisonAttributes.indexOf(event.value) !== -1) {
869
- if (comparisonAttribute.value !== event.value) {
870
- comparisonAttribute.setValue(event.value);
871
- this.formGroup.markAsDirty();
872
- }
873
- }
874
- else {
875
- if (comparisonAttribute.value !== '') {
876
- comparisonAttribute.setValue('');
877
- this.formGroup.markAsDirty();
878
- }
879
- }
880
- };
881
- RolloutRulesComponent.prototype.getPlaceHolder = function (rolloutRule) {
882
- if (!rolloutRule.controls.comparisonAttribute.value) {
883
- return '';
884
- }
885
- switch (rolloutRule.controls.comparator.value) {
886
- case ngConfigcatPublicapi.RolloutRuleComparator.IsOneOf:
887
- case ngConfigcatPublicapi.RolloutRuleComparator.IsNotOneOf:
888
- case ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsOneOf:
889
- case ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsNotOneOf:
890
- switch (rolloutRule.controls.comparisonAttribute.value.toLowerCase()) {
891
- case 'identifier':
892
- return 'e.g: user_id1, user_id2, user_id3';
893
- case 'email':
894
- return 'e.g: jane@example.com, john@example.com';
895
- case 'country':
896
- return 'e.g: France, Brazil';
897
- default:
898
- return 'e.g: value1, value2, value3';
899
- }
900
- case ngConfigcatPublicapi.RolloutRuleComparator.Contains:
901
- case ngConfigcatPublicapi.RolloutRuleComparator.DoesNotContain:
902
- switch (rolloutRule.controls.comparisonAttribute.value.toLowerCase()) {
903
- case 'identifier':
904
- return 'part-of-id';
905
- case 'email':
906
- return 'e.g: @example.com';
907
- case 'country':
908
- return 'e.g: United';
909
- default:
910
- return 'e.g: any-part-of-your-value-string';
911
- }
912
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsOneOf:
913
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsNotOneOf:
914
- return 'e.g: 1.0.0, 2.0.1';
915
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerLessOrEquals:
916
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerLess:
917
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerGreater:
918
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerGreaterOrEquals:
919
- return 'e.g: 1.0.0';
920
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberEquals:
921
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberDoesNotEqual:
922
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberLess:
923
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberLessOrEquals:
924
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberGreater:
925
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberGreaterOrEquals:
926
- return 'e.g: 42';
927
- }
928
- return '';
929
- };
930
- RolloutRulesComponent.prototype.getComparisonValueType = function (rolloutRule) {
931
- switch (rolloutRule.controls.comparator.value) {
932
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberEquals:
933
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberDoesNotEqual:
934
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberLess:
935
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberLessOrEquals:
936
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberGreater:
937
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberGreaterOrEquals:
938
- return 'number';
939
- default:
940
- return 'text';
941
- }
942
- };
943
- RolloutRulesComponent.prototype.getInfoClass = function (rolloutRule) {
944
- if (!rolloutRule.controls.comparisonAttribute.value) {
945
- return 'info';
946
- }
947
- switch (rolloutRule.controls.comparator.value) {
948
- case ngConfigcatPublicapi.RolloutRuleComparator.IsOneOf:
949
- case ngConfigcatPublicapi.RolloutRuleComparator.IsNotOneOf:
950
- case ngConfigcatPublicapi.RolloutRuleComparator.Contains:
951
- case ngConfigcatPublicapi.RolloutRuleComparator.DoesNotContain:
952
- return 'warn';
953
- default:
954
- return 'info';
955
- }
956
- };
957
- RolloutRulesComponent.prototype.getInfoTooltip = function (rolloutRule) {
958
- if (!rolloutRule.controls.comparisonAttribute.value) {
959
- return 'Learn more about comparators';
960
- }
961
- switch (rolloutRule.controls.comparator.value) {
962
- case ngConfigcatPublicapi.RolloutRuleComparator.IsOneOf:
963
- case ngConfigcatPublicapi.RolloutRuleComparator.IsNotOneOf:
964
- case ngConfigcatPublicapi.RolloutRuleComparator.Contains:
965
- case ngConfigcatPublicapi.RolloutRuleComparator.DoesNotContain:
966
- return 'Consider using sensitive text comparators. Click to learn more.';
967
- default:
968
- return 'Click to learn more about comparators';
969
- }
970
- };
971
- RolloutRulesComponent.prototype.comparatorChanged = function (rolloutRule) {
972
- var validators = [];
973
- switch (rolloutRule.controls.comparator.value) {
974
- case ngConfigcatPublicapi.RolloutRuleComparator.IsOneOf:
975
- case ngConfigcatPublicapi.RolloutRuleComparator.IsNotOneOf:
976
- case ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsOneOf:
977
- case ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsNotOneOf:
978
- case ngConfigcatPublicapi.RolloutRuleComparator.Contains:
979
- case ngConfigcatPublicapi.RolloutRuleComparator.DoesNotContain:
980
- validators = [i2.Validators.required, i2.Validators.maxLength(65535)];
981
- break;
982
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsOneOf:
983
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsNotOneOf:
984
- validators = [i2.Validators.required, this.validateSemVerList];
985
- break;
986
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerLessOrEquals:
987
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerLess:
988
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerGreater:
989
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerGreaterOrEquals:
990
- validators = [i2.Validators.required, this.validateSemVer];
991
- break;
992
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberEquals:
993
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberDoesNotEqual:
994
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberLess:
995
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberLessOrEquals:
996
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberGreater:
997
- case ngConfigcatPublicapi.RolloutRuleComparator.NumberGreaterOrEquals:
998
- validators = [i2.Validators.required, i2.Validators.min(-1.79769313486232E+308), i2.Validators.max(1.79769313486232E+308)];
999
- break;
1000
- }
1001
- rolloutRule.controls.comparisonValue.setValidators(validators);
1002
- rolloutRule.controls.comparisonValue.updateValueAndValidity();
1003
- };
1004
- RolloutRulesComponent.prototype.isListType = function (rolloutRule) {
1005
- switch (rolloutRule.controls.comparator.value) {
1006
- case ngConfigcatPublicapi.RolloutRuleComparator.IsOneOf:
1007
- case ngConfigcatPublicapi.RolloutRuleComparator.IsNotOneOf:
1008
- case ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsOneOf:
1009
- case ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsNotOneOf:
1010
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsOneOf:
1011
- case ngConfigcatPublicapi.RolloutRuleComparator.SemVerIsNotOneOf:
1012
- return true;
1013
- default:
1014
- return false;
1015
- }
1016
- };
1017
- RolloutRulesComponent.prototype.validateSemVer = function (c) {
1018
- if (semver.valid(c.value) === null) {
1019
- return {
1020
- validateSemVer: {
1021
- valid: false
1022
- }
1023
- };
1024
- }
1025
- return null;
1026
- };
1027
- RolloutRulesComponent.prototype.validateSemVerList = function (c) {
1028
- if (!c.value) {
1029
- return {
1030
- validateSemVerList: {
1031
- valid: false
1032
- }
1033
- };
1034
- }
1035
- var semvers = c.value.split(',').map(function (s) { return s.trim(); });
1036
- if (semvers.find(function (s) { return s && s !== '' && semver.valid(s) === null; })) {
1037
- return {
1038
- validateSemVerList: {
1039
- valid: false
1040
- }
1041
- };
1042
- }
1043
- return null;
1044
- };
1045
- RolloutRulesComponent.prototype.popOut = function (rolloutRule) {
1046
- this.dialog.open(ExpandDialogComponent, {
1047
- width: '640px',
1048
- data: {
1049
- control: rolloutRule.controls.comparisonValue,
1050
- multiline: this.isListType(rolloutRule)
1051
- }
1052
- });
1053
- };
1054
- RolloutRulesComponent.prototype.trackByIndex = function (index) {
1055
- return index;
1056
- };
1057
- RolloutRulesComponent.prototype.getRolloutRuleValueFormControl = function (rolloutRule) {
1058
- return rolloutRule.controls.value;
1059
- };
1060
- RolloutRulesComponent.prototype.getRolloutRuleComparisonValueFormControl = function (rolloutRule) {
1061
- return rolloutRule.controls.comparisonValue;
1062
- };
1063
- RolloutRulesComponent.prototype.getRolloutRuleComparisonAttributeFormControl = function (rolloutRule) {
1064
- return rolloutRule.controls.comparisonAttribute;
1065
- };
1066
- RolloutRulesComponent.prototype.getRolloutRuleComparatorFormControl = function (rolloutRule) {
1067
- return rolloutRule.controls.comparator;
1068
- };
1069
- return RolloutRulesComponent;
1070
- }());
1071
- RolloutRulesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: RolloutRulesComponent, deps: [{ token: i1__namespace$1.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1072
- RolloutRulesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: RolloutRulesComponent, selector: "configcat-rollout-rules", inputs: { formGroup: "formGroup", readOnly: "readOnly" }, ngImport: i0__namespace, template: "<div [formGroup]=\"formGroup\">\n <div cdkDropList (cdkDropListDropped)=\"onDrop($event)\" [cdkDropListDisabled]=\"readOnly\"\n [cdkDropListData]=\"rolloutRules().controls\">\n <div *ngFor=\"let rolloutRule of rolloutRules().controls; trackBy: trackByIndex; let i = index\" cdkDrag>\n <div class=\"targeting-row\">\n <div class=\"fields flex\">\n <div class=\"drag-handle\" cdkDragHandle data-tooltip=\"Drag here to reorder\" *ngIf=\"!readOnly\">\n <mat-icon>drag_indicator</mat-icon>\n </div>\n <div class=\"if\">\n <mat-chip-list [class.spacing]=\"i === 0\">\n <mat-chip class=\"chip\">{{ i === 0 ? 'IF' : 'ELSE IF' }}</mat-chip>\n </mat-chip-list>\n <a href=\"https://configcat.com/docs/advanced/user-object\" target=\"_blank\"\n rel=\"noopener noreferrer\">user's</a>\n </div>\n\n <select class=\"custom-select attribute-select\" matTooltip=\"Comparison attribute\"\n matTooltipPosition=\"above\" [matTooltipDisabled]=\"onlyFirstTooltip() && i !== 0\"\n (change)=\"attributeChanged($event.target, getRolloutRuleComparisonAttributeFormControl(rolloutRule))\">\n <option *ngFor=\"let comparisonAttribute of defaultComparisonAttributes\"\n [selected]=\"comparisonAttribute === getRolloutRuleComparisonAttributeFormControl(rolloutRule).value\">\n {{comparisonAttribute}}</option>\n <option\n [selected]=\"defaultComparisonAttributes.indexOf(getRolloutRuleComparisonAttributeFormControl(rolloutRule).value) === -1\">\n Custom\n </option>\n </select>\n\n\n <span class=\"attribute-span\" data-tooltip=\"Custom user attribute\"\n [hidden]=\"defaultComparisonAttributes.indexOf(getRolloutRuleComparisonAttributeFormControl(rolloutRule).value) !== -1\">\n <span class=\"attribute-error\"\n *ngIf=\"getRolloutRuleComparisonAttributeFormControl(rolloutRule).invalid\">*</span>\n <input\n [ngClass]=\"{'invalid': getRolloutRuleComparisonAttributeFormControl(rolloutRule).invalid}\"\n type=\"text\" matInput [matAutocomplete]=\"auto\"\n [formControl]=\"getRolloutRuleComparisonAttributeFormControl(rolloutRule)\" class=\"attribute\"\n placeholder=\"e.g. Eye color\">\n </span>\n\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of comparisonAttributes()\" [value]=\"option\">\n {{option}}\n </mat-option>\n </mat-autocomplete>\n\n <div class=\"select-wrapper\">\n <select class=\"custom-select\" [formControl]=\"getRolloutRuleComparatorFormControl(rolloutRule)\"\n matTooltip=\"Comparator\" matTooltipPosition=\"above\"\n [matTooltipDisabled]=\"onlyFirstTooltip() && i !== 0\"\n (change)=\"comparatorChanged(rolloutRule)\">\n <optgroup label=\"SENSITIVE TEXT\">\n <option *ngFor=\"let comparator of rolloutRuleComparators.slice(16, 18)\"\n [ngValue]=\"comparator.value\">\n {{comparator.label}}\n </option>\n </optgroup>\n <optgroup label=\"TEXT\">\n <option *ngFor=\"let comparator of rolloutRuleComparators.slice(0, 4)\"\n [ngValue]=\"comparator.value\">\n {{comparator.label}}\n </option>\n </optgroup>\n <optgroup label=\"SEMANTIC VERSION\">\n <option *ngFor=\"let comparator of rolloutRuleComparators.slice(4, 10)\"\n [ngValue]=\"comparator.value\">\n {{comparator.label}}\n </option>\n </optgroup>\n <optgroup label=\"NUMBER\">\n <option *ngFor=\"let comparator of rolloutRuleComparators.slice(10, 16)\"\n [ngValue]=\"comparator.value\">\n {{comparator.label}}\n </option>\n </optgroup>\n </select>\n <div [class]=\"getInfoClass(rolloutRule)\" [matTooltip]=\"getInfoTooltip(rolloutRule)\"\n [matTooltipDisabled]=\"onlyFirstTooltip() && i !== 0\">\n <a href=\"https://configcat.com/docs/advanced/targeting/#comparator\" target=\"_blank\"\n rel=\"noopener noreferrer\">\n <mat-icon>info</mat-icon>\n </a>\n </div>\n </div>\n\n <div class=\"comparison-value\" data-tooltip=\"Comparison value\">\n <span class=\"error\"\n *ngIf=\"getRolloutRuleComparisonValueFormControl(rolloutRule).invalid\">*</span>\n\n <input [ngClass]=\"{'invalid': getRolloutRuleComparisonValueFormControl(rolloutRule).invalid}\"\n [formControl]=\"getRolloutRuleComparisonValueFormControl(rolloutRule)\"\n [type]=\"getComparisonValueType(rolloutRule)\" [placeholder]=\"getPlaceHolder(rolloutRule)\">\n <div class=\"expand\" matTooltip=\"Pop-out Editor\" (click)=\"popOut(rolloutRule)\"\n *ngIf=\"getComparisonValueType(rolloutRule)==='text'\">\n <mat-icon>height</mat-icon>\n </div>\n </div>\n\n <div class=\"delete\" matTooltip=\"Remove targeting rule\"\n [matTooltipDisabled]=\"onlyFirstTooltip() && i !== 0\" *ngIf=\"!readOnly\" (click)=\"removeRule(i)\">\n <mat-icon>cancel</mat-icon>\n </div>\n </div>\n <div class=\"value flex\">\n <div class=\"serve\" *ngIf=\"setting().settingType !== SettingType.Boolean\">\n <mat-chip-list>\n <mat-chip class=\"chip\">Serve:</mat-chip>\n </mat-chip-list>\n </div>\n\n <configcat-value class=\"served-value\"\n [valueFormControl]=\"getRolloutRuleValueFormControl(rolloutRule)\" [setting]=\"setting()\">\n </configcat-value>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [".cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.targeting-row{border:1px solid #d5d5d5;border-radius:4px;background-color:#fff;margin:.5em 1em;display:flex;position:relative;padding:.5em 0}.targeting-row .select-wrapper{position:relative}.targeting-row .info{position:absolute;cursor:pointer;top:-8px;left:166px}.targeting-row .info a{color:#7fb3fd}.targeting-row .info a:hover{color:#0068f0}.targeting-row .info mat-icon{font-size:18px}.targeting-row .warn{position:absolute;cursor:pointer;top:-8px;left:128px}.targeting-row .warn a{color:#fdc67f}.targeting-row .warn a:hover{color:#ff9200}.targeting-row .warn mat-icon{font-size:18px}.chip{background-color:#67b1fc3d}.fields{justify-content:left;max-width:1060px;flex-grow:100}.fields .if{display:flex;align-items:center}.fields .if>*{margin:0 .5em}.fields .if .spacing{margin-right:46px}.fields .attribute-span{margin-left:.5em}.fields .attribute{width:170px;background-color:#fff;border:1px solid #e5e5e5;min-height:28px;min-width:170px;font-size:15px;padding:0 10px;font-family:Montserrat,Roboto,\"Helvetica Neue\",sans-serif;font-weight:300}.fields .invalid{border:1px solid #ff5252}.fields .attribute-error{color:#ff5252;margin-right:5px}.fields .delete{position:absolute;color:#d6a9a9;cursor:pointer;top:-8px;right:-12px;z-index:999}.fields .delete:hover{color:#ed5251}.fields .delete mat-icon{font-size:20px}.fields .drag-handle{position:absolute;cursor:-moz-grab;left:-20px;top:14px}.fields .drag-handle mat-icon{font-size:20px}.fields .custom-select{margin-left:.5em;width:170px;background-color:#fff;border:1px solid #e5e5e5;min-height:30px;min-width:170px;font-size:.8em;padding:0 5px;font-family:Montserrat,Roboto,\"Helvetica Neue\",sans-serif;font-weight:300}.fields .attribute-select{min-width:100px;width:100px;margin-left:0}.fields .comparison-value{flex-grow:100;min-width:200px;display:flex;align-items:center;margin-left:.5em}.fields .comparison-value .error{color:#ff5252;margin:0 5px}.fields .comparison-value input{background-color:#fff;border:1px solid #e5e5e5;min-height:28px;min-width:170px;flex-grow:100;font-size:15px;padding:0 30px 0 10px;font-family:Montserrat,Roboto,\"Helvetica Neue\",sans-serif;font-weight:300}.fields .comparison-value .invalid{border:1px solid #ff5252}.value{margin-left:auto;flex-wrap:nowrap}.value .serve{margin:0 5px}.warn{padding-left:3em;font-size:.8em}.flex{display:flex;flex-wrap:wrap;align-items:center}.expand{position:absolute;right:2px;font-size:8px;cursor:pointer;margin-left:-28px;z-index:1;color:#b3b3b3;background-color:#fff}.expand mat-icon{transform:rotate(45deg)}@media (max-width: 1200px){.targeting-row{flex-wrap:wrap}.targeting-row .fields{max-width:500px}}@media (max-width: 700px){.targeting-row{flex-direction:column;margin:.5em .3em}.targeting-row .help{left:161px}.targeting-row .fields{flex-direction:column;align-items:stretch}.targeting-row .fields .custom-select{margin:0}.targeting-row .fields .comparison-value{margin:0}}\n"], components: [{ type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i4__namespace$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i4__namespace$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: ValueComponent, selector: "configcat-value", inputs: ["valueFormControl", "setting"] }], directives: [{ type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i3__namespace$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5__namespace$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i2__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4__namespace$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }] });
1073
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: RolloutRulesComponent, decorators: [{
1074
- type: i0.Component,
1075
- args: [{
1076
- selector: 'configcat-rollout-rules',
1077
- templateUrl: './rollout-rules.component.html',
1078
- styleUrls: ['./rollout-rules.component.scss']
1079
- }]
1080
- }], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialog }]; }, propDecorators: { formGroup: [{
1081
- type: i0.Input
1082
- }], readOnly: [{
1083
- type: i0.Input
1084
- }] } });
1085
-
1086
- var RolloutPercentageItemsComponent = /** @class */ (function () {
1087
- function RolloutPercentageItemsComponent() {
1088
- this.readOnly = false;
1089
- this.SettingType = ngConfigcatPublicapi.SettingType;
1090
- }
1091
- RolloutPercentageItemsComponent.prototype.setting = function () {
1092
- var _a;
1093
- return (_a = this.formGroup.get('setting')) === null || _a === void 0 ? void 0 : _a.value;
1094
- };
1095
- RolloutPercentageItemsComponent.prototype.rolloutRules = function () {
1096
- return this.formGroup.get('rolloutRules');
1097
- };
1098
- RolloutPercentageItemsComponent.prototype.rolloutPercentageItems = function () {
1099
- return this.formGroup.get('rolloutPercentageItems');
1100
- };
1101
- RolloutPercentageItemsComponent.prototype.rolloutPercentageItemsSum = function () {
1102
- return this.formGroup.get('rolloutPercentageItemsSum');
1103
- };
1104
- RolloutPercentageItemsComponent.prototype.value = function (rolloutPercentageItem) {
1105
- return this.setting().settingType === ngConfigcatPublicapi.SettingType.Boolean ?
1106
- rolloutPercentageItem.get('valueDisabled') :
1107
- rolloutPercentageItem.get('value');
1108
- };
1109
- RolloutPercentageItemsComponent.prototype.percentageChanged = function (index) {
1110
- if (this.rolloutPercentageItems().controls[index].value.percentage < 0) {
1111
- this.rolloutPercentageItems().controls[index].controls.percentage.setValue(0);
1112
- }
1113
- if (this.rolloutPercentageItems().controls[index].value.percentage > 100) {
1114
- this.rolloutPercentageItems().controls[index].controls.percentage.setValue(100);
1115
- }
1116
- if (this.rolloutPercentageItems().controls.length === 2) {
1117
- this.rolloutPercentageItems().controls[1 - index].controls.percentage
1118
- .setValue(100 - this.rolloutPercentageItems().controls[index].value.percentage);
1119
- }
1120
- this.updateSum();
1121
- };
1122
- RolloutPercentageItemsComponent.prototype.updateSum = function () {
1123
- if (this.rolloutPercentageItems().controls.length === 0) {
1124
- this.rolloutPercentageItemsSum().setValue(100);
1125
- }
1126
- else {
1127
- this.rolloutPercentageItemsSum().setValue(this.rolloutPercentageItems().controls.map(function (v) { return v.value.percentage; })
1128
- .reduce(function (a, b) { return a + b; }));
1129
- }
1130
- };
1131
- RolloutPercentageItemsComponent.prototype.removeRolloutPercentageItem = function (index) {
1132
- this.rolloutPercentageItems().removeAt(index);
1133
- this.rolloutPercentageItems().markAsDirty();
1134
- this.updateSum();
1135
- };
1136
- RolloutPercentageItemsComponent.prototype.removeAll = function () {
1137
- this.rolloutPercentageItems().clear();
1138
- this.rolloutPercentageItems().markAsDirty();
1139
- this.updateSum();
1140
- };
1141
- RolloutPercentageItemsComponent.prototype.getRolloutPercentageItemFormGroups = function () {
1142
- var _a, _b;
1143
- return (_b = (_a = this.rolloutPercentageItems()) === null || _a === void 0 ? void 0 : _a.controls) === null || _b === void 0 ? void 0 : _b.map(function (c) { return c; });
1144
- };
1145
- RolloutPercentageItemsComponent.prototype.getPercentageFormControl = function (rolloutPercentageItem) {
1146
- return rolloutPercentageItem.controls.percentage;
1147
- };
1148
- return RolloutPercentageItemsComponent;
1149
- }());
1150
- RolloutPercentageItemsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: RolloutPercentageItemsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1151
- RolloutPercentageItemsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: RolloutPercentageItemsComponent, selector: "configcat-rollout-percentage-items", inputs: { formGroup: "formGroup", readOnly: "readOnly" }, ngImport: i0__namespace, template: "<div class=\"percentage-wrapper\" [formGroup]=\"formGroup\">\n\n <div class=\"if\" *ngIf=\"rolloutRules().controls.length > 0\">\n <mat-chip-list>\n <mat-chip class=\"chip\">ELSE IF</mat-chip>\n </mat-chip-list>\n </div>\n <div class=\"grow\">\n <div class=\"percentage-row flex\"\n *ngFor=\"let rolloutPercentageItem of getRolloutPercentageItemFormGroups(); let i = index\">\n <div class=\"flex\">\n <input type=\"number\" [formControl]=\"getPercentageFormControl(rolloutPercentageItem)\"\n (input)=\"percentageChanged(i)\">%\n <span class=\"users\">of <a href=\"https://configcat.com/docs/advanced/user-object\" target=\"_blank\"\n rel=\"noopener noreferrer\">users</a>\n </span>\n </div>\n\n <div class=\"delete-option\" matTooltip=\"Remove this % option\"\n *ngIf=\"!readOnly && rolloutPercentageItems().controls.length > 2\"\n (click)=\"removeRolloutPercentageItem(i)\">\n <mat-icon>cancel</mat-icon>\n </div>\n\n <span data-tooltip=\"The sum of percentages must be equal to 100.\"\n *ngIf=\"(i === rolloutPercentageItems().controls.length -1) && (rolloutPercentageItemsSum().invalid)\">\n <mat-icon color=\"warn\">\n error_outline\n </mat-icon>\n </span>\n\n <div class=\"value flex\">\n <span class=\"value-name\" *ngIf=\"setting().settingType !== SettingType.Boolean\">Served value:</span>\n <configcat-value class=\"served-value\" [valueFormControl]=\"value(rolloutPercentageItem)\"\n [setting]=\"setting()\">\n </configcat-value>\n </div>\n <div class=\"delete\" matTooltip=\"Remove % options\" (click)=\"removeAll()\" *ngIf=\"!readOnly\">\n <mat-icon>cancel</mat-icon>\n </div>\n </div>\n </div>\n</div>", styles: [".percentage-wrapper{border:1px solid #d5d5d5;background-color:#fff;border-radius:4px;margin:.5em 1em;position:relative;padding:.5em 0;display:flex}.percentage-wrapper .delete{position:absolute;color:#d6a9a9;cursor:pointer;top:-8px;right:-12px}.percentage-wrapper .delete:hover{color:#ed5251}.percentage-wrapper .delete mat-icon{font-size:20px}.percentage-wrapper .delete-option{color:#d6a9a9;cursor:pointer;margin-left:1rem;margin-top:4px}.percentage-wrapper .delete-option:hover{color:#ed5251}.percentage-wrapper .delete-option mat-icon{font-size:20px}.if{display:flex;align-items:center}.if>*{margin:0 .5em}.if .spacing{margin-right:44px}.if .chip{background-color:#67b1fc3d}.grow{flex-grow:1}.percentage-row{min-height:40px;margin-left:.5em}.flex{display:flex;flex-wrap:wrap;align-items:center}.value{margin-left:auto;min-width:100px}.value .value-name{display:none}input{background-color:#fff;border:1px solid #e5e5e5;min-height:28px;width:40px;margin-right:5px;font-size:15px;padding:0 5px;font-family:Montserrat,Roboto,\"Helvetica Neue\",sans-serif;font-weight:300}.users{margin-left:20px}@media (max-width: 700px){.percentage-wrapper{margin:.5em .3em}}\n"], components: [{ type: i3__namespace$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: ValueComponent, selector: "configcat-value", inputs: ["valueFormControl", "setting"] }], directives: [{ type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
1152
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: RolloutPercentageItemsComponent, decorators: [{
1153
- type: i0.Component,
1154
- args: [{
1155
- selector: 'configcat-rollout-percentage-items',
1156
- templateUrl: './rollout-percentage-items.component.html',
1157
- styleUrls: ['./rollout-percentage-items.component.scss']
1158
- }]
1159
- }], ctorParameters: function () { return []; }, propDecorators: { formGroup: [{
1160
- type: i0.Input
1161
- }], readOnly: [{
1162
- type: i0.Input
1163
- }] } });
1164
-
1165
- var SettingComponent = /** @class */ (function () {
1166
- function SettingComponent(formHelper, cdRef) {
1167
- this.formHelper = formHelper;
1168
- this.cdRef = cdRef;
1169
- this.readOnly = false;
1170
- this.canEditSetting = false;
1171
- this.canDeleteSetting = false;
1172
- this.deleteSettingText = 'Delete setting';
1173
- this.showEnvironmentName = false;
1174
- this.editSettingRequested = new i0.EventEmitter();
1175
- this.deleteSettingRequested = new i0.EventEmitter();
1176
- this.rulesBeingRendered = false;
1177
- this.SettingType = ngConfigcatPublicapi.SettingType;
1178
- }
1179
- SettingComponent.prototype.ngOnInit = function () { };
1180
- SettingComponent.prototype.environment = function () {
1181
- var _a;
1182
- return (_a = this.formGroup.root.get('environment')) === null || _a === void 0 ? void 0 : _a.value;
1183
- };
1184
- SettingComponent.prototype.setting = function () {
1185
- var _a;
1186
- return (_a = this.formGroup.get('setting')) === null || _a === void 0 ? void 0 : _a.value;
1187
- };
1188
- SettingComponent.prototype.integrationLinks = function () {
1189
- return this.formGroup.get('integrationLinks');
1190
- };
1191
- SettingComponent.prototype.rolloutRules = function () {
1192
- return this.formGroup.get('rolloutRules');
1193
- };
1194
- SettingComponent.prototype.rolloutPercentageItems = function () {
1195
- return this.formGroup.get('rolloutPercentageItems');
1196
- };
1197
- SettingComponent.prototype.value = function () {
1198
- return this.formGroup.get('value');
1199
- };
1200
- SettingComponent.prototype.addRolloutRule = function () {
1201
- this.rolloutRules().push(this.formHelper.createRolloutRuleFormGroup({
1202
- comparisonAttribute: 'Identifier',
1203
- comparator: ngConfigcatPublicapi.RolloutRuleComparator.SensitiveIsOneOf,
1204
- comparisonValue: '',
1205
- value: this.setting().settingType === ngConfigcatPublicapi.SettingType.Boolean ? false : null
1206
- }, this.readOnly, this.setting().settingType));
1207
- this.rolloutRules().markAsDirty();
1208
- };
1209
- SettingComponent.prototype.removeRolloutRules = function () {
1210
- this.rolloutRules().clear();
1211
- this.rolloutRules().markAsDirty();
1212
- };
1213
- SettingComponent.prototype.addRolloutPercentageItem = function () {
1214
- if (this.rolloutPercentageItems().length === 0) {
1215
- switch (this.setting().settingType) {
1216
- case ngConfigcatPublicapi.SettingType.Boolean:
1217
- this.rolloutPercentageItems().push(this.formHelper.createRolloutPercentageItemFormGroup({
1218
- percentage: 0,
1219
- value: true
1220
- }, this.readOnly, this.setting().settingType));
1221
- this.rolloutPercentageItems().push(this.formHelper.createRolloutPercentageItemFormGroup({
1222
- percentage: 100,
1223
- value: false
1224
- }, this.readOnly, this.setting().settingType));
1225
- break;
1226
- case ngConfigcatPublicapi.SettingType.String:
1227
- case ngConfigcatPublicapi.SettingType.Int:
1228
- case ngConfigcatPublicapi.SettingType.Double:
1229
- for (var i = 0; i < 4; i++) {
1230
- this.rolloutPercentageItems().push(this.formHelper.createRolloutPercentageItemFormGroup({
1231
- percentage: 25,
1232
- value: null
1233
- }, this.readOnly, this.setting().settingType));
1234
- }
1235
- break;
1236
- }
1237
- }
1238
- else if (this.setting().settingType !== ngConfigcatPublicapi.SettingType.Boolean) {
1239
- this.rolloutPercentageItems().push(this.formHelper.createRolloutPercentageItemFormGroup({
1240
- percentage: 0,
1241
- value: null
1242
- }, this.readOnly, this.setting().settingType));
1243
- }
1244
- this.rolloutPercentageItems().markAsDirty();
1245
- };
1246
- SettingComponent.prototype.removeRolloutPercentageItems = function () {
1247
- this.rolloutPercentageItems().clear();
1248
- this.rolloutPercentageItems().markAsDirty();
1249
- };
1250
- SettingComponent.prototype.editSetting = function () {
1251
- this.editSettingRequested.emit({ setting: this.setting() });
1252
- };
1253
- SettingComponent.prototype.deleteSetting = function () {
1254
- this.deleteSettingRequested.emit({ setting: this.setting() });
1255
- };
1256
- return SettingComponent;
1257
- }());
1258
- SettingComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingComponent, deps: [{ token: SettingListFormHelper }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1259
- SettingComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: SettingComponent, selector: "setting", inputs: { formGroup: "formGroup", readOnly: "readOnly", canEditSetting: "canEditSetting", canDeleteSetting: "canDeleteSetting", deleteSettingText: "deleteSettingText", showEnvironmentName: "showEnvironmentName" }, outputs: { editSettingRequested: "editSettingRequested", deleteSettingRequested: "deleteSettingRequested" }, ngImport: i0__namespace, template: "<div class=\"setting-full\"\n [formGroup]=\"formGroup\">\n <div class=\"delete\" (click)=\"deleteSetting()\" *ngIf=\"canDeleteSetting\" [matTooltip]=\"deleteSettingText\"\n data-robot=\"deleteSetting\">\n <mat-icon>cancel</mat-icon>\n </div>\n <div class=\"setting-header flex\">\n <div class=\"setting-name flex\">\n <div class=\"name\" data-robot=\"settingName\">\n {{setting().name}}\n <span *ngIf=\"showEnvironmentName\"> ({{environment().name}})</span>\n </div>\n <div class=\"edit\" matTooltip=\"Edit name and description\" (click)=\"editSetting()\" *ngIf=\"canEditSetting\"\n data-robot=\"renameSetting\">\n <mat-icon>edit</mat-icon>\n </div>\n </div>\n </div>\n <div class=\"setting-content\">\n <div class=\"setting-details\">\n <div class=\"setting-key\"><code data-robot=\"settingKey\">{{setting().key}}</code></div>\n <span *ngIf=\"setting().hint\" class=\"description\">{{setting().hint}}</span>\n </div>\n\n <div class=\"rules-list\">\n <div>\n <configcat-rollout-rules *ngIf=\"rolloutRules().controls.length !== 0\" [formGroup]=\"formGroup\">\n </configcat-rollout-rules>\n </div>\n\n <configcat-rollout-percentage-items *ngIf=\"rolloutPercentageItems().controls.length !== 0\"\n [formGroup]=\"formGroup\">\n </configcat-rollout-percentage-items>\n\n <div class=\"all-other flex\">\n <div *ngIf=\"rolloutPercentageItems().length === 0 && rolloutRules().length !== 0\"\n data-tooltip=\"This value will be served to all users who the above rules don't apply.\">\n <mat-chip-list>\n <mat-chip class=\"chip\">To all other users, serve:</mat-chip>\n </mat-chip-list>\n </div>\n <div *ngIf=\"rolloutPercentageItems().length !== 0\"\n data-tooltip=\"This fallback value will be served in case the user can't be identified.\">\n <mat-chip-list>\n <mat-chip class=\"chip\">To unidentified users, serve:</mat-chip>\n </mat-chip-list>\n </div>\n <div *ngIf=\"rolloutPercentageItems().length === 0 && rolloutRules().length === 0\">\n <mat-chip-list>\n <mat-chip class=\"chip\">To all users, serve:</mat-chip>\n </mat-chip-list>\n </div>\n <configcat-value class=\"served-value\" [valueFormControl]=\"value()\" [setting]=\"setting()\">\n </configcat-value>\n </div>\n <div class=\"buttons\">\n <button type=\"button\" class=\"sige-button targeting-button\" (click)=\"addRolloutRule()\" *ngIf=\"!readOnly\">\n {{rolloutRules().length === 0 ? 'Target specific users' : 'Add new targeting rule'}}\n </button>\n <button type=\"button\" class=\"sige-button targeting-button\" (click)=\"addRolloutPercentageItem()\"\n *ngIf=\"!readOnly\"\n [disabled]=\"setting().settingType === SettingType.Boolean && rolloutPercentageItems().length !== 0\">\n {{rolloutPercentageItems().length === 0 ? 'Target % of users' : 'Add new % option'}}\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".setting-full{position:relative;display:flex;flex-wrap:nowrap;flex-direction:column;border-radius:3px}.setting-full .delete{position:absolute;right:-15px;top:-10px;color:#d6a9a9;cursor:pointer}.setting-full .delete:hover{color:#ed5251}.setting-full .delete mat-icon{font-size:20px}.setting-full .setting-header{padding:1.5em 1.5em 0}.setting-full .setting-header .setting-name{flex-direction:row}.setting-full .setting-header .setting-name:hover>.edit{visibility:visible}.setting-full .setting-header .setting-name .name{font-weight:bold;word-wrap:break-word;max-width:100%}.setting-full .setting-header .setting-name .edit{margin:5px 0 0 5px;cursor:pointer;visibility:hidden;color:gray}.setting-full .setting-header .setting-name .edit:hover{visibility:visible}.setting-full .setting-header .setting-name .edit mat-icon{font-size:18px}.setting-full .setting-header .setting-meta{margin-left:auto;margin-right:14px;font-size:.7em;color:gray}.setting-full .setting-content{display:flex}.setting-full .setting-content .setting-details{display:flex;flex-direction:column;width:400px;padding:0 0 1em 1em}.setting-full .setting-content .setting-details>*{margin:.5em}.setting-full .setting-content .setting-details .integrations{font-size:.8rem}.setting-full .setting-content .setting-details .integrations>div{margin:3px}.setting-full .setting-content .setting-details .integrations>div>a:hover{text-decoration:underline}.setting-full .setting-content .setting-details .setting-key{word-wrap:break-word}.setting-full .setting-content .setting-details .description{font-size:.8em;white-space:pre-wrap;word-wrap:break-word;max-width:300px}.setting-full .setting-content .setting-details code{background-color:#d3d3d3;padding:3px 6px}.setting-full .setting-content .rules-list{width:100%;padding:0 1em 1em}.setting-full .setting-content .targeting-button{margin-left:.5rem;margin-right:.5rem;margin-bottom:1em}.all-other{min-height:40px;justify-content:flex-start;border:1px solid #d5d5d5;border-radius:4px;background-color:#fff;margin:.5em 1em;padding:4px 0 4px .5em}.all-other .chip{background-color:#67b1fc3d}.all-other .served-value{margin-left:auto;min-width:100px}.end{margin-left:auto}.buttons{display:flex;margin-left:.5rem;margin-right:.5rem}.buttons .updated-date{font-size:.7em;margin-left:auto;margin-right:22px;color:gray}.flex{display:flex;flex-wrap:wrap;align-items:center}.show-hide-toggle{margin-left:1em;cursor:pointer}.show-hide-toggle a{font-size:.8rem}.sige-button{background-color:#d9eadc;color:#363636;cursor:pointer;justify-content:center;padding:.375em .75em;text-align:center;white-space:nowrap;border-radius:2px;font-size:.75rem;border:1px solid #dbdbdb;box-shadow:none;display:inline-flex;font-family:Montserrat,Roboto,\"Helvetica Neue\",sans-serif}.sige-button:hover{background-color:#bad0be}.sige-button:disabled{background-color:#fff;color:#b3b3b3}@media (max-width: 1200px){.setting-details{width:300px}}@media (max-width: 700px){.setting-full .setting-content{flex-wrap:wrap}.setting-full .setting-content .rules-list{padding:0}.buttons{flex-direction:column}.updated-date{display:none}.setting-details{padding:.2em 0 .2em .2em}.all-other{margin:.5em .3em}}\n"], components: [{ type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: RolloutRulesComponent, selector: "configcat-rollout-rules", inputs: ["formGroup", "readOnly"] }, { type: RolloutPercentageItemsComponent, selector: "configcat-rollout-percentage-items", inputs: ["formGroup", "readOnly"] }, { type: i3__namespace$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: ValueComponent, selector: "configcat-value", inputs: ["valueFormControl", "setting"] }], directives: [{ type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i3__namespace$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }] });
1260
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingComponent, decorators: [{
1261
- type: i0.Component,
1262
- args: [{
1263
- selector: 'setting',
1264
- templateUrl: './setting.component.html',
1265
- styleUrls: ['./setting.component.scss']
1266
- }]
1267
- }], ctorParameters: function () { return [{ type: SettingListFormHelper }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { formGroup: [{
1268
- type: i0.Input
1269
- }], readOnly: [{
1270
- type: i0.Input
1271
- }], canEditSetting: [{
1272
- type: i0.Input
1273
- }], canDeleteSetting: [{
1274
- type: i0.Input
1275
- }], deleteSettingText: [{
1276
- type: i0.Input
1277
- }], showEnvironmentName: [{
1278
- type: i0.Input
1279
- }], editSettingRequested: [{
1280
- type: i0.Output
1281
- }], deleteSettingRequested: [{
1282
- type: i0.Output
1283
- }] } });
1284
-
1285
- var SettingListComponent = /** @class */ (function () {
1286
- function SettingListComponent(formHelper, snackBar, dialog) {
1287
- this.formHelper = formHelper;
1288
- this.snackBar = snackBar;
1289
- this.dialog = dialog;
1290
- this.canEditSetting = false;
1291
- this.canDeleteSetting = false;
1292
- this.deleteSettingText = 'Delete setting';
1293
- this.showEnvironmentName = false;
1294
- this.editSettingRequested = new i0.EventEmitter();
1295
- this.deleteSettingRequested = new i0.EventEmitter();
1296
- this.formValuesChanged = new i0.EventEmitter();
1297
- this.loading = true;
1298
- this.submitting = false;
1299
- this.showRevertQuestion = false;
1300
- this.showFeedBackMessage = false;
1301
- this.readOnly = false;
1302
- }
1303
- SettingListComponent.prototype.ngOnInit = function () {
1304
- this.reloadSettingValues();
1305
- };
1306
- SettingListComponent.prototype.ngOnChanges = function () {
1307
- this.reloadSettingValues();
1308
- };
1309
- SettingListComponent.prototype.ngOnDestroy = function () {
1310
- if (this.formValuesChangedSubscription) {
1311
- this.formValuesChangedSubscription.unsubscribe();
1312
- this.formValuesChangedSubscription = null;
1313
- }
1314
- };
1315
- SettingListComponent.prototype.reloadSettingValues = function () {
1316
- var _this = this;
1317
- this.showFeedBackMessage = false;
1318
- this.loading = true;
1319
- this.loadSettingValues()
1320
- .subscribe(function (settingValues) {
1321
- _this.readOnly = settingValues.readOnly;
1322
- _this.settingValues = settingValues;
1323
- _this.createFormGroup();
1324
- _this.loading = false;
1325
- }, function (error) {
1326
- _this.snackBar.open('Ooops. We could not load your Feature Flags and Settings. Please try again or contact us.', 'Dismiss', { duration: 60000, panelClass: 'red-snackbar' });
1327
- });
1328
- };
1329
- SettingListComponent.prototype.createFormGroup = function () {
1330
- var _this = this;
1331
- this.formGroup = this.formHelper.createSettingValuesFormGroup(this.settingValues);
1332
- this.formValuesChangedSubscription = this.formGroup.valueChanges.subscribe(function () {
1333
- _this.formValuesChanged.emit();
1334
- });
1335
- };
1336
- SettingListComponent.prototype.settingValuesFormArray = function () {
1337
- return this.formGroup.get('settingValues');
1338
- };
1339
- SettingListComponent.prototype.getSettingValueFormGroups = function () {
1340
- return this.settingValuesFormArray().controls.map(function (c) { return c; });
1341
- };
1342
- SettingListComponent.prototype.submit = function () {
1343
- var _this = this;
1344
- if (!this.formGroup || !this.formGroup.valid) {
1345
- this.showFeedBackMessage = true;
1346
- this.formGroup.markAsTouched();
1347
- return;
1348
- }
1349
- this.showFeedBackMessage = false;
1350
- this.submitting = true;
1351
- var updateSettingValuesModel = {
1352
- settingValues: this.formGroup.controls.settingValues.value,
1353
- knownLastUpdatedAt: this.settingValues.lastUpdatedAt,
1354
- forced: false
1355
- };
1356
- if (this.settingValues.reasonRequired) {
1357
- var dialogRef = this.dialog.open(ReasonDialogComponent, {
1358
- width: '450px'
1359
- });
1360
- dialogRef.afterClosed()
1361
- .subscribe(function (result) {
1362
- if (result && result.button === 'save' && result.reason) {
1363
- updateSettingValuesModel.reason = result.reason;
1364
- _this.updateSettingValues(updateSettingValuesModel);
1365
- }
1366
- else {
1367
- _this.submitting = false;
1368
- }
1369
- });
1370
- return;
1371
- }
1372
- this.updateSettingValues(updateSettingValuesModel);
1373
- };
1374
- SettingListComponent.prototype.updateSettingValues = function (updateSettingValuesModel) {
1375
- var _this = this;
1376
- this.onSave(updateSettingValuesModel).subscribe(function (settingValues) {
1377
- _this.settingValues = settingValues;
1378
- _this.createFormGroup();
1379
- _this.submitting = false;
1380
- _this.snackBar.openFromComponent(SaveSnackbarComponent, { duration: 5000, panelClass: 'green-snackbar' });
1381
- }, function (error) {
1382
- if (error.status === 400 && error.error
1383
- && error.error.KnownLastUpdatedAt && error.error.KnownLastUpdatedAt[0] === 'Concurrent update') {
1384
- var dialogRef = _this.dialog.open(ConcurrentDialogComponent, {
1385
- width: '560px'
1386
- });
1387
- dialogRef.afterClosed()
1388
- .subscribe(function (result) {
1389
- if (result && result.button === 'save') {
1390
- updateSettingValuesModel.forced = true;
1391
- _this.updateSettingValues(updateSettingValuesModel);
1392
- }
1393
- else {
1394
- _this.reloadSettingValues();
1395
- _this.submitting = false;
1396
- }
1397
- });
1398
- return;
1399
- }
1400
- if (error.status === 400 && error.error && error.error.Reason && error.error.Reason[0] === 'Reason required') {
1401
- var dialogRef = _this.dialog.open(ReasonDialogComponent, {
1402
- width: '450px'
1403
- });
1404
- dialogRef.afterClosed()
1405
- .subscribe(function (result) {
1406
- if (result && result.button === 'save' && result.reason) {
1407
- updateSettingValuesModel.reason = result.reason;
1408
- _this.updateSettingValues(updateSettingValuesModel);
1409
- }
1410
- else {
1411
- _this.submitting = false;
1412
- }
1413
- });
1414
- return;
1415
- }
1416
- _this.formGroup.setErrors({ internalServerError: 'Internal server error' });
1417
- _this.showFeedBackMessage = true;
1418
- });
1419
- };
1420
- SettingListComponent.prototype.handleRevertYes = function () {
1421
- this.showRevertQuestion = false;
1422
- this.reloadSettingValues();
1423
- };
1424
- SettingListComponent.prototype.handleRevertCancel = function () {
1425
- this.showRevertQuestion = false;
1426
- };
1427
- SettingListComponent.prototype.onEditSettingRequested = function (setting) {
1428
- this.editSettingRequested.emit({
1429
- setting: setting.setting,
1430
- environment: this.settingValues.environment,
1431
- config: this.settingValues.config
1432
- });
1433
- };
1434
- SettingListComponent.prototype.onDeleteSettingRequested = function (setting) {
1435
- this.deleteSettingRequested.emit({
1436
- setting: setting.setting,
1437
- environment: this.settingValues.environment,
1438
- config: this.settingValues.config
1439
- });
1440
- };
1441
- return SettingListComponent;
1442
- }());
1443
- SettingListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingListComponent, deps: [{ token: SettingListFormHelper }, { token: i2__namespace$2.MatSnackBar }, { token: i1__namespace$1.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1444
- SettingListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: SettingListComponent, selector: "configcat-setting-list", inputs: { canEditSetting: "canEditSetting", canDeleteSetting: "canDeleteSetting", onSave: "onSave", loadSettingValues: "loadSettingValues", deleteSettingText: "deleteSettingText", showEnvironmentName: "showEnvironmentName" }, outputs: { editSettingRequested: "editSettingRequested", deleteSettingRequested: "deleteSettingRequested", formValuesChanged: "formValuesChanged" }, usesOnChanges: true, ngImport: i0__namespace, template: "<form [formGroup]=\"formGroup\" (ngSubmit)=\"submit()\" *ngIf=\"!loading\">\n <div class=\"wrapper\" *ngFor=\"let settingValueFromGroup of getSettingValueFormGroups(); let i = index\">\n <setting [formGroup]=\"settingValueFromGroup\" [readOnly]=\"readOnly\" [canEditSetting]=\"canEditSetting\"\n [canDeleteSetting]=\"canDeleteSetting\" (editSettingRequested)=\"onEditSettingRequested($event)\"\n (deleteSettingRequested)=\"onDeleteSettingRequested($event)\" [deleteSettingText]=\"deleteSettingText\"\n [showEnvironmentName]=\"showEnvironmentName\">\n </setting>\n </div>\n\n <div class=\"save\" *ngIf=\"!readOnly && !submitting && formGroup.dirty\">\n <div class=\"feedback\" *ngIf=\"formGroup.touched && formGroup.invalid && showFeedBackMessage\">\n <div class=\"error\" *ngIf=\"formGroup.errors && formGroup.errors.internalServerError\">\n <span>Something went wrong and we could not save your settings. You can try again or <a\n href=\"https://configcat.com/support\" target=\"_blank\" rel=\"noopener noreferrer\">contact us.</a></span>\n </div>\n <div class=\"error\" *ngIf=\"!formGroup.errors || !formGroup.errors.internalServerError\">\n <span>Oh no! A feature flag has invalid or missing data.</span>\n </div>\n </div>\n <button type=\"button\" mat-stroked-button *ngIf=\"!showRevertQuestion\" (click)=\"showRevertQuestion = true\">\n <mat-icon>history</mat-icon><span>Revert changes</span>\n </button>\n <div *ngIf=\"showRevertQuestion\">\n <span class=\"revert\">Revert to last saved state?</span>\n <button type=\"button\" class=\"yes\" mat-stroked-button (click)=\"handleRevertYes()\">Yes</button>\n <button type=\"button\" mat-stroked-button (click)=\"handleRevertCancel()\">No</button>\n </div>\n <button class=\"save-button\" mat-flat-button color=\"warn\" type=\"submit\" [disabled]=\"submitting\">\n <mat-icon>backup</mat-icon> <span> Save & publish changes</span>\n </button>\n </div>\n</form>", styles: [".wrapper{background-color:#f3f3f3;border:1px solid rgba(0,0,0,.12);border-radius:4px;margin:1em 0}.show-hide a{cursor:pointer;font-size:.8rem}.save{position:sticky;bottom:0;min-height:38px;padding:.5rem .5rem .5rem 0;background-color:#fff;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-end;z-index:1000}.save .save-button{animation:shadow-pulse 1s 3;margin-left:1rem}.save>*{margin:.3em}.save .revert{margin:0 16px;font-size:14px}.save .yes{margin:0 5px}.error{background-color:#a32b2d;color:#fff;padding:5px;font-size:.9em}.error a{color:#fff;text-decoration:underline}@media (max-width: 700px){.save{padding:.5rem 0}}\n"], components: [{ type: SettingComponent, selector: "setting", inputs: ["formGroup", "readOnly", "canEditSetting", "canDeleteSetting", "deleteSettingText", "showEnvironmentName"], outputs: ["editSettingRequested", "deleteSettingRequested"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1445
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingListComponent, decorators: [{
1446
- type: i0.Component,
1447
- args: [{
1448
- selector: 'configcat-setting-list',
1449
- templateUrl: './setting-list.component.html',
1450
- styleUrls: ['./setting-list.component.scss']
1451
- }]
1452
- }], ctorParameters: function () { return [{ type: SettingListFormHelper }, { type: i2__namespace$2.MatSnackBar }, { type: i1__namespace$1.MatDialog }]; }, propDecorators: { canEditSetting: [{
1453
- type: i0.Input
1454
- }], canDeleteSetting: [{
1455
- type: i0.Input
1456
- }], onSave: [{
1457
- type: i0.Input
1458
- }], loadSettingValues: [{
1459
- type: i0.Input
1460
- }], deleteSettingText: [{
1461
- type: i0.Input
1462
- }], showEnvironmentName: [{
1463
- type: i0.Input
1464
- }], editSettingRequested: [{
1465
- type: i0.Output
1466
- }], deleteSettingRequested: [{
1467
- type: i0.Output
1468
- }], formValuesChanged: [{
1469
- type: i0.Output
1470
- }] } });
1471
-
1472
- var SettingItemComponent = /** @class */ (function (_super) {
1473
- __extends(SettingItemComponent, _super);
1474
- function SettingItemComponent(publicApiService) {
1475
- var _this = _super.call(this, publicApiService) || this;
1476
- _this.canEditSetting = true;
1477
- _this.canDeleteSetting = true;
1478
- _this.deleteSettingText = 'Delete setting';
1479
- _this.showEnvironmentName = true;
1480
- _this.editSettingRequested = new i0.EventEmitter();
1481
- _this.deleteSettingRequested = new i0.EventEmitter();
1482
- _this.loadSucceeded = new i0.EventEmitter();
1483
- _this.loadFailed = new i0.EventEmitter();
1484
- _this.saveSucceeded = new i0.EventEmitter();
1485
- _this.saveFailed = new i0.EventEmitter();
1486
- _this.formValuesChanged = new i0.EventEmitter();
1487
- _this.loadSettingValues = function () {
1488
- return _this.createSettingValuesService().getSettingValue(_this.environmentId, _this.settingId)
1489
- .pipe(operators.map(function (settingValue) {
1490
- _this.settingValue = settingValue;
1491
- var settingValues = {
1492
- settingValues: [settingValue],
1493
- readOnly: settingValue.readOnly,
1494
- config: settingValue.config,
1495
- environment: settingValue.environment
1496
- };
1497
- _this.loadSucceeded.emit(settingValues);
1498
- return settingValues;
1499
- }), operators.catchError(function (error) {
1500
- _this.loadFailed.emit(error);
1501
- return rxjs.throwError(error);
1502
- }));
1503
- };
1504
- _this.handleSave = function (model) {
1505
- if (model.settingValues.length === 0) {
1506
- return rxjs.of();
1507
- }
1508
- var updateModel = model.settingValues[0];
1509
- return _this.createSettingValuesService().replaceSettingValue(_this.environmentId, _this.settingId, updateModel, model.reason)
1510
- .pipe(operators.map(function (settingValue) {
1511
- _this.settingValue = settingValue;
1512
- var settingValues = {
1513
- settingValues: [settingValue],
1514
- readOnly: settingValue.readOnly,
1515
- config: settingValue.config,
1516
- environment: settingValue.environment
1517
- };
1518
- _this.saveSucceeded.emit(settingValues);
1519
- return settingValues;
1520
- }), operators.catchError(function (error) {
1521
- _this.saveFailed.emit(error);
1522
- return rxjs.throwError(error);
1523
- }));
1524
- };
1525
- return _this;
1526
- }
1527
- SettingItemComponent.prototype.ngOnInit = function () {
1528
- };
1529
- SettingItemComponent.prototype.onEditSettingRequested = function (setting) {
1530
- this.editSettingRequested.emit({
1531
- setting: setting.setting,
1532
- environment: this.settingValue.environment,
1533
- config: this.settingValue.config
1534
- });
1535
- };
1536
- SettingItemComponent.prototype.onDeleteSettingRequested = function (setting) {
1537
- this.deleteSettingRequested.emit({
1538
- setting: setting.setting,
1539
- environment: this.settingValue.environment,
1540
- config: this.settingValue.config
1541
- });
1542
- };
1543
- SettingItemComponent.prototype.onFormValuesChanged = function () {
1544
- this.formValuesChanged.emit();
1545
- };
1546
- return SettingItemComponent;
1547
- }(BaseComponent));
1548
- SettingItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingItemComponent, deps: [{ token: PublicApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1549
- SettingItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: SettingItemComponent, selector: "configcat-setting-item", inputs: { productId: "productId", environmentId: "environmentId", configId: "configId", settingId: "settingId", canEditSetting: "canEditSetting", canDeleteSetting: "canDeleteSetting", deleteSettingText: "deleteSettingText", showEnvironmentName: "showEnvironmentName" }, outputs: { editSettingRequested: "editSettingRequested", deleteSettingRequested: "deleteSettingRequested", loadSucceeded: "loadSucceeded", loadFailed: "loadFailed", saveSucceeded: "saveSucceeded", saveFailed: "saveFailed", formValuesChanged: "formValuesChanged" }, usesInheritance: true, ngImport: i0__namespace, template: "<configcat-setting-list [canEditSetting]=\"canEditSetting\" [canDeleteSetting]=\"canDeleteSetting\"\n [onSave]=\"handleSave\" [loadSettingValues]=\"loadSettingValues\"\n (editSettingRequested)=\"onEditSettingRequested($event)\" (deleteSettingRequested)=\"onDeleteSettingRequested($event)\"\n [deleteSettingText]=\"deleteSettingText\"\n [showEnvironmentName]=\"showEnvironmentName\" (formValuesChanged)=\"onFormValuesChanged()\">\n</configcat-setting-list>", styles: [".container{font-family:Montserrat,Roboto,\"Helvetica Neue\",sans-serif;background-color:#f3f3f3;border:1px solid rgba(0,0,0,.12);border-radius:4px;margin:1em 0}.container .setting-full{position:relative;display:flex;flex-wrap:nowrap}.container .setting-full .setting-details{display:flex;flex-direction:column;width:400px;padding:1em 0 1em 1em}.container .setting-full .setting-details>*{margin:.5em}.container .setting-full .setting-details .setting-name{flex-direction:row}.container .setting-full .setting-details .setting-name .name{font-weight:bold;word-wrap:break-word;max-width:100%}.container .setting-full .setting-details .setting-key{word-wrap:break-word}.container .setting-full .setting-details .description{font-size:.8em}.container .setting-full .setting-details code{background-color:#d3d3d3;padding:3px 6px}.container .setting-full .rules-list{width:100%;padding:1em}.container .setting-full .targeting-button{margin-left:1rem;margin-bottom:1em}.all-other{min-height:40px;justify-content:flex-start;border:1px solid #d5d5d5;border-radius:4px;background-color:#fff;margin:.5em 1em;padding:4px 0 4px .5em}.all-other .chip{background-color:#67b1fc3d}.all-other .served-value{margin-left:auto;min-width:100px}.end{margin-left:auto}.flex{display:flex;flex-wrap:wrap;align-items:center}.show-hide-toggle{margin-left:1em;cursor:pointer}@media (max-width: 1200px){.setting-full .setting-details{width:300px}}@media (max-width: 700px){.setting-full{flex-wrap:wrap}.setting-full .setting-details{padding:.2em 0 .2em .2em}.setting-full .all-other{margin:.5em .3em}}\n"], components: [{ type: SettingListComponent, selector: "configcat-setting-list", inputs: ["canEditSetting", "canDeleteSetting", "onSave", "loadSettingValues", "deleteSettingText", "showEnvironmentName"], outputs: ["editSettingRequested", "deleteSettingRequested", "formValuesChanged"] }] });
1550
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingItemComponent, decorators: [{
1551
- type: i0.Component,
1552
- args: [{
1553
- selector: 'configcat-setting-item',
1554
- templateUrl: './setting-item.component.html',
1555
- styleUrls: ['./setting-item.component.scss']
1556
- }]
1557
- }], ctorParameters: function () { return [{ type: PublicApiService }]; }, propDecorators: { productId: [{
1558
- type: i0.Input
1559
- }], environmentId: [{
1560
- type: i0.Input
1561
- }], configId: [{
1562
- type: i0.Input
1563
- }], settingId: [{
1564
- type: i0.Input
1565
- }], canEditSetting: [{
1566
- type: i0.Input
1567
- }], canDeleteSetting: [{
1568
- type: i0.Input
1569
- }], deleteSettingText: [{
1570
- type: i0.Input
1571
- }], showEnvironmentName: [{
1572
- type: i0.Input
1573
- }], editSettingRequested: [{
1574
- type: i0.Output
1575
- }], deleteSettingRequested: [{
1576
- type: i0.Output
1577
- }], loadSucceeded: [{
1578
- type: i0.Output
1579
- }], loadFailed: [{
1580
- type: i0.Output
1581
- }], saveSucceeded: [{
1582
- type: i0.Output
1583
- }], saveFailed: [{
1584
- type: i0.Output
1585
- }], formValuesChanged: [{
1586
- type: i0.Output
1587
- }] } });
1588
-
1589
- var SettingSelectComponent = /** @class */ (function (_super) {
1590
- __extends(SettingSelectComponent, _super);
1591
- function SettingSelectComponent(publicApiService) {
1592
- var _this = _super.call(this, publicApiService) || this;
1593
- _this.settings = [];
1594
- return _this;
1595
- }
1596
- SettingSelectComponent.prototype.ngOnInit = function () {
1597
- this.settings = [];
1598
- this.reloadSettings();
1599
- };
1600
- SettingSelectComponent.prototype.ngOnChanges = function () {
1601
- this.reloadSettings();
1602
- };
1603
- SettingSelectComponent.prototype.reloadSettings = function () {
1604
- var _this = this;
1605
- if (this.configId) {
1606
- this.createSettingsService().getSettings(this.configId).subscribe(function (settings) {
1607
- _this.settings = settings;
1608
- if (_this.settings.length > 0) {
1609
- _this.valueFormControl.setValue(_this.settings[0].settingId);
1610
- }
1611
- });
1612
- }
1613
- };
1614
- return SettingSelectComponent;
1615
- }(BaseComponent));
1616
- SettingSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingSelectComponent, deps: [{ token: PublicApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1617
- SettingSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: SettingSelectComponent, selector: "configcat-setting-select", inputs: { valueFormControl: "valueFormControl", configId: "configId" }, usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<mat-form-field class=\"form-field\">\n <mat-select placeholder=\"Feature flag or setting\" [formControl]=\"valueFormControl\" *ngIf=\"settings\" name=\"value\">\n <mat-option *ngFor=\"let setting of settings\" [value]=\"setting.settingId\">{{setting.name}}\n </mat-option>\n </mat-select>\n</mat-form-field>", styles: [".form-field{width:100%}\n"], components: [{ type: i3__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3__namespace$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i4__namespace$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1618
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: SettingSelectComponent, decorators: [{
1619
- type: i0.Component,
1620
- args: [{
1621
- selector: 'configcat-setting-select',
1622
- templateUrl: './setting-select.component.html',
1623
- styleUrls: ['./setting-select.component.css']
1624
- }]
1625
- }], ctorParameters: function () { return [{ type: PublicApiService }]; }, propDecorators: { valueFormControl: [{
1626
- type: i0.Input
1627
- }], configId: [{
1628
- type: i0.Input
1629
- }] } });
1630
-
1631
- var ProductSelectComponent = /** @class */ (function (_super) {
1632
- __extends(ProductSelectComponent, _super);
1633
- function ProductSelectComponent(publicApiService) {
1634
- var _this = _super.call(this, publicApiService) || this;
1635
- _this.products = [];
1636
- return _this;
1637
- }
1638
- ProductSelectComponent.prototype.ngOnInit = function () {
1639
- var _this = this;
1640
- this.products = [];
1641
- this.createProductsService().getProducts().subscribe(function (products) {
1642
- _this.products = products;
1643
- if (_this.products.length > 0) {
1644
- _this.valueFormControl.setValue(_this.products[0].productId, {
1645
- emitEvent: true,
1646
- emitModelToViewChange: true, emitViewToModelChange: true
1647
- });
1648
- }
1649
- });
1650
- };
1651
- return ProductSelectComponent;
1652
- }(BaseComponent));
1653
- ProductSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ProductSelectComponent, deps: [{ token: PublicApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1654
- ProductSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: ProductSelectComponent, selector: "configcat-product-select", inputs: { valueFormControl: "valueFormControl" }, usesInheritance: true, ngImport: i0__namespace, template: "<mat-form-field class=\"form-field\">\n <mat-select placeholder=\"Product\" [formControl]=\"valueFormControl\" name=\"productValue\">\n <mat-option *ngFor=\"let product of products\" [value]=\"product.productId\">{{product.name}}\n </mat-option>\n </mat-select>\n</mat-form-field>", styles: [".form-field{width:100%}\n"], components: [{ type: i3__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3__namespace$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i4__namespace$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1655
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ProductSelectComponent, decorators: [{
1656
- type: i0.Component,
1657
- args: [{
1658
- selector: 'configcat-product-select',
1659
- templateUrl: './product-select.component.html',
1660
- styleUrls: ['./product-select.component.css']
1661
- }]
1662
- }], ctorParameters: function () { return [{ type: PublicApiService }]; }, propDecorators: { valueFormControl: [{
1663
- type: i0.Input
1664
- }] } });
1665
-
1666
- var ConfigSelectComponent = /** @class */ (function (_super) {
1667
- __extends(ConfigSelectComponent, _super);
1668
- function ConfigSelectComponent(publicApiService) {
1669
- var _this = _super.call(this, publicApiService) || this;
1670
- _this.configs = [];
1671
- return _this;
1672
- }
1673
- ConfigSelectComponent.prototype.ngOnInit = function () {
1674
- this.configs = [];
1675
- this.reloadConfigs();
1676
- };
1677
- ConfigSelectComponent.prototype.ngOnChanges = function () {
1678
- this.reloadConfigs();
1679
- };
1680
- ConfigSelectComponent.prototype.reloadConfigs = function () {
1681
- var _this = this;
1682
- if (this.productId) {
1683
- this.createConfigsService().getConfigs(this.productId).subscribe(function (configs) {
1684
- _this.configs = configs;
1685
- if (_this.configs.length > 0) {
1686
- _this.valueFormControl.setValue(_this.configs[0].configId);
1687
- }
1688
- });
1689
- }
1690
- };
1691
- return ConfigSelectComponent;
1692
- }(BaseComponent));
1693
- ConfigSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ConfigSelectComponent, deps: [{ token: PublicApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1694
- ConfigSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: ConfigSelectComponent, selector: "configcat-config-select", inputs: { valueFormControl: "valueFormControl", productId: "productId" }, providers: [
1695
- {
1696
- provide: i2.NG_VALUE_ACCESSOR,
1697
- useExisting: i0.forwardRef(function () { return ConfigSelectComponent; }),
1698
- multi: true
1699
- }
1700
- ], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<mat-form-field class=\"form-field\">\n <mat-select placeholder=\"Config\" [formControl]=\"valueFormControl\" *ngIf=\"configs\" name=\"value\">\n <mat-option *ngFor=\"let config of configs\" [value]=\"config.configId\">{{config.name}}</mat-option>\n </mat-select>\n</mat-form-field>", styles: [".form-field{width:100%}\n"], components: [{ type: i3__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3__namespace$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i4__namespace$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1701
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ConfigSelectComponent, decorators: [{
1702
- type: i0.Component,
1703
- args: [{
1704
- selector: 'configcat-config-select',
1705
- templateUrl: './config-select.component.html',
1706
- styleUrls: ['./config-select.component.css'],
1707
- providers: [
1708
- {
1709
- provide: i2.NG_VALUE_ACCESSOR,
1710
- useExisting: i0.forwardRef(function () { return ConfigSelectComponent; }),
1711
- multi: true
1712
- }
1713
- ]
1714
- }]
1715
- }], ctorParameters: function () { return [{ type: PublicApiService }]; }, propDecorators: { valueFormControl: [{
1716
- type: i0.Input
1717
- }], productId: [{
1718
- type: i0.Input
1719
- }] } });
1720
-
1721
- var EnvironmentSelectComponent = /** @class */ (function (_super) {
1722
- __extends(EnvironmentSelectComponent, _super);
1723
- function EnvironmentSelectComponent(publicApiService) {
1724
- var _this = _super.call(this, publicApiService) || this;
1725
- _this.environments = [];
1726
- return _this;
1727
- }
1728
- EnvironmentSelectComponent.prototype.ngOnInit = function () {
1729
- this.environments = [];
1730
- this.reloadEnvironments();
1731
- };
1732
- EnvironmentSelectComponent.prototype.ngOnChanges = function () {
1733
- this.reloadEnvironments();
1734
- };
1735
- EnvironmentSelectComponent.prototype.reloadEnvironments = function () {
1736
- var _this = this;
1737
- if (this.productId) {
1738
- this.createEnvironmentsService().getEnvironments(this.productId).subscribe(function (environments) {
1739
- _this.environments = environments;
1740
- if (_this.environments.length > 0) {
1741
- _this.valueFormControl.setValue(_this.environments[0].environmentId);
1742
- }
1743
- });
1744
- }
1745
- };
1746
- return EnvironmentSelectComponent;
1747
- }(BaseComponent));
1748
- EnvironmentSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: EnvironmentSelectComponent, deps: [{ token: PublicApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1749
- EnvironmentSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: EnvironmentSelectComponent, selector: "configcat-environment-select", inputs: { valueFormControl: "valueFormControl", productId: "productId" }, usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<mat-form-field class=\"form-field\">\n <mat-select placeholder=\"Environment\" [formControl]=\"valueFormControl\" *ngIf=\"environments\" name=\"value\">\n <mat-option *ngFor=\"let environment of environments\" [value]=\"environment.environmentId\">{{environment.name}}\n </mat-option>\n </mat-select>\n</mat-form-field>", styles: [".form-field{width:100%}\n"], components: [{ type: i3__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3__namespace$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i4__namespace$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1750
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: EnvironmentSelectComponent, decorators: [{
1751
- type: i0.Component,
1752
- args: [{
1753
- selector: 'configcat-environment-select',
1754
- templateUrl: './environment-select.component.html',
1755
- styleUrls: ['./environment-select.component.css']
1756
- }]
1757
- }], ctorParameters: function () { return [{ type: PublicApiService }]; }, propDecorators: { valueFormControl: [{
1758
- type: i0.Input
1759
- }], productId: [{
1760
- type: i0.Input
1761
- }] } });
1762
-
1763
- var FormHelper = /** @class */ (function () {
1764
- function FormHelper() {
1765
- }
1766
- FormHelper.getErrorMessage = function (control, hint) {
1767
- if (hint === void 0) { hint = ''; }
1768
- if (!control || control.valid) {
1769
- return;
1770
- }
1771
- if (control.hasError('required')) {
1772
- return hint + " The field is required.";
1773
- }
1774
- if (control.hasError('pattern')) {
1775
- return 'Not a valid e-mail address.';
1776
- }
1777
- if (control.hasError('minlength')) {
1778
- return 'The field must be at least ' + control.getError('minlength').requiredLength + ' characters long';
1779
- }
1780
- if (control.hasError('maxlength')) {
1781
- return 'The field must be at max ' + control.getError('maxlength').requiredLength + ' characters long';
1782
- }
1783
- return;
1784
- };
1785
- return FormHelper;
1786
- }());
1787
-
1788
- var AuthorizationComponent = /** @class */ (function () {
1789
- function AuthorizationComponent(formBuilder, publicApiService) {
1790
- this.formBuilder = formBuilder;
1791
- this.publicApiService = publicApiService;
1792
- this.basePath = null;
1793
- this.authorized = new i0.EventEmitter();
1794
- this.FormHelper = FormHelper;
1795
- }
1796
- AuthorizationComponent.prototype.ngOnInit = function () {
1797
- this.formGroup = this.formBuilder.group({
1798
- basicAuthUsername: ['', i2.Validators.required],
1799
- basicAuthPassword: ['', i2.Validators.required],
1800
- });
1801
- };
1802
- AuthorizationComponent.prototype.onSubmit = function () {
1803
- var _this = this;
1804
- if (!this.formGroup.valid) {
1805
- return;
1806
- }
1807
- var meService = this.publicApiService.createMeService(this.formGroup.controls.basicAuthUsername.value, this.formGroup.controls.basicAuthPassword.value, this.basePath);
1808
- meService.getMe().subscribe(function (me) {
1809
- _this.authorized.emit({
1810
- basicAuthUsername: _this.formGroup.controls.basicAuthUsername.value,
1811
- basicAuthPassword: _this.formGroup.controls.basicAuthPassword.value
1812
- });
1813
- }, function (error) {
1814
- _this.formGroup.setErrors({ invalidAuthorization: 'Invalid Basic auth user name or password' });
1815
- });
1816
- };
1817
- return AuthorizationComponent;
1818
- }());
1819
- AuthorizationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AuthorizationComponent, deps: [{ token: i2__namespace.FormBuilder }, { token: PublicApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1820
- AuthorizationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.12", type: AuthorizationComponent, selector: "configcat-authorization", inputs: { basePath: "basePath" }, outputs: { authorized: "authorized" }, ngImport: i0__namespace, template: "<form [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\n <div class=\"container\">\n <div class=\"form\">\n <p>\n <a href=\"https://app.configcat.com/my-account/public-api-credentials\" target=\"_blank\">\n Get your Basic Auth user name and password</a> to access ConfigCat Public API.\n <br /><br />\n <b>Note!</b> Your ConfigCat account's email address and password will not work here.\n </p>\n\n <mat-form-field class=\"form-field\">\n <mat-label>Basic auth user name</mat-label>\n <input matInput placeholder=\"Basic auth user name\" formControlName=\"basicAuthUsername\">\n <mat-error *ngIf=\"formGroup.controls.basicAuthUsername.invalid\">\n {{FormHelper.getErrorMessage(formGroup.controls.basicAuthUsername)}}\n </mat-error>\n </mat-form-field>\n <mat-form-field class=\"form-field\">\n <mat-label>Basic auth password</mat-label>\n <input matInput placeholder=\"Basic auth password\" formControlName=\"basicAuthPassword\" type=\"password\"\n autocomplete=\"current-password\">\n <mat-error *ngIf=\"formGroup.controls.basicAuthPassword.invalid\">\n {{FormHelper.getErrorMessage(formGroup.controls.basicAuthPassword)}}\n </mat-error>\n </mat-form-field>\n <div>\n <button mat-raised-button color=\"primary\" type=\"submit\" class=\"submit\">Authorize</button>\n <mat-error *ngIf=\"formGroup.invalid && formGroup.errors && formGroup.errors.invalidAuthorization\">\n {{formGroup.errors.invalidAuthorization}}</mat-error>\n </div>\n </div>\n </div>\n</form>", styles: [".container{display:flex;margin:8px}.form{width:100%}.form-field{width:100%;margin-bottom:8px}.submit{margin-top:8px;margin-bottom:8px}\n"], components: [{ type: i3__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i2__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.MatLabel, selector: "mat-label" }, { type: i5__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatError, selector: "mat-error", inputs: ["id"] }] });
1821
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AuthorizationComponent, decorators: [{
1822
- type: i0.Component,
1823
- args: [{
1824
- selector: 'configcat-authorization',
1825
- templateUrl: './authorization.component.html',
1826
- styleUrls: ['./authorization.component.scss']
1827
- }]
1828
- }], ctorParameters: function () { return [{ type: i2__namespace.FormBuilder }, { type: PublicApiService }]; }, propDecorators: { basePath: [{
1829
- type: i0.Input
1830
- }], authorized: [{
1831
- type: i0.Output
1832
- }] } });
1833
-
1834
- var NgConfigCatPublicApiUIModule = /** @class */ (function () {
1835
- function NgConfigCatPublicApiUIModule() {
1836
- }
1837
- NgConfigCatPublicApiUIModule.forRoot = function (configurationFactory) {
1838
- return {
1839
- ngModule: NgConfigCatPublicApiUIModule,
1840
- providers: [{ provide: Configuration, useFactory: configurationFactory }]
1841
- };
1842
- };
1843
- return NgConfigCatPublicApiUIModule;
1844
- }());
1845
- NgConfigCatPublicApiUIModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgConfigCatPublicApiUIModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1846
- NgConfigCatPublicApiUIModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgConfigCatPublicApiUIModule, declarations: [BaseComponent,
1847
- ProductSelectComponent,
1848
- ConfigSelectComponent,
1849
- EnvironmentSelectComponent,
1850
- SettingSelectComponent,
1851
- SettingItemComponent,
1852
- AuthorizationComponent,
1853
- SettingListComponent,
1854
- SettingComponent,
1855
- RolloutPercentageItemsComponent,
1856
- RolloutRulesComponent,
1857
- ValueComponent,
1858
- ReasonDialogComponent,
1859
- ConcurrentDialogComponent,
1860
- SaveSnackbarComponent,
1861
- ExpandDialogComponent], imports: [i5$1.CommonModule,
1862
- i2.FormsModule,
1863
- i2.ReactiveFormsModule,
1864
- animations.BrowserAnimationsModule,
1865
- i3.MatFormFieldModule,
1866
- i4$2.MatOptionModule,
1867
- i3$3.MatSelectModule,
1868
- i4.MatButtonModule,
1869
- i5.MatInputModule,
1870
- i2$1.MatIconModule,
1871
- i5$2.MatTooltipModule,
1872
- i3$2.MatChipsModule,
1873
- i4$1.MatAutocompleteModule,
1874
- i8.DragDropModule,
1875
- i3$1.RouterModule,
1876
- i2$2.MatSnackBarModule,
1877
- i1$1.MatDialogModule,
1878
- menu.MatMenuModule,
1879
- ngConfigcatPublicapi.ApiModule], exports: [AuthorizationComponent,
1880
- ProductSelectComponent,
1881
- ConfigSelectComponent,
1882
- EnvironmentSelectComponent,
1883
- SettingSelectComponent,
1884
- SettingItemComponent] });
1885
- NgConfigCatPublicApiUIModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgConfigCatPublicApiUIModule, imports: [[
1886
- i5$1.CommonModule,
1887
- i2.FormsModule,
1888
- i2.ReactiveFormsModule,
1889
- animations.BrowserAnimationsModule,
1890
- i3.MatFormFieldModule,
1891
- i4$2.MatOptionModule,
1892
- i3$3.MatSelectModule,
1893
- i4.MatButtonModule,
1894
- i5.MatInputModule,
1895
- i2$1.MatIconModule,
1896
- i5$2.MatTooltipModule,
1897
- i3$2.MatChipsModule,
1898
- i4$1.MatAutocompleteModule,
1899
- i8.DragDropModule,
1900
- i3$1.RouterModule,
1901
- i2$2.MatSnackBarModule,
1902
- i1$1.MatDialogModule,
1903
- menu.MatMenuModule,
1904
- ngConfigcatPublicapi.ApiModule
1905
- ]] });
1906
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgConfigCatPublicApiUIModule, decorators: [{
1907
- type: i0.NgModule,
1908
- args: [{
1909
- declarations: [
1910
- BaseComponent,
1911
- ProductSelectComponent,
1912
- ConfigSelectComponent,
1913
- EnvironmentSelectComponent,
1914
- SettingSelectComponent,
1915
- SettingItemComponent,
1916
- AuthorizationComponent,
1917
- SettingListComponent,
1918
- SettingComponent,
1919
- RolloutPercentageItemsComponent,
1920
- RolloutRulesComponent,
1921
- ValueComponent,
1922
- ReasonDialogComponent,
1923
- ConcurrentDialogComponent,
1924
- SaveSnackbarComponent,
1925
- ExpandDialogComponent
1926
- ],
1927
- imports: [
1928
- i5$1.CommonModule,
1929
- i2.FormsModule,
1930
- i2.ReactiveFormsModule,
1931
- animations.BrowserAnimationsModule,
1932
- i3.MatFormFieldModule,
1933
- i4$2.MatOptionModule,
1934
- i3$3.MatSelectModule,
1935
- i4.MatButtonModule,
1936
- i5.MatInputModule,
1937
- i2$1.MatIconModule,
1938
- i5$2.MatTooltipModule,
1939
- i3$2.MatChipsModule,
1940
- i4$1.MatAutocompleteModule,
1941
- i8.DragDropModule,
1942
- i3$1.RouterModule,
1943
- i2$2.MatSnackBarModule,
1944
- i1$1.MatDialogModule,
1945
- menu.MatMenuModule,
1946
- ngConfigcatPublicapi.ApiModule
1947
- ],
1948
- exports: [
1949
- AuthorizationComponent,
1950
- ProductSelectComponent,
1951
- ConfigSelectComponent,
1952
- EnvironmentSelectComponent,
1953
- SettingSelectComponent,
1954
- SettingItemComponent
1955
- ]
1956
- }]
1957
- }], ctorParameters: function () { return []; } });
1958
-
1959
- /*
1960
- * Public API Surface of ng-configcat-publicapi-ui
1961
- */
1962
-
1963
- /**
1964
- * Generated bundle index. Do not edit.
1965
- */
1966
-
1967
- exports.AuthorizationComponent = AuthorizationComponent;
1968
- exports.ConfigSelectComponent = ConfigSelectComponent;
1969
- exports.EnvironmentSelectComponent = EnvironmentSelectComponent;
1970
- exports.NgConfigCatPublicApiUIModule = NgConfigCatPublicApiUIModule;
1971
- exports.ProductSelectComponent = ProductSelectComponent;
1972
- exports.PublicApiService = PublicApiService;
1973
- exports.SettingItemComponent = SettingItemComponent;
1974
- exports.SettingSelectComponent = SettingSelectComponent;
1975
-
1976
- Object.defineProperty(exports, '__esModule', { value: true });
1977
-
1978
- }));
1979
- //# sourceMappingURL=ng-configcat-publicapi-ui.umd.js.map