@skyux/inline-form 5.0.0-alpha.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/skyux-inline-form.umd.js +160 -335
- package/bundles/skyux-inline-form.umd.js.map +1 -1
- package/documentation.json +1084 -0
- package/esm2015/modules/inline-form/animations/slide-dissolve.js +1 -1
- package/esm2015/modules/inline-form/inline-form-adapter.service.js +10 -8
- package/esm2015/modules/inline-form/inline-form.component.js +37 -37
- package/esm2015/modules/inline-form/inline-form.module.js +25 -24
- package/esm2015/modules/inline-form/types/inline-form-button-action.js +2 -1
- package/esm2015/modules/inline-form/types/inline-form-button-config.js +2 -1
- package/esm2015/modules/inline-form/types/inline-form-button-layout.js +1 -1
- package/esm2015/modules/inline-form/types/inline-form-close-args.js +2 -1
- package/esm2015/modules/inline-form/types/inline-form-config.js +2 -1
- package/esm2015/modules/shared/sky-inline-form-resources.module.js +41 -0
- package/esm2015/public-api.js +10 -0
- package/esm2015/skyux-inline-form.js +2 -7
- package/fesm2015/skyux-inline-form.js +140 -121
- package/fesm2015/skyux-inline-form.js.map +1 -1
- package/modules/inline-form/inline-form-adapter.service.d.ts +3 -0
- package/modules/inline-form/inline-form.component.d.ts +3 -0
- package/modules/inline-form/inline-form.module.d.ts +7 -0
- package/modules/shared/sky-inline-form-resources.module.d.ts +14 -0
- package/package.json +9 -24
- package/{public_api.d.ts → public-api.d.ts} +1 -0
- package/skyux-inline-form.d.ts +2 -6
- package/CHANGELOG.md +0 -53
- package/bundles/skyux-inline-form.umd.min.js +0 -16
- package/bundles/skyux-inline-form.umd.min.js.map +0 -1
- package/esm2015/modules/shared/inline-form-resources.module.js +0 -20
- package/esm2015/plugin-resources/inline-form-resources-provider.js +0 -16
- package/esm2015/public_api.js +0 -3
- package/esm5/modules/inline-form/animations/slide-dissolve.js +0 -30
- package/esm5/modules/inline-form/inline-form-adapter.service.js +0 -64
- package/esm5/modules/inline-form/inline-form.component.js +0 -238
- package/esm5/modules/inline-form/inline-form.module.js +0 -32
- package/esm5/modules/inline-form/types/inline-form-button-action.js +0 -1
- package/esm5/modules/inline-form/types/inline-form-button-config.js +0 -1
- package/esm5/modules/inline-form/types/inline-form-button-layout.js +0 -9
- package/esm5/modules/inline-form/types/inline-form-close-args.js +0 -1
- package/esm5/modules/inline-form/types/inline-form-config.js +0 -1
- package/esm5/modules/shared/inline-form-resources.module.js +0 -23
- package/esm5/plugin-resources/inline-form-resources-provider.js +0 -17
- package/esm5/public_api.js +0 -3
- package/esm5/skyux-inline-form.js +0 -10
- package/fesm5/skyux-inline-form.js +0 -397
- package/fesm5/skyux-inline-form.js.map +0 -1
- package/modules/shared/inline-form-resources.module.d.ts +0 -2
- package/plugin-resources/inline-form-resources-provider.d.ts +0 -5
- package/skyux-inline-form.metadata.json +0 -1
- package/src/assets/img/anatomy.png +0 -0
- package/src/assets/locales/resources_en_US.json +0 -18
|
@@ -1,228 +1,72 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/inline-form', ['exports', '@angular/common', '@angular/core', '
|
|
4
|
-
(global = global || self, factory((global.skyux = global.skyux || {}, global.skyux['inline-form'] = {}), global.ng.common, global.ng.core, global.
|
|
5
|
-
}(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@skyux/i18n'), require('@skyux/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@skyux/inline-form', ['exports', '@angular/common', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/animations', '@skyux/i18n', '@skyux/core'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux['inline-form'] = {}), global.ng.common, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.animations, global.i2, global.i3));
|
|
5
|
+
}(this, (function (exports, i4, i0, rxjs, operators, animations, i2, i3) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
27
|
-
return extendStatics(d, b);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
function __extends(d, b) {
|
|
31
|
-
extendStatics(d, b);
|
|
32
|
-
function __() { this.constructor = d; }
|
|
33
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var __assign = function() {
|
|
37
|
-
__assign = Object.assign || function __assign(t) {
|
|
38
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
-
s = arguments[i];
|
|
40
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
41
|
-
}
|
|
42
|
-
return t;
|
|
43
|
-
};
|
|
44
|
-
return __assign.apply(this, arguments);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
function __rest(s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function __decorate(decorators, target, key, desc) {
|
|
60
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
62
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
63
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function __param(paramIndex, decorator) {
|
|
67
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function __metadata(metadataKey, metadataValue) {
|
|
71
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
75
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
76
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
77
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
78
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
79
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
80
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function __generator(thisArg, body) {
|
|
85
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
86
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
87
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
88
|
-
function step(op) {
|
|
89
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
90
|
-
while (_) try {
|
|
91
|
-
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) return t;
|
|
92
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
93
|
-
switch (op[0]) {
|
|
94
|
-
case 0: case 1: t = op; break;
|
|
95
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
96
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
97
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
98
|
-
default:
|
|
99
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
100
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
101
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
102
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
103
|
-
if (t[2]) _.ops.pop();
|
|
104
|
-
_.trys.pop(); continue;
|
|
105
|
-
}
|
|
106
|
-
op = body.call(thisArg, _);
|
|
107
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
108
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function __createBinding(o, m, k, k2) {
|
|
113
|
-
if (k2 === undefined) k2 = k;
|
|
114
|
-
o[k2] = m[k];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function __exportStar(m, exports) {
|
|
118
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function __values(o) {
|
|
122
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
123
|
-
if (m) return m.call(o);
|
|
124
|
-
if (o && typeof o.length === "number") return {
|
|
125
|
-
next: function () {
|
|
126
|
-
if (o && i >= o.length) o = void 0;
|
|
127
|
-
return { value: o && o[i++], done: !o };
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function __read(o, n) {
|
|
134
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
135
|
-
if (!m) return o;
|
|
136
|
-
var i = m.call(o), r, ar = [], e;
|
|
137
|
-
try {
|
|
138
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
139
|
-
}
|
|
140
|
-
catch (error) { e = { error: error }; }
|
|
141
|
-
finally {
|
|
142
|
-
try {
|
|
143
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
144
|
-
}
|
|
145
|
-
finally { if (e) throw e.error; }
|
|
146
|
-
}
|
|
147
|
-
return ar;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function __spread() {
|
|
151
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
152
|
-
ar = ar.concat(__read(arguments[i]));
|
|
153
|
-
return ar;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function __spreadArrays() {
|
|
157
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
158
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
159
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
160
|
-
r[k] = a[j];
|
|
161
|
-
return r;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
function __await(v) {
|
|
165
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
169
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
170
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
171
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
172
|
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
173
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
174
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
175
|
-
function fulfill(value) { resume("next", value); }
|
|
176
|
-
function reject(value) { resume("throw", value); }
|
|
177
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function __asyncDelegator(o) {
|
|
181
|
-
var i, p;
|
|
182
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
183
|
-
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; }
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function __asyncValues(o) {
|
|
187
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
188
|
-
var m = o[Symbol.asyncIterator], i;
|
|
189
|
-
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);
|
|
190
|
-
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); }); }; }
|
|
191
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function __makeTemplateObject(cooked, raw) {
|
|
195
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
196
|
-
return cooked;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
function __importStar(mod) {
|
|
200
|
-
if (mod && mod.__esModule) return mod;
|
|
201
|
-
var result = {};
|
|
202
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
203
|
-
result.default = mod;
|
|
204
|
-
return result;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function __importDefault(mod) {
|
|
208
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
212
|
-
if (!privateMap.has(receiver)) {
|
|
213
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
214
|
-
}
|
|
215
|
-
return privateMap.get(receiver);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
219
|
-
if (!privateMap.has(receiver)) {
|
|
220
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
221
|
-
}
|
|
222
|
-
privateMap.set(receiver, value);
|
|
223
|
-
return value;
|
|
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 () {
|
|
17
|
+
return e[k];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n['default'] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
224
25
|
}
|
|
225
26
|
|
|
27
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
28
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
29
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
30
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
31
|
+
|
|
32
|
+
var skySlideDissolve = animations.trigger('skySlideDissolve', [
|
|
33
|
+
animations.transition('* <=> *', [
|
|
34
|
+
// Expand animations
|
|
35
|
+
animations.query('.sky-slide-dissolve-last:enter', [
|
|
36
|
+
animations.style({ height: 0, opacity: 0 }),
|
|
37
|
+
animations.animate('200ms ease-in', animations.style({ height: '*', opacity: 0 }))
|
|
38
|
+
], { optional: true }),
|
|
39
|
+
animations.query('.sky-slide-dissolve-last:enter', [
|
|
40
|
+
animations.style({ opacity: 0 }),
|
|
41
|
+
animations.animate('200ms ease-in', animations.style({ opacity: 1 }))
|
|
42
|
+
], { optional: true }),
|
|
43
|
+
// Collapse animations
|
|
44
|
+
// The expanded content should fade out immediately to prevent
|
|
45
|
+
// any overlap with the read-only content that's returning to the screen.
|
|
46
|
+
animations.query('.sky-slide-dissolve-last:leave', [
|
|
47
|
+
animations.animate('0ms', animations.style({ opacity: 0 }))
|
|
48
|
+
], { optional: true }),
|
|
49
|
+
animations.group([
|
|
50
|
+
animations.query('.sky-slide-dissolve-first:enter', [
|
|
51
|
+
animations.style({ opacity: 0, height: 0 }),
|
|
52
|
+
animations.animate('100ms ease-in', animations.style({ opacity: 1, height: '*' }))
|
|
53
|
+
], { optional: true }),
|
|
54
|
+
animations.query('.sky-slide-dissolve-last:leave', [
|
|
55
|
+
animations.animate('200ms ease-in', animations.style({ height: 0 }))
|
|
56
|
+
], { optional: true })
|
|
57
|
+
])
|
|
58
|
+
])
|
|
59
|
+
]);
|
|
60
|
+
|
|
61
|
+
exports.SkyInlineFormButtonLayout = void 0;
|
|
62
|
+
(function (SkyInlineFormButtonLayout) {
|
|
63
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
64
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
65
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
66
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
67
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
68
|
+
})(exports.SkyInlineFormButtonLayout || (exports.SkyInlineFormButtonLayout = {}));
|
|
69
|
+
|
|
226
70
|
/* tslint:disable */
|
|
227
71
|
var SKY_TABBABLE_SELECTOR = [
|
|
228
72
|
'a[href]',
|
|
@@ -268,6 +112,7 @@
|
|
|
268
112
|
if (isHidden) {
|
|
269
113
|
return false;
|
|
270
114
|
}
|
|
115
|
+
/* istanbul ignore next */
|
|
271
116
|
var hasBounds = !!(element.offsetWidth ||
|
|
272
117
|
element.offsetHeight ||
|
|
273
118
|
element.getClientRects().length);
|
|
@@ -278,49 +123,13 @@
|
|
|
278
123
|
list[0].focus();
|
|
279
124
|
}
|
|
280
125
|
};
|
|
281
|
-
SkyInlineFormAdapterService = __decorate([
|
|
282
|
-
core.Injectable()
|
|
283
|
-
], SkyInlineFormAdapterService);
|
|
284
126
|
return SkyInlineFormAdapterService;
|
|
285
127
|
}());
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
animations.style({ height: 0, opacity: 0 }),
|
|
292
|
-
animations.animate('200ms ease-in', animations.style({ height: '*', opacity: 0 }))
|
|
293
|
-
], { optional: true }),
|
|
294
|
-
animations.query('.sky-slide-dissolve-last:enter', [
|
|
295
|
-
animations.style({ opacity: 0 }),
|
|
296
|
-
animations.animate('200ms ease-in', animations.style({ opacity: 1 }))
|
|
297
|
-
], { optional: true }),
|
|
298
|
-
// Collapse animations
|
|
299
|
-
// The expanded content should fade out immediately to prevent
|
|
300
|
-
// any overlap with the read-only content that's returning to the screen.
|
|
301
|
-
animations.query('.sky-slide-dissolve-last:leave', [
|
|
302
|
-
animations.animate('0ms', animations.style({ opacity: 0 }))
|
|
303
|
-
], { optional: true }),
|
|
304
|
-
animations.group([
|
|
305
|
-
animations.query('.sky-slide-dissolve-first:enter', [
|
|
306
|
-
animations.style({ opacity: 0, height: 0 }),
|
|
307
|
-
animations.animate('100ms ease-in', animations.style({ opacity: 1, height: '*' }))
|
|
308
|
-
], { optional: true }),
|
|
309
|
-
animations.query('.sky-slide-dissolve-last:leave', [
|
|
310
|
-
animations.animate('200ms ease-in', animations.style({ height: 0 }))
|
|
311
|
-
], { optional: true })
|
|
312
|
-
])
|
|
313
|
-
])
|
|
314
|
-
]);
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
(function (SkyInlineFormButtonLayout) {
|
|
318
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
319
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
320
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
321
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
322
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
323
|
-
})(exports.SkyInlineFormButtonLayout || (exports.SkyInlineFormButtonLayout = {}));
|
|
128
|
+
SkyInlineFormAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormAdapterService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
129
|
+
SkyInlineFormAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormAdapterService });
|
|
130
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormAdapterService, decorators: [{
|
|
131
|
+
type: i0.Injectable
|
|
132
|
+
}] });
|
|
324
133
|
|
|
325
134
|
/**
|
|
326
135
|
* Renders form content in the current view instead of a separate modal.
|
|
@@ -335,7 +144,7 @@
|
|
|
335
144
|
/**
|
|
336
145
|
* Fires when users close the inline form.
|
|
337
146
|
*/
|
|
338
|
-
this.close = new
|
|
147
|
+
this.close = new i0.EventEmitter();
|
|
339
148
|
this._showForm = false;
|
|
340
149
|
}
|
|
341
150
|
Object.defineProperty(SkyInlineFormComponent.prototype, "config", {
|
|
@@ -352,7 +161,7 @@
|
|
|
352
161
|
this.setupButtons();
|
|
353
162
|
}
|
|
354
163
|
},
|
|
355
|
-
enumerable:
|
|
164
|
+
enumerable: false,
|
|
356
165
|
configurable: true
|
|
357
166
|
});
|
|
358
167
|
Object.defineProperty(SkyInlineFormComponent.prototype, "showForm", {
|
|
@@ -376,7 +185,7 @@
|
|
|
376
185
|
});
|
|
377
186
|
}
|
|
378
187
|
},
|
|
379
|
-
enumerable:
|
|
188
|
+
enumerable: false,
|
|
380
189
|
configurable: true
|
|
381
190
|
});
|
|
382
191
|
SkyInlineFormComponent.prototype.ngOnInit = function () {
|
|
@@ -505,10 +314,12 @@
|
|
|
505
314
|
SkyInlineFormComponent.prototype.getCustomButtons = function (buttonConfigs) {
|
|
506
315
|
var buttons = [];
|
|
507
316
|
buttonConfigs.forEach(function (config) {
|
|
317
|
+
/* istanbul ignore next */
|
|
318
|
+
var styleType = config.styleType || 'default';
|
|
508
319
|
buttons.push({
|
|
509
320
|
action: config.action,
|
|
510
321
|
disabled: config.disabled,
|
|
511
|
-
styleType:
|
|
322
|
+
styleType: styleType,
|
|
512
323
|
text: config.text
|
|
513
324
|
});
|
|
514
325
|
});
|
|
@@ -519,98 +330,112 @@
|
|
|
519
330
|
config.buttonLayout === exports.SkyInlineFormButtonLayout.Custom &&
|
|
520
331
|
config.buttons.length > 0);
|
|
521
332
|
};
|
|
522
|
-
SkyInlineFormComponent.ctorParameters = function () { return [
|
|
523
|
-
{ type: SkyInlineFormAdapterService },
|
|
524
|
-
{ type: core.ElementRef },
|
|
525
|
-
{ type: i18n.SkyLibResourcesService },
|
|
526
|
-
{ type: core$1.SkyAppWindowRef },
|
|
527
|
-
{ type: core.ChangeDetectorRef }
|
|
528
|
-
]; };
|
|
529
|
-
__decorate([
|
|
530
|
-
core.Input()
|
|
531
|
-
], SkyInlineFormComponent.prototype, "config", null);
|
|
532
|
-
__decorate([
|
|
533
|
-
core.Input()
|
|
534
|
-
], SkyInlineFormComponent.prototype, "template", void 0);
|
|
535
|
-
__decorate([
|
|
536
|
-
core.Input()
|
|
537
|
-
], SkyInlineFormComponent.prototype, "showForm", null);
|
|
538
|
-
__decorate([
|
|
539
|
-
core.Output()
|
|
540
|
-
], SkyInlineFormComponent.prototype, "close", void 0);
|
|
541
|
-
SkyInlineFormComponent = __decorate([
|
|
542
|
-
core.Component({
|
|
543
|
-
selector: 'sky-inline-form',
|
|
544
|
-
template: "<div\n [@skySlideDissolve]=\"showForm\"\n>\n\n <div *ngIf=\"!showForm\"\n class=\"sky-slide-dissolve-first\"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\"\n class=\"sky-slide-dissolve-last\"\n >\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-3\"\n >\n <div\n class=\"sky-inline-form-content\"\n >\n <ng-container\n [ngTemplateOutlet]=\"template\"\n >\n </ng-container>\n </div>\n <div\n class=\"sky-inline-form-footer\"\n >\n <button *ngFor=\"let button of buttons\"\n class=\"sky-btn {{ 'sky-btn-' + button.styleType }}\"\n type=\"button\"\n [disabled]=\"(button.disabled) ? true : null\"\n [ngClass]=\"{ 'sky-btn-disabled' : button.disabled }\"\n (click)=\"closeInlineForm(button)\"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n",
|
|
545
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
546
|
-
animations: [skySlideDissolve],
|
|
547
|
-
styles: [".sky-inline-form{background:#eeeeef;border:1px solid #cdcfd2;padding:10px;width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:20px}.sky-inline-form .sky-inline-form-footer button{margin:0 5px 0 0}.sky-theme-modern .sky-inline-form,:host-context(.sky-theme-modern) .sky-inline-form{background-color:#fff;border:none;padding:15px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer,:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer{margin-top:30px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer button,:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer button{margin-right:10px}.sky-theme-modern.sky-theme-mode-dark .sky-inline-form,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-inline-form{background-color:#232427}"]
|
|
548
|
-
})
|
|
549
|
-
], SkyInlineFormComponent);
|
|
550
333
|
return SkyInlineFormComponent;
|
|
551
334
|
}());
|
|
335
|
+
SkyInlineFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormComponent, deps: [{ token: SkyInlineFormAdapterService }, { token: i0__namespace.ElementRef }, { token: i2__namespace.SkyLibResourcesService }, { token: i3__namespace.SkyAppWindowRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
336
|
+
SkyInlineFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: SkyInlineFormComponent, selector: "sky-inline-form", inputs: { config: "config", template: "template", showForm: "showForm" }, outputs: { close: "close" }, providers: [
|
|
337
|
+
SkyInlineFormAdapterService
|
|
338
|
+
], ngImport: i0__namespace, template: "<div\n [@skySlideDissolve]=\"showForm\"\n>\n\n <div *ngIf=\"!showForm\"\n class=\"sky-slide-dissolve-first\"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\"\n class=\"sky-slide-dissolve-last\"\n >\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-3\"\n >\n <div\n class=\"sky-inline-form-content\"\n >\n <ng-container\n [ngTemplateOutlet]=\"template\"\n >\n </ng-container>\n </div>\n <div\n class=\"sky-inline-form-footer\"\n >\n <button *ngFor=\"let button of buttons\"\n class=\"sky-btn {{ 'sky-btn-' + button.styleType }}\"\n type=\"button\"\n [disabled]=\"(button.disabled) ? true : null\"\n [ngClass]=\"{ 'sky-btn-disabled' : button.disabled }\"\n (click)=\"closeInlineForm(button)\"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n", styles: [".sky-inline-form{background:#eeeeef;border:1px solid #cdcfd2;padding:10px;width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:20px}.sky-inline-form .sky-inline-form-footer button{margin:0 5px 0 0}:host-context(.sky-theme-modern) .sky-inline-form{background-color:#fff;border:none;padding:15px}:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer{margin-top:30px}:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer button{margin-right:10px}.sky-theme-modern .sky-inline-form{background-color:#fff;border:none;padding:15px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer{margin-top:30px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer button{margin-right:10px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-inline-form{background-color:#232427}.sky-theme-modern.sky-theme-mode-dark .sky-inline-form{background-color:#232427}\n"], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [skySlideDissolve], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
339
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormComponent, decorators: [{
|
|
340
|
+
type: i0.Component,
|
|
341
|
+
args: [{
|
|
342
|
+
selector: 'sky-inline-form',
|
|
343
|
+
templateUrl: './inline-form.component.html',
|
|
344
|
+
styleUrls: ['./inline-form.component.scss'],
|
|
345
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
346
|
+
providers: [
|
|
347
|
+
SkyInlineFormAdapterService
|
|
348
|
+
],
|
|
349
|
+
animations: [skySlideDissolve]
|
|
350
|
+
}]
|
|
351
|
+
}], ctorParameters: function () { return [{ type: SkyInlineFormAdapterService }, { type: i0__namespace.ElementRef }, { type: i2__namespace.SkyLibResourcesService }, { type: i3__namespace.SkyAppWindowRef }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
352
|
+
type: i0.Input
|
|
353
|
+
}], template: [{
|
|
354
|
+
type: i0.Input
|
|
355
|
+
}], showForm: [{
|
|
356
|
+
type: i0.Input
|
|
357
|
+
}], close: [{
|
|
358
|
+
type: i0.Output
|
|
359
|
+
}] } });
|
|
552
360
|
|
|
361
|
+
/**
|
|
362
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
363
|
+
* The contents of this file were automatically generated by
|
|
364
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-inline-form' schematic.
|
|
365
|
+
* To update this file, simply rerun the command.
|
|
366
|
+
*/
|
|
367
|
+
var RESOURCES = {
|
|
368
|
+
'EN-US': { "skyux_inline_form_button_cancel": { "message": "Cancel" }, "skyux_inline_form_button_delete": { "message": "Delete" }, "skyux_inline_form_button_done": { "message": "Done" }, "skyux_inline_form_button_save": { "message": "Save" } },
|
|
369
|
+
};
|
|
553
370
|
var SkyInlineFormResourcesProvider = /** @class */ (function () {
|
|
554
371
|
function SkyInlineFormResourcesProvider() {
|
|
555
|
-
this.resources = { "EN-US": { "skyux_inline_form_button_cancel": "Cancel", "skyux_inline_form_button_delete": "Delete", "skyux_inline_form_button_done": "Done", "skyux_inline_form_button_save": "Save" } };
|
|
556
372
|
}
|
|
557
373
|
SkyInlineFormResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
558
|
-
return
|
|
374
|
+
return i2.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
559
375
|
};
|
|
560
|
-
SkyInlineFormResourcesProvider = __decorate([
|
|
561
|
-
core.Injectable()
|
|
562
|
-
], SkyInlineFormResourcesProvider);
|
|
563
376
|
return SkyInlineFormResourcesProvider;
|
|
564
377
|
}());
|
|
565
|
-
|
|
378
|
+
/**
|
|
379
|
+
* Import into any component library module that needs to use resource strings.
|
|
380
|
+
*/
|
|
566
381
|
var SkyInlineFormResourcesModule = /** @class */ (function () {
|
|
567
382
|
function SkyInlineFormResourcesModule() {
|
|
568
383
|
}
|
|
569
|
-
SkyInlineFormResourcesModule = __decorate([
|
|
570
|
-
core.NgModule({
|
|
571
|
-
exports: [
|
|
572
|
-
i18n.SkyI18nModule
|
|
573
|
-
],
|
|
574
|
-
providers: [{
|
|
575
|
-
provide: i18n.SKY_LIB_RESOURCES_PROVIDERS,
|
|
576
|
-
useClass: SkyInlineFormResourcesProvider,
|
|
577
|
-
multi: true
|
|
578
|
-
}]
|
|
579
|
-
})
|
|
580
|
-
], SkyInlineFormResourcesModule);
|
|
581
384
|
return SkyInlineFormResourcesModule;
|
|
582
385
|
}());
|
|
386
|
+
SkyInlineFormResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
387
|
+
SkyInlineFormResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, exports: [i2.SkyI18nModule] });
|
|
388
|
+
SkyInlineFormResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, providers: [{
|
|
389
|
+
provide: i2.SKY_LIB_RESOURCES_PROVIDERS,
|
|
390
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
391
|
+
multi: true
|
|
392
|
+
}], imports: [i2.SkyI18nModule] });
|
|
393
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, decorators: [{
|
|
394
|
+
type: i0.NgModule,
|
|
395
|
+
args: [{
|
|
396
|
+
exports: [i2.SkyI18nModule],
|
|
397
|
+
providers: [{
|
|
398
|
+
provide: i2.SKY_LIB_RESOURCES_PROVIDERS,
|
|
399
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
400
|
+
multi: true
|
|
401
|
+
}]
|
|
402
|
+
}]
|
|
403
|
+
}] });
|
|
583
404
|
|
|
584
405
|
var SkyInlineFormModule = /** @class */ (function () {
|
|
585
406
|
function SkyInlineFormModule() {
|
|
586
407
|
}
|
|
587
|
-
SkyInlineFormModule = __decorate([
|
|
588
|
-
core.NgModule({
|
|
589
|
-
declarations: [
|
|
590
|
-
SkyInlineFormComponent
|
|
591
|
-
],
|
|
592
|
-
imports: [
|
|
593
|
-
common.CommonModule,
|
|
594
|
-
SkyInlineFormResourcesModule
|
|
595
|
-
],
|
|
596
|
-
exports: [
|
|
597
|
-
SkyInlineFormComponent
|
|
598
|
-
],
|
|
599
|
-
providers: [
|
|
600
|
-
core$1.SkyAppWindowRef,
|
|
601
|
-
SkyInlineFormAdapterService
|
|
602
|
-
]
|
|
603
|
-
})
|
|
604
|
-
], SkyInlineFormModule);
|
|
605
408
|
return SkyInlineFormModule;
|
|
606
409
|
}());
|
|
410
|
+
SkyInlineFormModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
411
|
+
SkyInlineFormModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormModule, declarations: [SkyInlineFormComponent], imports: [i4.CommonModule,
|
|
412
|
+
SkyInlineFormResourcesModule], exports: [SkyInlineFormComponent] });
|
|
413
|
+
SkyInlineFormModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormModule, imports: [[
|
|
414
|
+
i4.CommonModule,
|
|
415
|
+
SkyInlineFormResourcesModule
|
|
416
|
+
]] });
|
|
417
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: SkyInlineFormModule, decorators: [{
|
|
418
|
+
type: i0.NgModule,
|
|
419
|
+
args: [{
|
|
420
|
+
declarations: [
|
|
421
|
+
SkyInlineFormComponent
|
|
422
|
+
],
|
|
423
|
+
imports: [
|
|
424
|
+
i4.CommonModule,
|
|
425
|
+
SkyInlineFormResourcesModule
|
|
426
|
+
],
|
|
427
|
+
exports: [
|
|
428
|
+
SkyInlineFormComponent
|
|
429
|
+
]
|
|
430
|
+
}]
|
|
431
|
+
}] });
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Generated bundle index. Do not edit.
|
|
435
|
+
*/
|
|
607
436
|
|
|
608
437
|
exports.SkyInlineFormModule = SkyInlineFormModule;
|
|
609
|
-
exports
|
|
610
|
-
exports.ɵb = skySlideDissolve;
|
|
611
|
-
exports.ɵc = SkyInlineFormAdapterService;
|
|
612
|
-
exports.ɵd = SkyInlineFormResourcesModule;
|
|
613
|
-
exports.ɵe = SkyInlineFormResourcesProvider;
|
|
438
|
+
exports.λ1 = SkyInlineFormComponent;
|
|
614
439
|
|
|
615
440
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
616
441
|
|