@veloceapps/sdk 3.0.0 → 3.0.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.
- package/bundles/veloce-sdk.umd.js +1238 -1052
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/esm2015/src/components/header/header.component.js +16 -0
- package/esm2015/src/components/header/header.module.js +18 -0
- package/esm2015/src/flow-routing.module.js +15 -4
- package/esm2015/src/flow.component.js +18 -8
- package/esm2015/src/flow.module.js +5 -4
- package/esm2015/src/pages/debug/debug.component.js +15 -12
- package/esm2015/src/pages/shopping-cart/product.module.js +20 -0
- package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +82 -0
- package/esm2015/src/resolvers/flow.resolver.js +4 -4
- package/esm2015/src/services/flow.service.js +1 -1
- package/esm2015/src/services/router.service.js +36 -5
- package/esm2015/src/types/index.js +1 -2
- package/fesm2015/veloce-sdk.js +209 -45
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +3 -3
- package/src/components/header/header.component.d.ts +5 -0
- package/src/components/header/header.module.d.ts +8 -0
- package/src/flow-routing.module.d.ts +2 -1
- package/src/flow.component.d.ts +7 -2
- package/src/flow.module.d.ts +2 -1
- package/src/pages/debug/debug.component.d.ts +8 -8
- package/src/pages/shopping-cart/product.module.d.ts +10 -0
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +27 -0
- package/src/services/flow.service.d.ts +1 -1
- package/src/services/router.service.d.ts +14 -2
- package/src/types/index.d.ts +0 -1
- package/esm2015/src/types/flow.types.js +0 -2
- package/src/types/flow.types.d.ts +0 -5
|
@@ -1,1128 +1,1314 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/runtime'), require('@angular/router'), require('rxjs'), require('@veloce/core'), require('@angular/forms'), require('primeng/button'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('ngx-bootstrap/tooltip'), require('primeng/api'), require('@angular/common/http')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/runtime', '@angular/router', 'rxjs', '@veloce/core', '@angular/forms', 'primeng/button', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', 'ngx-bootstrap/tooltip', 'primeng/api', '@angular/common/http'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.runtime, global.ng.router, global.rxjs, global["@veloce/core"], global.ng.forms, global["primeng/button"], global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global["ngx-bootstrap/tooltip"], global["primeng/api"], global.ng.common.http));
|
|
5
|
+
})(this, (function (exports, i5, i0, i1$1, i2$1, i1$3, i2, i1, rxjs, core, i6, i4, i7, i5$1, operators, i1$2, i4$1, http) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
});
|
|
18
20
|
}
|
|
19
|
-
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
20
23
|
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
26
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
28
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
29
|
-
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
30
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
31
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
32
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
33
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
34
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
35
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
36
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
37
|
-
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
38
24
|
|
|
39
|
-
|
|
25
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
26
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
28
|
+
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
29
|
+
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
30
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
32
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
33
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
34
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
35
|
+
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
36
|
+
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
37
|
+
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
Copyright (c) Microsoft Corporation.
|
|
39
|
+
var VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
var FlowHeaderComponent = /** @class */ (function () {
|
|
42
|
+
function FlowHeaderComponent() {
|
|
43
|
+
}
|
|
44
|
+
return FlowHeaderComponent;
|
|
45
|
+
}());
|
|
46
|
+
FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
47
|
+
FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, template: "Flow Header\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;font-weight:bold;flex-shrink:0}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
48
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
|
|
49
|
+
type: i0.Component,
|
|
50
|
+
args: [{
|
|
51
|
+
selector: 'vl-flow-header',
|
|
52
|
+
templateUrl: './header.component.html',
|
|
53
|
+
styleUrls: ['./header.component.scss'],
|
|
54
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
55
|
+
}]
|
|
56
|
+
}] });
|
|
46
57
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
50
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
51
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
52
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
53
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
54
|
-
***************************************************************************** */
|
|
55
|
-
/* global Reflect, Promise */
|
|
56
|
-
var extendStatics = function (d, b) {
|
|
57
|
-
extendStatics = Object.setPrototypeOf ||
|
|
58
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
59
|
-
function (d, b) { for (var p in b)
|
|
60
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
61
|
-
d[p] = b[p]; };
|
|
62
|
-
return extendStatics(d, b);
|
|
63
|
-
};
|
|
64
|
-
function __extends(d, b) {
|
|
65
|
-
if (typeof b !== "function" && b !== null)
|
|
66
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
67
|
-
extendStatics(d, b);
|
|
68
|
-
function __() { this.constructor = d; }
|
|
69
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
70
|
-
}
|
|
71
|
-
var __assign = function () {
|
|
72
|
-
__assign = Object.assign || function __assign(t) {
|
|
73
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
74
|
-
s = arguments[i];
|
|
75
|
-
for (var p in s)
|
|
76
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
77
|
-
t[p] = s[p];
|
|
58
|
+
var FlowHeaderModule = /** @class */ (function () {
|
|
59
|
+
function FlowHeaderModule() {
|
|
78
60
|
}
|
|
79
|
-
return
|
|
61
|
+
return FlowHeaderModule;
|
|
62
|
+
}());
|
|
63
|
+
FlowHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
64
|
+
FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i5.CommonModule], exports: [FlowHeaderComponent] });
|
|
65
|
+
FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i5.CommonModule]] });
|
|
66
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, decorators: [{
|
|
67
|
+
type: i0.NgModule,
|
|
68
|
+
args: [{
|
|
69
|
+
declarations: [FlowHeaderComponent],
|
|
70
|
+
imports: [i5.CommonModule],
|
|
71
|
+
exports: [FlowHeaderComponent],
|
|
72
|
+
}]
|
|
73
|
+
}] });
|
|
74
|
+
|
|
75
|
+
/*! *****************************************************************************
|
|
76
|
+
Copyright (c) Microsoft Corporation.
|
|
77
|
+
|
|
78
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
79
|
+
purpose with or without fee is hereby granted.
|
|
80
|
+
|
|
81
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
82
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
83
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
84
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
85
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
86
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
87
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
88
|
+
***************************************************************************** */
|
|
89
|
+
/* global Reflect, Promise */
|
|
90
|
+
var extendStatics = function (d, b) {
|
|
91
|
+
extendStatics = Object.setPrototypeOf ||
|
|
92
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
93
|
+
function (d, b) { for (var p in b)
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
95
|
+
d[p] = b[p]; };
|
|
96
|
+
return extendStatics(d, b);
|
|
80
97
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
function __decorate(decorators, target, key, desc) {
|
|
96
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
97
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
98
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
99
|
-
else
|
|
100
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
101
|
-
if (d = decorators[i])
|
|
102
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
103
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
104
|
-
}
|
|
105
|
-
function __param(paramIndex, decorator) {
|
|
106
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
107
|
-
}
|
|
108
|
-
function __metadata(metadataKey, metadataValue) {
|
|
109
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
110
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
111
|
-
}
|
|
112
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
113
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
114
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
115
|
-
function fulfilled(value) { try {
|
|
116
|
-
step(generator.next(value));
|
|
117
|
-
}
|
|
118
|
-
catch (e) {
|
|
119
|
-
reject(e);
|
|
120
|
-
} }
|
|
121
|
-
function rejected(value) { try {
|
|
122
|
-
step(generator["throw"](value));
|
|
123
|
-
}
|
|
124
|
-
catch (e) {
|
|
125
|
-
reject(e);
|
|
126
|
-
} }
|
|
127
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
128
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function __generator(thisArg, body) {
|
|
132
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
133
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
134
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
135
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
136
|
-
function step(op) {
|
|
137
|
-
if (f)
|
|
138
|
-
throw new TypeError("Generator is already executing.");
|
|
139
|
-
while (_)
|
|
140
|
-
try {
|
|
141
|
-
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)
|
|
142
|
-
return t;
|
|
143
|
-
if (y = 0, t)
|
|
144
|
-
op = [op[0] & 2, t.value];
|
|
145
|
-
switch (op[0]) {
|
|
146
|
-
case 0:
|
|
147
|
-
case 1:
|
|
148
|
-
t = op;
|
|
149
|
-
break;
|
|
150
|
-
case 4:
|
|
151
|
-
_.label++;
|
|
152
|
-
return { value: op[1], done: false };
|
|
153
|
-
case 5:
|
|
154
|
-
_.label++;
|
|
155
|
-
y = op[1];
|
|
156
|
-
op = [0];
|
|
157
|
-
continue;
|
|
158
|
-
case 7:
|
|
159
|
-
op = _.ops.pop();
|
|
160
|
-
_.trys.pop();
|
|
161
|
-
continue;
|
|
162
|
-
default:
|
|
163
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
164
|
-
_ = 0;
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
168
|
-
_.label = op[1];
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
172
|
-
_.label = t[1];
|
|
173
|
-
t = op;
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
if (t && _.label < t[2]) {
|
|
177
|
-
_.label = t[2];
|
|
178
|
-
_.ops.push(op);
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
if (t[2])
|
|
182
|
-
_.ops.pop();
|
|
183
|
-
_.trys.pop();
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
op = body.call(thisArg, _);
|
|
187
|
-
}
|
|
188
|
-
catch (e) {
|
|
189
|
-
op = [6, e];
|
|
190
|
-
y = 0;
|
|
98
|
+
function __extends(d, b) {
|
|
99
|
+
if (typeof b !== "function" && b !== null)
|
|
100
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
101
|
+
extendStatics(d, b);
|
|
102
|
+
function __() { this.constructor = d; }
|
|
103
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
104
|
+
}
|
|
105
|
+
var __assign = function () {
|
|
106
|
+
__assign = Object.assign || function __assign(t) {
|
|
107
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
108
|
+
s = arguments[i];
|
|
109
|
+
for (var p in s)
|
|
110
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
111
|
+
t[p] = s[p];
|
|
191
112
|
}
|
|
192
|
-
|
|
193
|
-
|
|
113
|
+
return t;
|
|
114
|
+
};
|
|
115
|
+
return __assign.apply(this, arguments);
|
|
116
|
+
};
|
|
117
|
+
function __rest(s, e) {
|
|
118
|
+
var t = {};
|
|
119
|
+
for (var p in s)
|
|
120
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
121
|
+
t[p] = s[p];
|
|
122
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
123
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
124
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
125
|
+
t[p[i]] = s[p[i]];
|
|
194
126
|
}
|
|
195
|
-
|
|
196
|
-
throw op[1];
|
|
197
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
127
|
+
return t;
|
|
198
128
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
return
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
if (o && i >= o.length)
|
|
222
|
-
o = void 0;
|
|
223
|
-
return { value: o && o[i++], done: !o };
|
|
129
|
+
function __decorate(decorators, target, key, desc) {
|
|
130
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
131
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
132
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
133
|
+
else
|
|
134
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
135
|
+
if (d = decorators[i])
|
|
136
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
137
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
138
|
+
}
|
|
139
|
+
function __param(paramIndex, decorator) {
|
|
140
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
141
|
+
}
|
|
142
|
+
function __metadata(metadataKey, metadataValue) {
|
|
143
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
144
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
145
|
+
}
|
|
146
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
147
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
148
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
149
|
+
function fulfilled(value) { try {
|
|
150
|
+
step(generator.next(value));
|
|
224
151
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
152
|
+
catch (e) {
|
|
153
|
+
reject(e);
|
|
154
|
+
} }
|
|
155
|
+
function rejected(value) { try {
|
|
156
|
+
step(generator["throw"](value));
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
reject(e);
|
|
160
|
+
} }
|
|
161
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
162
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
163
|
+
});
|
|
236
164
|
}
|
|
237
|
-
|
|
238
|
-
|
|
165
|
+
function __generator(thisArg, body) {
|
|
166
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
167
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
168
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
169
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
170
|
+
function step(op) {
|
|
171
|
+
if (f)
|
|
172
|
+
throw new TypeError("Generator is already executing.");
|
|
173
|
+
while (_)
|
|
174
|
+
try {
|
|
175
|
+
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)
|
|
176
|
+
return t;
|
|
177
|
+
if (y = 0, t)
|
|
178
|
+
op = [op[0] & 2, t.value];
|
|
179
|
+
switch (op[0]) {
|
|
180
|
+
case 0:
|
|
181
|
+
case 1:
|
|
182
|
+
t = op;
|
|
183
|
+
break;
|
|
184
|
+
case 4:
|
|
185
|
+
_.label++;
|
|
186
|
+
return { value: op[1], done: false };
|
|
187
|
+
case 5:
|
|
188
|
+
_.label++;
|
|
189
|
+
y = op[1];
|
|
190
|
+
op = [0];
|
|
191
|
+
continue;
|
|
192
|
+
case 7:
|
|
193
|
+
op = _.ops.pop();
|
|
194
|
+
_.trys.pop();
|
|
195
|
+
continue;
|
|
196
|
+
default:
|
|
197
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
198
|
+
_ = 0;
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
202
|
+
_.label = op[1];
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
206
|
+
_.label = t[1];
|
|
207
|
+
t = op;
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
if (t && _.label < t[2]) {
|
|
211
|
+
_.label = t[2];
|
|
212
|
+
_.ops.push(op);
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
if (t[2])
|
|
216
|
+
_.ops.pop();
|
|
217
|
+
_.trys.pop();
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
op = body.call(thisArg, _);
|
|
221
|
+
}
|
|
222
|
+
catch (e) {
|
|
223
|
+
op = [6, e];
|
|
224
|
+
y = 0;
|
|
225
|
+
}
|
|
226
|
+
finally {
|
|
227
|
+
f = t = 0;
|
|
228
|
+
}
|
|
229
|
+
if (op[0] & 5)
|
|
230
|
+
throw op[1];
|
|
231
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
232
|
+
}
|
|
239
233
|
}
|
|
240
|
-
|
|
234
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
235
|
+
if (k2 === undefined)
|
|
236
|
+
k2 = k;
|
|
237
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
238
|
+
}) : (function (o, m, k, k2) {
|
|
239
|
+
if (k2 === undefined)
|
|
240
|
+
k2 = k;
|
|
241
|
+
o[k2] = m[k];
|
|
242
|
+
});
|
|
243
|
+
function __exportStar(m, o) {
|
|
244
|
+
for (var p in m)
|
|
245
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
246
|
+
__createBinding(o, m, p);
|
|
247
|
+
}
|
|
248
|
+
function __values(o) {
|
|
249
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
250
|
+
if (m)
|
|
251
|
+
return m.call(o);
|
|
252
|
+
if (o && typeof o.length === "number")
|
|
253
|
+
return {
|
|
254
|
+
next: function () {
|
|
255
|
+
if (o && i >= o.length)
|
|
256
|
+
o = void 0;
|
|
257
|
+
return { value: o && o[i++], done: !o };
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
261
|
+
}
|
|
262
|
+
function __read(o, n) {
|
|
263
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
264
|
+
if (!m)
|
|
265
|
+
return o;
|
|
266
|
+
var i = m.call(o), r, ar = [], e;
|
|
241
267
|
try {
|
|
242
|
-
|
|
243
|
-
|
|
268
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
269
|
+
ar.push(r.value);
|
|
244
270
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
throw e.error;
|
|
271
|
+
catch (error) {
|
|
272
|
+
e = { error: error };
|
|
248
273
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
/** @deprecated */
|
|
259
|
-
function __spreadArrays() {
|
|
260
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
261
|
-
s += arguments[i].length;
|
|
262
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
263
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
264
|
-
r[k] = a[j];
|
|
265
|
-
return r;
|
|
266
|
-
}
|
|
267
|
-
function __spreadArray(to, from, pack) {
|
|
268
|
-
if (pack || arguments.length === 2)
|
|
269
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
270
|
-
if (ar || !(i in from)) {
|
|
271
|
-
if (!ar)
|
|
272
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
273
|
-
ar[i] = from[i];
|
|
274
|
+
finally {
|
|
275
|
+
try {
|
|
276
|
+
if (r && !r.done && (m = i["return"]))
|
|
277
|
+
m.call(i);
|
|
278
|
+
}
|
|
279
|
+
finally {
|
|
280
|
+
if (e)
|
|
281
|
+
throw e.error;
|
|
274
282
|
}
|
|
275
283
|
}
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
function __await(v) {
|
|
279
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
280
|
-
}
|
|
281
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
282
|
-
if (!Symbol.asyncIterator)
|
|
283
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
285
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
286
|
-
function verb(n) { if (g[n])
|
|
287
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
288
|
-
function resume(n, v) { try {
|
|
289
|
-
step(g[n](v));
|
|
284
|
+
return ar;
|
|
290
285
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
function reject(value) { resume("throw", value); }
|
|
297
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
298
|
-
resume(q[0][0], q[0][1]); }
|
|
299
|
-
}
|
|
300
|
-
function __asyncDelegator(o) {
|
|
301
|
-
var i, p;
|
|
302
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
303
|
-
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; }
|
|
304
|
-
}
|
|
305
|
-
function __asyncValues(o) {
|
|
306
|
-
if (!Symbol.asyncIterator)
|
|
307
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
308
|
-
var m = o[Symbol.asyncIterator], i;
|
|
309
|
-
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);
|
|
310
|
-
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); }); }; }
|
|
311
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
312
|
-
}
|
|
313
|
-
function __makeTemplateObject(cooked, raw) {
|
|
314
|
-
if (Object.defineProperty) {
|
|
315
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
286
|
+
/** @deprecated */
|
|
287
|
+
function __spread() {
|
|
288
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
289
|
+
ar = ar.concat(__read(arguments[i]));
|
|
290
|
+
return ar;
|
|
316
291
|
}
|
|
317
|
-
|
|
318
|
-
|
|
292
|
+
/** @deprecated */
|
|
293
|
+
function __spreadArrays() {
|
|
294
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
295
|
+
s += arguments[i].length;
|
|
296
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
297
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
298
|
+
r[k] = a[j];
|
|
299
|
+
return r;
|
|
319
300
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
function __importStar(mod) {
|
|
329
|
-
if (mod && mod.__esModule)
|
|
330
|
-
return mod;
|
|
331
|
-
var result = {};
|
|
332
|
-
if (mod != null)
|
|
333
|
-
for (var k in mod)
|
|
334
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
335
|
-
__createBinding(result, mod, k);
|
|
336
|
-
__setModuleDefault(result, mod);
|
|
337
|
-
return result;
|
|
338
|
-
}
|
|
339
|
-
function __importDefault(mod) {
|
|
340
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
341
|
-
}
|
|
342
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
343
|
-
if (kind === "a" && !f)
|
|
344
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
345
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
346
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
347
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
348
|
-
}
|
|
349
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
350
|
-
if (kind === "m")
|
|
351
|
-
throw new TypeError("Private method is not writable");
|
|
352
|
-
if (kind === "a" && !f)
|
|
353
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
354
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
355
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
356
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
var RouterService = /** @class */ (function () {
|
|
360
|
-
function RouterService(router) {
|
|
361
|
-
this.router = router;
|
|
362
|
-
this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationStart ||
|
|
363
|
-
e instanceof i1.NavigationCancel ||
|
|
364
|
-
e instanceof i1.NavigationEnd ||
|
|
365
|
-
e instanceof i1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
|
|
366
|
-
}
|
|
367
|
-
RouterService.prototype.getFlowRootRoute = function (route) {
|
|
368
|
-
var _a;
|
|
369
|
-
var path = __spreadArray([], __read(route.pathFromRoot));
|
|
370
|
-
while (path.length) {
|
|
371
|
-
var parent = path.pop();
|
|
372
|
-
if (!parent) {
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
if (((_a = parent.routeConfig) === null || _a === void 0 ? void 0 : _a.id) === VELOCE_FLOW_ROOT_ROUTE) {
|
|
376
|
-
return parent;
|
|
301
|
+
function __spreadArray(to, from, pack) {
|
|
302
|
+
if (pack || arguments.length === 2)
|
|
303
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
304
|
+
if (ar || !(i in from)) {
|
|
305
|
+
if (!ar)
|
|
306
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
307
|
+
ar[i] = from[i];
|
|
308
|
+
}
|
|
377
309
|
}
|
|
378
|
-
|
|
379
|
-
return;
|
|
380
|
-
};
|
|
381
|
-
RouterService.prototype.getFlowRootPath = function (route) {
|
|
382
|
-
var rootRoute = this.getFlowRootRoute(route);
|
|
383
|
-
if (!rootRoute) {
|
|
384
|
-
return '';
|
|
385
|
-
}
|
|
386
|
-
var path = rootRoute.pathFromRoot
|
|
387
|
-
.map(function (r) { var _a; return (_a = r.routeConfig) === null || _a === void 0 ? void 0 : _a.path; })
|
|
388
|
-
.filter(Boolean)
|
|
389
|
-
.join('/');
|
|
390
|
-
return '/' + path;
|
|
391
|
-
};
|
|
392
|
-
return RouterService;
|
|
393
|
-
}());
|
|
394
|
-
RouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, deps: [{ token: i1__namespace.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
395
|
-
RouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, providedIn: 'root' });
|
|
396
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, decorators: [{
|
|
397
|
-
type: i0.Injectable,
|
|
398
|
-
args: [{ providedIn: 'root' }]
|
|
399
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }]; } });
|
|
400
|
-
|
|
401
|
-
var FlowComponent = /** @class */ (function () {
|
|
402
|
-
function FlowComponent(routerService) {
|
|
403
|
-
this.routerService = routerService;
|
|
310
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
404
311
|
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
408
|
-
FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<div class=\"loading-overlay\" *ngIf=\"routerService.loading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n</div>\n\n<router-outlet></router-outlet>\n", styles: [".loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: i2__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i3__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
409
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
|
|
410
|
-
type: i0.Component,
|
|
411
|
-
args: [{
|
|
412
|
-
selector: 'vl-flow',
|
|
413
|
-
templateUrl: './flow.component.html',
|
|
414
|
-
styleUrls: ['./flow.component.scss'],
|
|
415
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
416
|
-
}]
|
|
417
|
-
}], ctorParameters: function () { return [{ type: RouterService }]; } });
|
|
418
|
-
|
|
419
|
-
var ContextGuard = /** @class */ (function () {
|
|
420
|
-
function ContextGuard(router, routerService) {
|
|
421
|
-
this.router = router;
|
|
422
|
-
this.routerService = routerService;
|
|
312
|
+
function __await(v) {
|
|
313
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
423
314
|
}
|
|
424
|
-
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
315
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
316
|
+
if (!Symbol.asyncIterator)
|
|
317
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
318
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
319
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
320
|
+
function verb(n) { if (g[n])
|
|
321
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
322
|
+
function resume(n, v) { try {
|
|
323
|
+
step(g[n](v));
|
|
430
324
|
}
|
|
431
|
-
|
|
432
|
-
|
|
325
|
+
catch (e) {
|
|
326
|
+
settle(q[0][3], e);
|
|
327
|
+
} }
|
|
328
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
329
|
+
function fulfill(value) { resume("next", value); }
|
|
330
|
+
function reject(value) { resume("throw", value); }
|
|
331
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
332
|
+
resume(q[0][0], q[0][1]); }
|
|
333
|
+
}
|
|
334
|
+
function __asyncDelegator(o) {
|
|
335
|
+
var i, p;
|
|
336
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
337
|
+
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; }
|
|
338
|
+
}
|
|
339
|
+
function __asyncValues(o) {
|
|
340
|
+
if (!Symbol.asyncIterator)
|
|
341
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
342
|
+
var m = o[Symbol.asyncIterator], i;
|
|
343
|
+
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);
|
|
344
|
+
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); }); }; }
|
|
345
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
346
|
+
}
|
|
347
|
+
function __makeTemplateObject(cooked, raw) {
|
|
348
|
+
if (Object.defineProperty) {
|
|
349
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
433
350
|
}
|
|
434
|
-
|
|
435
|
-
|
|
351
|
+
else {
|
|
352
|
+
cooked.raw = raw;
|
|
436
353
|
}
|
|
437
|
-
return;
|
|
354
|
+
return cooked;
|
|
355
|
+
}
|
|
356
|
+
;
|
|
357
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
358
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
359
|
+
}) : function (o, v) {
|
|
360
|
+
o["default"] = v;
|
|
438
361
|
};
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
var
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
362
|
+
function __importStar(mod) {
|
|
363
|
+
if (mod && mod.__esModule)
|
|
364
|
+
return mod;
|
|
365
|
+
var result = {};
|
|
366
|
+
if (mod != null)
|
|
367
|
+
for (var k in mod)
|
|
368
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
369
|
+
__createBinding(result, mod, k);
|
|
370
|
+
__setModuleDefault(result, mod);
|
|
371
|
+
return result;
|
|
372
|
+
}
|
|
373
|
+
function __importDefault(mod) {
|
|
374
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
375
|
+
}
|
|
376
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
377
|
+
if (kind === "a" && !f)
|
|
378
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
379
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
380
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
381
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
382
|
+
}
|
|
383
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
384
|
+
if (kind === "m")
|
|
385
|
+
throw new TypeError("Private method is not writable");
|
|
386
|
+
if (kind === "a" && !f)
|
|
387
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
388
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
389
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
390
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
var RouterService = /** @class */ (function () {
|
|
394
|
+
function RouterService(router, route) {
|
|
395
|
+
var _this = this;
|
|
396
|
+
this.router = router;
|
|
397
|
+
this.route = route;
|
|
398
|
+
this.getLastChildRoute = function (route) {
|
|
399
|
+
return route.firstChild ? _this.getLastChildRoute(route.firstChild) : route;
|
|
400
|
+
};
|
|
401
|
+
this.getNthChildRoute = function (route, index) {
|
|
402
|
+
if (index <= 0) {
|
|
403
|
+
return route;
|
|
404
|
+
}
|
|
405
|
+
return route.firstChild ? _this.getNthChildRoute(route.firstChild, index - 1) : route;
|
|
406
|
+
};
|
|
407
|
+
this.getLastChildRouteSnapshot = function (route) {
|
|
408
|
+
return route.firstChild ? _this.getLastChildRouteSnapshot(route.firstChild) : route;
|
|
409
|
+
};
|
|
410
|
+
this.watchLastChildRoute$ = function (route) {
|
|
411
|
+
return _this.routeChange$.pipe(rxjs.map(function () { return _this.getLastChildRouteSnapshot(route.snapshot); }));
|
|
412
|
+
};
|
|
413
|
+
this.getLastChildParams = function (route) {
|
|
414
|
+
return route.firstChild ? _this.getLastChildParams(route.firstChild) : route.params;
|
|
415
|
+
};
|
|
416
|
+
this.watchLastChildParams$ = function (route) {
|
|
417
|
+
return _this.routeChange$.pipe(rxjs.map(function () { return _this.getLastChildParams(route.snapshot); }));
|
|
418
|
+
};
|
|
419
|
+
this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationEnd; }), rxjs.shareReplay());
|
|
420
|
+
this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(rxjs.startWith(this.getLastChildParams(this.route.snapshot)), rxjs.shareReplay());
|
|
421
|
+
this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(rxjs.startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), rxjs.shareReplay());
|
|
422
|
+
this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationStart ||
|
|
423
|
+
e instanceof i1.NavigationCancel ||
|
|
424
|
+
e instanceof i1.NavigationEnd ||
|
|
425
|
+
e instanceof i1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
|
|
449
426
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
427
|
+
RouterService.prototype.getFlowRootRoute = function (route) {
|
|
428
|
+
var _a;
|
|
429
|
+
var path = __spreadArray([], __read(route.pathFromRoot));
|
|
430
|
+
while (path.length) {
|
|
431
|
+
var parent = path.pop();
|
|
432
|
+
if (!parent) {
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
if (((_a = parent.routeConfig) === null || _a === void 0 ? void 0 : _a.id) === VELOCE_FLOW_ROOT_ROUTE) {
|
|
436
|
+
return parent;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return;
|
|
453
440
|
};
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
441
|
+
RouterService.prototype.getFlowRootPath = function (route) {
|
|
442
|
+
var rootRoute = this.getFlowRootRoute(route);
|
|
443
|
+
if (!rootRoute) {
|
|
444
|
+
return '';
|
|
445
|
+
}
|
|
446
|
+
var path = rootRoute.pathFromRoot
|
|
447
|
+
.map(function (r) { var _a; return (_a = r.routeConfig) === null || _a === void 0 ? void 0 : _a.path; })
|
|
448
|
+
.filter(Boolean)
|
|
449
|
+
.join('/');
|
|
450
|
+
return '/' + path;
|
|
451
|
+
};
|
|
452
|
+
Object.defineProperty(RouterService.prototype, "route$", {
|
|
453
|
+
get: function () {
|
|
454
|
+
return this.lastChildRoute$;
|
|
455
|
+
},
|
|
456
|
+
enumerable: false,
|
|
457
|
+
configurable: true
|
|
467
458
|
});
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
459
|
+
Object.defineProperty(RouterService.prototype, "params$", {
|
|
460
|
+
get: function () {
|
|
461
|
+
return this.lastChildParams$;
|
|
462
|
+
},
|
|
463
|
+
enumerable: false,
|
|
464
|
+
configurable: true
|
|
465
|
+
});
|
|
466
|
+
return RouterService;
|
|
467
|
+
}());
|
|
468
|
+
RouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
469
|
+
RouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, providedIn: 'root' });
|
|
470
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RouterService, decorators: [{
|
|
471
|
+
type: i0.Injectable,
|
|
472
|
+
args: [{ providedIn: 'root' }]
|
|
473
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }]; } });
|
|
477
474
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
475
|
+
var FlowComponent = /** @class */ (function () {
|
|
476
|
+
function FlowComponent(routerService, context) {
|
|
477
|
+
var _this = this;
|
|
478
|
+
this.routerService = routerService;
|
|
479
|
+
this.context = context;
|
|
480
|
+
this.isLoading$ = this.routerService.loading$;
|
|
481
|
+
this.showHeader$ = this.routerService.route$.pipe(rxjs.map(function (route) {
|
|
482
|
+
var _a;
|
|
483
|
+
var showHeader = ((_a = _this.context.resolve()) === null || _a === void 0 ? void 0 : _a.properties.standalone) !== 'true';
|
|
484
|
+
return route.data.showHeader && showHeader;
|
|
485
|
+
}));
|
|
486
|
+
}
|
|
487
|
+
return FlowComponent;
|
|
488
|
+
}());
|
|
489
|
+
FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: RouterService }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
490
|
+
FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i2__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
491
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
|
|
492
|
+
type: i0.Component,
|
|
493
|
+
args: [{
|
|
494
|
+
selector: 'vl-flow',
|
|
495
|
+
templateUrl: './flow.component.html',
|
|
496
|
+
styleUrls: ['./flow.component.scss'],
|
|
497
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
498
|
+
}]
|
|
499
|
+
}], ctorParameters: function () { return [{ type: RouterService }, { type: i2__namespace.ContextService }]; } });
|
|
500
|
+
|
|
501
|
+
var ContextGuard = /** @class */ (function () {
|
|
502
|
+
function ContextGuard(router, routerService) {
|
|
503
|
+
this.router = router;
|
|
504
|
+
this.routerService = routerService;
|
|
494
505
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
506
|
+
ContextGuard.prototype.getConfigurationContextMode = function (accountId, quoteId, orderId, rpcMessage) {
|
|
507
|
+
if (accountId) {
|
|
508
|
+
return core.ConfigurationContextMode.ACCOUNT;
|
|
509
|
+
}
|
|
510
|
+
if (quoteId) {
|
|
511
|
+
return core.ConfigurationContextMode.QUOTE;
|
|
512
|
+
}
|
|
513
|
+
if (orderId) {
|
|
514
|
+
return core.ConfigurationContextMode.ORDER;
|
|
515
|
+
}
|
|
516
|
+
if (rpcMessage) {
|
|
517
|
+
return core.ConfigurationContextMode.REMOTE;
|
|
518
|
+
}
|
|
519
|
+
return;
|
|
520
|
+
};
|
|
521
|
+
ContextGuard.prototype.checkActivation = function (route) {
|
|
522
|
+
var _a, _b;
|
|
523
|
+
var queryParams = route.queryParams;
|
|
524
|
+
var accountId = queryParams.accountId, quoteId = queryParams.quoteId, orderId = queryParams.orderId;
|
|
525
|
+
var rpcMessage = window['RPC_MESSAGE'];
|
|
526
|
+
var rpcMessageId = rpcMessage && ((_b = (_a = JSON.parse(rpcMessage)) === null || _a === void 0 ? void 0 : _a.quote) === null || _b === void 0 ? void 0 : _b.Id);
|
|
527
|
+
var headerId = accountId || quoteId || orderId || rpcMessageId || 'empty-for-test-mode';
|
|
528
|
+
var mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
|
|
529
|
+
if (mode === void 0) {
|
|
530
|
+
return this.reject(route, 'Mode is undefined');
|
|
531
|
+
}
|
|
532
|
+
var contextRouteData = {
|
|
533
|
+
headerId: headerId,
|
|
534
|
+
mode: mode,
|
|
535
|
+
};
|
|
536
|
+
route.data = Object.assign(Object.assign({}, route.data), contextRouteData);
|
|
537
|
+
return true;
|
|
538
|
+
};
|
|
539
|
+
ContextGuard.prototype.canActivate = function (route) {
|
|
540
|
+
return this.checkActivation(route);
|
|
541
|
+
};
|
|
542
|
+
ContextGuard.prototype.canActivateChild = function (childRoute) {
|
|
543
|
+
return this.checkActivation(childRoute);
|
|
544
|
+
};
|
|
545
|
+
ContextGuard.prototype.reject = function (route, message) {
|
|
546
|
+
var parentUrl = this.routerService.getFlowRootPath(route);
|
|
547
|
+
this.router.navigate([parentUrl, '404'], {
|
|
548
|
+
state: { message: message },
|
|
500
549
|
});
|
|
550
|
+
return false;
|
|
551
|
+
};
|
|
552
|
+
return ContextGuard;
|
|
553
|
+
}());
|
|
554
|
+
ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace.Router }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
555
|
+
ContextGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard });
|
|
556
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, decorators: [{
|
|
557
|
+
type: i0.Injectable
|
|
558
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: RouterService }]; } });
|
|
559
|
+
|
|
560
|
+
var RootGuard = /** @class */ (function () {
|
|
561
|
+
function RootGuard(router, routerService) {
|
|
562
|
+
this.router = router;
|
|
563
|
+
this.routerService = routerService;
|
|
564
|
+
this.initialized = false;
|
|
565
|
+
this.navToRestore = null;
|
|
501
566
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
567
|
+
RootGuard.prototype.canActivate = function (route) {
|
|
568
|
+
var _this = this;
|
|
569
|
+
// We always need to initialize root component first, and only then start checking guards/resolvers
|
|
570
|
+
var _a;
|
|
571
|
+
if (!this.initialized) {
|
|
572
|
+
this.initialized = true;
|
|
573
|
+
this.navToRestore = this.router.getCurrentNavigation();
|
|
574
|
+
var rootUrl = this.routerService.getFlowRootPath(route);
|
|
575
|
+
this.router.navigate([rootUrl], { replaceUrl: !((_a = this.navToRestore) === null || _a === void 0 ? void 0 : _a.previousNavigation) });
|
|
576
|
+
}
|
|
577
|
+
else if (this.navToRestore) {
|
|
578
|
+
var nav_1 = this.navToRestore;
|
|
579
|
+
setTimeout(function () {
|
|
580
|
+
_this.router.navigateByUrl(nav_1.extractedUrl, nav_1.extras);
|
|
581
|
+
_this.navToRestore = null;
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
return true;
|
|
585
|
+
};
|
|
586
|
+
RootGuard.prototype.canDeactivate = function () {
|
|
587
|
+
this.initialized = false;
|
|
588
|
+
return true;
|
|
589
|
+
};
|
|
590
|
+
return RootGuard;
|
|
591
|
+
}());
|
|
592
|
+
RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace.Router }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
593
|
+
RootGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, providedIn: 'root' });
|
|
594
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, decorators: [{
|
|
595
|
+
type: i0.Injectable,
|
|
596
|
+
args: [{ providedIn: 'root' }]
|
|
597
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: RouterService }]; } });
|
|
516
598
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
599
|
+
var FlowService = /** @class */ (function () {
|
|
600
|
+
function FlowService(configurationSettingsApiService) {
|
|
601
|
+
this.configurationSettingsApiService = configurationSettingsApiService;
|
|
602
|
+
this.flowsKey = 'flows';
|
|
603
|
+
}
|
|
604
|
+
FlowService.prototype.getFlow = function (id) {
|
|
605
|
+
return this.fetchFlows().pipe(operators.map(function (flows) { return flows.find(function (flow) { return flow.id == id; }); }));
|
|
606
|
+
};
|
|
607
|
+
FlowService.prototype.fetchFlows = function () {
|
|
608
|
+
return this.configurationSettingsApiService
|
|
609
|
+
.fetchSetting(this.flowsKey)
|
|
610
|
+
.pipe(operators.map(function (_a) {
|
|
611
|
+
var value = _a.value;
|
|
612
|
+
return (value ? JSON.parse(value) : []);
|
|
613
|
+
}));
|
|
614
|
+
};
|
|
615
|
+
return FlowService;
|
|
616
|
+
}());
|
|
617
|
+
FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i1__namespace$1.ConfigurationSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
618
|
+
FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
|
|
619
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
|
|
620
|
+
type: i0.Injectable
|
|
621
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.ConfigurationSettingsApiService }]; } });
|
|
540
622
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
DebugComponent.prototype.runFlow = function () {
|
|
561
|
-
var id = this.form.value.id;
|
|
562
|
-
if (!id || !this.selectedFlow) {
|
|
563
|
-
return;
|
|
623
|
+
var DebugComponent = /** @class */ (function () {
|
|
624
|
+
function DebugComponent(flowService, router, activatedRoute, context) {
|
|
625
|
+
this.flowService = flowService;
|
|
626
|
+
this.router = router;
|
|
627
|
+
this.activatedRoute = activatedRoute;
|
|
628
|
+
this.context = context;
|
|
629
|
+
this.form = new i6.FormGroup({
|
|
630
|
+
id: new i6.FormControl(''),
|
|
631
|
+
});
|
|
632
|
+
this.flows$ = this.flowService.fetchFlows().pipe(rxjs.map(function (flows) { return flows.map(function (flow) {
|
|
633
|
+
var _a, _b, _c;
|
|
634
|
+
var queryParams = (_b = (_a = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _a === void 0 ? void 0 : _a.queryParams) !== null && _b !== void 0 ? _b : {};
|
|
635
|
+
return {
|
|
636
|
+
id: flow.id,
|
|
637
|
+
entryPath: (_c = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _c === void 0 ? void 0 : _c.entryPath,
|
|
638
|
+
queryParams: queryParams,
|
|
639
|
+
queryParamsStr: JSON.stringify(queryParams),
|
|
640
|
+
};
|
|
641
|
+
}); }), rxjs.shareReplay());
|
|
564
642
|
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
643
|
+
DebugComponent.prototype.runFlow = function () {
|
|
644
|
+
var id = this.form.value.id;
|
|
645
|
+
if (!id || !this.selectedFlow) {
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
// Delete context before starting a new flow
|
|
649
|
+
this.context.delete();
|
|
650
|
+
this.router.navigate(['..', 'flows'], {
|
|
651
|
+
queryParams: Object.assign({ flowId: this.selectedFlow.id, quoteId: id }, this.selectedFlow.queryParams),
|
|
652
|
+
relativeTo: this.activatedRoute,
|
|
653
|
+
});
|
|
654
|
+
};
|
|
655
|
+
return DebugComponent;
|
|
656
|
+
}());
|
|
657
|
+
DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: FlowService }, { token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
658
|
+
DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, template: "<form [formGroup]=\"form\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: ["form{display:flex;align-items:center;justify-content:space-between}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i4__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5__namespace$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i6__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__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: i6__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7__namespace.InputText, selector: "[pInputText]" }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
659
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
|
|
660
|
+
type: i0.Component,
|
|
661
|
+
args: [{
|
|
662
|
+
selector: 'vl-flow-debug',
|
|
663
|
+
templateUrl: './debug.component.html',
|
|
664
|
+
styleUrls: ['./debug.component.scss'],
|
|
665
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
666
|
+
}]
|
|
667
|
+
}], ctorParameters: function () { return [{ type: FlowService }, { type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }, { type: i2__namespace.ContextService }]; } });
|
|
584
668
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
669
|
+
var routes$1 = [{ path: '', component: DebugComponent }];
|
|
670
|
+
var DebugModule = /** @class */ (function () {
|
|
671
|
+
function DebugModule() {
|
|
672
|
+
}
|
|
673
|
+
return DebugModule;
|
|
674
|
+
}());
|
|
675
|
+
DebugModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
676
|
+
DebugModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, declarations: [DebugComponent], imports: [i5.CommonModule,
|
|
677
|
+
i6.FormsModule,
|
|
678
|
+
i6.ReactiveFormsModule, i1__namespace.RouterModule, i5$1.RadioButtonModule,
|
|
679
|
+
i4.ButtonModule,
|
|
680
|
+
i7.InputTextModule] });
|
|
681
|
+
DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, imports: [[
|
|
682
|
+
i5.CommonModule,
|
|
683
|
+
i6.FormsModule,
|
|
684
|
+
i6.ReactiveFormsModule,
|
|
685
|
+
i1.RouterModule.forChild(routes$1),
|
|
686
|
+
i5$1.RadioButtonModule,
|
|
687
|
+
i4.ButtonModule,
|
|
688
|
+
i7.InputTextModule,
|
|
689
|
+
]] });
|
|
690
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, decorators: [{
|
|
691
|
+
type: i0.NgModule,
|
|
692
|
+
args: [{
|
|
693
|
+
declarations: [DebugComponent],
|
|
694
|
+
imports: [
|
|
695
|
+
i5.CommonModule,
|
|
696
|
+
i6.FormsModule,
|
|
697
|
+
i6.ReactiveFormsModule,
|
|
698
|
+
i1.RouterModule.forChild(routes$1),
|
|
699
|
+
i5$1.RadioButtonModule,
|
|
700
|
+
i4.ButtonModule,
|
|
701
|
+
i7.InputTextModule,
|
|
702
|
+
],
|
|
703
|
+
}]
|
|
704
|
+
}] });
|
|
621
705
|
|
|
622
|
-
|
|
706
|
+
var FLOW_CUSTOMIZATION = new i0.InjectionToken('FLOW_CUSTOMIZATION');
|
|
623
707
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
};
|
|
645
|
-
LegacyProductComponent.prototype.ngOnDestroy = function () {
|
|
646
|
-
this.destroyed$.next();
|
|
647
|
-
this.destroyed$.complete();
|
|
648
|
-
};
|
|
649
|
-
LegacyProductComponent.prototype.onSolutionReady = function (lineItem) {
|
|
650
|
-
var _a;
|
|
651
|
-
lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
|
|
652
|
-
};
|
|
653
|
-
LegacyProductComponent.prototype.onSolutionCancel = function () {
|
|
654
|
-
this.quoteService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
|
|
655
|
-
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
|
656
|
-
});
|
|
657
|
-
};
|
|
658
|
-
LegacyProductComponent.prototype.onSolutionUpdated = function (lineItem) {
|
|
659
|
-
var states = {
|
|
660
|
-
configurableRamp: lineItem,
|
|
661
|
-
currentState: this.currentStateService.currentState,
|
|
662
|
-
asset: this.getAsset(lineItem),
|
|
708
|
+
var LegacyProductComponent = /** @class */ (function () {
|
|
709
|
+
function LegacyProductComponent(route, quoteService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
|
|
710
|
+
this.route = route;
|
|
711
|
+
this.quoteService = quoteService;
|
|
712
|
+
this.quoteApiService = quoteApiService;
|
|
713
|
+
this.contextService = contextService;
|
|
714
|
+
this.runtimeContextService = runtimeContextService;
|
|
715
|
+
this.runtimeService = runtimeService;
|
|
716
|
+
this.currentStateService = currentStateService;
|
|
717
|
+
this.customizationService = customizationService;
|
|
718
|
+
this.destroyed$ = new rxjs.Subject();
|
|
719
|
+
}
|
|
720
|
+
LegacyProductComponent.prototype.ngOnInit = function () {
|
|
721
|
+
var _this = this;
|
|
722
|
+
this.quoteService.quote$
|
|
723
|
+
.pipe(operators.first(), operators.takeUntil(this.destroyed$))
|
|
724
|
+
.subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
|
|
725
|
+
this.runtimeService.onSolutionStopEvent.pipe(operators.take(1)).subscribe(function (lineItem) { return _this.onSolutionStop(lineItem); });
|
|
726
|
+
this.runtimeService.onSolutionReadyEvent.pipe(operators.take(1)).subscribe(function (event) { return _this.onSolutionReady(event); });
|
|
727
|
+
this.runtimeService.onSolutionCancelEvent.pipe(operators.take(1)).subscribe(function () { return _this.onSolutionCancel(); });
|
|
663
728
|
};
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
var
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
729
|
+
LegacyProductComponent.prototype.ngOnDestroy = function () {
|
|
730
|
+
this.destroyed$.next();
|
|
731
|
+
this.destroyed$.complete();
|
|
732
|
+
};
|
|
733
|
+
LegacyProductComponent.prototype.onSolutionReady = function (lineItem) {
|
|
734
|
+
var _a;
|
|
735
|
+
lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
|
|
736
|
+
};
|
|
737
|
+
LegacyProductComponent.prototype.onSolutionCancel = function () {
|
|
738
|
+
this.quoteService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
|
|
674
739
|
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
|
675
740
|
});
|
|
676
|
-
});
|
|
677
|
-
};
|
|
678
|
-
LegacyProductComponent.prototype.init = function (quote, queryParams) {
|
|
679
|
-
var productId = queryParams['productId'];
|
|
680
|
-
var lineItemId = this.getLineItemId(quote, queryParams);
|
|
681
|
-
this.assets = quote.initialState;
|
|
682
|
-
lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
|
|
683
|
-
};
|
|
684
|
-
LegacyProductComponent.prototype.getLineItemId = function (quote, queryParams) {
|
|
685
|
-
if (core.EntityUtil.isPresent(queryParams['lineItemId'])) {
|
|
686
|
-
return queryParams['lineItemId'];
|
|
687
|
-
}
|
|
688
|
-
return quote.currentState
|
|
689
|
-
.filter(function (lineItem) { return lineItem.productId === queryParams['productId']; })
|
|
690
|
-
.map(function (lineItem) { return lineItem.id; })
|
|
691
|
-
.find(function (id) { return id; });
|
|
692
|
-
};
|
|
693
|
-
LegacyProductComponent.prototype.configure = function (productId) {
|
|
694
|
-
var runtimeContext = this.getRuntimeContext(productId, '', i2$1.RuntimeOperation.INIT);
|
|
695
|
-
this.startRuntime({}, runtimeContext);
|
|
696
|
-
};
|
|
697
|
-
LegacyProductComponent.prototype.reConfigure = function (lineItemId, currentState) {
|
|
698
|
-
var currentStateItem = core.EntityUtil.findById(lineItemId, currentState);
|
|
699
|
-
var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i2$1.RuntimeOperation.UPDATE);
|
|
700
|
-
var states = {
|
|
701
|
-
configurableRamp: currentStateItem,
|
|
702
|
-
currentState: currentState,
|
|
703
|
-
asset: this.getAsset(currentStateItem),
|
|
704
741
|
};
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
742
|
+
LegacyProductComponent.prototype.onSolutionUpdated = function (lineItem) {
|
|
743
|
+
var states = {
|
|
744
|
+
configurableRamp: lineItem,
|
|
745
|
+
currentState: this.currentStateService.currentState,
|
|
746
|
+
asset: this.getAsset(lineItem),
|
|
747
|
+
};
|
|
748
|
+
this.runtimeService.updateRuntime(states);
|
|
749
|
+
};
|
|
750
|
+
LegacyProductComponent.prototype.onSolutionStop = function (lineItem) {
|
|
751
|
+
var _this = this;
|
|
752
|
+
this.quoteService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
|
|
753
|
+
var quoteToUpsert = Object.assign(Object.assign({}, quote), { context: _this.contextService.resolve(), currentState: __spreadArray(__spreadArray([], __read((_this.currentStateService.currentState || []).filter(function (li) { return li.id !== lineItem.id; }))), [lineItem]) });
|
|
754
|
+
_this.quoteApiService
|
|
755
|
+
.upsertQuote(quoteToUpsert)
|
|
756
|
+
.pipe(operators.take(1))
|
|
757
|
+
.subscribe(function (quote) {
|
|
758
|
+
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
|
759
|
+
});
|
|
760
|
+
});
|
|
761
|
+
};
|
|
762
|
+
LegacyProductComponent.prototype.init = function (quote, queryParams) {
|
|
763
|
+
var productId = queryParams['productId'];
|
|
764
|
+
var lineItemId = this.getLineItemId(quote, queryParams);
|
|
765
|
+
this.assets = quote.initialState;
|
|
766
|
+
lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
|
|
767
|
+
};
|
|
768
|
+
LegacyProductComponent.prototype.getLineItemId = function (quote, queryParams) {
|
|
769
|
+
if (core.EntityUtil.isPresent(queryParams['lineItemId'])) {
|
|
770
|
+
return queryParams['lineItemId'];
|
|
771
|
+
}
|
|
772
|
+
return quote.currentState
|
|
773
|
+
.filter(function (lineItem) { return lineItem.productId === queryParams['productId']; })
|
|
774
|
+
.map(function (lineItem) { return lineItem.id; })
|
|
775
|
+
.find(function (id) { return id; });
|
|
776
|
+
};
|
|
777
|
+
LegacyProductComponent.prototype.configure = function (productId) {
|
|
778
|
+
var runtimeContext = this.getRuntimeContext(productId, '', i2.RuntimeOperation.INIT);
|
|
779
|
+
this.startRuntime({}, runtimeContext);
|
|
780
|
+
};
|
|
781
|
+
LegacyProductComponent.prototype.reConfigure = function (lineItemId, currentState) {
|
|
782
|
+
var currentStateItem = core.EntityUtil.findById(lineItemId, currentState);
|
|
783
|
+
var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i2.RuntimeOperation.UPDATE);
|
|
784
|
+
var states = {
|
|
785
|
+
configurableRamp: currentStateItem,
|
|
786
|
+
currentState: currentState,
|
|
787
|
+
asset: this.getAsset(currentStateItem),
|
|
788
|
+
};
|
|
789
|
+
this.currentStateService.update(currentState);
|
|
790
|
+
this.startRuntime(states, runtimeContext);
|
|
791
|
+
};
|
|
792
|
+
LegacyProductComponent.prototype.getAsset = function (lineItem) {
|
|
793
|
+
return this.assets && this.assets.find(function (a) { return a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId; });
|
|
794
|
+
};
|
|
795
|
+
LegacyProductComponent.prototype.startRuntime = function (states, runtimeContext$) {
|
|
796
|
+
var _this = this;
|
|
797
|
+
runtimeContext$
|
|
798
|
+
.pipe(operators.take(1), operators.map(function (runtimeContext) {
|
|
799
|
+
_this.runtimeService.startRuntime(runtimeContext, states);
|
|
800
|
+
}))
|
|
801
|
+
.subscribe();
|
|
802
|
+
};
|
|
803
|
+
LegacyProductComponent.prototype.customizeContext = function (productId, context) {
|
|
804
|
+
var _a;
|
|
805
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getLegacyUiDefinition)) {
|
|
806
|
+
return rxjs.of(context);
|
|
807
|
+
}
|
|
808
|
+
return this.customizationService.getLegacyUiDefinition(productId).pipe(operators.map(function (uiDef) { return (Object.assign(Object.assign({}, context), { uiDefinition: uiDef !== null && uiDef !== void 0 ? uiDef : context.uiDefinition })); }));
|
|
809
|
+
};
|
|
810
|
+
LegacyProductComponent.prototype.getRuntimeContext = function (productId, offeringId, runtimeOperation) {
|
|
811
|
+
var _this = this;
|
|
812
|
+
return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(operators.map(function (runtimeContext) {
|
|
813
|
+
runtimeContext.invocationContext = { runtimeOperation: i2.RuntimeOperation[runtimeOperation] };
|
|
814
|
+
return runtimeContext;
|
|
815
|
+
}), operators.switchMap(function (runtimeContext) { return _this.customizeContext(productId, runtimeContext); }));
|
|
816
|
+
};
|
|
817
|
+
return LegacyProductComponent;
|
|
818
|
+
}());
|
|
819
|
+
LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace.ActivatedRoute }, { token: i2__namespace.QuoteService }, { token: i1__namespace$1.QuoteApiService }, { token: i2__namespace.ContextService }, { token: i2__namespace.RuntimeContextService }, { token: i2__namespace.RuntimeService }, { token: i2__namespace.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
820
|
+
LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i2__namespace.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
|
|
821
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
|
|
822
|
+
type: i0.Component,
|
|
823
|
+
args: [{
|
|
824
|
+
templateUrl: './legacy-product.component.html',
|
|
825
|
+
styleUrls: ['./legacy-product.component.scss'],
|
|
826
|
+
}]
|
|
827
|
+
}], ctorParameters: function () {
|
|
828
|
+
return [{ type: i1__namespace.ActivatedRoute }, { type: i2__namespace.QuoteService }, { type: i1__namespace$1.QuoteApiService }, { type: i2__namespace.ContextService }, { type: i2__namespace.RuntimeContextService }, { type: i2__namespace.RuntimeService }, { type: i2__namespace.CurrentStateService }, { type: undefined, decorators: [{
|
|
829
|
+
type: i0.Optional
|
|
830
|
+
}, {
|
|
831
|
+
type: i0.Inject,
|
|
832
|
+
args: [FLOW_CUSTOMIZATION]
|
|
833
|
+
}] }];
|
|
834
|
+
} });
|
|
751
835
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
836
|
+
var LegacyProductModule = /** @class */ (function () {
|
|
837
|
+
function LegacyProductModule() {
|
|
838
|
+
}
|
|
839
|
+
return LegacyProductModule;
|
|
840
|
+
}());
|
|
841
|
+
LegacyProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
842
|
+
LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i5.CommonModule, i2.RuntimeModule, i1__namespace$2.TooltipModule], exports: [LegacyProductComponent] });
|
|
843
|
+
LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i5.CommonModule, i2.RuntimeModule, i1$2.TooltipModule.forRoot()]] });
|
|
844
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
|
|
845
|
+
type: i0.NgModule,
|
|
846
|
+
args: [{
|
|
847
|
+
declarations: [LegacyProductComponent],
|
|
848
|
+
imports: [i5.CommonModule, i2.RuntimeModule, i1$2.TooltipModule.forRoot()],
|
|
849
|
+
exports: [LegacyProductComponent],
|
|
850
|
+
}]
|
|
851
|
+
}] });
|
|
768
852
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
}
|
|
780
|
-
ProductComponent.prototype.ngOnInit = function () {
|
|
781
|
-
var _this = this;
|
|
782
|
-
this.quoteService.quote$
|
|
783
|
-
.pipe(rxjs.first(), rxjs.takeUntil(this.destroy$))
|
|
784
|
-
.subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
|
|
785
|
-
};
|
|
786
|
-
ProductComponent.prototype.ngOnDestroy = function () {
|
|
787
|
-
this.destroy$.next();
|
|
788
|
-
this.destroy$.complete();
|
|
789
|
-
};
|
|
790
|
-
ProductComponent.prototype.customize = function (productId) {
|
|
791
|
-
var _this = this;
|
|
792
|
-
var _a;
|
|
793
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getUiDefinition)) {
|
|
794
|
-
return rxjs.of(null);
|
|
853
|
+
var ProductComponent = /** @class */ (function () {
|
|
854
|
+
function ProductComponent(runtimeService, conigurationService, quoteService, route, messageService, customizationService) {
|
|
855
|
+
this.runtimeService = runtimeService;
|
|
856
|
+
this.conigurationService = conigurationService;
|
|
857
|
+
this.quoteService = quoteService;
|
|
858
|
+
this.route = route;
|
|
859
|
+
this.messageService = messageService;
|
|
860
|
+
this.customizationService = customizationService;
|
|
861
|
+
this.destroy$ = new rxjs.Subject();
|
|
862
|
+
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
|
795
863
|
}
|
|
796
|
-
|
|
864
|
+
ProductComponent.prototype.ngOnInit = function () {
|
|
865
|
+
var _this = this;
|
|
866
|
+
this.quoteService.quote$
|
|
867
|
+
.pipe(rxjs.first(), rxjs.takeUntil(this.destroy$))
|
|
868
|
+
.subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
|
|
869
|
+
};
|
|
870
|
+
ProductComponent.prototype.ngOnDestroy = function () {
|
|
871
|
+
this.destroy$.next();
|
|
872
|
+
this.destroy$.complete();
|
|
873
|
+
};
|
|
874
|
+
ProductComponent.prototype.customize = function (productId) {
|
|
875
|
+
var _this = this;
|
|
797
876
|
var _a;
|
|
798
|
-
if (
|
|
799
|
-
|
|
800
|
-
_this.runtimeService.uiDefinitionProperties = (_a = uiDef.properties) !== null && _a !== void 0 ? _a : {};
|
|
877
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getUiDefinition)) {
|
|
878
|
+
return rxjs.of(null);
|
|
801
879
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
_this.messageService.add({ severity: 'error', summary: error });
|
|
880
|
+
return this.customizationService.getUiDefinition(productId).pipe(rxjs.tap(function (uiDef) {
|
|
881
|
+
var _a;
|
|
882
|
+
if (uiDef) {
|
|
883
|
+
_this.uiDefinition = uiDef;
|
|
884
|
+
_this.runtimeService.uiDefinitionProperties = (_a = uiDef.properties) !== null && _a !== void 0 ? _a : {};
|
|
885
|
+
}
|
|
886
|
+
}));
|
|
887
|
+
};
|
|
888
|
+
ProductComponent.prototype.init = function (quote, queryParams) {
|
|
889
|
+
var _this = this;
|
|
890
|
+
var _a;
|
|
891
|
+
var lineItemId = this.getLineItemId(quote, queryParams);
|
|
892
|
+
var currentStateItem = core.EntityUtil.findById(lineItemId, quote.currentState);
|
|
893
|
+
var productId = (_a = currentStateItem === null || currentStateItem === void 0 ? void 0 : currentStateItem.productId) !== null && _a !== void 0 ? _a : queryParams['productId'];
|
|
894
|
+
var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
|
|
895
|
+
if (currentStateItem) {
|
|
896
|
+
this.conigurationService.updateCurrentStates({
|
|
897
|
+
configurableRamp: currentStateItem,
|
|
898
|
+
currentState: quote.currentState,
|
|
899
|
+
});
|
|
823
900
|
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
901
|
+
this.runtimeService
|
|
902
|
+
.init({ productId: productId, offeringId: offeringId })
|
|
903
|
+
.pipe(rxjs.tap(function (context) { return (_this.uiDefinition = context === null || context === void 0 ? void 0 : context.uiDefinition); }), rxjs.switchMap(function () { return _this.customize(productId); }), rxjs.switchMap(function () { return _this.conigurationService.configure(); }), rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
|
|
904
|
+
var _a, _b;
|
|
905
|
+
if (!((_b = (_a = _this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
|
|
906
|
+
_this.messageService.add({ severity: 'error', summary: error });
|
|
907
|
+
}
|
|
908
|
+
_this.state$.next({ loading: false, failure: true });
|
|
909
|
+
return rxjs.of();
|
|
910
|
+
}), rxjs.takeUntil(this.destroy$))
|
|
911
|
+
.subscribe();
|
|
912
|
+
};
|
|
913
|
+
ProductComponent.prototype.getLineItemId = function (quote, queryParams) {
|
|
914
|
+
if (core.EntityUtil.isPresent(queryParams['lineItemId'])) {
|
|
915
|
+
return queryParams['lineItemId'];
|
|
916
|
+
}
|
|
917
|
+
return quote.currentState
|
|
918
|
+
.filter(function (lineItem) { return lineItem.productId === queryParams['productId']; })
|
|
919
|
+
.map(function (lineItem) { return lineItem.id; })
|
|
920
|
+
.find(function (id) { return id; });
|
|
921
|
+
};
|
|
922
|
+
return ProductComponent;
|
|
923
|
+
}());
|
|
924
|
+
ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i1__namespace$3.ConfigurationRuntimeService }, { token: i1__namespace$3.ConfigurationService }, { token: i2__namespace.QuoteService }, { token: i1__namespace.ActivatedRoute }, { token: i4__namespace$1.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
925
|
+
ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i2__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
926
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, decorators: [{
|
|
927
|
+
type: i0.Component,
|
|
928
|
+
args: [{
|
|
929
|
+
selector: 'vl-flow-product',
|
|
930
|
+
templateUrl: './product.component.html',
|
|
931
|
+
styleUrls: ['./product.component.scss'],
|
|
932
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
933
|
+
}]
|
|
934
|
+
}], ctorParameters: function () {
|
|
935
|
+
return [{ type: i1__namespace$3.ConfigurationRuntimeService }, { type: i1__namespace$3.ConfigurationService }, { type: i2__namespace.QuoteService }, { type: i1__namespace.ActivatedRoute }, { type: i4__namespace$1.MessageService }, { type: undefined, decorators: [{
|
|
936
|
+
type: i0.Optional
|
|
937
|
+
}, {
|
|
938
|
+
type: i0.Inject,
|
|
939
|
+
args: [FLOW_CUSTOMIZATION]
|
|
940
|
+
}] }];
|
|
941
|
+
} });
|
|
942
|
+
|
|
943
|
+
var ProductModule = /** @class */ (function () {
|
|
944
|
+
function ProductModule() {
|
|
832
945
|
}
|
|
833
|
-
return
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
};
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
templateUrl: './product.component.html',
|
|
847
|
-
styleUrls: ['./product.component.scss'],
|
|
848
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
849
|
-
}]
|
|
850
|
-
}], ctorParameters: function () {
|
|
851
|
-
return [{ type: i1__namespace$3.ConfigurationRuntimeService }, { type: i1__namespace$3.ConfigurationService }, { type: i2__namespace$1.QuoteService }, { type: i1__namespace.ActivatedRoute }, { type: i4__namespace$1.MessageService }, { type: undefined, decorators: [{
|
|
852
|
-
type: i0.Optional
|
|
853
|
-
}, {
|
|
854
|
-
type: i0.Inject,
|
|
855
|
-
args: [FLOW_CUSTOMIZATION]
|
|
856
|
-
}] }];
|
|
857
|
-
} });
|
|
946
|
+
return ProductModule;
|
|
947
|
+
}());
|
|
948
|
+
ProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
949
|
+
ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i5.CommonModule, i1$3.PreviewModule, i2$1.LoaderModule], exports: [ProductComponent] });
|
|
950
|
+
ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i5.CommonModule, i1$3.PreviewModule, i2$1.LoaderModule]] });
|
|
951
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, decorators: [{
|
|
952
|
+
type: i0.NgModule,
|
|
953
|
+
args: [{
|
|
954
|
+
declarations: [ProductComponent],
|
|
955
|
+
imports: [i5.CommonModule, i1$3.PreviewModule, i2$1.LoaderModule],
|
|
956
|
+
exports: [ProductComponent],
|
|
957
|
+
}]
|
|
958
|
+
}] });
|
|
858
959
|
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
960
|
+
var RecordNotFoundComponent = /** @class */ (function () {
|
|
961
|
+
function RecordNotFoundComponent(router, route) {
|
|
962
|
+
this.router = router;
|
|
963
|
+
this.route = route;
|
|
964
|
+
this.subMessage = '';
|
|
965
|
+
var navigation = this.router.getCurrentNavigation();
|
|
966
|
+
var state = ((navigation === null || navigation === void 0 ? void 0 : navigation.extras) || {}).state;
|
|
967
|
+
this.message = state === null || state === void 0 ? void 0 : state.message;
|
|
968
|
+
if (typeof this.message === 'string') {
|
|
969
|
+
this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return RecordNotFoundComponent;
|
|
973
|
+
}());
|
|
974
|
+
RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
975
|
+
RecordNotFoundComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0__namespace, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
976
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, decorators: [{
|
|
977
|
+
type: i0.Component,
|
|
978
|
+
args: [{
|
|
979
|
+
selector: 'vl-flow-record-not-found',
|
|
980
|
+
templateUrl: './record-not-found.component.html',
|
|
981
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
982
|
+
}]
|
|
983
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }]; } });
|
|
875
984
|
|
|
876
|
-
|
|
877
|
-
function
|
|
878
|
-
|
|
879
|
-
this.route = route;
|
|
880
|
-
this.subMessage = '';
|
|
881
|
-
var navigation = this.router.getCurrentNavigation();
|
|
882
|
-
var state = ((navigation === null || navigation === void 0 ? void 0 : navigation.extras) || {}).state;
|
|
883
|
-
this.message = state === null || state === void 0 ? void 0 : state.message;
|
|
884
|
-
if (typeof this.message === 'string') {
|
|
885
|
-
this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';
|
|
985
|
+
var routes = [{ path: '', component: RecordNotFoundComponent }];
|
|
986
|
+
var RecordNotFoundModule = /** @class */ (function () {
|
|
987
|
+
function RecordNotFoundModule() {
|
|
886
988
|
}
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }]; } });
|
|
989
|
+
return RecordNotFoundModule;
|
|
990
|
+
}());
|
|
991
|
+
RecordNotFoundModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
992
|
+
RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i5.CommonModule, i1__namespace.RouterModule] });
|
|
993
|
+
RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i5.CommonModule, i1.RouterModule.forChild(routes)]] });
|
|
994
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, decorators: [{
|
|
995
|
+
type: i0.NgModule,
|
|
996
|
+
args: [{
|
|
997
|
+
declarations: [RecordNotFoundComponent],
|
|
998
|
+
imports: [i5.CommonModule, i1.RouterModule.forChild(routes)],
|
|
999
|
+
}]
|
|
1000
|
+
}] });
|
|
900
1001
|
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
1002
|
+
var ShoppingCartComponent = /** @class */ (function () {
|
|
1003
|
+
function ShoppingCartComponent(templatesApi, cdr, toastService) {
|
|
1004
|
+
this.templatesApi = templatesApi;
|
|
1005
|
+
this.cdr = cdr;
|
|
1006
|
+
this.toastService = toastService;
|
|
1007
|
+
this.uiDefinition = undefined;
|
|
1008
|
+
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
|
1009
|
+
this.destroyed$ = new rxjs.Subject();
|
|
1010
|
+
}
|
|
1011
|
+
ShoppingCartComponent.prototype.ngOnInit = function () {
|
|
1012
|
+
var _this = this;
|
|
1013
|
+
this.generateUIDefinition$()
|
|
1014
|
+
.pipe(rxjs.tap(function (uiDef) {
|
|
1015
|
+
if (!uiDef) {
|
|
1016
|
+
throw 'Not found';
|
|
1017
|
+
}
|
|
1018
|
+
_this.uiDefinition = uiDef;
|
|
1019
|
+
_this.state$.next({ loading: false, failure: false });
|
|
1020
|
+
}), rxjs.catchError(function (err) {
|
|
1021
|
+
_this.uiDefinition = undefined;
|
|
1022
|
+
_this.toastService.add({ severity: i2$1.ToastType.error, summary: 'Failed to resolve Shopping Cart component' });
|
|
1023
|
+
_this.state$.next({ loading: false, failure: true });
|
|
1024
|
+
throw err;
|
|
1025
|
+
}), rxjs.takeUntil(this.destroyed$))
|
|
1026
|
+
.subscribe(function () { return _this.cdr.detectChanges(); });
|
|
1027
|
+
};
|
|
1028
|
+
ShoppingCartComponent.prototype.ngOnDestroy = function () {
|
|
1029
|
+
this.destroyed$.next();
|
|
1030
|
+
this.destroyed$.complete();
|
|
1031
|
+
};
|
|
1032
|
+
ShoppingCartComponent.prototype.getTemplateRootComponent$ = function (template) {
|
|
1033
|
+
return this.templatesApi
|
|
1034
|
+
.fetchComponents$(template.id)
|
|
1035
|
+
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === core.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
|
|
1036
|
+
};
|
|
1037
|
+
ShoppingCartComponent.prototype.getShoppingCartComponentMeta$ = function () {
|
|
1038
|
+
var _this = this;
|
|
1039
|
+
return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.filter(function (template) { return template.type === core.UITemplateType.SHOPPING_CART; }).reverse()[0]; }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
|
|
1040
|
+
};
|
|
1041
|
+
ShoppingCartComponent.prototype.generateUIDefinition$ = function () {
|
|
1042
|
+
return this.getShoppingCartComponentMeta$().pipe(rxjs.map(function (meta) {
|
|
1043
|
+
if (!meta) {
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
var uiDef = {
|
|
1047
|
+
name: '',
|
|
1048
|
+
createdTimestamp: 0,
|
|
1049
|
+
primary: true,
|
|
1050
|
+
type: 'DEFAULT',
|
|
1051
|
+
version: 2,
|
|
1052
|
+
children: [
|
|
1053
|
+
{
|
|
1054
|
+
children: [],
|
|
1055
|
+
template: meta.html && btoa(meta.html),
|
|
1056
|
+
script: meta.js && btoa(meta.js),
|
|
1057
|
+
styles: meta.css && btoa(meta.css),
|
|
1058
|
+
},
|
|
1059
|
+
],
|
|
1060
|
+
};
|
|
1061
|
+
return uiDef;
|
|
1062
|
+
}));
|
|
1063
|
+
};
|
|
1064
|
+
return ShoppingCartComponent;
|
|
1065
|
+
}());
|
|
1066
|
+
ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$1.UITemplatesApiService }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$1.ToastService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1067
|
+
ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i2__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1068
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
|
|
1069
|
+
type: i0.Component,
|
|
1070
|
+
args: [{
|
|
1071
|
+
selector: 'vl-flow-shopping-cart',
|
|
1072
|
+
templateUrl: './shopping-cart.component.html',
|
|
1073
|
+
styleUrls: ['./shopping-cart.component.scss'],
|
|
1074
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1075
|
+
}]
|
|
1076
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.UITemplatesApiService }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$1.ToastService }]; } });
|
|
917
1077
|
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
this.contextService = contextService;
|
|
921
|
-
this.router = router;
|
|
922
|
-
this.routerService = routerService;
|
|
923
|
-
}
|
|
924
|
-
ContextResolver.prototype.handleError = function (route, message) {
|
|
925
|
-
this.contextService.delete();
|
|
926
|
-
var parentUrl = this.routerService.getFlowRootPath(route);
|
|
927
|
-
return rxjs.from(this.router.navigate([parentUrl, '404'], { state: { message: message } }));
|
|
928
|
-
};
|
|
929
|
-
ContextResolver.prototype.resolve = function (route) {
|
|
930
|
-
var _this = this;
|
|
931
|
-
var queryParams = route.queryParams, data = route.data;
|
|
932
|
-
var uiDefinitionId = queryParams.uiDefinitionId;
|
|
933
|
-
var _a = data !== null && data !== void 0 ? data : {}, headerId = _a.headerId, mode = _a.mode;
|
|
934
|
-
var currentContext = this.contextService.resolve();
|
|
935
|
-
if (headerId && (currentContext === null || currentContext === void 0 ? void 0 : currentContext.headerId) === headerId) {
|
|
936
|
-
return rxjs.of(currentContext);
|
|
1078
|
+
var ShoppingCartModule = /** @class */ (function () {
|
|
1079
|
+
function ShoppingCartModule() {
|
|
937
1080
|
}
|
|
938
|
-
return
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
type: i0.Injectable
|
|
952
|
-
}], ctorParameters: function () { return [{ type: i2__namespace$1.ContextService }, { type: i1__namespace.Router }, { type: RouterService }]; } });
|
|
1081
|
+
return ShoppingCartModule;
|
|
1082
|
+
}());
|
|
1083
|
+
ShoppingCartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1084
|
+
ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i5.CommonModule, i1$3.PreviewModule, i2$1.LoaderModule], exports: [ShoppingCartComponent] });
|
|
1085
|
+
ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i5.CommonModule, i1$3.PreviewModule, i2$1.LoaderModule]] });
|
|
1086
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, decorators: [{
|
|
1087
|
+
type: i0.NgModule,
|
|
1088
|
+
args: [{
|
|
1089
|
+
declarations: [ShoppingCartComponent],
|
|
1090
|
+
imports: [i5.CommonModule, i1$3.PreviewModule, i2$1.LoaderModule],
|
|
1091
|
+
exports: [ShoppingCartComponent],
|
|
1092
|
+
}]
|
|
1093
|
+
}] });
|
|
953
1094
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}
|
|
960
|
-
FlowResolver.prototype.handleError = function (route, message, queryParams) {
|
|
961
|
-
var parentUrl = this.routerService.getFlowRootPath(route);
|
|
962
|
-
return this.router.navigate([parentUrl, '404'], {
|
|
963
|
-
queryParams: queryParams,
|
|
964
|
-
state: {
|
|
965
|
-
message: message,
|
|
966
|
-
},
|
|
967
|
-
});
|
|
968
|
-
};
|
|
969
|
-
FlowResolver.prototype.resolve = function (route) {
|
|
970
|
-
var _this = this;
|
|
971
|
-
var queryParams = route.queryParams;
|
|
972
|
-
var flowId = queryParams.flowId;
|
|
973
|
-
if (!flowId) {
|
|
974
|
-
return this.handleError(route);
|
|
1095
|
+
var ContextResolver = /** @class */ (function () {
|
|
1096
|
+
function ContextResolver(contextService, router, routerService) {
|
|
1097
|
+
this.contextService = contextService;
|
|
1098
|
+
this.router = router;
|
|
1099
|
+
this.routerService = routerService;
|
|
975
1100
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1101
|
+
ContextResolver.prototype.handleError = function (route, message) {
|
|
1102
|
+
this.contextService.delete();
|
|
1103
|
+
var parentUrl = this.routerService.getFlowRootPath(route);
|
|
1104
|
+
return rxjs.from(this.router.navigate([parentUrl, '404'], { state: { message: message } }));
|
|
1105
|
+
};
|
|
1106
|
+
ContextResolver.prototype.resolve = function (route) {
|
|
1107
|
+
var _this = this;
|
|
1108
|
+
var queryParams = route.queryParams, data = route.data;
|
|
1109
|
+
var uiDefinitionId = queryParams.uiDefinitionId;
|
|
1110
|
+
var _a = data !== null && data !== void 0 ? data : {}, headerId = _a.headerId, mode = _a.mode;
|
|
1111
|
+
var currentContext = this.contextService.resolve();
|
|
1112
|
+
if (headerId && (currentContext === null || currentContext === void 0 ? void 0 : currentContext.headerId) === headerId) {
|
|
1113
|
+
return rxjs.of(currentContext);
|
|
979
1114
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
var mergedParams = Object.assign(Object.assign({}, queryParams), flowQueryParams);
|
|
984
|
-
var parentUrl = _this.routerService.getFlowRootPath(route);
|
|
985
|
-
var entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
|
|
986
|
-
.split('/')
|
|
987
|
-
.filter(Boolean);
|
|
988
|
-
return _this.router
|
|
989
|
-
.navigate(__spreadArray([parentUrl], __read(entryUrl)), {
|
|
990
|
-
queryParams: mergedParams,
|
|
991
|
-
replaceUrl: true,
|
|
992
|
-
})
|
|
993
|
-
.catch(function (e) {
|
|
1115
|
+
return this.contextService.create(headerId, mode).pipe(operators.tap(function (context) {
|
|
1116
|
+
_this.contextService.update(Object.assign(Object.assign({}, context), { uiDefinitionId: uiDefinitionId, properties: Object.assign(Object.assign(Object.assign({}, currentContext === null || currentContext === void 0 ? void 0 : currentContext.properties), context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})) }));
|
|
1117
|
+
}), operators.catchError(function (e) {
|
|
994
1118
|
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
|
995
|
-
|
|
1119
|
+
_this.handleError(route, message);
|
|
1120
|
+
return rxjs.of(null);
|
|
1121
|
+
}));
|
|
1122
|
+
};
|
|
1123
|
+
return ContextResolver;
|
|
1124
|
+
}());
|
|
1125
|
+
ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i2__namespace.ContextService }, { token: i1__namespace.Router }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1126
|
+
ContextResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver });
|
|
1127
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, decorators: [{
|
|
1128
|
+
type: i0.Injectable
|
|
1129
|
+
}], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i1__namespace.Router }, { type: RouterService }]; } });
|
|
1130
|
+
|
|
1131
|
+
var FlowResolver = /** @class */ (function () {
|
|
1132
|
+
function FlowResolver(router, flowService, routerService) {
|
|
1133
|
+
this.router = router;
|
|
1134
|
+
this.flowService = flowService;
|
|
1135
|
+
this.routerService = routerService;
|
|
1136
|
+
}
|
|
1137
|
+
FlowResolver.prototype.handleError = function (route, message, queryParams) {
|
|
1138
|
+
var parentUrl = this.routerService.getFlowRootPath(route);
|
|
1139
|
+
return this.router.navigate([parentUrl, '404'], {
|
|
1140
|
+
queryParams: queryParams,
|
|
1141
|
+
state: {
|
|
1142
|
+
message: message,
|
|
1143
|
+
},
|
|
996
1144
|
});
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1145
|
+
};
|
|
1146
|
+
FlowResolver.prototype.resolve = function (route) {
|
|
1147
|
+
var _this = this;
|
|
1148
|
+
var queryParams = route.queryParams;
|
|
1149
|
+
var flowId = queryParams.flowId;
|
|
1150
|
+
if (!flowId) {
|
|
1151
|
+
return this.handleError(route);
|
|
1152
|
+
}
|
|
1153
|
+
return this.flowService.getFlow(flowId).pipe(operators.map(function (flow) {
|
|
1154
|
+
if (!flow) {
|
|
1155
|
+
return _this.handleError(route, "Flow with flowId=" + flowId + " is not defined");
|
|
1156
|
+
}
|
|
1157
|
+
var properties = flow.properties;
|
|
1158
|
+
var flowQueryParams = properties.queryParams, entryPath = properties.entryPath;
|
|
1159
|
+
var isProductFlow = entryPath.includes('/product');
|
|
1160
|
+
var mergedParams = Object.assign(Object.assign(Object.assign({}, queryParams), flowQueryParams), Object.assign({}, (isProductFlow && { standalone: true })));
|
|
1161
|
+
var parentUrl = _this.routerService.getFlowRootPath(route);
|
|
1162
|
+
var entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
|
|
1163
|
+
.split('/')
|
|
1164
|
+
.filter(Boolean);
|
|
1165
|
+
return _this.router
|
|
1166
|
+
.navigate(__spreadArray([parentUrl], __read(entryUrl)), {
|
|
1167
|
+
queryParams: mergedParams,
|
|
1168
|
+
replaceUrl: true,
|
|
1169
|
+
})
|
|
1170
|
+
.catch(function (e) {
|
|
1171
|
+
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
|
1172
|
+
return _this.handleError(route, message, mergedParams);
|
|
1173
|
+
});
|
|
1174
|
+
}));
|
|
1175
|
+
};
|
|
1176
|
+
return FlowResolver;
|
|
1177
|
+
}());
|
|
1178
|
+
FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace.Router }, { token: FlowService }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1179
|
+
FlowResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver });
|
|
1180
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, decorators: [{
|
|
1181
|
+
type: i0.Injectable
|
|
1182
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: FlowService }, { type: RouterService }]; } });
|
|
1006
1183
|
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
}
|
|
1013
|
-
QuoteResolver.prototype.handleError = function (route, message) {
|
|
1014
|
-
var parentUrl = this.routerService.getFlowRootPath(route);
|
|
1015
|
-
return rxjs.from(this.router.navigate([parentUrl, '404'], { state: { message: message } }));
|
|
1016
|
-
};
|
|
1017
|
-
QuoteResolver.prototype.resolve = function (route) {
|
|
1018
|
-
var _this = this;
|
|
1019
|
-
var headerId = route.data.headerId;
|
|
1020
|
-
var quote = this.quoteService.getQuote();
|
|
1021
|
-
if (quote && quote.quoteId === headerId) {
|
|
1022
|
-
return rxjs.of(true);
|
|
1184
|
+
var QuoteResolver = /** @class */ (function () {
|
|
1185
|
+
function QuoteResolver(router, quoteService, routerService) {
|
|
1186
|
+
this.router = router;
|
|
1187
|
+
this.quoteService = quoteService;
|
|
1188
|
+
this.routerService = routerService;
|
|
1023
1189
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1190
|
+
QuoteResolver.prototype.handleError = function (route, message) {
|
|
1191
|
+
var parentUrl = this.routerService.getFlowRootPath(route);
|
|
1192
|
+
return rxjs.from(this.router.navigate([parentUrl, '404'], { state: { message: message } }));
|
|
1193
|
+
};
|
|
1194
|
+
QuoteResolver.prototype.resolve = function (route) {
|
|
1195
|
+
var _this = this;
|
|
1196
|
+
var headerId = route.data.headerId;
|
|
1197
|
+
var quote = this.quoteService.getQuote();
|
|
1198
|
+
if (quote && quote.quoteId === headerId) {
|
|
1199
|
+
return rxjs.of(true);
|
|
1200
|
+
}
|
|
1201
|
+
var queryParams = route.queryParams;
|
|
1202
|
+
return this.quoteService.init(headerId, queryParams).pipe(rxjs.catchError(function (e) {
|
|
1203
|
+
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
|
1204
|
+
return _this.handleError(route, message);
|
|
1205
|
+
}));
|
|
1206
|
+
};
|
|
1207
|
+
return QuoteResolver;
|
|
1208
|
+
}());
|
|
1209
|
+
QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace.Router }, { token: i2__namespace.QuoteService }, { token: RouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1210
|
+
QuoteResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver });
|
|
1211
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, decorators: [{
|
|
1212
|
+
type: i0.Injectable
|
|
1213
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i2__namespace.QuoteService }, { type: RouterService }]; } });
|
|
1037
1214
|
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1215
|
+
var rootRoute = {
|
|
1216
|
+
id: VELOCE_FLOW_ROOT_ROUTE,
|
|
1217
|
+
path: '',
|
|
1218
|
+
component: FlowComponent,
|
|
1219
|
+
canActivate: [RootGuard],
|
|
1220
|
+
canDeactivate: [RootGuard],
|
|
1221
|
+
children: [
|
|
1222
|
+
{
|
|
1223
|
+
path: 'flows',
|
|
1224
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1225
|
+
resolve: { quote: FlowResolver },
|
|
1226
|
+
canActivate: [ContextGuard],
|
|
1227
|
+
children: [],
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
path: 'legacy',
|
|
1231
|
+
children: [
|
|
1232
|
+
{
|
|
1233
|
+
path: 'product',
|
|
1234
|
+
component: LegacyProductComponent,
|
|
1235
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1236
|
+
resolve: { context: ContextResolver, quote: QuoteResolver },
|
|
1237
|
+
canActivate: [ContextGuard],
|
|
1238
|
+
},
|
|
1239
|
+
],
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
path: 'product',
|
|
1243
|
+
component: ProductComponent,
|
|
1244
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1245
|
+
resolve: { context: ContextResolver, quote: QuoteResolver },
|
|
1246
|
+
canActivate: [ContextGuard],
|
|
1247
|
+
data: { showHeader: true },
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
path: 'cart',
|
|
1251
|
+
component: ShoppingCartComponent,
|
|
1252
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1253
|
+
resolve: { context: ContextResolver, quote: QuoteResolver },
|
|
1254
|
+
canActivate: [ContextGuard],
|
|
1255
|
+
data: { showHeader: true },
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
path: 'debug',
|
|
1259
|
+
loadChildren: function () { return DebugModule; },
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
path: '404',
|
|
1263
|
+
loadChildren: function () { return RecordNotFoundModule; },
|
|
1264
|
+
},
|
|
1265
|
+
],
|
|
1266
|
+
};
|
|
1267
|
+
var FlowRoutingModule = /** @class */ (function () {
|
|
1268
|
+
function FlowRoutingModule() {
|
|
1269
|
+
}
|
|
1270
|
+
return FlowRoutingModule;
|
|
1271
|
+
}());
|
|
1272
|
+
FlowRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1273
|
+
FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule], exports: [i1.RouterModule] });
|
|
1274
|
+
FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [RouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule], i1.RouterModule] });
|
|
1275
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, decorators: [{
|
|
1276
|
+
type: i0.NgModule,
|
|
1277
|
+
args: [{
|
|
1278
|
+
imports: [i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],
|
|
1279
|
+
exports: [i1.RouterModule],
|
|
1280
|
+
providers: [RouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],
|
|
1281
|
+
}]
|
|
1282
|
+
}] });
|
|
1097
1283
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1284
|
+
var FlowModule = /** @class */ (function () {
|
|
1285
|
+
function FlowModule() {
|
|
1286
|
+
}
|
|
1287
|
+
return FlowModule;
|
|
1288
|
+
}());
|
|
1289
|
+
FlowModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1290
|
+
FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i5.CommonModule, FlowRoutingModule, i1$1.ApiModule, i1$3.LauncherModule, i2$1.LoaderModule, FlowHeaderModule] });
|
|
1291
|
+
FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, i2.ContextService], imports: [[i5.CommonModule, FlowRoutingModule, i1$1.ApiModule, i1$3.LauncherModule, i2$1.LoaderModule, FlowHeaderModule]] });
|
|
1292
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, decorators: [{
|
|
1293
|
+
type: i0.NgModule,
|
|
1294
|
+
args: [{
|
|
1295
|
+
declarations: [FlowComponent],
|
|
1296
|
+
imports: [i5.CommonModule, FlowRoutingModule, i1$1.ApiModule, i1$3.LauncherModule, i2$1.LoaderModule, FlowHeaderModule],
|
|
1297
|
+
providers: [FlowService, i2.ContextService],
|
|
1298
|
+
}]
|
|
1299
|
+
}] });
|
|
1114
1300
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1301
|
+
/**
|
|
1302
|
+
* Generated bundle index. Do not edit.
|
|
1303
|
+
*/
|
|
1118
1304
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1305
|
+
exports.ContextGuard = ContextGuard;
|
|
1306
|
+
exports.FLOW_CUSTOMIZATION = FLOW_CUSTOMIZATION;
|
|
1307
|
+
exports.FlowModule = FlowModule;
|
|
1308
|
+
exports.FlowService = FlowService;
|
|
1309
|
+
exports.VELOCE_FLOW_ROOT_ROUTE = VELOCE_FLOW_ROOT_ROUTE;
|
|
1124
1310
|
|
|
1125
|
-
|
|
1311
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1126
1312
|
|
|
1127
1313
|
}));
|
|
1128
1314
|
//# sourceMappingURL=veloce-sdk.umd.js.map
|