@abp/ng.theme.shared 5.0.0-rc.1 → 5.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/abp-ng.theme.shared.d.ts +5 -5
- package/bundles/abp-ng.theme.shared-extensions.umd.js +1749 -1748
- package/bundles/abp-ng.theme.shared-extensions.umd.js.map +1 -1
- package/bundles/abp-ng.theme.shared-testing.umd.js +41 -41
- package/bundles/abp-ng.theme.shared.umd.js +2316 -2316
- package/bundles/abp-ng.theme.shared.umd.js.map +1 -1
- package/esm2015/abp-ng.theme.shared.js +4 -4
- package/esm2015/extensions/abp-ng.theme.shared-extensions.js +4 -4
- package/esm2015/extensions/lib/adapters/date-time.adapter.js +33 -33
- package/esm2015/extensions/lib/adapters/date.adapter.js +40 -40
- package/esm2015/extensions/lib/adapters/time.adapter.js +35 -35
- package/esm2015/extensions/lib/components/abstract-actions/abstract-actions.component.js +24 -24
- package/esm2015/extensions/lib/components/date-time-picker/date-time-picker.component.js +73 -73
- package/esm2015/extensions/lib/components/extensible-form/extensible-form-prop.component.js +164 -164
- package/esm2015/extensions/lib/components/extensible-form/extensible-form.component.js +70 -70
- package/esm2015/extensions/lib/components/extensible-table/extensible-table.component.js +133 -133
- package/esm2015/extensions/lib/components/grid-actions/grid-actions.component.js +45 -45
- package/esm2015/extensions/lib/components/page-toolbar/page-toolbar.component.js +45 -45
- package/esm2015/extensions/lib/constants/extra-properties.js +1 -1
- package/esm2015/extensions/lib/directives/disabled.directive.js +28 -28
- package/esm2015/extensions/lib/directives/prop-data.directive.js +40 -40
- package/esm2015/extensions/lib/enums/props.enum.js +1 -1
- package/esm2015/extensions/lib/models/actions.js +45 -45
- package/esm2015/extensions/lib/models/entity-actions.js +28 -28
- package/esm2015/extensions/lib/models/entity-props.js +36 -34
- package/esm2015/extensions/lib/models/form-props.js +51 -51
- package/esm2015/extensions/lib/models/internal/object-extensions.js +1 -1
- package/esm2015/extensions/lib/models/object-extensions.js +2 -2
- package/esm2015/extensions/lib/models/props.js +49 -49
- package/esm2015/extensions/lib/models/toolbar-actions.js +40 -40
- package/esm2015/extensions/lib/services/extensions.service.js +23 -23
- package/esm2015/extensions/lib/tokens/extensions.token.js +6 -6
- package/esm2015/extensions/lib/ui-extensions.module.js +91 -91
- package/esm2015/extensions/lib/utils/actions.util.js +8 -8
- package/esm2015/extensions/lib/utils/enum.util.js +41 -41
- package/esm2015/extensions/lib/utils/factory.util.js +3 -3
- package/esm2015/extensions/lib/utils/form-props.util.js +50 -50
- package/esm2015/extensions/lib/utils/localization.util.js +12 -12
- package/esm2015/extensions/lib/utils/props.util.js +13 -13
- package/esm2015/extensions/lib/utils/state.util.js +123 -123
- package/esm2015/extensions/lib/utils/typeahead.util.js +51 -51
- package/esm2015/extensions/lib/utils/validation.util.js +10 -10
- package/esm2015/extensions/public-api.js +27 -27
- package/esm2015/lib/animations/bounce.animations.js +16 -16
- package/esm2015/lib/animations/collapse.animations.js +49 -49
- package/esm2015/lib/animations/fade.animations.js +37 -37
- package/esm2015/lib/animations/index.js +6 -6
- package/esm2015/lib/animations/modal.animations.js +10 -10
- package/esm2015/lib/animations/slide.animations.js +7 -7
- package/esm2015/lib/animations/toast.animations.js +12 -12
- package/esm2015/lib/components/breadcrumb/breadcrumb.component.js +48 -48
- package/esm2015/lib/components/breadcrumb-items/breadcrumb-items.component.js +21 -21
- package/esm2015/lib/components/button/button.component.js +71 -71
- package/esm2015/lib/components/confirmation/confirmation.component.js +39 -39
- package/esm2015/lib/components/http-error-wrapper/http-error-wrapper.component.js +65 -65
- package/esm2015/lib/components/index.js +12 -12
- package/esm2015/lib/components/loader-bar/loader-bar.component.js +101 -101
- package/esm2015/lib/components/loading/loading.component.js +17 -17
- package/esm2015/lib/components/modal/modal-close.directive.js +27 -27
- package/esm2015/lib/components/modal/modal-ref.service.js +25 -25
- package/esm2015/lib/components/modal/modal.component.js +188 -188
- package/esm2015/lib/components/toast/toast.component.js +60 -60
- package/esm2015/lib/components/toast-container/toast-container.component.js +48 -48
- package/esm2015/lib/constants/styles.js +1 -1
- package/esm2015/lib/constants/validation.js +14 -14
- package/esm2015/lib/directives/ellipsis.directive.js +62 -62
- package/esm2015/lib/directives/index.js +4 -4
- package/esm2015/lib/directives/loading.directive.js +89 -89
- package/esm2015/lib/directives/ngx-datatable-default.directive.js +74 -74
- package/esm2015/lib/directives/ngx-datatable-list.directive.js +93 -93
- package/esm2015/lib/enums/index.js +1 -1
- package/esm2015/lib/enums/route-names.js +1 -1
- package/esm2015/lib/handlers/document-dir.handler.js +32 -32
- package/esm2015/lib/handlers/error.handler.js +291 -291
- package/esm2015/lib/handlers/index.js +2 -2
- package/esm2015/lib/models/common.js +1 -1
- package/esm2015/lib/models/confirmation.js +9 -9
- package/esm2015/lib/models/index.js +5 -5
- package/esm2015/lib/models/nav-item.js +6 -6
- package/esm2015/lib/models/statistics.js +1 -1
- package/esm2015/lib/models/toaster.js +1 -1
- package/esm2015/lib/providers/index.js +2 -2
- package/esm2015/lib/providers/ng-bootstrap-config.provider.js +16 -16
- package/esm2015/lib/providers/route.provider.js +17 -17
- package/esm2015/lib/services/confirmation.service.js +67 -67
- package/esm2015/lib/services/index.js +4 -4
- package/esm2015/lib/services/nav-items.service.js +50 -50
- package/esm2015/lib/services/page-alert.service.js +25 -25
- package/esm2015/lib/services/toaster.service.js +102 -102
- package/esm2015/lib/theme-shared.module.js +164 -164
- package/esm2015/lib/tokens/append-content.token.js +10 -10
- package/esm2015/lib/tokens/http-error.token.js +9 -9
- package/esm2015/lib/tokens/index.js +4 -4
- package/esm2015/lib/tokens/ngx-datatable-messages.token.js +7 -7
- package/esm2015/lib/tokens/suppress-unsaved-changes-warning.token.js +2 -2
- package/esm2015/lib/utils/date-parser-formatter.js +58 -58
- package/esm2015/lib/utils/index.js +2 -2
- package/esm2015/lib/utils/validation-utils.js +32 -32
- package/esm2015/public-api.js +15 -15
- package/esm2015/testing/abp-ng.theme.shared-testing.js +4 -4
- package/esm2015/testing/lib/models/config.js +1 -1
- package/esm2015/testing/lib/models/index.js +1 -1
- package/esm2015/testing/lib/theme-shared-testing.module.js +42 -42
- package/esm2015/testing/public-api.js +3 -3
- package/extensions/abp-ng.theme.shared-extensions.d.ts +5 -5
- package/extensions/lib/adapters/date-time.adapter.d.ts +11 -11
- package/extensions/lib/adapters/date.adapter.d.ts +9 -9
- package/extensions/lib/adapters/time.adapter.d.ts +8 -8
- package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +14 -14
- package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +16 -16
- package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +37 -37
- package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +24 -24
- package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +35 -35
- package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +13 -13
- package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +12 -12
- package/extensions/lib/constants/extra-properties.d.ts +1 -1
- package/extensions/lib/directives/disabled.directive.d.ts +11 -11
- package/extensions/lib/directives/prop-data.directive.d.ts +19 -19
- package/extensions/lib/enums/props.enum.d.ts +15 -15
- package/extensions/lib/models/actions.d.ts +35 -35
- package/extensions/lib/models/entity-actions.d.ts +22 -22
- package/extensions/lib/models/entity-props.d.ts +29 -29
- package/extensions/lib/models/form-props.d.ts +42 -42
- package/extensions/lib/models/internal/object-extensions.d.ts +85 -85
- package/extensions/lib/models/object-extensions.d.ts +2 -2
- package/extensions/lib/models/props.d.ts +39 -39
- package/extensions/lib/models/toolbar-actions.d.ts +29 -29
- package/extensions/lib/services/extensions.service.d.ts +14 -14
- package/extensions/lib/tokens/extensions.token.d.ts +14 -14
- package/extensions/lib/ui-extensions.module.d.ts +23 -23
- package/extensions/lib/utils/actions.util.d.ts +7 -7
- package/extensions/lib/utils/enum.util.d.ts +7 -7
- package/extensions/lib/utils/factory.util.d.ts +1 -1
- package/extensions/lib/utils/form-props.util.d.ts +3 -3
- package/extensions/lib/utils/localization.util.d.ts +3 -3
- package/extensions/lib/utils/props.util.d.ts +8 -8
- package/extensions/lib/utils/state.util.d.ts +5 -5
- package/extensions/lib/utils/typeahead.util.d.ts +11 -11
- package/extensions/lib/utils/validation.util.d.ts +3 -3
- package/extensions/public-api.d.ts +27 -27
- package/fesm2015/abp-ng.theme.shared-extensions.js +1227 -1226
- package/fesm2015/abp-ng.theme.shared-extensions.js.map +1 -1
- package/fesm2015/abp-ng.theme.shared-testing.js +37 -37
- package/fesm2015/abp-ng.theme.shared.js +1858 -1858
- package/fesm2015/abp-ng.theme.shared.js.map +1 -1
- package/lib/animations/bounce.animations.d.ts +1 -1
- package/lib/animations/collapse.animations.d.ts +9 -9
- package/lib/animations/fade.animations.d.ts +10 -10
- package/lib/animations/index.d.ts +6 -6
- package/lib/animations/modal.animations.d.ts +2 -2
- package/lib/animations/slide.animations.d.ts +1 -1
- package/lib/animations/toast.animations.d.ts +1 -1
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +16 -16
- package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +7 -7
- package/lib/components/button/button.component.d.ts +25 -25
- package/lib/components/confirmation/confirmation.component.d.ts +14 -14
- package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +27 -27
- package/lib/components/index.d.ts +12 -12
- package/lib/components/loader-bar/loader-bar.component.d.ts +33 -33
- package/lib/components/loading/loading.component.d.ts +5 -5
- package/lib/components/modal/modal-close.directive.d.ts +9 -9
- package/lib/components/modal/modal-ref.service.d.ts +13 -13
- package/lib/components/modal/modal.component.d.ts +50 -50
- package/lib/components/toast/toast.component.d.ts +14 -14
- package/lib/components/toast-container/toast-container.component.d.ts +18 -18
- package/lib/constants/styles.d.ts +2 -2
- package/lib/constants/validation.d.ts +14 -14
- package/lib/directives/ellipsis.directive.d.ts +21 -21
- package/lib/directives/index.d.ts +4 -4
- package/lib/directives/loading.directive.d.ts +25 -25
- package/lib/directives/ngx-datatable-default.directive.d.ts +30 -30
- package/lib/directives/ngx-datatable-list.directive.d.ts +24 -24
- package/lib/enums/index.d.ts +1 -1
- package/lib/enums/route-names.d.ts +3 -3
- package/lib/handlers/document-dir.handler.d.ts +13 -13
- package/lib/handlers/error.handler.d.ts +82 -82
- package/lib/handlers/index.d.ts +2 -2
- package/lib/models/common.d.ts +19 -19
- package/lib/models/confirmation.d.ts +25 -25
- package/lib/models/index.d.ts +5 -5
- package/lib/models/nav-item.d.ts +11 -11
- package/lib/models/statistics.d.ts +12 -12
- package/lib/models/toaster.d.ts +30 -30
- package/lib/providers/index.d.ts +2 -2
- package/lib/providers/ng-bootstrap-config.provider.d.ts +8 -8
- package/lib/providers/route.provider.d.ts +8 -8
- package/lib/services/confirmation.service.d.ts +21 -21
- package/lib/services/index.d.ts +4 -4
- package/lib/services/nav-items.service.d.ts +13 -13
- package/lib/services/page-alert.service.d.ts +18 -18
- package/lib/services/toaster.service.d.ts +60 -60
- package/lib/theme-shared.module.d.ts +33 -33
- package/lib/tokens/append-content.token.d.ts +2 -2
- package/lib/tokens/http-error.token.d.ts +5 -5
- package/lib/tokens/index.d.ts +4 -4
- package/lib/tokens/ngx-datatable-messages.token.d.ts +12 -12
- package/lib/tokens/suppress-unsaved-changes-warning.token.d.ts +2 -2
- package/lib/utils/date-parser-formatter.d.ts +12 -12
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/validation-utils.d.ts +3 -3
- package/package.json +4 -4
- package/public-api.d.ts +12 -12
- package/testing/abp-ng.theme.shared-testing.d.ts +5 -5
- package/testing/lib/models/config.d.ts +4 -4
- package/testing/lib/models/index.d.ts +1 -1
- package/testing/lib/theme-shared-testing.module.d.ts +14 -14
- package/testing/public-api.d.ts +3 -3
|
@@ -31,1822 +31,1823 @@
|
|
|
31
31
|
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
32
32
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
33
33
|
|
|
34
|
-
var DateTimeAdapter = /** @class */ (function () {
|
|
35
|
-
function DateTimeAdapter() {
|
|
36
|
-
}
|
|
37
|
-
DateTimeAdapter.prototype.fromModel = function (value) {
|
|
38
|
-
if (!value)
|
|
39
|
-
return null;
|
|
40
|
-
var date = new Date(value);
|
|
41
|
-
if (isNaN(date))
|
|
42
|
-
return null;
|
|
43
|
-
this.value = {
|
|
44
|
-
year: date.getFullYear(),
|
|
45
|
-
month: date.getMonth() + 1,
|
|
46
|
-
day: date.getDate(),
|
|
47
|
-
hour: date.getHours(),
|
|
48
|
-
minute: date.getMinutes(),
|
|
49
|
-
second: date.getSeconds(),
|
|
50
|
-
};
|
|
51
|
-
return this.value;
|
|
52
|
-
};
|
|
53
|
-
DateTimeAdapter.prototype.toModel = function (value) {
|
|
54
|
-
if (!value)
|
|
55
|
-
return '';
|
|
56
|
-
//const now = new Date();
|
|
57
|
-
value = Object.assign(Object.assign({}, this.value), value);
|
|
58
|
-
var date = new Date(value.year, value.month - 1, value.day, value.hour, value.minute, value.second);
|
|
59
|
-
return new Date(date).toISOString();
|
|
60
|
-
};
|
|
61
|
-
return DateTimeAdapter;
|
|
62
|
-
}());
|
|
63
|
-
DateTimeAdapter.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimeAdapter, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
64
|
-
DateTimeAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimeAdapter });
|
|
65
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimeAdapter, decorators: [{
|
|
66
|
-
type: i0.Injectable
|
|
34
|
+
var DateTimeAdapter = /** @class */ (function () {
|
|
35
|
+
function DateTimeAdapter() {
|
|
36
|
+
}
|
|
37
|
+
DateTimeAdapter.prototype.fromModel = function (value) {
|
|
38
|
+
if (!value)
|
|
39
|
+
return null;
|
|
40
|
+
var date = new Date(value);
|
|
41
|
+
if (isNaN(date))
|
|
42
|
+
return null;
|
|
43
|
+
this.value = {
|
|
44
|
+
year: date.getFullYear(),
|
|
45
|
+
month: date.getMonth() + 1,
|
|
46
|
+
day: date.getDate(),
|
|
47
|
+
hour: date.getHours(),
|
|
48
|
+
minute: date.getMinutes(),
|
|
49
|
+
second: date.getSeconds(),
|
|
50
|
+
};
|
|
51
|
+
return this.value;
|
|
52
|
+
};
|
|
53
|
+
DateTimeAdapter.prototype.toModel = function (value) {
|
|
54
|
+
if (!value)
|
|
55
|
+
return '';
|
|
56
|
+
//const now = new Date();
|
|
57
|
+
value = Object.assign(Object.assign({}, this.value), value);
|
|
58
|
+
var date = new Date(value.year, value.month - 1, value.day, value.hour, value.minute, value.second);
|
|
59
|
+
return new Date(date).toISOString();
|
|
60
|
+
};
|
|
61
|
+
return DateTimeAdapter;
|
|
62
|
+
}());
|
|
63
|
+
DateTimeAdapter.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimeAdapter, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
64
|
+
DateTimeAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimeAdapter });
|
|
65
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimeAdapter, decorators: [{
|
|
66
|
+
type: i0.Injectable
|
|
67
67
|
}] });
|
|
68
68
|
|
|
69
|
-
/*! *****************************************************************************
|
|
70
|
-
Copyright (c) Microsoft Corporation.
|
|
71
|
-
|
|
72
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
73
|
-
purpose with or without fee is hereby granted.
|
|
74
|
-
|
|
75
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
76
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
77
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
78
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
79
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
80
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
81
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
82
|
-
***************************************************************************** */
|
|
83
|
-
/* global Reflect, Promise */
|
|
84
|
-
var extendStatics = function (d, b) {
|
|
85
|
-
extendStatics = Object.setPrototypeOf ||
|
|
86
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
87
|
-
function (d, b) { for (var p in b)
|
|
88
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
89
|
-
d[p] = b[p]; };
|
|
90
|
-
return extendStatics(d, b);
|
|
91
|
-
};
|
|
92
|
-
function __extends(d, b) {
|
|
93
|
-
if (typeof b !== "function" && b !== null)
|
|
94
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
95
|
-
extendStatics(d, b);
|
|
96
|
-
function __() { this.constructor = d; }
|
|
97
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
98
|
-
}
|
|
99
|
-
var __assign = function () {
|
|
100
|
-
__assign = Object.assign || function __assign(t) {
|
|
101
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
102
|
-
s = arguments[i];
|
|
103
|
-
for (var p in s)
|
|
104
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
105
|
-
t[p] = s[p];
|
|
106
|
-
}
|
|
107
|
-
return t;
|
|
108
|
-
};
|
|
109
|
-
return __assign.apply(this, arguments);
|
|
110
|
-
};
|
|
111
|
-
function __rest(s, e) {
|
|
112
|
-
var t = {};
|
|
113
|
-
for (var p in s)
|
|
114
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
115
|
-
t[p] = s[p];
|
|
116
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
117
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
118
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
119
|
-
t[p[i]] = s[p[i]];
|
|
120
|
-
}
|
|
121
|
-
return t;
|
|
122
|
-
}
|
|
123
|
-
function __decorate(decorators, target, key, desc) {
|
|
124
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
125
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
126
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
127
|
-
else
|
|
128
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
129
|
-
if (d = decorators[i])
|
|
130
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
131
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
132
|
-
}
|
|
133
|
-
function __param(paramIndex, decorator) {
|
|
134
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
135
|
-
}
|
|
136
|
-
function __metadata(metadataKey, metadataValue) {
|
|
137
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
138
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
139
|
-
}
|
|
140
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
141
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
142
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
143
|
-
function fulfilled(value) { try {
|
|
144
|
-
step(generator.next(value));
|
|
145
|
-
}
|
|
146
|
-
catch (e) {
|
|
147
|
-
reject(e);
|
|
148
|
-
} }
|
|
149
|
-
function rejected(value) { try {
|
|
150
|
-
step(generator["throw"](value));
|
|
151
|
-
}
|
|
152
|
-
catch (e) {
|
|
153
|
-
reject(e);
|
|
154
|
-
} }
|
|
155
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
156
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function __generator(thisArg, body) {
|
|
160
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
161
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
162
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
163
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
164
|
-
function step(op) {
|
|
165
|
-
if (f)
|
|
166
|
-
throw new TypeError("Generator is already executing.");
|
|
167
|
-
while (_)
|
|
168
|
-
try {
|
|
169
|
-
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)
|
|
170
|
-
return t;
|
|
171
|
-
if (y = 0, t)
|
|
172
|
-
op = [op[0] & 2, t.value];
|
|
173
|
-
switch (op[0]) {
|
|
174
|
-
case 0:
|
|
175
|
-
case 1:
|
|
176
|
-
t = op;
|
|
177
|
-
break;
|
|
178
|
-
case 4:
|
|
179
|
-
_.label++;
|
|
180
|
-
return { value: op[1], done: false };
|
|
181
|
-
case 5:
|
|
182
|
-
_.label++;
|
|
183
|
-
y = op[1];
|
|
184
|
-
op = [0];
|
|
185
|
-
continue;
|
|
186
|
-
case 7:
|
|
187
|
-
op = _.ops.pop();
|
|
188
|
-
_.trys.pop();
|
|
189
|
-
continue;
|
|
190
|
-
default:
|
|
191
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
192
|
-
_ = 0;
|
|
193
|
-
continue;
|
|
194
|
-
}
|
|
195
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
196
|
-
_.label = op[1];
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
200
|
-
_.label = t[1];
|
|
201
|
-
t = op;
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
if (t && _.label < t[2]) {
|
|
205
|
-
_.label = t[2];
|
|
206
|
-
_.ops.push(op);
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
if (t[2])
|
|
210
|
-
_.ops.pop();
|
|
211
|
-
_.trys.pop();
|
|
212
|
-
continue;
|
|
213
|
-
}
|
|
214
|
-
op = body.call(thisArg, _);
|
|
215
|
-
}
|
|
216
|
-
catch (e) {
|
|
217
|
-
op = [6, e];
|
|
218
|
-
y = 0;
|
|
219
|
-
}
|
|
220
|
-
finally {
|
|
221
|
-
f = t = 0;
|
|
222
|
-
}
|
|
223
|
-
if (op[0] & 5)
|
|
224
|
-
throw op[1];
|
|
225
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
229
|
-
if (k2 === undefined)
|
|
230
|
-
k2 = k;
|
|
231
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
232
|
-
}) : (function (o, m, k, k2) {
|
|
233
|
-
if (k2 === undefined)
|
|
234
|
-
k2 = k;
|
|
235
|
-
o[k2] = m[k];
|
|
236
|
-
});
|
|
237
|
-
function __exportStar(m, o) {
|
|
238
|
-
for (var p in m)
|
|
239
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
240
|
-
__createBinding(o, m, p);
|
|
241
|
-
}
|
|
242
|
-
function __values(o) {
|
|
243
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
244
|
-
if (m)
|
|
245
|
-
return m.call(o);
|
|
246
|
-
if (o && typeof o.length === "number")
|
|
247
|
-
return {
|
|
248
|
-
next: function () {
|
|
249
|
-
if (o && i >= o.length)
|
|
250
|
-
o = void 0;
|
|
251
|
-
return { value: o && o[i++], done: !o };
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
255
|
-
}
|
|
256
|
-
function __read(o, n) {
|
|
257
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
258
|
-
if (!m)
|
|
259
|
-
return o;
|
|
260
|
-
var i = m.call(o), r, ar = [], e;
|
|
261
|
-
try {
|
|
262
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
263
|
-
ar.push(r.value);
|
|
264
|
-
}
|
|
265
|
-
catch (error) {
|
|
266
|
-
e = { error: error };
|
|
267
|
-
}
|
|
268
|
-
finally {
|
|
269
|
-
try {
|
|
270
|
-
if (r && !r.done && (m = i["return"]))
|
|
271
|
-
m.call(i);
|
|
272
|
-
}
|
|
273
|
-
finally {
|
|
274
|
-
if (e)
|
|
275
|
-
throw e.error;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
return ar;
|
|
279
|
-
}
|
|
280
|
-
/** @deprecated */
|
|
281
|
-
function __spread() {
|
|
282
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
283
|
-
ar = ar.concat(__read(arguments[i]));
|
|
284
|
-
return ar;
|
|
285
|
-
}
|
|
286
|
-
/** @deprecated */
|
|
287
|
-
function __spreadArrays() {
|
|
288
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
289
|
-
s += arguments[i].length;
|
|
290
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
291
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
292
|
-
r[k] = a[j];
|
|
293
|
-
return r;
|
|
294
|
-
}
|
|
295
|
-
function __spreadArray(to, from, pack) {
|
|
296
|
-
if (pack || arguments.length === 2)
|
|
297
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
298
|
-
if (ar || !(i in from)) {
|
|
299
|
-
if (!ar)
|
|
300
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
301
|
-
ar[i] = from[i];
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
305
|
-
}
|
|
306
|
-
function __await(v) {
|
|
307
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
308
|
-
}
|
|
309
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
310
|
-
if (!Symbol.asyncIterator)
|
|
311
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
312
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
313
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
314
|
-
function verb(n) { if (g[n])
|
|
315
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
316
|
-
function resume(n, v) { try {
|
|
317
|
-
step(g[n](v));
|
|
318
|
-
}
|
|
319
|
-
catch (e) {
|
|
320
|
-
settle(q[0][3], e);
|
|
321
|
-
} }
|
|
322
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
323
|
-
function fulfill(value) { resume("next", value); }
|
|
324
|
-
function reject(value) { resume("throw", value); }
|
|
325
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
326
|
-
resume(q[0][0], q[0][1]); }
|
|
327
|
-
}
|
|
328
|
-
function __asyncDelegator(o) {
|
|
329
|
-
var i, p;
|
|
330
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
331
|
-
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; }
|
|
332
|
-
}
|
|
333
|
-
function __asyncValues(o) {
|
|
334
|
-
if (!Symbol.asyncIterator)
|
|
335
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
336
|
-
var m = o[Symbol.asyncIterator], i;
|
|
337
|
-
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);
|
|
338
|
-
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); }); }; }
|
|
339
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
340
|
-
}
|
|
341
|
-
function __makeTemplateObject(cooked, raw) {
|
|
342
|
-
if (Object.defineProperty) {
|
|
343
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
cooked.raw = raw;
|
|
347
|
-
}
|
|
348
|
-
return cooked;
|
|
349
|
-
}
|
|
350
|
-
;
|
|
351
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
352
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
353
|
-
}) : function (o, v) {
|
|
354
|
-
o["default"] = v;
|
|
355
|
-
};
|
|
356
|
-
function __importStar(mod) {
|
|
357
|
-
if (mod && mod.__esModule)
|
|
358
|
-
return mod;
|
|
359
|
-
var result = {};
|
|
360
|
-
if (mod != null)
|
|
361
|
-
for (var k in mod)
|
|
362
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
363
|
-
__createBinding(result, mod, k);
|
|
364
|
-
__setModuleDefault(result, mod);
|
|
365
|
-
return result;
|
|
366
|
-
}
|
|
367
|
-
function __importDefault(mod) {
|
|
368
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
369
|
-
}
|
|
370
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
371
|
-
if (kind === "a" && !f)
|
|
372
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
373
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
374
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
375
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
376
|
-
}
|
|
377
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
378
|
-
if (kind === "m")
|
|
379
|
-
throw new TypeError("Private method is not writable");
|
|
380
|
-
if (kind === "a" && !f)
|
|
381
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
382
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
383
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
384
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
69
|
+
/*! *****************************************************************************
|
|
70
|
+
Copyright (c) Microsoft Corporation.
|
|
71
|
+
|
|
72
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
73
|
+
purpose with or without fee is hereby granted.
|
|
74
|
+
|
|
75
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
76
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
77
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
78
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
79
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
80
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
81
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
82
|
+
***************************************************************************** */
|
|
83
|
+
/* global Reflect, Promise */
|
|
84
|
+
var extendStatics = function (d, b) {
|
|
85
|
+
extendStatics = Object.setPrototypeOf ||
|
|
86
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
87
|
+
function (d, b) { for (var p in b)
|
|
88
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
89
|
+
d[p] = b[p]; };
|
|
90
|
+
return extendStatics(d, b);
|
|
91
|
+
};
|
|
92
|
+
function __extends(d, b) {
|
|
93
|
+
if (typeof b !== "function" && b !== null)
|
|
94
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
95
|
+
extendStatics(d, b);
|
|
96
|
+
function __() { this.constructor = d; }
|
|
97
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
98
|
+
}
|
|
99
|
+
var __assign = function () {
|
|
100
|
+
__assign = Object.assign || function __assign(t) {
|
|
101
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
102
|
+
s = arguments[i];
|
|
103
|
+
for (var p in s)
|
|
104
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
105
|
+
t[p] = s[p];
|
|
106
|
+
}
|
|
107
|
+
return t;
|
|
108
|
+
};
|
|
109
|
+
return __assign.apply(this, arguments);
|
|
110
|
+
};
|
|
111
|
+
function __rest(s, e) {
|
|
112
|
+
var t = {};
|
|
113
|
+
for (var p in s)
|
|
114
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
115
|
+
t[p] = s[p];
|
|
116
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
117
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
118
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
119
|
+
t[p[i]] = s[p[i]];
|
|
120
|
+
}
|
|
121
|
+
return t;
|
|
122
|
+
}
|
|
123
|
+
function __decorate(decorators, target, key, desc) {
|
|
124
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
125
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
126
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
127
|
+
else
|
|
128
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
129
|
+
if (d = decorators[i])
|
|
130
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
131
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
132
|
+
}
|
|
133
|
+
function __param(paramIndex, decorator) {
|
|
134
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
135
|
+
}
|
|
136
|
+
function __metadata(metadataKey, metadataValue) {
|
|
137
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
138
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
139
|
+
}
|
|
140
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
141
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
142
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
143
|
+
function fulfilled(value) { try {
|
|
144
|
+
step(generator.next(value));
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
reject(e);
|
|
148
|
+
} }
|
|
149
|
+
function rejected(value) { try {
|
|
150
|
+
step(generator["throw"](value));
|
|
151
|
+
}
|
|
152
|
+
catch (e) {
|
|
153
|
+
reject(e);
|
|
154
|
+
} }
|
|
155
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
156
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function __generator(thisArg, body) {
|
|
160
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
161
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
162
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
163
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
164
|
+
function step(op) {
|
|
165
|
+
if (f)
|
|
166
|
+
throw new TypeError("Generator is already executing.");
|
|
167
|
+
while (_)
|
|
168
|
+
try {
|
|
169
|
+
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)
|
|
170
|
+
return t;
|
|
171
|
+
if (y = 0, t)
|
|
172
|
+
op = [op[0] & 2, t.value];
|
|
173
|
+
switch (op[0]) {
|
|
174
|
+
case 0:
|
|
175
|
+
case 1:
|
|
176
|
+
t = op;
|
|
177
|
+
break;
|
|
178
|
+
case 4:
|
|
179
|
+
_.label++;
|
|
180
|
+
return { value: op[1], done: false };
|
|
181
|
+
case 5:
|
|
182
|
+
_.label++;
|
|
183
|
+
y = op[1];
|
|
184
|
+
op = [0];
|
|
185
|
+
continue;
|
|
186
|
+
case 7:
|
|
187
|
+
op = _.ops.pop();
|
|
188
|
+
_.trys.pop();
|
|
189
|
+
continue;
|
|
190
|
+
default:
|
|
191
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
192
|
+
_ = 0;
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
196
|
+
_.label = op[1];
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
200
|
+
_.label = t[1];
|
|
201
|
+
t = op;
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
if (t && _.label < t[2]) {
|
|
205
|
+
_.label = t[2];
|
|
206
|
+
_.ops.push(op);
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
if (t[2])
|
|
210
|
+
_.ops.pop();
|
|
211
|
+
_.trys.pop();
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
op = body.call(thisArg, _);
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
op = [6, e];
|
|
218
|
+
y = 0;
|
|
219
|
+
}
|
|
220
|
+
finally {
|
|
221
|
+
f = t = 0;
|
|
222
|
+
}
|
|
223
|
+
if (op[0] & 5)
|
|
224
|
+
throw op[1];
|
|
225
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
229
|
+
if (k2 === undefined)
|
|
230
|
+
k2 = k;
|
|
231
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
232
|
+
}) : (function (o, m, k, k2) {
|
|
233
|
+
if (k2 === undefined)
|
|
234
|
+
k2 = k;
|
|
235
|
+
o[k2] = m[k];
|
|
236
|
+
});
|
|
237
|
+
function __exportStar(m, o) {
|
|
238
|
+
for (var p in m)
|
|
239
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
240
|
+
__createBinding(o, m, p);
|
|
241
|
+
}
|
|
242
|
+
function __values(o) {
|
|
243
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
244
|
+
if (m)
|
|
245
|
+
return m.call(o);
|
|
246
|
+
if (o && typeof o.length === "number")
|
|
247
|
+
return {
|
|
248
|
+
next: function () {
|
|
249
|
+
if (o && i >= o.length)
|
|
250
|
+
o = void 0;
|
|
251
|
+
return { value: o && o[i++], done: !o };
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
255
|
+
}
|
|
256
|
+
function __read(o, n) {
|
|
257
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
258
|
+
if (!m)
|
|
259
|
+
return o;
|
|
260
|
+
var i = m.call(o), r, ar = [], e;
|
|
261
|
+
try {
|
|
262
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
263
|
+
ar.push(r.value);
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
e = { error: error };
|
|
267
|
+
}
|
|
268
|
+
finally {
|
|
269
|
+
try {
|
|
270
|
+
if (r && !r.done && (m = i["return"]))
|
|
271
|
+
m.call(i);
|
|
272
|
+
}
|
|
273
|
+
finally {
|
|
274
|
+
if (e)
|
|
275
|
+
throw e.error;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return ar;
|
|
279
|
+
}
|
|
280
|
+
/** @deprecated */
|
|
281
|
+
function __spread() {
|
|
282
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
283
|
+
ar = ar.concat(__read(arguments[i]));
|
|
284
|
+
return ar;
|
|
285
|
+
}
|
|
286
|
+
/** @deprecated */
|
|
287
|
+
function __spreadArrays() {
|
|
288
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
289
|
+
s += arguments[i].length;
|
|
290
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
291
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
292
|
+
r[k] = a[j];
|
|
293
|
+
return r;
|
|
294
|
+
}
|
|
295
|
+
function __spreadArray(to, from, pack) {
|
|
296
|
+
if (pack || arguments.length === 2)
|
|
297
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
298
|
+
if (ar || !(i in from)) {
|
|
299
|
+
if (!ar)
|
|
300
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
301
|
+
ar[i] = from[i];
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
305
|
+
}
|
|
306
|
+
function __await(v) {
|
|
307
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
308
|
+
}
|
|
309
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
310
|
+
if (!Symbol.asyncIterator)
|
|
311
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
312
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
313
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
314
|
+
function verb(n) { if (g[n])
|
|
315
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
316
|
+
function resume(n, v) { try {
|
|
317
|
+
step(g[n](v));
|
|
318
|
+
}
|
|
319
|
+
catch (e) {
|
|
320
|
+
settle(q[0][3], e);
|
|
321
|
+
} }
|
|
322
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
323
|
+
function fulfill(value) { resume("next", value); }
|
|
324
|
+
function reject(value) { resume("throw", value); }
|
|
325
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
326
|
+
resume(q[0][0], q[0][1]); }
|
|
327
|
+
}
|
|
328
|
+
function __asyncDelegator(o) {
|
|
329
|
+
var i, p;
|
|
330
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
331
|
+
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; }
|
|
332
|
+
}
|
|
333
|
+
function __asyncValues(o) {
|
|
334
|
+
if (!Symbol.asyncIterator)
|
|
335
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
336
|
+
var m = o[Symbol.asyncIterator], i;
|
|
337
|
+
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);
|
|
338
|
+
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); }); }; }
|
|
339
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
340
|
+
}
|
|
341
|
+
function __makeTemplateObject(cooked, raw) {
|
|
342
|
+
if (Object.defineProperty) {
|
|
343
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
cooked.raw = raw;
|
|
347
|
+
}
|
|
348
|
+
return cooked;
|
|
349
|
+
}
|
|
350
|
+
;
|
|
351
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
352
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
353
|
+
}) : function (o, v) {
|
|
354
|
+
o["default"] = v;
|
|
355
|
+
};
|
|
356
|
+
function __importStar(mod) {
|
|
357
|
+
if (mod && mod.__esModule)
|
|
358
|
+
return mod;
|
|
359
|
+
var result = {};
|
|
360
|
+
if (mod != null)
|
|
361
|
+
for (var k in mod)
|
|
362
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
363
|
+
__createBinding(result, mod, k);
|
|
364
|
+
__setModuleDefault(result, mod);
|
|
365
|
+
return result;
|
|
366
|
+
}
|
|
367
|
+
function __importDefault(mod) {
|
|
368
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
369
|
+
}
|
|
370
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
371
|
+
if (kind === "a" && !f)
|
|
372
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
373
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
374
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
375
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
376
|
+
}
|
|
377
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
378
|
+
if (kind === "m")
|
|
379
|
+
throw new TypeError("Private method is not writable");
|
|
380
|
+
if (kind === "a" && !f)
|
|
381
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
382
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
383
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
384
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
-
var DateAdapter = /** @class */ (function (_super) {
|
|
388
|
-
__extends(DateAdapter, _super);
|
|
389
|
-
function DateAdapter() {
|
|
390
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
391
|
-
}
|
|
392
|
-
DateAdapter.prototype.fromModel = function (value) {
|
|
393
|
-
if (!value)
|
|
394
|
-
return null;
|
|
395
|
-
var date;
|
|
396
|
-
if (typeof value === 'string') {
|
|
397
|
-
date = this.dateOf(value);
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
date = new Date(value);
|
|
401
|
-
}
|
|
402
|
-
if (isNaN(date))
|
|
403
|
-
return null;
|
|
404
|
-
return {
|
|
405
|
-
day: date.getDate(),
|
|
406
|
-
month: date.getMonth() + 1,
|
|
407
|
-
year: date.getFullYear(),
|
|
408
|
-
};
|
|
409
|
-
};
|
|
410
|
-
DateAdapter.prototype.toModel = function (value) {
|
|
411
|
-
if (!value)
|
|
412
|
-
return '';
|
|
413
|
-
var date = new Date(value.year, value.month - 1, value.day);
|
|
414
|
-
var formattedDate = i5.formatDate(date, 'yyyy-MM-dd', 'en');
|
|
415
|
-
return formattedDate;
|
|
416
|
-
};
|
|
417
|
-
DateAdapter.prototype.dateOf = function (value) {
|
|
418
|
-
var dateUtc = new Date(Date.parse(value));
|
|
419
|
-
return new Date(dateUtc.getTime() + Math.abs(dateUtc.getTimezoneOffset() * 60000));
|
|
420
|
-
};
|
|
421
|
-
return DateAdapter;
|
|
422
|
-
}(i2.NgbDateAdapter));
|
|
423
|
-
DateAdapter.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateAdapter, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
424
|
-
DateAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateAdapter });
|
|
425
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateAdapter, decorators: [{
|
|
426
|
-
type: i0.Injectable
|
|
387
|
+
var DateAdapter = /** @class */ (function (_super) {
|
|
388
|
+
__extends(DateAdapter, _super);
|
|
389
|
+
function DateAdapter() {
|
|
390
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
391
|
+
}
|
|
392
|
+
DateAdapter.prototype.fromModel = function (value) {
|
|
393
|
+
if (!value)
|
|
394
|
+
return null;
|
|
395
|
+
var date;
|
|
396
|
+
if (typeof value === 'string') {
|
|
397
|
+
date = this.dateOf(value);
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
date = new Date(value);
|
|
401
|
+
}
|
|
402
|
+
if (isNaN(date))
|
|
403
|
+
return null;
|
|
404
|
+
return {
|
|
405
|
+
day: date.getDate(),
|
|
406
|
+
month: date.getMonth() + 1,
|
|
407
|
+
year: date.getFullYear(),
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
DateAdapter.prototype.toModel = function (value) {
|
|
411
|
+
if (!value)
|
|
412
|
+
return '';
|
|
413
|
+
var date = new Date(value.year, value.month - 1, value.day);
|
|
414
|
+
var formattedDate = i5.formatDate(date, 'yyyy-MM-dd', 'en');
|
|
415
|
+
return formattedDate;
|
|
416
|
+
};
|
|
417
|
+
DateAdapter.prototype.dateOf = function (value) {
|
|
418
|
+
var dateUtc = new Date(Date.parse(value));
|
|
419
|
+
return new Date(dateUtc.getTime() + Math.abs(dateUtc.getTimezoneOffset() * 60000));
|
|
420
|
+
};
|
|
421
|
+
return DateAdapter;
|
|
422
|
+
}(i2.NgbDateAdapter));
|
|
423
|
+
DateAdapter.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateAdapter, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
424
|
+
DateAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateAdapter });
|
|
425
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateAdapter, decorators: [{
|
|
426
|
+
type: i0.Injectable
|
|
427
427
|
}] });
|
|
428
428
|
|
|
429
|
-
var TimeAdapter = /** @class */ (function (_super) {
|
|
430
|
-
__extends(TimeAdapter, _super);
|
|
431
|
-
function TimeAdapter() {
|
|
432
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
433
|
-
}
|
|
434
|
-
TimeAdapter.prototype.fromModel = function (value) {
|
|
435
|
-
if (!value)
|
|
436
|
-
return null;
|
|
437
|
-
var date = isTimeStr(value)
|
|
438
|
-
? new (Date.bind.apply(Date, __spreadArray([void 0, 0, 0, 1], __read(value.split(':').map(Number)))))() : new Date(value);
|
|
439
|
-
if (isNaN(date))
|
|
440
|
-
return null;
|
|
441
|
-
return {
|
|
442
|
-
hour: date.getHours(),
|
|
443
|
-
minute: date.getMinutes(),
|
|
444
|
-
second: date.getSeconds(),
|
|
445
|
-
};
|
|
446
|
-
};
|
|
447
|
-
TimeAdapter.prototype.toModel = function (value) {
|
|
448
|
-
if (!value)
|
|
449
|
-
return '';
|
|
450
|
-
var date = new Date(0, 0, 1, value.hour, value.minute, value.second);
|
|
451
|
-
var formattedDate = i5.formatDate(date, 'HH:mm', 'en');
|
|
452
|
-
return formattedDate;
|
|
453
|
-
};
|
|
454
|
-
return TimeAdapter;
|
|
455
|
-
}(i2.NgbTimeAdapter));
|
|
456
|
-
TimeAdapter.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: TimeAdapter, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
457
|
-
TimeAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: TimeAdapter });
|
|
458
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: TimeAdapter, decorators: [{
|
|
459
|
-
type: i0.Injectable
|
|
460
|
-
}] });
|
|
461
|
-
function isTimeStr(value) {
|
|
462
|
-
return /^((2[123])|[01][0-9])(\:[0-5][0-9]){1,2}$/.test(String(value));
|
|
429
|
+
var TimeAdapter = /** @class */ (function (_super) {
|
|
430
|
+
__extends(TimeAdapter, _super);
|
|
431
|
+
function TimeAdapter() {
|
|
432
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
433
|
+
}
|
|
434
|
+
TimeAdapter.prototype.fromModel = function (value) {
|
|
435
|
+
if (!value)
|
|
436
|
+
return null;
|
|
437
|
+
var date = isTimeStr(value)
|
|
438
|
+
? new (Date.bind.apply(Date, __spreadArray([void 0, 0, 0, 1], __read(value.split(':').map(Number)))))() : new Date(value);
|
|
439
|
+
if (isNaN(date))
|
|
440
|
+
return null;
|
|
441
|
+
return {
|
|
442
|
+
hour: date.getHours(),
|
|
443
|
+
minute: date.getMinutes(),
|
|
444
|
+
second: date.getSeconds(),
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
TimeAdapter.prototype.toModel = function (value) {
|
|
448
|
+
if (!value)
|
|
449
|
+
return '';
|
|
450
|
+
var date = new Date(0, 0, 1, value.hour, value.minute, value.second);
|
|
451
|
+
var formattedDate = i5.formatDate(date, 'HH:mm', 'en');
|
|
452
|
+
return formattedDate;
|
|
453
|
+
};
|
|
454
|
+
return TimeAdapter;
|
|
455
|
+
}(i2.NgbTimeAdapter));
|
|
456
|
+
TimeAdapter.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: TimeAdapter, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
457
|
+
TimeAdapter.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: TimeAdapter });
|
|
458
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: TimeAdapter, decorators: [{
|
|
459
|
+
type: i0.Injectable
|
|
460
|
+
}] });
|
|
461
|
+
function isTimeStr(value) {
|
|
462
|
+
return /^((2[123])|[01][0-9])(\:[0-5][0-9]){1,2}$/.test(String(value));
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
-
function selfFactory(dependency) {
|
|
466
|
-
return dependency;
|
|
465
|
+
function selfFactory(dependency) {
|
|
466
|
+
return dependency;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
var DateTimePickerComponent = /** @class */ (function () {
|
|
470
|
-
function DateTimePickerComponent(cdRef) {
|
|
471
|
-
this.cdRef = cdRef;
|
|
472
|
-
this.meridian = false;
|
|
473
|
-
}
|
|
474
|
-
DateTimePickerComponent.prototype.setDate = function (datestr) {
|
|
475
|
-
this.date.writeValue(datestr);
|
|
476
|
-
};
|
|
477
|
-
DateTimePickerComponent.prototype.setTime = function (datestr) {
|
|
478
|
-
this.time.writeValue(datestr);
|
|
479
|
-
};
|
|
480
|
-
return DateTimePickerComponent;
|
|
481
|
-
}());
|
|
482
|
-
DateTimePickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimePickerComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
483
|
-
DateTimePickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: { prop: "prop", meridian: "meridian" }, viewQueries: [{ propertyName: "date", first: true, predicate: i2.NgbInputDatepicker, descendants: true }, { propertyName: "time", first: true, predicate: i2.NgbTimepicker, descendants: true }], exportAs: ["abpDateTimePicker"], ngImport: i0__namespace, template: "\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setTime($event)\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n <ngb-timepicker\n #timepicker\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setDate($event)\"\n [meridian]=\"meridian\"\n ></ngb-timepicker>\n ", isInline: true, components: [{ type: i2__namespace.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }], directives: [{ type: i2__namespace.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i6__namespace.ValidationDirective, selector: "[formControl],[formControlName]",
|
|
484
|
-
{
|
|
485
|
-
provide: i2$1.ControlContainer,
|
|
486
|
-
useFactory: selfFactory,
|
|
487
|
-
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
provide: i2.NgbDateAdapter,
|
|
491
|
-
useClass: DateTimeAdapter,
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
provide: i2.NgbTimeAdapter,
|
|
495
|
-
useClass: DateTimeAdapter,
|
|
496
|
-
},
|
|
497
|
-
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
498
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimePickerComponent, decorators: [{
|
|
499
|
-
type: i0.Component,
|
|
500
|
-
args: [{
|
|
501
|
-
exportAs: 'abpDateTimePicker',
|
|
502
|
-
selector: 'abp-date-time-picker',
|
|
503
|
-
template: "\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setTime($event)\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n <ngb-timepicker\n #timepicker\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setDate($event)\"\n [meridian]=\"meridian\"\n ></ngb-timepicker>\n ",
|
|
504
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
505
|
-
viewProviders: [
|
|
506
|
-
{
|
|
507
|
-
provide: i2$1.ControlContainer,
|
|
508
|
-
useFactory: selfFactory,
|
|
509
|
-
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
provide: i2.NgbDateAdapter,
|
|
513
|
-
useClass: DateTimeAdapter,
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
provide: i2.NgbTimeAdapter,
|
|
517
|
-
useClass: DateTimeAdapter,
|
|
518
|
-
},
|
|
519
|
-
],
|
|
520
|
-
}]
|
|
521
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { prop: [{
|
|
522
|
-
type: i0.Input
|
|
523
|
-
}], meridian: [{
|
|
524
|
-
type: i0.Input
|
|
525
|
-
}], date: [{
|
|
526
|
-
type: i0.ViewChild,
|
|
527
|
-
args: [i2.NgbInputDatepicker]
|
|
528
|
-
}], time: [{
|
|
529
|
-
type: i0.ViewChild,
|
|
530
|
-
args: [i2.NgbTimepicker]
|
|
469
|
+
var DateTimePickerComponent = /** @class */ (function () {
|
|
470
|
+
function DateTimePickerComponent(cdRef) {
|
|
471
|
+
this.cdRef = cdRef;
|
|
472
|
+
this.meridian = false;
|
|
473
|
+
}
|
|
474
|
+
DateTimePickerComponent.prototype.setDate = function (datestr) {
|
|
475
|
+
this.date.writeValue(datestr);
|
|
476
|
+
};
|
|
477
|
+
DateTimePickerComponent.prototype.setTime = function (datestr) {
|
|
478
|
+
this.time.writeValue(datestr);
|
|
479
|
+
};
|
|
480
|
+
return DateTimePickerComponent;
|
|
481
|
+
}());
|
|
482
|
+
DateTimePickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimePickerComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
483
|
+
DateTimePickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: { prop: "prop", meridian: "meridian" }, viewQueries: [{ propertyName: "date", first: true, predicate: i2.NgbInputDatepicker, descendants: true }, { propertyName: "time", first: true, predicate: i2.NgbTimepicker, descendants: true }], exportAs: ["abpDateTimePicker"], ngImport: i0__namespace, template: "\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setTime($event)\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n <ngb-timepicker\n #timepicker\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setDate($event)\"\n [meridian]=\"meridian\"\n ></ngb-timepicker>\n ", isInline: true, components: [{ type: i2__namespace.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }], directives: [{ type: i2__namespace.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i6__namespace.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }], viewProviders: [
|
|
484
|
+
{
|
|
485
|
+
provide: i2$1.ControlContainer,
|
|
486
|
+
useFactory: selfFactory,
|
|
487
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
provide: i2.NgbDateAdapter,
|
|
491
|
+
useClass: DateTimeAdapter,
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
provide: i2.NgbTimeAdapter,
|
|
495
|
+
useClass: DateTimeAdapter,
|
|
496
|
+
},
|
|
497
|
+
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
498
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DateTimePickerComponent, decorators: [{
|
|
499
|
+
type: i0.Component,
|
|
500
|
+
args: [{
|
|
501
|
+
exportAs: 'abpDateTimePicker',
|
|
502
|
+
selector: 'abp-date-time-picker',
|
|
503
|
+
template: "\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setTime($event)\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n <ngb-timepicker\n #timepicker\n [formControlName]=\"prop.name\"\n (ngModelChange)=\"setDate($event)\"\n [meridian]=\"meridian\"\n ></ngb-timepicker>\n ",
|
|
504
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
505
|
+
viewProviders: [
|
|
506
|
+
{
|
|
507
|
+
provide: i2$1.ControlContainer,
|
|
508
|
+
useFactory: selfFactory,
|
|
509
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
provide: i2.NgbDateAdapter,
|
|
513
|
+
useClass: DateTimeAdapter,
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
provide: i2.NgbTimeAdapter,
|
|
517
|
+
useClass: DateTimeAdapter,
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
}]
|
|
521
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { prop: [{
|
|
522
|
+
type: i0.Input
|
|
523
|
+
}], meridian: [{
|
|
524
|
+
type: i0.Input
|
|
525
|
+
}], date: [{
|
|
526
|
+
type: i0.ViewChild,
|
|
527
|
+
args: [i2.NgbInputDatepicker]
|
|
528
|
+
}], time: [{
|
|
529
|
+
type: i0.ViewChild,
|
|
530
|
+
args: [i2.NgbTimepicker]
|
|
531
531
|
}] } });
|
|
532
532
|
|
|
533
533
|
var EXTRA_PROPERTIES_KEY = 'extraProperties';
|
|
534
534
|
|
|
535
|
-
var TYPEAHEAD_TEXT_SUFFIX = '_Text';
|
|
536
|
-
var TYPEAHEAD_TEXT_SUFFIX_REGEX = /_Text$/;
|
|
537
|
-
function createTypeaheadOptions(lookup) {
|
|
538
|
-
return function (data, searchText) {
|
|
539
|
-
var _a;
|
|
540
|
-
return searchText && data
|
|
541
|
-
? data
|
|
542
|
-
.getInjected(i1.RestService)
|
|
543
|
-
.request({
|
|
544
|
-
method: 'GET',
|
|
545
|
-
url: lookup.url || '',
|
|
546
|
-
params: (_a = {},
|
|
547
|
-
_a[lookup.filterParamName || ''] = searchText,
|
|
548
|
-
_a),
|
|
549
|
-
}, { apiName: 'Default' })
|
|
550
|
-
.pipe(operators.map(function (response) {
|
|
551
|
-
var list = response[lookup.resultListPropertyName || ''];
|
|
552
|
-
var mapToOption = function (item) { return ({
|
|
553
|
-
key: item[lookup.displayPropertyName || ''],
|
|
554
|
-
value: item[lookup.valuePropertyName || ''],
|
|
555
|
-
}); };
|
|
556
|
-
return list.map(mapToOption);
|
|
557
|
-
}))
|
|
558
|
-
: rxjs.of([]);
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
function getTypeaheadType(lookup, name) {
|
|
562
|
-
return Boolean(lookup.url)
|
|
563
|
-
? "typeahead" /* Typeahead */
|
|
564
|
-
: name.endsWith(TYPEAHEAD_TEXT_SUFFIX)
|
|
565
|
-
? "hidden" /* Hidden */
|
|
566
|
-
: undefined;
|
|
567
|
-
}
|
|
568
|
-
function createTypeaheadDisplayNameGenerator(displayNameGeneratorFn, properties) {
|
|
569
|
-
return function (displayName, fallback) {
|
|
570
|
-
var name = removeTypeaheadTextSuffix(fallback.name || '');
|
|
571
|
-
return displayNameGeneratorFn(displayName || properties[name].displayName, {
|
|
572
|
-
name: name,
|
|
573
|
-
resource: fallback.resource,
|
|
574
|
-
});
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
function addTypeaheadTextSuffix(name) {
|
|
578
|
-
return name + TYPEAHEAD_TEXT_SUFFIX;
|
|
579
|
-
}
|
|
580
|
-
function hasTypeaheadTextSuffix(name) {
|
|
581
|
-
return TYPEAHEAD_TEXT_SUFFIX_REGEX.test(name);
|
|
582
|
-
}
|
|
583
|
-
function removeTypeaheadTextSuffix(name) {
|
|
584
|
-
return name.replace(TYPEAHEAD_TEXT_SUFFIX_REGEX, '');
|
|
535
|
+
var TYPEAHEAD_TEXT_SUFFIX = '_Text';
|
|
536
|
+
var TYPEAHEAD_TEXT_SUFFIX_REGEX = /_Text$/;
|
|
537
|
+
function createTypeaheadOptions(lookup) {
|
|
538
|
+
return function (data, searchText) {
|
|
539
|
+
var _a;
|
|
540
|
+
return searchText && data
|
|
541
|
+
? data
|
|
542
|
+
.getInjected(i1.RestService)
|
|
543
|
+
.request({
|
|
544
|
+
method: 'GET',
|
|
545
|
+
url: lookup.url || '',
|
|
546
|
+
params: (_a = {},
|
|
547
|
+
_a[lookup.filterParamName || ''] = searchText,
|
|
548
|
+
_a),
|
|
549
|
+
}, { apiName: 'Default' })
|
|
550
|
+
.pipe(operators.map(function (response) {
|
|
551
|
+
var list = response[lookup.resultListPropertyName || ''];
|
|
552
|
+
var mapToOption = function (item) { return ({
|
|
553
|
+
key: item[lookup.displayPropertyName || ''],
|
|
554
|
+
value: item[lookup.valuePropertyName || ''],
|
|
555
|
+
}); };
|
|
556
|
+
return list.map(mapToOption);
|
|
557
|
+
}))
|
|
558
|
+
: rxjs.of([]);
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
function getTypeaheadType(lookup, name) {
|
|
562
|
+
return Boolean(lookup.url)
|
|
563
|
+
? "typeahead" /* Typeahead */
|
|
564
|
+
: name.endsWith(TYPEAHEAD_TEXT_SUFFIX)
|
|
565
|
+
? "hidden" /* Hidden */
|
|
566
|
+
: undefined;
|
|
567
|
+
}
|
|
568
|
+
function createTypeaheadDisplayNameGenerator(displayNameGeneratorFn, properties) {
|
|
569
|
+
return function (displayName, fallback) {
|
|
570
|
+
var name = removeTypeaheadTextSuffix(fallback.name || '');
|
|
571
|
+
return displayNameGeneratorFn(displayName || properties[name].displayName, {
|
|
572
|
+
name: name,
|
|
573
|
+
resource: fallback.resource,
|
|
574
|
+
});
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
function addTypeaheadTextSuffix(name) {
|
|
578
|
+
return name + TYPEAHEAD_TEXT_SUFFIX;
|
|
579
|
+
}
|
|
580
|
+
function hasTypeaheadTextSuffix(name) {
|
|
581
|
+
return TYPEAHEAD_TEXT_SUFFIX_REGEX.test(name);
|
|
582
|
+
}
|
|
583
|
+
function removeTypeaheadTextSuffix(name) {
|
|
584
|
+
return name.replace(TYPEAHEAD_TEXT_SUFFIX_REGEX, '');
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
var DisabledDirective = /** @class */ (function () {
|
|
588
|
-
function DisabledDirective(ngControl) {
|
|
589
|
-
this.ngControl = ngControl;
|
|
590
|
-
this.abpDisabled = false;
|
|
591
|
-
}
|
|
592
|
-
// Related issue: https://github.com/angular/angular/issues/35330
|
|
593
|
-
DisabledDirective.prototype.ngOnChanges = function (_a) {
|
|
594
|
-
var abpDisabled = _a.abpDisabled;
|
|
595
|
-
if (this.ngControl.control && abpDisabled) {
|
|
596
|
-
this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
return DisabledDirective;
|
|
600
|
-
}());
|
|
601
|
-
DisabledDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DisabledDirective, deps: [{ token: i2__namespace$1.NgControl, host: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
602
|
-
DisabledDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: DisabledDirective, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0__namespace });
|
|
603
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DisabledDirective, decorators: [{
|
|
604
|
-
type: i0.Directive,
|
|
605
|
-
args: [{
|
|
606
|
-
selector: '[abpDisabled]',
|
|
607
|
-
}]
|
|
608
|
-
}], ctorParameters: function () {
|
|
609
|
-
return [{ type: i2__namespace$1.NgControl, decorators: [{
|
|
610
|
-
type: i0.Host
|
|
611
|
-
}] }];
|
|
612
|
-
}, propDecorators: { abpDisabled: [{
|
|
613
|
-
type: i0.Input
|
|
587
|
+
var DisabledDirective = /** @class */ (function () {
|
|
588
|
+
function DisabledDirective(ngControl) {
|
|
589
|
+
this.ngControl = ngControl;
|
|
590
|
+
this.abpDisabled = false;
|
|
591
|
+
}
|
|
592
|
+
// Related issue: https://github.com/angular/angular/issues/35330
|
|
593
|
+
DisabledDirective.prototype.ngOnChanges = function (_a) {
|
|
594
|
+
var abpDisabled = _a.abpDisabled;
|
|
595
|
+
if (this.ngControl.control && abpDisabled) {
|
|
596
|
+
this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
return DisabledDirective;
|
|
600
|
+
}());
|
|
601
|
+
DisabledDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DisabledDirective, deps: [{ token: i2__namespace$1.NgControl, host: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
602
|
+
DisabledDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: DisabledDirective, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0__namespace });
|
|
603
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DisabledDirective, decorators: [{
|
|
604
|
+
type: i0.Directive,
|
|
605
|
+
args: [{
|
|
606
|
+
selector: '[abpDisabled]',
|
|
607
|
+
}]
|
|
608
|
+
}], ctorParameters: function () {
|
|
609
|
+
return [{ type: i2__namespace$1.NgControl, decorators: [{
|
|
610
|
+
type: i0.Host
|
|
611
|
+
}] }];
|
|
612
|
+
}, propDecorators: { abpDisabled: [{
|
|
613
|
+
type: i0.Input
|
|
614
614
|
}] } });
|
|
615
615
|
|
|
616
|
-
var ExtensibleFormPropComponent = /** @class */ (function () {
|
|
617
|
-
function ExtensibleFormPropComponent(cdRef, track, configState, groupDirective) {
|
|
618
|
-
var _this = this;
|
|
619
|
-
this.cdRef = cdRef;
|
|
620
|
-
this.track = track;
|
|
621
|
-
this.configState = configState;
|
|
622
|
-
this.asterisk = '';
|
|
623
|
-
this.options$ = rxjs.of([]);
|
|
624
|
-
this.validators = [];
|
|
625
|
-
this.search = function (text$) { return text$
|
|
626
|
-
? text$.pipe(operators.debounceTime(300), operators.distinctUntilChanged(), operators.switchMap(function (text) { return _this.prop.options(_this.data, text); }))
|
|
627
|
-
: rxjs.of([]); };
|
|
628
|
-
this.typeaheadFormatter = function (option) { return option.key; };
|
|
629
|
-
this.form = groupDirective.form;
|
|
630
|
-
}
|
|
631
|
-
ExtensibleFormPropComponent.prototype.setTypeaheadValue = function (selectedOption) {
|
|
632
|
-
this.typeaheadModel = selectedOption || { key: null, value: null };
|
|
633
|
-
var _a = this.typeaheadModel, key = _a.key, value = _a.value;
|
|
634
|
-
var _b = __read(this.getTypeaheadControls(), 2), keyControl = _b[0], valueControl = _b[1];
|
|
635
|
-
if ((valueControl === null || valueControl === void 0 ? void 0 : valueControl.value) && !value)
|
|
636
|
-
valueControl.markAsDirty();
|
|
637
|
-
keyControl === null || keyControl === void 0 ? void 0 : keyControl.setValue(key);
|
|
638
|
-
valueControl === null || valueControl === void 0 ? void 0 : valueControl.setValue(value);
|
|
639
|
-
};
|
|
640
|
-
Object.defineProperty(ExtensibleFormPropComponent.prototype, "meridian", {
|
|
641
|
-
get: function () {
|
|
642
|
-
return (this.configState.getDeep('localization.currentCulture.dateTimeFormat.shortTimePattern') || '').includes('tt');
|
|
643
|
-
},
|
|
644
|
-
enumerable: false,
|
|
645
|
-
configurable: true
|
|
646
|
-
});
|
|
647
|
-
Object.defineProperty(ExtensibleFormPropComponent.prototype, "isInvalid", {
|
|
648
|
-
get: function () {
|
|
649
|
-
var control = this.form.get(this.prop.name);
|
|
650
|
-
return control.touched && control.invalid;
|
|
651
|
-
},
|
|
652
|
-
enumerable: false,
|
|
653
|
-
configurable: true
|
|
654
|
-
});
|
|
655
|
-
ExtensibleFormPropComponent.prototype.getTypeaheadControls = function () {
|
|
656
|
-
var name = this.prop.name;
|
|
657
|
-
var extraPropName = EXTRA_PROPERTIES_KEY + "." + name;
|
|
658
|
-
var keyControl = this.form.get(addTypeaheadTextSuffix(extraPropName)) ||
|
|
659
|
-
this.form.get(addTypeaheadTextSuffix(name));
|
|
660
|
-
var valueControl = this.form.get(extraPropName) || this.form.get(name);
|
|
661
|
-
return [keyControl, valueControl];
|
|
662
|
-
};
|
|
663
|
-
ExtensibleFormPropComponent.prototype.setAsterisk = function () {
|
|
664
|
-
this.asterisk = this.validators.some(isRequired) ? '*' : '';
|
|
665
|
-
};
|
|
666
|
-
ExtensibleFormPropComponent.prototype.ngAfterViewInit = function () {
|
|
667
|
-
if (this.first && this.fieldRef) {
|
|
668
|
-
this.fieldRef.nativeElement.focus();
|
|
669
|
-
}
|
|
670
|
-
};
|
|
671
|
-
ExtensibleFormPropComponent.prototype.getComponent = function (prop) {
|
|
672
|
-
switch (prop.type) {
|
|
673
|
-
case "boolean" /* Boolean */:
|
|
674
|
-
return 'checkbox';
|
|
675
|
-
case "date" /* Date */:
|
|
676
|
-
return 'date';
|
|
677
|
-
case "dateTime" /* DateTime */:
|
|
678
|
-
return 'dateTime';
|
|
679
|
-
case "hidden" /* Hidden */:
|
|
680
|
-
return 'hidden';
|
|
681
|
-
case "multiselect" /* MultiSelect */:
|
|
682
|
-
return 'multiselect';
|
|
683
|
-
case "text" /* Text */:
|
|
684
|
-
return 'textarea';
|
|
685
|
-
case "time" /* Time */:
|
|
686
|
-
return 'time';
|
|
687
|
-
case "typeahead" /* Typeahead */:
|
|
688
|
-
return 'typeahead';
|
|
689
|
-
default:
|
|
690
|
-
return prop.options ? 'select' : 'input';
|
|
691
|
-
}
|
|
692
|
-
};
|
|
693
|
-
ExtensibleFormPropComponent.prototype.getType = function (prop) {
|
|
694
|
-
switch (prop.type) {
|
|
695
|
-
case "date" /* Date */:
|
|
696
|
-
case "string" /* String */:
|
|
697
|
-
return 'text';
|
|
698
|
-
case "boolean" /* Boolean */:
|
|
699
|
-
return 'checkbox';
|
|
700
|
-
case "number" /* Number */:
|
|
701
|
-
return 'number';
|
|
702
|
-
case "email" /* Email */:
|
|
703
|
-
return 'email';
|
|
704
|
-
case "password" /* Password */:
|
|
705
|
-
return 'password';
|
|
706
|
-
default:
|
|
707
|
-
return 'hidden';
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
ExtensibleFormPropComponent.prototype.ngOnChanges = function (_a) {
|
|
711
|
-
var prop = _a.prop;
|
|
712
|
-
var currentProp = prop === null || prop === void 0 ? void 0 : prop.currentValue;
|
|
713
|
-
var _b = currentProp || {}, options = _b.options, readonly = _b.readonly, disabled = _b.disabled, validators = _b.validators;
|
|
714
|
-
if (options)
|
|
715
|
-
this.options$ = options(this.data);
|
|
716
|
-
if (readonly)
|
|
717
|
-
this.readonly = readonly(this.data);
|
|
718
|
-
if (disabled)
|
|
719
|
-
this.disabled = disabled(this.data);
|
|
720
|
-
if (validators) {
|
|
721
|
-
this.validators = validators(this.data);
|
|
722
|
-
this.setAsterisk();
|
|
723
|
-
}
|
|
724
|
-
var _c = __read(this.getTypeaheadControls(), 2), keyControl = _c[0], valueControl = _c[1];
|
|
725
|
-
if (keyControl && valueControl)
|
|
726
|
-
this.typeaheadModel = { key: keyControl.value, value: valueControl.value };
|
|
727
|
-
};
|
|
728
|
-
return ExtensibleFormPropComponent;
|
|
729
|
-
}());
|
|
730
|
-
ExtensibleFormPropComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormPropComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.TrackByService }, { token: i1__namespace.ConfigStateService }, { token: i2__namespace$1.FormGroupDirective }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
731
|
-
ExtensibleFormPropComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: { data: "data", prop: "prop", first: "first" }, viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"mb-3 form-group\" *abpPermission=\"prop.permission\" [ngSwitch]=\"getComponent(prop)\">\n <ng-template ngSwitchCase=\"input\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [autocomplete]=\"prop.autocomplete\"\n [type]=\"getType(prop)\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"hidden\">\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </ng-template>\n\n <ng-template ngSwitchCase=\"checkbox\">\n <div class=\"form-check\" validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n type=\"checkbox\"\n class=\"form-check-input\"\n />\n <ng-template\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\n ></ng-template>\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"select\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n class=\"form-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"multiselect\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n multiple=\"multiple\"\n class=\"form-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"typeahead\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [autocomplete]=\"prop.autocomplete\"\n [abpDisabled]=\"disabled\"\n [ngbTypeahead]=\"search\"\n [editable]=\"false\"\n [inputFormatter]=\"typeaheadFormatter\"\n [resultFormatter]=\"typeaheadFormatter\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"typeaheadModel\"\n (selectItem)=\"setTypeaheadValue($event.item)\"\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\n class=\"form-control\"\n />\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"date\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"time\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"dateTime\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"textarea\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <textarea\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n ></textarea>\n </ng-template>\n</div>\n\n<ng-template #label let-classes>\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\"\n >{{ prop.displayName | abpLocalization }} {{ asterisk }}</label\n >\n</ng-template>\n", components: [{ type: i2__namespace.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }, { type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }], directives: [{ type: i1__namespace.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i6__namespace.ValidationDirective, selector: "[formControl],[formControlName]",
|
|
732
|
-
{
|
|
733
|
-
provide: i2$1.ControlContainer,
|
|
734
|
-
useFactory: selfFactory,
|
|
735
|
-
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
736
|
-
},
|
|
737
|
-
{ provide: i2.NgbDateAdapter, useClass: DateAdapter },
|
|
738
|
-
{ provide: i2.NgbTimeAdapter, useClass: TimeAdapter },
|
|
739
|
-
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
740
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormPropComponent, decorators: [{
|
|
741
|
-
type: i0.Component,
|
|
742
|
-
args: [{
|
|
743
|
-
selector: 'abp-extensible-form-prop',
|
|
744
|
-
templateUrl: './extensible-form-prop.component.html',
|
|
745
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
746
|
-
viewProviders: [
|
|
747
|
-
{
|
|
748
|
-
provide: i2$1.ControlContainer,
|
|
749
|
-
useFactory: selfFactory,
|
|
750
|
-
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
751
|
-
},
|
|
752
|
-
{ provide: i2.NgbDateAdapter, useClass: DateAdapter },
|
|
753
|
-
{ provide: i2.NgbTimeAdapter, useClass: TimeAdapter },
|
|
754
|
-
],
|
|
755
|
-
}]
|
|
756
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.TrackByService }, { type: i1__namespace.ConfigStateService }, { type: i2__namespace$1.FormGroupDirective }]; }, propDecorators: { data: [{
|
|
757
|
-
type: i0.Input
|
|
758
|
-
}], prop: [{
|
|
759
|
-
type: i0.Input
|
|
760
|
-
}], first: [{
|
|
761
|
-
type: i0.Input
|
|
762
|
-
}], fieldRef: [{
|
|
763
|
-
type: i0.ViewChild,
|
|
764
|
-
args: ['field']
|
|
765
|
-
}] } });
|
|
766
|
-
function isRequired(validator) {
|
|
767
|
-
return validator === i2$1.Validators.required || validator === i1.AbpValidators.required;
|
|
616
|
+
var ExtensibleFormPropComponent = /** @class */ (function () {
|
|
617
|
+
function ExtensibleFormPropComponent(cdRef, track, configState, groupDirective) {
|
|
618
|
+
var _this = this;
|
|
619
|
+
this.cdRef = cdRef;
|
|
620
|
+
this.track = track;
|
|
621
|
+
this.configState = configState;
|
|
622
|
+
this.asterisk = '';
|
|
623
|
+
this.options$ = rxjs.of([]);
|
|
624
|
+
this.validators = [];
|
|
625
|
+
this.search = function (text$) { return text$
|
|
626
|
+
? text$.pipe(operators.debounceTime(300), operators.distinctUntilChanged(), operators.switchMap(function (text) { return _this.prop.options(_this.data, text); }))
|
|
627
|
+
: rxjs.of([]); };
|
|
628
|
+
this.typeaheadFormatter = function (option) { return option.key; };
|
|
629
|
+
this.form = groupDirective.form;
|
|
630
|
+
}
|
|
631
|
+
ExtensibleFormPropComponent.prototype.setTypeaheadValue = function (selectedOption) {
|
|
632
|
+
this.typeaheadModel = selectedOption || { key: null, value: null };
|
|
633
|
+
var _a = this.typeaheadModel, key = _a.key, value = _a.value;
|
|
634
|
+
var _b = __read(this.getTypeaheadControls(), 2), keyControl = _b[0], valueControl = _b[1];
|
|
635
|
+
if ((valueControl === null || valueControl === void 0 ? void 0 : valueControl.value) && !value)
|
|
636
|
+
valueControl.markAsDirty();
|
|
637
|
+
keyControl === null || keyControl === void 0 ? void 0 : keyControl.setValue(key);
|
|
638
|
+
valueControl === null || valueControl === void 0 ? void 0 : valueControl.setValue(value);
|
|
639
|
+
};
|
|
640
|
+
Object.defineProperty(ExtensibleFormPropComponent.prototype, "meridian", {
|
|
641
|
+
get: function () {
|
|
642
|
+
return (this.configState.getDeep('localization.currentCulture.dateTimeFormat.shortTimePattern') || '').includes('tt');
|
|
643
|
+
},
|
|
644
|
+
enumerable: false,
|
|
645
|
+
configurable: true
|
|
646
|
+
});
|
|
647
|
+
Object.defineProperty(ExtensibleFormPropComponent.prototype, "isInvalid", {
|
|
648
|
+
get: function () {
|
|
649
|
+
var control = this.form.get(this.prop.name);
|
|
650
|
+
return control.touched && control.invalid;
|
|
651
|
+
},
|
|
652
|
+
enumerable: false,
|
|
653
|
+
configurable: true
|
|
654
|
+
});
|
|
655
|
+
ExtensibleFormPropComponent.prototype.getTypeaheadControls = function () {
|
|
656
|
+
var name = this.prop.name;
|
|
657
|
+
var extraPropName = EXTRA_PROPERTIES_KEY + "." + name;
|
|
658
|
+
var keyControl = this.form.get(addTypeaheadTextSuffix(extraPropName)) ||
|
|
659
|
+
this.form.get(addTypeaheadTextSuffix(name));
|
|
660
|
+
var valueControl = this.form.get(extraPropName) || this.form.get(name);
|
|
661
|
+
return [keyControl, valueControl];
|
|
662
|
+
};
|
|
663
|
+
ExtensibleFormPropComponent.prototype.setAsterisk = function () {
|
|
664
|
+
this.asterisk = this.validators.some(isRequired) ? '*' : '';
|
|
665
|
+
};
|
|
666
|
+
ExtensibleFormPropComponent.prototype.ngAfterViewInit = function () {
|
|
667
|
+
if (this.first && this.fieldRef) {
|
|
668
|
+
this.fieldRef.nativeElement.focus();
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
ExtensibleFormPropComponent.prototype.getComponent = function (prop) {
|
|
672
|
+
switch (prop.type) {
|
|
673
|
+
case "boolean" /* Boolean */:
|
|
674
|
+
return 'checkbox';
|
|
675
|
+
case "date" /* Date */:
|
|
676
|
+
return 'date';
|
|
677
|
+
case "dateTime" /* DateTime */:
|
|
678
|
+
return 'dateTime';
|
|
679
|
+
case "hidden" /* Hidden */:
|
|
680
|
+
return 'hidden';
|
|
681
|
+
case "multiselect" /* MultiSelect */:
|
|
682
|
+
return 'multiselect';
|
|
683
|
+
case "text" /* Text */:
|
|
684
|
+
return 'textarea';
|
|
685
|
+
case "time" /* Time */:
|
|
686
|
+
return 'time';
|
|
687
|
+
case "typeahead" /* Typeahead */:
|
|
688
|
+
return 'typeahead';
|
|
689
|
+
default:
|
|
690
|
+
return prop.options ? 'select' : 'input';
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
ExtensibleFormPropComponent.prototype.getType = function (prop) {
|
|
694
|
+
switch (prop.type) {
|
|
695
|
+
case "date" /* Date */:
|
|
696
|
+
case "string" /* String */:
|
|
697
|
+
return 'text';
|
|
698
|
+
case "boolean" /* Boolean */:
|
|
699
|
+
return 'checkbox';
|
|
700
|
+
case "number" /* Number */:
|
|
701
|
+
return 'number';
|
|
702
|
+
case "email" /* Email */:
|
|
703
|
+
return 'email';
|
|
704
|
+
case "password" /* Password */:
|
|
705
|
+
return 'password';
|
|
706
|
+
default:
|
|
707
|
+
return 'hidden';
|
|
708
|
+
}
|
|
709
|
+
};
|
|
710
|
+
ExtensibleFormPropComponent.prototype.ngOnChanges = function (_a) {
|
|
711
|
+
var prop = _a.prop;
|
|
712
|
+
var currentProp = prop === null || prop === void 0 ? void 0 : prop.currentValue;
|
|
713
|
+
var _b = currentProp || {}, options = _b.options, readonly = _b.readonly, disabled = _b.disabled, validators = _b.validators;
|
|
714
|
+
if (options)
|
|
715
|
+
this.options$ = options(this.data);
|
|
716
|
+
if (readonly)
|
|
717
|
+
this.readonly = readonly(this.data);
|
|
718
|
+
if (disabled)
|
|
719
|
+
this.disabled = disabled(this.data);
|
|
720
|
+
if (validators) {
|
|
721
|
+
this.validators = validators(this.data);
|
|
722
|
+
this.setAsterisk();
|
|
723
|
+
}
|
|
724
|
+
var _c = __read(this.getTypeaheadControls(), 2), keyControl = _c[0], valueControl = _c[1];
|
|
725
|
+
if (keyControl && valueControl)
|
|
726
|
+
this.typeaheadModel = { key: keyControl.value, value: valueControl.value };
|
|
727
|
+
};
|
|
728
|
+
return ExtensibleFormPropComponent;
|
|
729
|
+
}());
|
|
730
|
+
ExtensibleFormPropComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormPropComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.TrackByService }, { token: i1__namespace.ConfigStateService }, { token: i2__namespace$1.FormGroupDirective }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
731
|
+
ExtensibleFormPropComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: { data: "data", prop: "prop", first: "first" }, viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"mb-3 form-group\" *abpPermission=\"prop.permission\" [ngSwitch]=\"getComponent(prop)\">\n <ng-template ngSwitchCase=\"input\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [autocomplete]=\"prop.autocomplete\"\n [type]=\"getType(prop)\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"hidden\">\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </ng-template>\n\n <ng-template ngSwitchCase=\"checkbox\">\n <div class=\"form-check\" validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n type=\"checkbox\"\n class=\"form-check-input\"\n />\n <ng-template\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\n ></ng-template>\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"select\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n class=\"form-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"multiselect\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n multiple=\"multiple\"\n class=\"form-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"typeahead\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [autocomplete]=\"prop.autocomplete\"\n [abpDisabled]=\"disabled\"\n [ngbTypeahead]=\"search\"\n [editable]=\"false\"\n [inputFormatter]=\"typeaheadFormatter\"\n [resultFormatter]=\"typeaheadFormatter\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"typeaheadModel\"\n (selectItem)=\"setTypeaheadValue($event.item)\"\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\n class=\"form-control\"\n />\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"date\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"time\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"dateTime\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"textarea\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <textarea\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n ></textarea>\n </ng-template>\n</div>\n\n<ng-template #label let-classes>\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\"\n >{{ prop.displayName | abpLocalization }} {{ asterisk }}</label\n >\n</ng-template>\n", components: [{ type: i2__namespace.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }, { type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }], directives: [{ type: i1__namespace.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i6__namespace.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { type: DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { type: i6__namespace.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { type: i2__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2__namespace$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace$1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { type: i6__namespace.ValidationStyleDirective, selector: "[validationStyle]", exportAs: ["validationStyle"] }, { type: i2__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i2__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i5__namespace.AsyncPipe, "abpLocalization": i1__namespace.LocalizationPipe }, viewProviders: [
|
|
732
|
+
{
|
|
733
|
+
provide: i2$1.ControlContainer,
|
|
734
|
+
useFactory: selfFactory,
|
|
735
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
736
|
+
},
|
|
737
|
+
{ provide: i2.NgbDateAdapter, useClass: DateAdapter },
|
|
738
|
+
{ provide: i2.NgbTimeAdapter, useClass: TimeAdapter },
|
|
739
|
+
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
740
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormPropComponent, decorators: [{
|
|
741
|
+
type: i0.Component,
|
|
742
|
+
args: [{
|
|
743
|
+
selector: 'abp-extensible-form-prop',
|
|
744
|
+
templateUrl: './extensible-form-prop.component.html',
|
|
745
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
746
|
+
viewProviders: [
|
|
747
|
+
{
|
|
748
|
+
provide: i2$1.ControlContainer,
|
|
749
|
+
useFactory: selfFactory,
|
|
750
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
751
|
+
},
|
|
752
|
+
{ provide: i2.NgbDateAdapter, useClass: DateAdapter },
|
|
753
|
+
{ provide: i2.NgbTimeAdapter, useClass: TimeAdapter },
|
|
754
|
+
],
|
|
755
|
+
}]
|
|
756
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.TrackByService }, { type: i1__namespace.ConfigStateService }, { type: i2__namespace$1.FormGroupDirective }]; }, propDecorators: { data: [{
|
|
757
|
+
type: i0.Input
|
|
758
|
+
}], prop: [{
|
|
759
|
+
type: i0.Input
|
|
760
|
+
}], first: [{
|
|
761
|
+
type: i0.Input
|
|
762
|
+
}], fieldRef: [{
|
|
763
|
+
type: i0.ViewChild,
|
|
764
|
+
args: ['field']
|
|
765
|
+
}] } });
|
|
766
|
+
function isRequired(validator) {
|
|
767
|
+
return validator === i2$1.Validators.required || validator === i1.AbpValidators.required;
|
|
768
768
|
}
|
|
769
769
|
|
|
770
|
-
var EXTENSIONS_IDENTIFIER = new i0.InjectionToken('EXTENSIONS_IDENTIFIER');
|
|
771
|
-
var EXTENSIONS_ACTION_TYPE = new i0.InjectionToken('EXTENSIONS_ACTION_TYPE');
|
|
772
|
-
var EXTENSIONS_ACTION_DATA = new i0.InjectionToken('EXTENSIONS_ACTION_DATA');
|
|
773
|
-
var EXTENSIONS_ACTION_CALLBACK = new i0.InjectionToken('EXTENSIONS_ACTION_DATA');
|
|
770
|
+
var EXTENSIONS_IDENTIFIER = new i0.InjectionToken('EXTENSIONS_IDENTIFIER');
|
|
771
|
+
var EXTENSIONS_ACTION_TYPE = new i0.InjectionToken('EXTENSIONS_ACTION_TYPE');
|
|
772
|
+
var EXTENSIONS_ACTION_DATA = new i0.InjectionToken('EXTENSIONS_ACTION_DATA');
|
|
773
|
+
var EXTENSIONS_ACTION_CALLBACK = new i0.InjectionToken('EXTENSIONS_ACTION_DATA');
|
|
774
774
|
var PROP_DATA_STREAM = new i0.InjectionToken('PROP_DATA_STREAM');
|
|
775
775
|
|
|
776
|
-
var ActionList = /** @class */ (function (_super) {
|
|
777
|
-
__extends(ActionList, _super);
|
|
778
|
-
function ActionList() {
|
|
779
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
780
|
-
}
|
|
781
|
-
return ActionList;
|
|
782
|
-
}(utils.LinkedList));
|
|
783
|
-
var ActionData = /** @class */ (function () {
|
|
784
|
-
function ActionData() {
|
|
785
|
-
}
|
|
786
|
-
Object.defineProperty(ActionData.prototype, "data", {
|
|
787
|
-
get: function () {
|
|
788
|
-
return {
|
|
789
|
-
getInjected: this.getInjected,
|
|
790
|
-
index: this.index,
|
|
791
|
-
record: this.record,
|
|
792
|
-
};
|
|
793
|
-
},
|
|
794
|
-
enumerable: false,
|
|
795
|
-
configurable: true
|
|
796
|
-
});
|
|
797
|
-
return ActionData;
|
|
798
|
-
}());
|
|
799
|
-
var Action = /** @class */ (function () {
|
|
800
|
-
function Action(permission, visible, action) {
|
|
801
|
-
if (visible === void 0) { visible = function (_) { return true; }; }
|
|
802
|
-
if (action === void 0) { action = function (_) { }; }
|
|
803
|
-
this.permission = permission;
|
|
804
|
-
this.visible = visible;
|
|
805
|
-
this.action = action;
|
|
806
|
-
}
|
|
807
|
-
return Action;
|
|
808
|
-
}());
|
|
809
|
-
var ActionsFactory = /** @class */ (function () {
|
|
810
|
-
function ActionsFactory() {
|
|
811
|
-
this.contributorCallbacks = {};
|
|
812
|
-
}
|
|
813
|
-
ActionsFactory.prototype.get = function (name) {
|
|
814
|
-
this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
|
|
815
|
-
return new this._ctor(this.contributorCallbacks[name]);
|
|
816
|
-
};
|
|
817
|
-
return ActionsFactory;
|
|
818
|
-
}());
|
|
819
|
-
var Actions = /** @class */ (function () {
|
|
820
|
-
function Actions(callbackList) {
|
|
821
|
-
this.callbackList = callbackList;
|
|
822
|
-
}
|
|
823
|
-
Object.defineProperty(Actions.prototype, "actions", {
|
|
824
|
-
get: function () {
|
|
825
|
-
var actionList = new this._ctor();
|
|
826
|
-
this.callbackList.forEach(function (callback) { return callback(actionList); });
|
|
827
|
-
return actionList;
|
|
828
|
-
},
|
|
829
|
-
enumerable: false,
|
|
830
|
-
configurable: true
|
|
831
|
-
});
|
|
832
|
-
Actions.prototype.addContributor = function (contributeCallback) {
|
|
833
|
-
this.callbackList.push(contributeCallback);
|
|
834
|
-
};
|
|
835
|
-
Actions.prototype.clearContributors = function () {
|
|
836
|
-
while (this.callbackList.length)
|
|
837
|
-
this.callbackList.pop();
|
|
838
|
-
};
|
|
839
|
-
return Actions;
|
|
776
|
+
var ActionList = /** @class */ (function (_super) {
|
|
777
|
+
__extends(ActionList, _super);
|
|
778
|
+
function ActionList() {
|
|
779
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
780
|
+
}
|
|
781
|
+
return ActionList;
|
|
782
|
+
}(utils.LinkedList));
|
|
783
|
+
var ActionData = /** @class */ (function () {
|
|
784
|
+
function ActionData() {
|
|
785
|
+
}
|
|
786
|
+
Object.defineProperty(ActionData.prototype, "data", {
|
|
787
|
+
get: function () {
|
|
788
|
+
return {
|
|
789
|
+
getInjected: this.getInjected,
|
|
790
|
+
index: this.index,
|
|
791
|
+
record: this.record,
|
|
792
|
+
};
|
|
793
|
+
},
|
|
794
|
+
enumerable: false,
|
|
795
|
+
configurable: true
|
|
796
|
+
});
|
|
797
|
+
return ActionData;
|
|
798
|
+
}());
|
|
799
|
+
var Action = /** @class */ (function () {
|
|
800
|
+
function Action(permission, visible, action) {
|
|
801
|
+
if (visible === void 0) { visible = function (_) { return true; }; }
|
|
802
|
+
if (action === void 0) { action = function (_) { }; }
|
|
803
|
+
this.permission = permission;
|
|
804
|
+
this.visible = visible;
|
|
805
|
+
this.action = action;
|
|
806
|
+
}
|
|
807
|
+
return Action;
|
|
808
|
+
}());
|
|
809
|
+
var ActionsFactory = /** @class */ (function () {
|
|
810
|
+
function ActionsFactory() {
|
|
811
|
+
this.contributorCallbacks = {};
|
|
812
|
+
}
|
|
813
|
+
ActionsFactory.prototype.get = function (name) {
|
|
814
|
+
this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
|
|
815
|
+
return new this._ctor(this.contributorCallbacks[name]);
|
|
816
|
+
};
|
|
817
|
+
return ActionsFactory;
|
|
818
|
+
}());
|
|
819
|
+
var Actions = /** @class */ (function () {
|
|
820
|
+
function Actions(callbackList) {
|
|
821
|
+
this.callbackList = callbackList;
|
|
822
|
+
}
|
|
823
|
+
Object.defineProperty(Actions.prototype, "actions", {
|
|
824
|
+
get: function () {
|
|
825
|
+
var actionList = new this._ctor();
|
|
826
|
+
this.callbackList.forEach(function (callback) { return callback(actionList); });
|
|
827
|
+
return actionList;
|
|
828
|
+
},
|
|
829
|
+
enumerable: false,
|
|
830
|
+
configurable: true
|
|
831
|
+
});
|
|
832
|
+
Actions.prototype.addContributor = function (contributeCallback) {
|
|
833
|
+
this.callbackList.push(contributeCallback);
|
|
834
|
+
};
|
|
835
|
+
Actions.prototype.clearContributors = function () {
|
|
836
|
+
while (this.callbackList.length)
|
|
837
|
+
this.callbackList.pop();
|
|
838
|
+
};
|
|
839
|
+
return Actions;
|
|
840
840
|
}());
|
|
841
841
|
|
|
842
|
-
var EntityActionList = /** @class */ (function (_super) {
|
|
843
|
-
__extends(EntityActionList, _super);
|
|
844
|
-
function EntityActionList() {
|
|
845
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
846
|
-
}
|
|
847
|
-
return EntityActionList;
|
|
848
|
-
}(ActionList));
|
|
849
|
-
var EntityActions = /** @class */ (function (_super) {
|
|
850
|
-
__extends(EntityActions, _super);
|
|
851
|
-
function EntityActions() {
|
|
852
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
853
|
-
_this._ctor = EntityActionList;
|
|
854
|
-
return _this;
|
|
855
|
-
}
|
|
856
|
-
return EntityActions;
|
|
857
|
-
}(Actions));
|
|
858
|
-
var EntityActionsFactory = /** @class */ (function (_super) {
|
|
859
|
-
__extends(EntityActionsFactory, _super);
|
|
860
|
-
function EntityActionsFactory() {
|
|
861
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
862
|
-
_this._ctor = EntityActions;
|
|
863
|
-
return _this;
|
|
864
|
-
}
|
|
865
|
-
return EntityActionsFactory;
|
|
866
|
-
}(ActionsFactory));
|
|
867
|
-
var EntityAction = /** @class */ (function (_super) {
|
|
868
|
-
__extends(EntityAction, _super);
|
|
869
|
-
function EntityAction(options) {
|
|
870
|
-
var _this = _super.call(this, options.permission, options.visible, options.action) || this;
|
|
871
|
-
_this.text = options.text;
|
|
872
|
-
_this.icon = options.icon || '';
|
|
873
|
-
return _this;
|
|
874
|
-
}
|
|
875
|
-
EntityAction.create = function (options) {
|
|
876
|
-
return new EntityAction(options);
|
|
877
|
-
};
|
|
878
|
-
EntityAction.createMany = function (arrayOfOptions) {
|
|
879
|
-
return arrayOfOptions.map(EntityAction.create);
|
|
880
|
-
};
|
|
881
|
-
return EntityAction;
|
|
842
|
+
var EntityActionList = /** @class */ (function (_super) {
|
|
843
|
+
__extends(EntityActionList, _super);
|
|
844
|
+
function EntityActionList() {
|
|
845
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
846
|
+
}
|
|
847
|
+
return EntityActionList;
|
|
848
|
+
}(ActionList));
|
|
849
|
+
var EntityActions = /** @class */ (function (_super) {
|
|
850
|
+
__extends(EntityActions, _super);
|
|
851
|
+
function EntityActions() {
|
|
852
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
853
|
+
_this._ctor = EntityActionList;
|
|
854
|
+
return _this;
|
|
855
|
+
}
|
|
856
|
+
return EntityActions;
|
|
857
|
+
}(Actions));
|
|
858
|
+
var EntityActionsFactory = /** @class */ (function (_super) {
|
|
859
|
+
__extends(EntityActionsFactory, _super);
|
|
860
|
+
function EntityActionsFactory() {
|
|
861
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
862
|
+
_this._ctor = EntityActions;
|
|
863
|
+
return _this;
|
|
864
|
+
}
|
|
865
|
+
return EntityActionsFactory;
|
|
866
|
+
}(ActionsFactory));
|
|
867
|
+
var EntityAction = /** @class */ (function (_super) {
|
|
868
|
+
__extends(EntityAction, _super);
|
|
869
|
+
function EntityAction(options) {
|
|
870
|
+
var _this = _super.call(this, options.permission, options.visible, options.action) || this;
|
|
871
|
+
_this.text = options.text;
|
|
872
|
+
_this.icon = options.icon || '';
|
|
873
|
+
return _this;
|
|
874
|
+
}
|
|
875
|
+
EntityAction.create = function (options) {
|
|
876
|
+
return new EntityAction(options);
|
|
877
|
+
};
|
|
878
|
+
EntityAction.createMany = function (arrayOfOptions) {
|
|
879
|
+
return arrayOfOptions.map(EntityAction.create);
|
|
880
|
+
};
|
|
881
|
+
return EntityAction;
|
|
882
882
|
}(Action));
|
|
883
883
|
|
|
884
|
-
var PropList = /** @class */ (function (_super) {
|
|
885
|
-
__extends(PropList, _super);
|
|
886
|
-
function PropList() {
|
|
887
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
888
|
-
}
|
|
889
|
-
return PropList;
|
|
890
|
-
}(utils.LinkedList));
|
|
891
|
-
var PropData = /** @class */ (function () {
|
|
892
|
-
function PropData() {
|
|
893
|
-
}
|
|
894
|
-
Object.defineProperty(PropData.prototype, "data", {
|
|
895
|
-
get: function () {
|
|
896
|
-
return {
|
|
897
|
-
getInjected: this.getInjected,
|
|
898
|
-
index: this.index,
|
|
899
|
-
record: this.record,
|
|
900
|
-
};
|
|
901
|
-
},
|
|
902
|
-
enumerable: false,
|
|
903
|
-
configurable: true
|
|
904
|
-
});
|
|
905
|
-
return PropData;
|
|
906
|
-
}());
|
|
907
|
-
var Prop = /** @class */ (function () {
|
|
908
|
-
function Prop(type, name, displayName, permission, visible, isExtra) {
|
|
909
|
-
if (visible === void 0) { visible = function (_) { return true; }; }
|
|
910
|
-
if (isExtra === void 0) { isExtra = false; }
|
|
911
|
-
this.type = type;
|
|
912
|
-
this.name = name;
|
|
913
|
-
this.displayName = displayName;
|
|
914
|
-
this.permission = permission;
|
|
915
|
-
this.visible = visible;
|
|
916
|
-
this.isExtra = isExtra;
|
|
917
|
-
this.displayName = this.displayName || this.name;
|
|
918
|
-
}
|
|
919
|
-
return Prop;
|
|
920
|
-
}());
|
|
921
|
-
var PropsFactory = /** @class */ (function () {
|
|
922
|
-
function PropsFactory() {
|
|
923
|
-
this.contributorCallbacks = {};
|
|
924
|
-
}
|
|
925
|
-
PropsFactory.prototype.get = function (name) {
|
|
926
|
-
this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
|
|
927
|
-
return new this._ctor(this.contributorCallbacks[name]);
|
|
928
|
-
};
|
|
929
|
-
return PropsFactory;
|
|
930
|
-
}());
|
|
931
|
-
var Props = /** @class */ (function () {
|
|
932
|
-
function Props(callbackList) {
|
|
933
|
-
this.callbackList = callbackList;
|
|
934
|
-
}
|
|
935
|
-
Object.defineProperty(Props.prototype, "props", {
|
|
936
|
-
get: function () {
|
|
937
|
-
var propList = new this._ctor();
|
|
938
|
-
this.callbackList.forEach(function (callback) { return callback(propList); });
|
|
939
|
-
return propList;
|
|
940
|
-
},
|
|
941
|
-
enumerable: false,
|
|
942
|
-
configurable: true
|
|
943
|
-
});
|
|
944
|
-
Props.prototype.addContributor = function (contributeCallback) {
|
|
945
|
-
this.callbackList.push(contributeCallback);
|
|
946
|
-
};
|
|
947
|
-
Props.prototype.clearContributors = function () {
|
|
948
|
-
while (this.callbackList.length)
|
|
949
|
-
this.callbackList.pop();
|
|
950
|
-
};
|
|
951
|
-
return Props;
|
|
884
|
+
var PropList = /** @class */ (function (_super) {
|
|
885
|
+
__extends(PropList, _super);
|
|
886
|
+
function PropList() {
|
|
887
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
888
|
+
}
|
|
889
|
+
return PropList;
|
|
890
|
+
}(utils.LinkedList));
|
|
891
|
+
var PropData = /** @class */ (function () {
|
|
892
|
+
function PropData() {
|
|
893
|
+
}
|
|
894
|
+
Object.defineProperty(PropData.prototype, "data", {
|
|
895
|
+
get: function () {
|
|
896
|
+
return {
|
|
897
|
+
getInjected: this.getInjected,
|
|
898
|
+
index: this.index,
|
|
899
|
+
record: this.record,
|
|
900
|
+
};
|
|
901
|
+
},
|
|
902
|
+
enumerable: false,
|
|
903
|
+
configurable: true
|
|
904
|
+
});
|
|
905
|
+
return PropData;
|
|
906
|
+
}());
|
|
907
|
+
var Prop = /** @class */ (function () {
|
|
908
|
+
function Prop(type, name, displayName, permission, visible, isExtra) {
|
|
909
|
+
if (visible === void 0) { visible = function (_) { return true; }; }
|
|
910
|
+
if (isExtra === void 0) { isExtra = false; }
|
|
911
|
+
this.type = type;
|
|
912
|
+
this.name = name;
|
|
913
|
+
this.displayName = displayName;
|
|
914
|
+
this.permission = permission;
|
|
915
|
+
this.visible = visible;
|
|
916
|
+
this.isExtra = isExtra;
|
|
917
|
+
this.displayName = this.displayName || this.name;
|
|
918
|
+
}
|
|
919
|
+
return Prop;
|
|
920
|
+
}());
|
|
921
|
+
var PropsFactory = /** @class */ (function () {
|
|
922
|
+
function PropsFactory() {
|
|
923
|
+
this.contributorCallbacks = {};
|
|
924
|
+
}
|
|
925
|
+
PropsFactory.prototype.get = function (name) {
|
|
926
|
+
this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
|
|
927
|
+
return new this._ctor(this.contributorCallbacks[name]);
|
|
928
|
+
};
|
|
929
|
+
return PropsFactory;
|
|
930
|
+
}());
|
|
931
|
+
var Props = /** @class */ (function () {
|
|
932
|
+
function Props(callbackList) {
|
|
933
|
+
this.callbackList = callbackList;
|
|
934
|
+
}
|
|
935
|
+
Object.defineProperty(Props.prototype, "props", {
|
|
936
|
+
get: function () {
|
|
937
|
+
var propList = new this._ctor();
|
|
938
|
+
this.callbackList.forEach(function (callback) { return callback(propList); });
|
|
939
|
+
return propList;
|
|
940
|
+
},
|
|
941
|
+
enumerable: false,
|
|
942
|
+
configurable: true
|
|
943
|
+
});
|
|
944
|
+
Props.prototype.addContributor = function (contributeCallback) {
|
|
945
|
+
this.callbackList.push(contributeCallback);
|
|
946
|
+
};
|
|
947
|
+
Props.prototype.clearContributors = function () {
|
|
948
|
+
while (this.callbackList.length)
|
|
949
|
+
this.callbackList.pop();
|
|
950
|
+
};
|
|
951
|
+
return Props;
|
|
952
952
|
}());
|
|
953
953
|
|
|
954
|
-
var EntityPropList = /** @class */ (function (_super) {
|
|
955
|
-
__extends(EntityPropList, _super);
|
|
956
|
-
function EntityPropList() {
|
|
957
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
958
|
-
}
|
|
959
|
-
return EntityPropList;
|
|
960
|
-
}(PropList));
|
|
961
|
-
var EntityProps = /** @class */ (function (_super) {
|
|
962
|
-
__extends(EntityProps, _super);
|
|
963
|
-
function EntityProps() {
|
|
964
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
965
|
-
_this._ctor = EntityPropList;
|
|
966
|
-
return _this;
|
|
967
|
-
}
|
|
968
|
-
return EntityProps;
|
|
969
|
-
}(Props));
|
|
970
|
-
var EntityPropsFactory = /** @class */ (function (_super) {
|
|
971
|
-
__extends(EntityPropsFactory, _super);
|
|
972
|
-
function EntityPropsFactory() {
|
|
973
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
974
|
-
_this._ctor = EntityProps;
|
|
975
|
-
return _this;
|
|
976
|
-
}
|
|
977
|
-
return EntityPropsFactory;
|
|
978
|
-
}(PropsFactory));
|
|
979
|
-
var EntityProp = /** @class */ (function (_super) {
|
|
980
|
-
__extends(EntityProp, _super);
|
|
981
|
-
function EntityProp(options) {
|
|
982
|
-
var _this = _super.call(this, options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra) || this;
|
|
983
|
-
_this.columnWidth = options.columnWidth;
|
|
984
|
-
_this.sortable = options.sortable || false;
|
|
985
|
-
_this.valueResolver =
|
|
986
|
-
|
|
987
|
-
_this.
|
|
988
|
-
_this.
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
954
|
+
var EntityPropList = /** @class */ (function (_super) {
|
|
955
|
+
__extends(EntityPropList, _super);
|
|
956
|
+
function EntityPropList() {
|
|
957
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
958
|
+
}
|
|
959
|
+
return EntityPropList;
|
|
960
|
+
}(PropList));
|
|
961
|
+
var EntityProps = /** @class */ (function (_super) {
|
|
962
|
+
__extends(EntityProps, _super);
|
|
963
|
+
function EntityProps() {
|
|
964
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
965
|
+
_this._ctor = EntityPropList;
|
|
966
|
+
return _this;
|
|
967
|
+
}
|
|
968
|
+
return EntityProps;
|
|
969
|
+
}(Props));
|
|
970
|
+
var EntityPropsFactory = /** @class */ (function (_super) {
|
|
971
|
+
__extends(EntityPropsFactory, _super);
|
|
972
|
+
function EntityPropsFactory() {
|
|
973
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
974
|
+
_this._ctor = EntityProps;
|
|
975
|
+
return _this;
|
|
976
|
+
}
|
|
977
|
+
return EntityPropsFactory;
|
|
978
|
+
}(PropsFactory));
|
|
979
|
+
var EntityProp = /** @class */ (function (_super) {
|
|
980
|
+
__extends(EntityProp, _super);
|
|
981
|
+
function EntityProp(options) {
|
|
982
|
+
var _this = _super.call(this, options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra) || this;
|
|
983
|
+
_this.columnWidth = options.columnWidth;
|
|
984
|
+
_this.sortable = options.sortable || false;
|
|
985
|
+
_this.valueResolver =
|
|
986
|
+
options.valueResolver || (function (data) { return rxjs.of(i1.escapeHtmlChars(data.record[_this.name])); });
|
|
987
|
+
_this.action = options.action;
|
|
988
|
+
_this.component = options.component;
|
|
989
|
+
_this.enumList = options.enumList;
|
|
990
|
+
return _this;
|
|
991
|
+
}
|
|
992
|
+
EntityProp.create = function (options) {
|
|
993
|
+
return new EntityProp(options);
|
|
994
|
+
};
|
|
995
|
+
EntityProp.createMany = function (arrayOfOptions) {
|
|
996
|
+
return arrayOfOptions.map(EntityProp.create);
|
|
997
|
+
};
|
|
998
|
+
return EntityProp;
|
|
998
999
|
}(Prop));
|
|
999
1000
|
|
|
1000
|
-
var FormPropList = /** @class */ (function (_super) {
|
|
1001
|
-
__extends(FormPropList, _super);
|
|
1002
|
-
function FormPropList() {
|
|
1003
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1004
|
-
}
|
|
1005
|
-
return FormPropList;
|
|
1006
|
-
}(PropList));
|
|
1007
|
-
var FormProps = /** @class */ (function (_super) {
|
|
1008
|
-
__extends(FormProps, _super);
|
|
1009
|
-
function FormProps() {
|
|
1010
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1011
|
-
_this._ctor = FormPropList;
|
|
1012
|
-
return _this;
|
|
1013
|
-
}
|
|
1014
|
-
return FormProps;
|
|
1015
|
-
}(Props));
|
|
1016
|
-
var CreateFormPropsFactory = /** @class */ (function (_super) {
|
|
1017
|
-
__extends(CreateFormPropsFactory, _super);
|
|
1018
|
-
function CreateFormPropsFactory() {
|
|
1019
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1020
|
-
_this._ctor = FormProps;
|
|
1021
|
-
return _this;
|
|
1022
|
-
}
|
|
1023
|
-
return CreateFormPropsFactory;
|
|
1024
|
-
}(PropsFactory));
|
|
1025
|
-
var EditFormPropsFactory = /** @class */ (function (_super) {
|
|
1026
|
-
__extends(EditFormPropsFactory, _super);
|
|
1027
|
-
function EditFormPropsFactory() {
|
|
1028
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1029
|
-
_this._ctor = FormProps;
|
|
1030
|
-
return _this;
|
|
1031
|
-
}
|
|
1032
|
-
return EditFormPropsFactory;
|
|
1033
|
-
}(PropsFactory));
|
|
1034
|
-
var FormProp = /** @class */ (function (_super) {
|
|
1035
|
-
__extends(FormProp, _super);
|
|
1036
|
-
function FormProp(options) {
|
|
1037
|
-
var _this = _super.call(this, options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra) || this;
|
|
1038
|
-
_this.asyncValidators = options.asyncValidators || (function (_) { return []; });
|
|
1039
|
-
_this.validators = options.validators || (function (_) { return []; });
|
|
1040
|
-
_this.disabled = options.disabled || (function (_) { return false; });
|
|
1041
|
-
_this.readonly = options.readonly || (function (_) { return false; });
|
|
1042
|
-
_this.autocomplete = options.autocomplete || 'off';
|
|
1043
|
-
_this.options = options.options;
|
|
1044
|
-
_this.id = options.id || options.name;
|
|
1045
|
-
var defaultValue = options.defaultValue;
|
|
1046
|
-
_this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || null;
|
|
1047
|
-
return _this;
|
|
1048
|
-
}
|
|
1049
|
-
FormProp.create = function (options) {
|
|
1050
|
-
return new FormProp(options);
|
|
1051
|
-
};
|
|
1052
|
-
FormProp.createMany = function (arrayOfOptions) {
|
|
1053
|
-
return arrayOfOptions.map(FormProp.create);
|
|
1054
|
-
};
|
|
1055
|
-
return FormProp;
|
|
1056
|
-
}(Prop));
|
|
1057
|
-
var FormPropData = /** @class */ (function (_super) {
|
|
1058
|
-
__extends(FormPropData, _super);
|
|
1059
|
-
function FormPropData(injector, record) {
|
|
1060
|
-
var _this = _super.call(this) || this;
|
|
1061
|
-
_this.record = record;
|
|
1062
|
-
_this.getInjected = injector.get.bind(injector);
|
|
1063
|
-
return _this;
|
|
1064
|
-
}
|
|
1065
|
-
return FormPropData;
|
|
1066
|
-
}(PropData));
|
|
1067
|
-
function isFalsyValue(defaultValue) {
|
|
1068
|
-
return [0, '', false].indexOf(defaultValue) > -1;
|
|
1001
|
+
var FormPropList = /** @class */ (function (_super) {
|
|
1002
|
+
__extends(FormPropList, _super);
|
|
1003
|
+
function FormPropList() {
|
|
1004
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1005
|
+
}
|
|
1006
|
+
return FormPropList;
|
|
1007
|
+
}(PropList));
|
|
1008
|
+
var FormProps = /** @class */ (function (_super) {
|
|
1009
|
+
__extends(FormProps, _super);
|
|
1010
|
+
function FormProps() {
|
|
1011
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1012
|
+
_this._ctor = FormPropList;
|
|
1013
|
+
return _this;
|
|
1014
|
+
}
|
|
1015
|
+
return FormProps;
|
|
1016
|
+
}(Props));
|
|
1017
|
+
var CreateFormPropsFactory = /** @class */ (function (_super) {
|
|
1018
|
+
__extends(CreateFormPropsFactory, _super);
|
|
1019
|
+
function CreateFormPropsFactory() {
|
|
1020
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1021
|
+
_this._ctor = FormProps;
|
|
1022
|
+
return _this;
|
|
1023
|
+
}
|
|
1024
|
+
return CreateFormPropsFactory;
|
|
1025
|
+
}(PropsFactory));
|
|
1026
|
+
var EditFormPropsFactory = /** @class */ (function (_super) {
|
|
1027
|
+
__extends(EditFormPropsFactory, _super);
|
|
1028
|
+
function EditFormPropsFactory() {
|
|
1029
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1030
|
+
_this._ctor = FormProps;
|
|
1031
|
+
return _this;
|
|
1032
|
+
}
|
|
1033
|
+
return EditFormPropsFactory;
|
|
1034
|
+
}(PropsFactory));
|
|
1035
|
+
var FormProp = /** @class */ (function (_super) {
|
|
1036
|
+
__extends(FormProp, _super);
|
|
1037
|
+
function FormProp(options) {
|
|
1038
|
+
var _this = _super.call(this, options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra) || this;
|
|
1039
|
+
_this.asyncValidators = options.asyncValidators || (function (_) { return []; });
|
|
1040
|
+
_this.validators = options.validators || (function (_) { return []; });
|
|
1041
|
+
_this.disabled = options.disabled || (function (_) { return false; });
|
|
1042
|
+
_this.readonly = options.readonly || (function (_) { return false; });
|
|
1043
|
+
_this.autocomplete = options.autocomplete || 'off';
|
|
1044
|
+
_this.options = options.options;
|
|
1045
|
+
_this.id = options.id || options.name;
|
|
1046
|
+
var defaultValue = options.defaultValue;
|
|
1047
|
+
_this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || null;
|
|
1048
|
+
return _this;
|
|
1049
|
+
}
|
|
1050
|
+
FormProp.create = function (options) {
|
|
1051
|
+
return new FormProp(options);
|
|
1052
|
+
};
|
|
1053
|
+
FormProp.createMany = function (arrayOfOptions) {
|
|
1054
|
+
return arrayOfOptions.map(FormProp.create);
|
|
1055
|
+
};
|
|
1056
|
+
return FormProp;
|
|
1057
|
+
}(Prop));
|
|
1058
|
+
var FormPropData = /** @class */ (function (_super) {
|
|
1059
|
+
__extends(FormPropData, _super);
|
|
1060
|
+
function FormPropData(injector, record) {
|
|
1061
|
+
var _this = _super.call(this) || this;
|
|
1062
|
+
_this.record = record;
|
|
1063
|
+
_this.getInjected = injector.get.bind(injector);
|
|
1064
|
+
return _this;
|
|
1065
|
+
}
|
|
1066
|
+
return FormPropData;
|
|
1067
|
+
}(PropData));
|
|
1068
|
+
function isFalsyValue(defaultValue) {
|
|
1069
|
+
return [0, '', false].indexOf(defaultValue) > -1;
|
|
1069
1070
|
}
|
|
1070
1071
|
|
|
1071
|
-
var ToolbarActionList = /** @class */ (function (_super) {
|
|
1072
|
-
__extends(ToolbarActionList, _super);
|
|
1073
|
-
function ToolbarActionList() {
|
|
1074
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1075
|
-
}
|
|
1076
|
-
return ToolbarActionList;
|
|
1077
|
-
}(ActionList));
|
|
1078
|
-
var ToolbarActions = /** @class */ (function (_super) {
|
|
1079
|
-
__extends(ToolbarActions, _super);
|
|
1080
|
-
function ToolbarActions() {
|
|
1081
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1082
|
-
_this._ctor = ToolbarActionList;
|
|
1083
|
-
return _this;
|
|
1084
|
-
}
|
|
1085
|
-
return ToolbarActions;
|
|
1086
|
-
}(Actions));
|
|
1087
|
-
var ToolbarActionsFactory = /** @class */ (function (_super) {
|
|
1088
|
-
__extends(ToolbarActionsFactory, _super);
|
|
1089
|
-
function ToolbarActionsFactory() {
|
|
1090
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1091
|
-
_this._ctor = ToolbarActions;
|
|
1092
|
-
return _this;
|
|
1093
|
-
}
|
|
1094
|
-
return ToolbarActionsFactory;
|
|
1095
|
-
}(ActionsFactory));
|
|
1096
|
-
var ToolbarAction = /** @class */ (function (_super) {
|
|
1097
|
-
__extends(ToolbarAction, _super);
|
|
1098
|
-
function ToolbarAction(options) {
|
|
1099
|
-
var _this = _super.call(this, options.permission || '', options.visible, options.action) || this;
|
|
1100
|
-
_this.text = options.text;
|
|
1101
|
-
_this.icon = options.icon || '';
|
|
1102
|
-
return _this;
|
|
1103
|
-
}
|
|
1104
|
-
ToolbarAction.create = function (options) {
|
|
1105
|
-
return new ToolbarAction(options);
|
|
1106
|
-
};
|
|
1107
|
-
ToolbarAction.createMany = function (arrayOfOptions) {
|
|
1108
|
-
return arrayOfOptions.map(ToolbarAction.create);
|
|
1109
|
-
};
|
|
1110
|
-
return ToolbarAction;
|
|
1111
|
-
}(Action));
|
|
1112
|
-
var ToolbarComponent = /** @class */ (function (_super) {
|
|
1113
|
-
__extends(ToolbarComponent, _super);
|
|
1114
|
-
function ToolbarComponent(options) {
|
|
1115
|
-
var _this = _super.call(this, options.permission || '', options.visible, options.action) || this;
|
|
1116
|
-
_this.component = options.component;
|
|
1117
|
-
return _this;
|
|
1118
|
-
}
|
|
1119
|
-
ToolbarComponent.create = function (options) {
|
|
1120
|
-
return new ToolbarComponent(options);
|
|
1121
|
-
};
|
|
1122
|
-
ToolbarComponent.createMany = function (arrayOfOptions) {
|
|
1123
|
-
return arrayOfOptions.map(ToolbarComponent.create);
|
|
1124
|
-
};
|
|
1125
|
-
return ToolbarComponent;
|
|
1072
|
+
var ToolbarActionList = /** @class */ (function (_super) {
|
|
1073
|
+
__extends(ToolbarActionList, _super);
|
|
1074
|
+
function ToolbarActionList() {
|
|
1075
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1076
|
+
}
|
|
1077
|
+
return ToolbarActionList;
|
|
1078
|
+
}(ActionList));
|
|
1079
|
+
var ToolbarActions = /** @class */ (function (_super) {
|
|
1080
|
+
__extends(ToolbarActions, _super);
|
|
1081
|
+
function ToolbarActions() {
|
|
1082
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1083
|
+
_this._ctor = ToolbarActionList;
|
|
1084
|
+
return _this;
|
|
1085
|
+
}
|
|
1086
|
+
return ToolbarActions;
|
|
1087
|
+
}(Actions));
|
|
1088
|
+
var ToolbarActionsFactory = /** @class */ (function (_super) {
|
|
1089
|
+
__extends(ToolbarActionsFactory, _super);
|
|
1090
|
+
function ToolbarActionsFactory() {
|
|
1091
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1092
|
+
_this._ctor = ToolbarActions;
|
|
1093
|
+
return _this;
|
|
1094
|
+
}
|
|
1095
|
+
return ToolbarActionsFactory;
|
|
1096
|
+
}(ActionsFactory));
|
|
1097
|
+
var ToolbarAction = /** @class */ (function (_super) {
|
|
1098
|
+
__extends(ToolbarAction, _super);
|
|
1099
|
+
function ToolbarAction(options) {
|
|
1100
|
+
var _this = _super.call(this, options.permission || '', options.visible, options.action) || this;
|
|
1101
|
+
_this.text = options.text;
|
|
1102
|
+
_this.icon = options.icon || '';
|
|
1103
|
+
return _this;
|
|
1104
|
+
}
|
|
1105
|
+
ToolbarAction.create = function (options) {
|
|
1106
|
+
return new ToolbarAction(options);
|
|
1107
|
+
};
|
|
1108
|
+
ToolbarAction.createMany = function (arrayOfOptions) {
|
|
1109
|
+
return arrayOfOptions.map(ToolbarAction.create);
|
|
1110
|
+
};
|
|
1111
|
+
return ToolbarAction;
|
|
1112
|
+
}(Action));
|
|
1113
|
+
var ToolbarComponent = /** @class */ (function (_super) {
|
|
1114
|
+
__extends(ToolbarComponent, _super);
|
|
1115
|
+
function ToolbarComponent(options) {
|
|
1116
|
+
var _this = _super.call(this, options.permission || '', options.visible, options.action) || this;
|
|
1117
|
+
_this.component = options.component;
|
|
1118
|
+
return _this;
|
|
1119
|
+
}
|
|
1120
|
+
ToolbarComponent.create = function (options) {
|
|
1121
|
+
return new ToolbarComponent(options);
|
|
1122
|
+
};
|
|
1123
|
+
ToolbarComponent.createMany = function (arrayOfOptions) {
|
|
1124
|
+
return arrayOfOptions.map(ToolbarComponent.create);
|
|
1125
|
+
};
|
|
1126
|
+
return ToolbarComponent;
|
|
1126
1127
|
}(Action));
|
|
1127
1128
|
|
|
1128
|
-
var ExtensionsService = /** @class */ (function () {
|
|
1129
|
-
function ExtensionsService() {
|
|
1130
|
-
this.entityActions = new EntityActionsFactory();
|
|
1131
|
-
this.toolbarActions = new ToolbarActionsFactory();
|
|
1132
|
-
this.entityProps = new EntityPropsFactory();
|
|
1133
|
-
this.createFormProps = new CreateFormPropsFactory();
|
|
1134
|
-
this.editFormProps = new EditFormPropsFactory();
|
|
1135
|
-
}
|
|
1136
|
-
return ExtensionsService;
|
|
1137
|
-
}());
|
|
1138
|
-
ExtensionsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensionsService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1139
|
-
ExtensionsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensionsService, providedIn: 'root' });
|
|
1140
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensionsService, decorators: [{
|
|
1141
|
-
type: i0.Injectable,
|
|
1142
|
-
args: [{
|
|
1143
|
-
providedIn: 'root',
|
|
1144
|
-
}]
|
|
1129
|
+
var ExtensionsService = /** @class */ (function () {
|
|
1130
|
+
function ExtensionsService() {
|
|
1131
|
+
this.entityActions = new EntityActionsFactory();
|
|
1132
|
+
this.toolbarActions = new ToolbarActionsFactory();
|
|
1133
|
+
this.entityProps = new EntityPropsFactory();
|
|
1134
|
+
this.createFormProps = new CreateFormPropsFactory();
|
|
1135
|
+
this.editFormProps = new EditFormPropsFactory();
|
|
1136
|
+
}
|
|
1137
|
+
return ExtensionsService;
|
|
1138
|
+
}());
|
|
1139
|
+
ExtensionsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensionsService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1140
|
+
ExtensionsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensionsService, providedIn: 'root' });
|
|
1141
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensionsService, decorators: [{
|
|
1142
|
+
type: i0.Injectable,
|
|
1143
|
+
args: [{
|
|
1144
|
+
providedIn: 'root',
|
|
1145
|
+
}]
|
|
1145
1146
|
}] });
|
|
1146
1147
|
|
|
1147
|
-
var PropDataDirective = /** @class */ (function (_super) {
|
|
1148
|
-
__extends(PropDataDirective, _super);
|
|
1149
|
-
function PropDataDirective(tempRef, vcRef, injector) {
|
|
1150
|
-
var _this = _super.call(this) || this;
|
|
1151
|
-
_this.tempRef = tempRef;
|
|
1152
|
-
_this.vcRef = vcRef;
|
|
1153
|
-
_this.getInjected = injector.get.bind(injector);
|
|
1154
|
-
return _this;
|
|
1155
|
-
}
|
|
1156
|
-
PropDataDirective.prototype.ngOnChanges = function () {
|
|
1157
|
-
this.vcRef.clear();
|
|
1158
|
-
this.vcRef.createEmbeddedView(this.tempRef, {
|
|
1159
|
-
$implicit: this.data,
|
|
1160
|
-
index: 0,
|
|
1161
|
-
});
|
|
1162
|
-
};
|
|
1163
|
-
PropDataDirective.prototype.ngOnDestroy = function () {
|
|
1164
|
-
this.vcRef.clear();
|
|
1165
|
-
};
|
|
1166
|
-
return PropDataDirective;
|
|
1167
|
-
}(PropData));
|
|
1168
|
-
PropDataDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PropDataDirective, deps: [{ token: i0__namespace.TemplateRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1169
|
-
PropDataDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: PropDataDirective, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
1170
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PropDataDirective, decorators: [{
|
|
1171
|
-
type: i0.Directive,
|
|
1172
|
-
args: [{
|
|
1173
|
-
exportAs: 'abpPropData',
|
|
1174
|
-
selector: '[abpPropData]',
|
|
1175
|
-
}]
|
|
1176
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.Injector }]; }, propDecorators: { propList: [{
|
|
1177
|
-
type: i0.Input,
|
|
1178
|
-
args: ['abpPropDataFromList']
|
|
1179
|
-
}], record: [{
|
|
1180
|
-
type: i0.Input,
|
|
1181
|
-
args: ['abpPropDataWithRecord']
|
|
1182
|
-
}], index: [{
|
|
1183
|
-
type: i0.Input,
|
|
1184
|
-
args: ['abpPropDataAtIndex']
|
|
1148
|
+
var PropDataDirective = /** @class */ (function (_super) {
|
|
1149
|
+
__extends(PropDataDirective, _super);
|
|
1150
|
+
function PropDataDirective(tempRef, vcRef, injector) {
|
|
1151
|
+
var _this = _super.call(this) || this;
|
|
1152
|
+
_this.tempRef = tempRef;
|
|
1153
|
+
_this.vcRef = vcRef;
|
|
1154
|
+
_this.getInjected = injector.get.bind(injector);
|
|
1155
|
+
return _this;
|
|
1156
|
+
}
|
|
1157
|
+
PropDataDirective.prototype.ngOnChanges = function () {
|
|
1158
|
+
this.vcRef.clear();
|
|
1159
|
+
this.vcRef.createEmbeddedView(this.tempRef, {
|
|
1160
|
+
$implicit: this.data,
|
|
1161
|
+
index: 0,
|
|
1162
|
+
});
|
|
1163
|
+
};
|
|
1164
|
+
PropDataDirective.prototype.ngOnDestroy = function () {
|
|
1165
|
+
this.vcRef.clear();
|
|
1166
|
+
};
|
|
1167
|
+
return PropDataDirective;
|
|
1168
|
+
}(PropData));
|
|
1169
|
+
PropDataDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PropDataDirective, deps: [{ token: i0__namespace.TemplateRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1170
|
+
PropDataDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: PropDataDirective, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
1171
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PropDataDirective, decorators: [{
|
|
1172
|
+
type: i0.Directive,
|
|
1173
|
+
args: [{
|
|
1174
|
+
exportAs: 'abpPropData',
|
|
1175
|
+
selector: '[abpPropData]',
|
|
1176
|
+
}]
|
|
1177
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.Injector }]; }, propDecorators: { propList: [{
|
|
1178
|
+
type: i0.Input,
|
|
1179
|
+
args: ['abpPropDataFromList']
|
|
1180
|
+
}], record: [{
|
|
1181
|
+
type: i0.Input,
|
|
1182
|
+
args: ['abpPropDataWithRecord']
|
|
1183
|
+
}], index: [{
|
|
1184
|
+
type: i0.Input,
|
|
1185
|
+
args: ['abpPropDataAtIndex']
|
|
1185
1186
|
}] } });
|
|
1186
1187
|
|
|
1187
|
-
var ExtensibleFormComponent = /** @class */ (function () {
|
|
1188
|
-
function ExtensibleFormComponent(cdRef, track, container, extensions, identifier) {
|
|
1189
|
-
this.cdRef = cdRef;
|
|
1190
|
-
this.track = track;
|
|
1191
|
-
this.container = container;
|
|
1192
|
-
this.extensions = extensions;
|
|
1193
|
-
this.identifier = identifier;
|
|
1194
|
-
this.extraPropertiesKey = EXTRA_PROPERTIES_KEY;
|
|
1195
|
-
}
|
|
1196
|
-
Object.defineProperty(ExtensibleFormComponent.prototype, "selectedRecord", {
|
|
1197
|
-
set: function (record) {
|
|
1198
|
-
var type = !record || JSON.stringify(record) === '{}' ? 'create' : 'edit';
|
|
1199
|
-
this.propList = this.extensions[type + "FormProps"].get(this.identifier).props;
|
|
1200
|
-
this.record = record;
|
|
1201
|
-
},
|
|
1202
|
-
enumerable: false,
|
|
1203
|
-
configurable: true
|
|
1204
|
-
});
|
|
1205
|
-
Object.defineProperty(ExtensibleFormComponent.prototype, "form", {
|
|
1206
|
-
get: function () {
|
|
1207
|
-
return (this.container ? this.container.control : { controls: {} });
|
|
1208
|
-
},
|
|
1209
|
-
enumerable: false,
|
|
1210
|
-
configurable: true
|
|
1211
|
-
});
|
|
1212
|
-
Object.defineProperty(ExtensibleFormComponent.prototype, "extraProperties", {
|
|
1213
|
-
get: function () {
|
|
1214
|
-
return (this.form.controls.extraProperties || { controls: {} });
|
|
1215
|
-
},
|
|
1216
|
-
enumerable: false,
|
|
1217
|
-
configurable: true
|
|
1218
|
-
});
|
|
1219
|
-
return ExtensibleFormComponent;
|
|
1220
|
-
}());
|
|
1221
|
-
ExtensibleFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.TrackByService }, { token: i2__namespace$1.ControlContainer }, { token: ExtensionsService }, { token: EXTENSIONS_IDENTIFIER }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1222
|
-
ExtensibleFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: { selectedRecord: "selectedRecord" }, viewQueries: [{ propertyName: "formProps", predicate: ExtensibleFormPropComponent, descendants: true }], exportAs: ["abpExtensibleForm"], ngImport: i0__namespace, template: "<ng-container *ngIf=\"form\">\n <ng-container *abpPropData=\"let data; fromList: propList; withRecord: record\">\n <ng-container *ngFor=\"let prop of propList; let first = first; trackBy: track.by('name')\">\n <ng-container *ngIf=\"prop.visible(data)\">\n <ng-container\n [formGroupName]=\"extraPropertiesKey\"\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\n >\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"></abp-extensible-form-prop>\n </ng-container>\n\n <ng-template #tempDefault>\n <abp-extensible-form-prop\n *ngIf=\"form.get(prop.name)\"\n [prop]=\"prop\"\n [data]=\"data\"\n [first]=\"first\"\n ></abp-extensible-form-prop>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n", components: [{ type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: ["data", "prop", "first"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PropDataDirective, selector: "[abpPropData]", inputs: ["abpPropDataFromList", "abpPropDataWithRecord", "abpPropDataAtIndex"], exportAs: ["abpPropData"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i6__namespace.ValidationGroupDirective, selector: "[formGroup],[formGroupName]",
|
|
1223
|
-
{
|
|
1224
|
-
provide: i2$1.ControlContainer,
|
|
1225
|
-
useFactory: selfFactory,
|
|
1226
|
-
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
1227
|
-
},
|
|
1228
|
-
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1229
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormComponent, decorators: [{
|
|
1230
|
-
type: i0.Component,
|
|
1231
|
-
args: [{
|
|
1232
|
-
exportAs: 'abpExtensibleForm',
|
|
1233
|
-
selector: 'abp-extensible-form',
|
|
1234
|
-
templateUrl: './extensible-form.component.html',
|
|
1235
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1236
|
-
viewProviders: [
|
|
1237
|
-
{
|
|
1238
|
-
provide: i2$1.ControlContainer,
|
|
1239
|
-
useFactory: selfFactory,
|
|
1240
|
-
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
1241
|
-
},
|
|
1242
|
-
],
|
|
1243
|
-
}]
|
|
1244
|
-
}], ctorParameters: function () {
|
|
1245
|
-
return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.TrackByService }, { type: i2__namespace$1.ControlContainer }, { type: ExtensionsService }, { type: undefined, decorators: [{
|
|
1246
|
-
type: i0.Inject,
|
|
1247
|
-
args: [EXTENSIONS_IDENTIFIER]
|
|
1248
|
-
}] }];
|
|
1249
|
-
}, propDecorators: { formProps: [{
|
|
1250
|
-
type: i0.ViewChildren,
|
|
1251
|
-
args: [ExtensibleFormPropComponent]
|
|
1252
|
-
}], selectedRecord: [{
|
|
1253
|
-
type: i0.Input
|
|
1188
|
+
var ExtensibleFormComponent = /** @class */ (function () {
|
|
1189
|
+
function ExtensibleFormComponent(cdRef, track, container, extensions, identifier) {
|
|
1190
|
+
this.cdRef = cdRef;
|
|
1191
|
+
this.track = track;
|
|
1192
|
+
this.container = container;
|
|
1193
|
+
this.extensions = extensions;
|
|
1194
|
+
this.identifier = identifier;
|
|
1195
|
+
this.extraPropertiesKey = EXTRA_PROPERTIES_KEY;
|
|
1196
|
+
}
|
|
1197
|
+
Object.defineProperty(ExtensibleFormComponent.prototype, "selectedRecord", {
|
|
1198
|
+
set: function (record) {
|
|
1199
|
+
var type = !record || JSON.stringify(record) === '{}' ? 'create' : 'edit';
|
|
1200
|
+
this.propList = this.extensions[type + "FormProps"].get(this.identifier).props;
|
|
1201
|
+
this.record = record;
|
|
1202
|
+
},
|
|
1203
|
+
enumerable: false,
|
|
1204
|
+
configurable: true
|
|
1205
|
+
});
|
|
1206
|
+
Object.defineProperty(ExtensibleFormComponent.prototype, "form", {
|
|
1207
|
+
get: function () {
|
|
1208
|
+
return (this.container ? this.container.control : { controls: {} });
|
|
1209
|
+
},
|
|
1210
|
+
enumerable: false,
|
|
1211
|
+
configurable: true
|
|
1212
|
+
});
|
|
1213
|
+
Object.defineProperty(ExtensibleFormComponent.prototype, "extraProperties", {
|
|
1214
|
+
get: function () {
|
|
1215
|
+
return (this.form.controls.extraProperties || { controls: {} });
|
|
1216
|
+
},
|
|
1217
|
+
enumerable: false,
|
|
1218
|
+
configurable: true
|
|
1219
|
+
});
|
|
1220
|
+
return ExtensibleFormComponent;
|
|
1221
|
+
}());
|
|
1222
|
+
ExtensibleFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.TrackByService }, { token: i2__namespace$1.ControlContainer }, { token: ExtensionsService }, { token: EXTENSIONS_IDENTIFIER }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1223
|
+
ExtensibleFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: { selectedRecord: "selectedRecord" }, viewQueries: [{ propertyName: "formProps", predicate: ExtensibleFormPropComponent, descendants: true }], exportAs: ["abpExtensibleForm"], ngImport: i0__namespace, template: "<ng-container *ngIf=\"form\">\n <ng-container *abpPropData=\"let data; fromList: propList; withRecord: record\">\n <ng-container *ngFor=\"let prop of propList; let first = first; trackBy: track.by('name')\">\n <ng-container *ngIf=\"prop.visible(data)\">\n <ng-container\n [formGroupName]=\"extraPropertiesKey\"\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\n >\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"></abp-extensible-form-prop>\n </ng-container>\n\n <ng-template #tempDefault>\n <abp-extensible-form-prop\n *ngIf=\"form.get(prop.name)\"\n [prop]=\"prop\"\n [data]=\"data\"\n [first]=\"first\"\n ></abp-extensible-form-prop>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n", components: [{ type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: ["data", "prop", "first"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PropDataDirective, selector: "[abpPropData]", inputs: ["abpPropDataFromList", "abpPropDataWithRecord", "abpPropDataAtIndex"], exportAs: ["abpPropData"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i6__namespace.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }], viewProviders: [
|
|
1224
|
+
{
|
|
1225
|
+
provide: i2$1.ControlContainer,
|
|
1226
|
+
useFactory: selfFactory,
|
|
1227
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
1228
|
+
},
|
|
1229
|
+
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1230
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleFormComponent, decorators: [{
|
|
1231
|
+
type: i0.Component,
|
|
1232
|
+
args: [{
|
|
1233
|
+
exportAs: 'abpExtensibleForm',
|
|
1234
|
+
selector: 'abp-extensible-form',
|
|
1235
|
+
templateUrl: './extensible-form.component.html',
|
|
1236
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1237
|
+
viewProviders: [
|
|
1238
|
+
{
|
|
1239
|
+
provide: i2$1.ControlContainer,
|
|
1240
|
+
useFactory: selfFactory,
|
|
1241
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), i2$1.ControlContainer]],
|
|
1242
|
+
},
|
|
1243
|
+
],
|
|
1244
|
+
}]
|
|
1245
|
+
}], ctorParameters: function () {
|
|
1246
|
+
return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.TrackByService }, { type: i2__namespace$1.ControlContainer }, { type: ExtensionsService }, { type: undefined, decorators: [{
|
|
1247
|
+
type: i0.Inject,
|
|
1248
|
+
args: [EXTENSIONS_IDENTIFIER]
|
|
1249
|
+
}] }];
|
|
1250
|
+
}, propDecorators: { formProps: [{
|
|
1251
|
+
type: i0.ViewChildren,
|
|
1252
|
+
args: [ExtensibleFormPropComponent]
|
|
1253
|
+
}], selectedRecord: [{
|
|
1254
|
+
type: i0.Input
|
|
1254
1255
|
}] } });
|
|
1255
1256
|
|
|
1256
|
-
// Fix for https://github.com/angular/angular/issues/23904
|
|
1257
|
-
// @dynamic
|
|
1258
|
-
var AbstractActionsComponent = /** @class */ (function (_super) {
|
|
1259
|
-
__extends(AbstractActionsComponent, _super);
|
|
1260
|
-
function AbstractActionsComponent(injector) {
|
|
1261
|
-
var _this = _super.call(this) || this;
|
|
1262
|
-
_this.getInjected = injector.get.bind(injector);
|
|
1263
|
-
var extensions = injector.get(ExtensionsService);
|
|
1264
|
-
var name = injector.get(EXTENSIONS_IDENTIFIER);
|
|
1265
|
-
var type = injector.get(EXTENSIONS_ACTION_TYPE);
|
|
1266
|
-
_this.actionList = extensions[type].get(name).actions;
|
|
1267
|
-
return _this;
|
|
1268
|
-
}
|
|
1269
|
-
return AbstractActionsComponent;
|
|
1270
|
-
}(ActionData));
|
|
1271
|
-
AbstractActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AbstractActionsComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1272
|
-
AbstractActionsComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: AbstractActionsComponent, inputs: { record: "record" }, usesInheritance: true, ngImport: i0__namespace });
|
|
1273
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AbstractActionsComponent, decorators: [{
|
|
1274
|
-
type: i0.Directive
|
|
1275
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { record: [{
|
|
1276
|
-
type: i0.Input
|
|
1257
|
+
// Fix for https://github.com/angular/angular/issues/23904
|
|
1258
|
+
// @dynamic
|
|
1259
|
+
var AbstractActionsComponent = /** @class */ (function (_super) {
|
|
1260
|
+
__extends(AbstractActionsComponent, _super);
|
|
1261
|
+
function AbstractActionsComponent(injector) {
|
|
1262
|
+
var _this = _super.call(this) || this;
|
|
1263
|
+
_this.getInjected = injector.get.bind(injector);
|
|
1264
|
+
var extensions = injector.get(ExtensionsService);
|
|
1265
|
+
var name = injector.get(EXTENSIONS_IDENTIFIER);
|
|
1266
|
+
var type = injector.get(EXTENSIONS_ACTION_TYPE);
|
|
1267
|
+
_this.actionList = extensions[type].get(name).actions;
|
|
1268
|
+
return _this;
|
|
1269
|
+
}
|
|
1270
|
+
return AbstractActionsComponent;
|
|
1271
|
+
}(ActionData));
|
|
1272
|
+
AbstractActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AbstractActionsComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1273
|
+
AbstractActionsComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: AbstractActionsComponent, inputs: { record: "record" }, usesInheritance: true, ngImport: i0__namespace });
|
|
1274
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AbstractActionsComponent, decorators: [{
|
|
1275
|
+
type: i0.Directive
|
|
1276
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { record: [{
|
|
1277
|
+
type: i0.Input
|
|
1277
1278
|
}] } });
|
|
1278
1279
|
|
|
1279
|
-
var GridActionsComponent = /** @class */ (function (_super) {
|
|
1280
|
-
__extends(GridActionsComponent, _super);
|
|
1281
|
-
function GridActionsComponent(injector) {
|
|
1282
|
-
var _this = _super.call(this, injector) || this;
|
|
1283
|
-
_this.icon = 'fa fa-cog';
|
|
1284
|
-
_this.text = '';
|
|
1285
|
-
_this.trackByFn = function (_, item) { return item.text; };
|
|
1286
|
-
return _this;
|
|
1287
|
-
}
|
|
1288
|
-
return GridActionsComponent;
|
|
1289
|
-
}(AbstractActionsComponent));
|
|
1290
|
-
GridActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: GridActionsComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1291
|
-
GridActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: GridActionsComponent, selector: "abp-grid-actions", inputs: { icon: "icon", index: "index", text: "text" }, providers: [
|
|
1292
|
-
{
|
|
1293
|
-
provide: EXTENSIONS_ACTION_TYPE,
|
|
1294
|
-
useValue: 'entityActions',
|
|
1295
|
-
},
|
|
1296
|
-
], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0__namespace, template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\n <button\n class=\"btn btn-primary btn-sm dropdown-toggle\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n ngbDropdownToggle\n >\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\n </button>\n <div ngbDropdownMenu>\n <ng-container\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"
|
|
1297
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: GridActionsComponent, decorators: [{
|
|
1298
|
-
type: i0.Component,
|
|
1299
|
-
args: [{
|
|
1300
|
-
exportAs: 'abpGridActions',
|
|
1301
|
-
selector: 'abp-grid-actions',
|
|
1302
|
-
templateUrl: './grid-actions.component.html',
|
|
1303
|
-
providers: [
|
|
1304
|
-
{
|
|
1305
|
-
provide: EXTENSIONS_ACTION_TYPE,
|
|
1306
|
-
useValue: 'entityActions',
|
|
1307
|
-
},
|
|
1308
|
-
],
|
|
1309
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1310
|
-
}]
|
|
1311
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { icon: [{
|
|
1312
|
-
type: i0.Input
|
|
1313
|
-
}], index: [{
|
|
1314
|
-
type: i0.Input
|
|
1315
|
-
}], text: [{
|
|
1316
|
-
type: i0.Input
|
|
1280
|
+
var GridActionsComponent = /** @class */ (function (_super) {
|
|
1281
|
+
__extends(GridActionsComponent, _super);
|
|
1282
|
+
function GridActionsComponent(injector) {
|
|
1283
|
+
var _this = _super.call(this, injector) || this;
|
|
1284
|
+
_this.icon = 'fa fa-cog';
|
|
1285
|
+
_this.text = '';
|
|
1286
|
+
_this.trackByFn = function (_, item) { return item.text; };
|
|
1287
|
+
return _this;
|
|
1288
|
+
}
|
|
1289
|
+
return GridActionsComponent;
|
|
1290
|
+
}(AbstractActionsComponent));
|
|
1291
|
+
GridActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: GridActionsComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1292
|
+
GridActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: GridActionsComponent, selector: "abp-grid-actions", inputs: { icon: "icon", index: "index", text: "text" }, providers: [
|
|
1293
|
+
{
|
|
1294
|
+
provide: EXTENSIONS_ACTION_TYPE,
|
|
1295
|
+
useValue: 'entityActions',
|
|
1296
|
+
},
|
|
1297
|
+
], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0__namespace, template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\n <button\n class=\"btn btn-primary btn-sm dropdown-toggle\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n ngbDropdownToggle\n >\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\n </button>\n <div ngbDropdownMenu>\n <ng-container\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\n >\n </ng-container>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"actionList.length === 1\"\n [ngTemplateOutlet]=\"btnTmp\"\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\n></ng-container>\n\n<ng-template #dropDownBtnItemTmp let-action>\n <ng-container *ngIf=\"action.visible(data)\">\n <button\n ngbDropdownItem\n *abpPermission=\"action.permission\"\n (click)=\"action.action(data)\"\n type=\"button\"\n >\n <ng-container\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\n ></ng-container>\n </button>\n </ng-container>\n</ng-template>\n\n<ng-template #buttonContentTmp let-action>\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\n <ng-template #ellipsis>\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\n </ng-template>\n</ng-template>\n\n<ng-template #btnTmp let-action>\n <ng-container *ngIf=\"action.visible(data)\">\n <button\n *abpPermission=\"action.permission\"\n (click)=\"action.action(data)\"\n type=\"button\"\n class=\"btn btn-primary text-center\"\n >\n <ng-container\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\n ></ng-container>\n </button>\n </ng-container>\n</ng-template>\n", directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i2__namespace.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i2__namespace.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { type: i4__namespace.EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }], pipes: { "abpLocalization": i1__namespace.LocalizationPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1298
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: GridActionsComponent, decorators: [{
|
|
1299
|
+
type: i0.Component,
|
|
1300
|
+
args: [{
|
|
1301
|
+
exportAs: 'abpGridActions',
|
|
1302
|
+
selector: 'abp-grid-actions',
|
|
1303
|
+
templateUrl: './grid-actions.component.html',
|
|
1304
|
+
providers: [
|
|
1305
|
+
{
|
|
1306
|
+
provide: EXTENSIONS_ACTION_TYPE,
|
|
1307
|
+
useValue: 'entityActions',
|
|
1308
|
+
},
|
|
1309
|
+
],
|
|
1310
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1311
|
+
}]
|
|
1312
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { icon: [{
|
|
1313
|
+
type: i0.Input
|
|
1314
|
+
}], index: [{
|
|
1315
|
+
type: i0.Input
|
|
1316
|
+
}], text: [{
|
|
1317
|
+
type: i0.Input
|
|
1317
1318
|
}] } });
|
|
1318
1319
|
|
|
1319
|
-
var DEFAULT_ACTIONS_COLUMN_WIDTH = 150;
|
|
1320
|
-
var ExtensibleTableComponent = /** @class */ (function () {
|
|
1321
|
-
function ExtensibleTableComponent(locale, config, injector) {
|
|
1322
|
-
this.locale = locale;
|
|
1323
|
-
this.config = config;
|
|
1324
|
-
this.injector = injector;
|
|
1325
|
-
this.trackByFn = function (_, item) { return item.name; };
|
|
1326
|
-
this.getInjected = injector.get.bind(injector);
|
|
1327
|
-
var extensions = injector.get(ExtensionsService);
|
|
1328
|
-
var name = injector.get(EXTENSIONS_IDENTIFIER);
|
|
1329
|
-
this.propList = extensions.entityProps.get(name).props;
|
|
1330
|
-
this.actionList = extensions['entityActions'].get(name)
|
|
1331
|
-
.actions;
|
|
1332
|
-
var permissionService = injector.get(i1.PermissionService);
|
|
1333
|
-
this.hasAtLeastOnePermittedAction =
|
|
1334
|
-
permissionService.filterItemsByPolicy(this.actionList.toArray().map(function (action) { return ({ requiredPolicy: action.permission }); })).length > 0;
|
|
1335
|
-
this.setColumnWidths(DEFAULT_ACTIONS_COLUMN_WIDTH);
|
|
1336
|
-
}
|
|
1337
|
-
Object.defineProperty(ExtensibleTableComponent.prototype, "actionsText", {
|
|
1338
|
-
get: function () {
|
|
1339
|
-
var _a;
|
|
1340
|
-
return (_a = this._actionsText) !== null && _a !== void 0 ? _a : (this.actionList.length > 1 ? 'AbpUi::Actions' : '');
|
|
1341
|
-
},
|
|
1342
|
-
set: function (value) {
|
|
1343
|
-
this._actionsText = value;
|
|
1344
|
-
},
|
|
1345
|
-
enumerable: false,
|
|
1346
|
-
configurable: true
|
|
1347
|
-
});
|
|
1348
|
-
Object.defineProperty(ExtensibleTableComponent.prototype, "actionsColumnWidth", {
|
|
1349
|
-
set: function (width) {
|
|
1350
|
-
this.setColumnWidths(width ? Number(width) : undefined);
|
|
1351
|
-
},
|
|
1352
|
-
enumerable: false,
|
|
1353
|
-
configurable: true
|
|
1354
|
-
});
|
|
1355
|
-
ExtensibleTableComponent.prototype.setColumnWidths = function (actionsColumn) {
|
|
1356
|
-
var widths = [actionsColumn];
|
|
1357
|
-
this.propList.forEach(function (_b) {
|
|
1358
|
-
var prop = _b.value;
|
|
1359
|
-
widths.push(prop.columnWidth);
|
|
1360
|
-
});
|
|
1361
|
-
this.columnWidths = widths;
|
|
1362
|
-
};
|
|
1363
|
-
ExtensibleTableComponent.prototype.getDate = function (value, format) {
|
|
1364
|
-
return value ? i5.formatDate(value, format, this.locale) : '';
|
|
1365
|
-
};
|
|
1366
|
-
ExtensibleTableComponent.prototype.getIcon = function (value) {
|
|
1367
|
-
return value
|
|
1368
|
-
? '<div class="text-center text-success"><i class="fa fa-check"></i></div>'
|
|
1369
|
-
: '<div class="text-center text-danger"><i class="fa fa-times"></i></div>';
|
|
1370
|
-
};
|
|
1371
|
-
ExtensibleTableComponent.prototype.getEnum = function (rowValue, list) {
|
|
1372
|
-
if (!list)
|
|
1373
|
-
return rowValue;
|
|
1374
|
-
var key = list.find(function (_b) {
|
|
1375
|
-
var value = _b.value;
|
|
1376
|
-
return value === rowValue;
|
|
1377
|
-
}).key;
|
|
1378
|
-
return key;
|
|
1379
|
-
};
|
|
1380
|
-
ExtensibleTableComponent.prototype.getContent = function (prop, data) {
|
|
1381
|
-
var _this = this;
|
|
1382
|
-
return prop.valueResolver(data).pipe(operators.map(function (value) {
|
|
1383
|
-
switch (prop.type) {
|
|
1384
|
-
case "boolean" /* Boolean */:
|
|
1385
|
-
return _this.getIcon(value);
|
|
1386
|
-
case "date" /* Date */:
|
|
1387
|
-
return _this.getDate(value, i1.getShortDateFormat(_this.config));
|
|
1388
|
-
case "time" /* Time */:
|
|
1389
|
-
return _this.getDate(value, i1.getShortTimeFormat(_this.config));
|
|
1390
|
-
case "dateTime" /* DateTime */:
|
|
1391
|
-
return _this.getDate(value, i1.getShortDateShortTimeFormat(_this.config));
|
|
1392
|
-
case "enum" /* Enum */:
|
|
1393
|
-
return _this.getEnum(value, prop.enumList);
|
|
1394
|
-
default:
|
|
1395
|
-
return value;
|
|
1396
|
-
// More types can be handled in the future
|
|
1397
|
-
}
|
|
1398
|
-
}));
|
|
1399
|
-
};
|
|
1400
|
-
ExtensibleTableComponent.prototype.ngOnChanges = function (_b) {
|
|
1401
|
-
var _this = this;
|
|
1402
|
-
var data = _b.data;
|
|
1403
|
-
if (!(data === null || data === void 0 ? void 0 : data.currentValue))
|
|
1404
|
-
return;
|
|
1405
|
-
this.data = data.currentValue.map(function (record, index) {
|
|
1406
|
-
_this.propList.forEach(function (prop) {
|
|
1407
|
-
var propData = { getInjected: _this.getInjected, record: record, index: index };
|
|
1408
|
-
var value = _this.getContent(prop.value, propData);
|
|
1409
|
-
var propKey = "_" + prop.value.name;
|
|
1410
|
-
record[propKey] = {
|
|
1411
|
-
visible: prop.value.visible(propData),
|
|
1412
|
-
value: value,
|
|
1413
|
-
};
|
|
1414
|
-
if (prop.value.component) {
|
|
1415
|
-
var injector = i0.Injector.create([
|
|
1416
|
-
{
|
|
1417
|
-
provide: PROP_DATA_STREAM,
|
|
1418
|
-
useValue: value,
|
|
1419
|
-
},
|
|
1420
|
-
], _this.injector);
|
|
1421
|
-
record[propKey].injector = injector;
|
|
1422
|
-
record[propKey].component = prop.value.component;
|
|
1423
|
-
}
|
|
1424
|
-
});
|
|
1425
|
-
return record;
|
|
1426
|
-
});
|
|
1427
|
-
};
|
|
1428
|
-
return ExtensibleTableComponent;
|
|
1429
|
-
}());
|
|
1430
|
-
ExtensibleTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleTableComponent, deps: [{ token: i0.LOCALE_ID }, { token: i1__namespace.ConfigStateService }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1431
|
-
ExtensibleTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0__namespace, template: "<ngx-datatable default [rows]=\"data\" [count]=\"recordsTotal\" [list]=\"list\">\n <ngx-datatable-column\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\n [name]=\"actionsText | abpLocalization\"\n [maxWidth]=\"columnWidths[0]\"\n [width]=\"columnWidths[0]\"\n [sortable]=\"false\"\n >\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\n <ng-container\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\n ></ng-container>\n <ng-template #gridActions>\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\n </ng-template>\n </ng-template>\n </ngx-datatable-column>\n\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\n <ngx-datatable-column\n [width]=\"columnWidths[i + 1] || 200\"\n [name]=\"prop.displayName | abpLocalization\"\n [prop]=\"prop.name\"\n [sortable]=\"prop.sortable\"\n >\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\n <ng-container *abpPermission=\"prop.permission\">\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\n <div\n *ngIf=\"!row['_' + prop.name].component; else component\"\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\n (click)=\"\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\n \"\n [class.pointer]=\"prop.action\"\n ></div>\n </ng-container>\n <ng-template #component>\n <ng-container\n *ngComponentOutlet=\"\n row['_' + prop.name].component;\n injector: row['_' + prop.name].injector\n \"\n ></ng-container>\n </ng-template>\n </ng-container>\n </ng-template>\n </ngx-datatable-column>\n </ng-container>\n</ngx-datatable>\n", components: [{ type: i2__namespace$2.DatatableComponent, selector: "ngx-datatable", inputs: ["selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "loadingIndicator", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "groupExpansionDefault", "selectAllRowsOnPage", "virtualization", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity", "rows", "groupedRows", "groupRowsBy", "columns", "limit", "count", "offset", "targetMarkerTemplate", "selectionType", "rowClass", "selectCheck", "displayCheck", "trackByProp", "treeFromRelation", "treeToRelation"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }], directives: [{ type: i4__namespace.NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { type: i4__namespace.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$2.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { type: i2__namespace$2.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5__namespace.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }], pipes: { "abpLocalization": i1__namespace.LocalizationPipe, "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1432
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleTableComponent, decorators: [{
|
|
1433
|
-
type: i0.Component,
|
|
1434
|
-
args: [{
|
|
1435
|
-
exportAs: 'abpExtensibleTable',
|
|
1436
|
-
selector: 'abp-extensible-table',
|
|
1437
|
-
templateUrl: './extensible-table.component.html',
|
|
1438
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1439
|
-
}]
|
|
1440
|
-
}], ctorParameters: function () {
|
|
1441
|
-
return [{ type: undefined, decorators: [{
|
|
1442
|
-
type: i0.Inject,
|
|
1443
|
-
args: [i0.LOCALE_ID]
|
|
1444
|
-
}] }, { type: i1__namespace.ConfigStateService }, { type: i0__namespace.Injector }];
|
|
1445
|
-
}, propDecorators: { actionsText: [{
|
|
1446
|
-
type: i0.Input
|
|
1447
|
-
}], data: [{
|
|
1448
|
-
type: i0.Input
|
|
1449
|
-
}], list: [{
|
|
1450
|
-
type: i0.Input
|
|
1451
|
-
}], recordsTotal: [{
|
|
1452
|
-
type: i0.Input
|
|
1453
|
-
}], actionsColumnWidth: [{
|
|
1454
|
-
type: i0.Input
|
|
1455
|
-
}], actionsTemplate: [{
|
|
1456
|
-
type: i0.Input
|
|
1320
|
+
var DEFAULT_ACTIONS_COLUMN_WIDTH = 150;
|
|
1321
|
+
var ExtensibleTableComponent = /** @class */ (function () {
|
|
1322
|
+
function ExtensibleTableComponent(locale, config, injector) {
|
|
1323
|
+
this.locale = locale;
|
|
1324
|
+
this.config = config;
|
|
1325
|
+
this.injector = injector;
|
|
1326
|
+
this.trackByFn = function (_, item) { return item.name; };
|
|
1327
|
+
this.getInjected = injector.get.bind(injector);
|
|
1328
|
+
var extensions = injector.get(ExtensionsService);
|
|
1329
|
+
var name = injector.get(EXTENSIONS_IDENTIFIER);
|
|
1330
|
+
this.propList = extensions.entityProps.get(name).props;
|
|
1331
|
+
this.actionList = extensions['entityActions'].get(name)
|
|
1332
|
+
.actions;
|
|
1333
|
+
var permissionService = injector.get(i1.PermissionService);
|
|
1334
|
+
this.hasAtLeastOnePermittedAction =
|
|
1335
|
+
permissionService.filterItemsByPolicy(this.actionList.toArray().map(function (action) { return ({ requiredPolicy: action.permission }); })).length > 0;
|
|
1336
|
+
this.setColumnWidths(DEFAULT_ACTIONS_COLUMN_WIDTH);
|
|
1337
|
+
}
|
|
1338
|
+
Object.defineProperty(ExtensibleTableComponent.prototype, "actionsText", {
|
|
1339
|
+
get: function () {
|
|
1340
|
+
var _a;
|
|
1341
|
+
return (_a = this._actionsText) !== null && _a !== void 0 ? _a : (this.actionList.length > 1 ? 'AbpUi::Actions' : '');
|
|
1342
|
+
},
|
|
1343
|
+
set: function (value) {
|
|
1344
|
+
this._actionsText = value;
|
|
1345
|
+
},
|
|
1346
|
+
enumerable: false,
|
|
1347
|
+
configurable: true
|
|
1348
|
+
});
|
|
1349
|
+
Object.defineProperty(ExtensibleTableComponent.prototype, "actionsColumnWidth", {
|
|
1350
|
+
set: function (width) {
|
|
1351
|
+
this.setColumnWidths(width ? Number(width) : undefined);
|
|
1352
|
+
},
|
|
1353
|
+
enumerable: false,
|
|
1354
|
+
configurable: true
|
|
1355
|
+
});
|
|
1356
|
+
ExtensibleTableComponent.prototype.setColumnWidths = function (actionsColumn) {
|
|
1357
|
+
var widths = [actionsColumn];
|
|
1358
|
+
this.propList.forEach(function (_b) {
|
|
1359
|
+
var prop = _b.value;
|
|
1360
|
+
widths.push(prop.columnWidth);
|
|
1361
|
+
});
|
|
1362
|
+
this.columnWidths = widths;
|
|
1363
|
+
};
|
|
1364
|
+
ExtensibleTableComponent.prototype.getDate = function (value, format) {
|
|
1365
|
+
return value ? i5.formatDate(value, format, this.locale) : '';
|
|
1366
|
+
};
|
|
1367
|
+
ExtensibleTableComponent.prototype.getIcon = function (value) {
|
|
1368
|
+
return value
|
|
1369
|
+
? '<div class="text-center text-success"><i class="fa fa-check"></i></div>'
|
|
1370
|
+
: '<div class="text-center text-danger"><i class="fa fa-times"></i></div>';
|
|
1371
|
+
};
|
|
1372
|
+
ExtensibleTableComponent.prototype.getEnum = function (rowValue, list) {
|
|
1373
|
+
if (!list)
|
|
1374
|
+
return rowValue;
|
|
1375
|
+
var key = list.find(function (_b) {
|
|
1376
|
+
var value = _b.value;
|
|
1377
|
+
return value === rowValue;
|
|
1378
|
+
}).key;
|
|
1379
|
+
return key;
|
|
1380
|
+
};
|
|
1381
|
+
ExtensibleTableComponent.prototype.getContent = function (prop, data) {
|
|
1382
|
+
var _this = this;
|
|
1383
|
+
return prop.valueResolver(data).pipe(operators.map(function (value) {
|
|
1384
|
+
switch (prop.type) {
|
|
1385
|
+
case "boolean" /* Boolean */:
|
|
1386
|
+
return _this.getIcon(value);
|
|
1387
|
+
case "date" /* Date */:
|
|
1388
|
+
return _this.getDate(value, i1.getShortDateFormat(_this.config));
|
|
1389
|
+
case "time" /* Time */:
|
|
1390
|
+
return _this.getDate(value, i1.getShortTimeFormat(_this.config));
|
|
1391
|
+
case "dateTime" /* DateTime */:
|
|
1392
|
+
return _this.getDate(value, i1.getShortDateShortTimeFormat(_this.config));
|
|
1393
|
+
case "enum" /* Enum */:
|
|
1394
|
+
return _this.getEnum(value, prop.enumList);
|
|
1395
|
+
default:
|
|
1396
|
+
return value;
|
|
1397
|
+
// More types can be handled in the future
|
|
1398
|
+
}
|
|
1399
|
+
}));
|
|
1400
|
+
};
|
|
1401
|
+
ExtensibleTableComponent.prototype.ngOnChanges = function (_b) {
|
|
1402
|
+
var _this = this;
|
|
1403
|
+
var data = _b.data;
|
|
1404
|
+
if (!(data === null || data === void 0 ? void 0 : data.currentValue))
|
|
1405
|
+
return;
|
|
1406
|
+
this.data = data.currentValue.map(function (record, index) {
|
|
1407
|
+
_this.propList.forEach(function (prop) {
|
|
1408
|
+
var propData = { getInjected: _this.getInjected, record: record, index: index };
|
|
1409
|
+
var value = _this.getContent(prop.value, propData);
|
|
1410
|
+
var propKey = "_" + prop.value.name;
|
|
1411
|
+
record[propKey] = {
|
|
1412
|
+
visible: prop.value.visible(propData),
|
|
1413
|
+
value: value,
|
|
1414
|
+
};
|
|
1415
|
+
if (prop.value.component) {
|
|
1416
|
+
var injector = i0.Injector.create([
|
|
1417
|
+
{
|
|
1418
|
+
provide: PROP_DATA_STREAM,
|
|
1419
|
+
useValue: value,
|
|
1420
|
+
},
|
|
1421
|
+
], _this.injector);
|
|
1422
|
+
record[propKey].injector = injector;
|
|
1423
|
+
record[propKey].component = prop.value.component;
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
return record;
|
|
1427
|
+
});
|
|
1428
|
+
};
|
|
1429
|
+
return ExtensibleTableComponent;
|
|
1430
|
+
}());
|
|
1431
|
+
ExtensibleTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleTableComponent, deps: [{ token: i0.LOCALE_ID }, { token: i1__namespace.ConfigStateService }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1432
|
+
ExtensibleTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0__namespace, template: "<ngx-datatable default [rows]=\"data\" [count]=\"recordsTotal\" [list]=\"list\">\n <ngx-datatable-column\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\n [name]=\"actionsText | abpLocalization\"\n [maxWidth]=\"columnWidths[0]\"\n [width]=\"columnWidths[0]\"\n [sortable]=\"false\"\n >\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\n <ng-container\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\n ></ng-container>\n <ng-template #gridActions>\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\n </ng-template>\n </ng-template>\n </ngx-datatable-column>\n\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\n <ngx-datatable-column\n [width]=\"columnWidths[i + 1] || 200\"\n [name]=\"prop.displayName | abpLocalization\"\n [prop]=\"prop.name\"\n [sortable]=\"prop.sortable\"\n >\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\n <ng-container *abpPermission=\"prop.permission\">\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\n <div\n *ngIf=\"!row['_' + prop.name].component; else component\"\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\n (click)=\"\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\n \"\n [class.pointer]=\"prop.action\"\n ></div>\n </ng-container>\n <ng-template #component>\n <ng-container\n *ngComponentOutlet=\"\n row['_' + prop.name].component;\n injector: row['_' + prop.name].injector\n \"\n ></ng-container>\n </ng-template>\n </ng-container>\n </ng-template>\n </ngx-datatable-column>\n </ng-container>\n</ngx-datatable>\n", components: [{ type: i2__namespace$2.DatatableComponent, selector: "ngx-datatable", inputs: ["selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "loadingIndicator", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "groupExpansionDefault", "selectAllRowsOnPage", "virtualization", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity", "rows", "groupedRows", "groupRowsBy", "columns", "limit", "count", "offset", "targetMarkerTemplate", "selectionType", "rowClass", "selectCheck", "displayCheck", "trackByProp", "treeFromRelation", "treeToRelation"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }], directives: [{ type: i4__namespace.NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { type: i4__namespace.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$2.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { type: i2__namespace$2.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { type: i5__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5__namespace.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }], pipes: { "abpLocalization": i1__namespace.LocalizationPipe, "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1433
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExtensibleTableComponent, decorators: [{
|
|
1434
|
+
type: i0.Component,
|
|
1435
|
+
args: [{
|
|
1436
|
+
exportAs: 'abpExtensibleTable',
|
|
1437
|
+
selector: 'abp-extensible-table',
|
|
1438
|
+
templateUrl: './extensible-table.component.html',
|
|
1439
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1440
|
+
}]
|
|
1441
|
+
}], ctorParameters: function () {
|
|
1442
|
+
return [{ type: undefined, decorators: [{
|
|
1443
|
+
type: i0.Inject,
|
|
1444
|
+
args: [i0.LOCALE_ID]
|
|
1445
|
+
}] }, { type: i1__namespace.ConfigStateService }, { type: i0__namespace.Injector }];
|
|
1446
|
+
}, propDecorators: { actionsText: [{
|
|
1447
|
+
type: i0.Input
|
|
1448
|
+
}], data: [{
|
|
1449
|
+
type: i0.Input
|
|
1450
|
+
}], list: [{
|
|
1451
|
+
type: i0.Input
|
|
1452
|
+
}], recordsTotal: [{
|
|
1453
|
+
type: i0.Input
|
|
1454
|
+
}], actionsColumnWidth: [{
|
|
1455
|
+
type: i0.Input
|
|
1456
|
+
}], actionsTemplate: [{
|
|
1457
|
+
type: i0.Input
|
|
1457
1458
|
}] } });
|
|
1458
1459
|
|
|
1459
|
-
var PageToolbarComponent = /** @class */ (function (_super) {
|
|
1460
|
-
__extends(PageToolbarComponent, _super);
|
|
1461
|
-
function PageToolbarComponent(injector) {
|
|
1462
|
-
var _this = _super.call(this, injector) || this;
|
|
1463
|
-
_this.injector = injector;
|
|
1464
|
-
_this.trackByFn = function (_, item) { return item.action || item.component; };
|
|
1465
|
-
return _this;
|
|
1466
|
-
}
|
|
1467
|
-
PageToolbarComponent.prototype.createInjector = function (action) {
|
|
1468
|
-
var _this = this;
|
|
1469
|
-
var get = function (token, notFoundValue, flags) {
|
|
1470
|
-
return token === EXTENSIONS_ACTION_DATA
|
|
1471
|
-
? _this.data
|
|
1472
|
-
: token === EXTENSIONS_ACTION_CALLBACK
|
|
1473
|
-
? function (data) {
|
|
1474
|
-
if (data === void 0) { data = _this.data; }
|
|
1475
|
-
return action.action(data);
|
|
1476
|
-
}
|
|
1477
|
-
: _this.getInjected.call(_this.injector, token, notFoundValue, flags);
|
|
1478
|
-
};
|
|
1479
|
-
return { get: get };
|
|
1480
|
-
};
|
|
1481
|
-
return PageToolbarComponent;
|
|
1482
|
-
}(AbstractActionsComponent));
|
|
1483
|
-
PageToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PageToolbarComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1484
|
-
PageToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageToolbarComponent, selector: "abp-page-toolbar", providers: [
|
|
1485
|
-
{
|
|
1486
|
-
provide: EXTENSIONS_ACTION_TYPE,
|
|
1487
|
-
useValue: 'toolbarActions',
|
|
1488
|
-
},
|
|
1489
|
-
], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"row justify-content-end mx-0\" id=\"AbpContentToolbar\">\n <div\n class=\"col-auto px-1 pt-0 pt-md-2\"\n [class.pe-0]=\"last\"\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\n >\n <ng-container *ngIf=\"action.visible(data)\">\n <ng-container *abpPermission=\"action.permission\">\n <ng-container *ngIf=\"action.component as component; else button\">\n <ng-container\n *ngComponentOutlet=\"component; injector: createInjector(action)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #button>\n <button (click)=\"action.action(data)\" type=\"button\" class=\"btn btn-primary btn-sm\">\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\n {{ action.text | abpLocalization }}\n </button>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</div>\n", directives: [{ type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5__namespace.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "abpLocalization": i1__namespace.LocalizationPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1490
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PageToolbarComponent, decorators: [{
|
|
1491
|
-
type: i0.Component,
|
|
1492
|
-
args: [{
|
|
1493
|
-
exportAs: 'abpPageToolbar',
|
|
1494
|
-
selector: 'abp-page-toolbar',
|
|
1495
|
-
templateUrl: './page-toolbar.component.html',
|
|
1496
|
-
providers: [
|
|
1497
|
-
{
|
|
1498
|
-
provide: EXTENSIONS_ACTION_TYPE,
|
|
1499
|
-
useValue: 'toolbarActions',
|
|
1500
|
-
},
|
|
1501
|
-
],
|
|
1502
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1503
|
-
}]
|
|
1460
|
+
var PageToolbarComponent = /** @class */ (function (_super) {
|
|
1461
|
+
__extends(PageToolbarComponent, _super);
|
|
1462
|
+
function PageToolbarComponent(injector) {
|
|
1463
|
+
var _this = _super.call(this, injector) || this;
|
|
1464
|
+
_this.injector = injector;
|
|
1465
|
+
_this.trackByFn = function (_, item) { return item.action || item.component; };
|
|
1466
|
+
return _this;
|
|
1467
|
+
}
|
|
1468
|
+
PageToolbarComponent.prototype.createInjector = function (action) {
|
|
1469
|
+
var _this = this;
|
|
1470
|
+
var get = function (token, notFoundValue, flags) {
|
|
1471
|
+
return token === EXTENSIONS_ACTION_DATA
|
|
1472
|
+
? _this.data
|
|
1473
|
+
: token === EXTENSIONS_ACTION_CALLBACK
|
|
1474
|
+
? function (data) {
|
|
1475
|
+
if (data === void 0) { data = _this.data; }
|
|
1476
|
+
return action.action(data);
|
|
1477
|
+
}
|
|
1478
|
+
: _this.getInjected.call(_this.injector, token, notFoundValue, flags);
|
|
1479
|
+
};
|
|
1480
|
+
return { get: get };
|
|
1481
|
+
};
|
|
1482
|
+
return PageToolbarComponent;
|
|
1483
|
+
}(AbstractActionsComponent));
|
|
1484
|
+
PageToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PageToolbarComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1485
|
+
PageToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageToolbarComponent, selector: "abp-page-toolbar", providers: [
|
|
1486
|
+
{
|
|
1487
|
+
provide: EXTENSIONS_ACTION_TYPE,
|
|
1488
|
+
useValue: 'toolbarActions',
|
|
1489
|
+
},
|
|
1490
|
+
], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"row justify-content-end mx-0\" id=\"AbpContentToolbar\">\n <div\n class=\"col-auto px-1 pt-0 pt-md-2\"\n [class.pe-0]=\"last\"\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\n >\n <ng-container *ngIf=\"action.visible(data)\">\n <ng-container *abpPermission=\"action.permission\">\n <ng-container *ngIf=\"action.component as component; else button\">\n <ng-container\n *ngComponentOutlet=\"component; injector: createInjector(action)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #button>\n <button (click)=\"action.action(data)\" type=\"button\" class=\"btn btn-primary btn-sm\">\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\n {{ action.text | abpLocalization }}\n </button>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</div>\n", directives: [{ type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5__namespace.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "abpLocalization": i1__namespace.LocalizationPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1491
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PageToolbarComponent, decorators: [{
|
|
1492
|
+
type: i0.Component,
|
|
1493
|
+
args: [{
|
|
1494
|
+
exportAs: 'abpPageToolbar',
|
|
1495
|
+
selector: 'abp-page-toolbar',
|
|
1496
|
+
templateUrl: './page-toolbar.component.html',
|
|
1497
|
+
providers: [
|
|
1498
|
+
{
|
|
1499
|
+
provide: EXTENSIONS_ACTION_TYPE,
|
|
1500
|
+
useValue: 'toolbarActions',
|
|
1501
|
+
},
|
|
1502
|
+
],
|
|
1503
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1504
|
+
}]
|
|
1504
1505
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
1505
1506
|
|
|
1506
1507
|
var objectExtensions = /*#__PURE__*/Object.freeze({
|
|
1507
1508
|
__proto__: null
|
|
1508
1509
|
});
|
|
1509
1510
|
|
|
1510
|
-
var BaseUiExtensionsModule = /** @class */ (function () {
|
|
1511
|
-
function BaseUiExtensionsModule() {
|
|
1512
|
-
}
|
|
1513
|
-
return BaseUiExtensionsModule;
|
|
1514
|
-
}());
|
|
1515
|
-
BaseUiExtensionsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1516
|
-
BaseUiExtensionsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
|
|
1517
|
-
PageToolbarComponent,
|
|
1518
|
-
GridActionsComponent,
|
|
1519
|
-
ExtensibleFormPropComponent,
|
|
1520
|
-
ExtensibleFormComponent,
|
|
1521
|
-
ExtensibleTableComponent,
|
|
1522
|
-
PropDataDirective,
|
|
1523
|
-
DisabledDirective], imports: [i1.CoreModule,
|
|
1524
|
-
i4.ThemeSharedModule,
|
|
1525
|
-
i6.NgxValidateCoreModule,
|
|
1526
|
-
i2.NgbDatepickerModule,
|
|
1527
|
-
i2.NgbDropdownModule,
|
|
1528
|
-
i2.NgbTimepickerModule,
|
|
1529
|
-
i2.NgbTypeaheadModule], exports: [DateTimePickerComponent,
|
|
1530
|
-
PageToolbarComponent,
|
|
1531
|
-
GridActionsComponent,
|
|
1532
|
-
ExtensibleFormComponent,
|
|
1533
|
-
ExtensibleTableComponent,
|
|
1534
|
-
PropDataDirective,
|
|
1535
|
-
DisabledDirective] });
|
|
1536
|
-
BaseUiExtensionsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, imports: [[
|
|
1537
|
-
i1.CoreModule,
|
|
1538
|
-
i4.ThemeSharedModule,
|
|
1539
|
-
i6.NgxValidateCoreModule,
|
|
1540
|
-
i2.NgbDatepickerModule,
|
|
1541
|
-
i2.NgbDropdownModule,
|
|
1542
|
-
i2.NgbTimepickerModule,
|
|
1543
|
-
i2.NgbTypeaheadModule,
|
|
1544
|
-
]] });
|
|
1545
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, decorators: [{
|
|
1546
|
-
type: i0.NgModule,
|
|
1547
|
-
args: [{
|
|
1548
|
-
exports: [
|
|
1549
|
-
DateTimePickerComponent,
|
|
1550
|
-
PageToolbarComponent,
|
|
1551
|
-
GridActionsComponent,
|
|
1552
|
-
ExtensibleFormComponent,
|
|
1553
|
-
ExtensibleTableComponent,
|
|
1554
|
-
PropDataDirective,
|
|
1555
|
-
DisabledDirective,
|
|
1556
|
-
],
|
|
1557
|
-
declarations: [
|
|
1558
|
-
DateTimePickerComponent,
|
|
1559
|
-
PageToolbarComponent,
|
|
1560
|
-
GridActionsComponent,
|
|
1561
|
-
ExtensibleFormPropComponent,
|
|
1562
|
-
ExtensibleFormComponent,
|
|
1563
|
-
ExtensibleTableComponent,
|
|
1564
|
-
PropDataDirective,
|
|
1565
|
-
DisabledDirective,
|
|
1566
|
-
],
|
|
1567
|
-
imports: [
|
|
1568
|
-
i1.CoreModule,
|
|
1569
|
-
i4.ThemeSharedModule,
|
|
1570
|
-
i6.NgxValidateCoreModule,
|
|
1571
|
-
i2.NgbDatepickerModule,
|
|
1572
|
-
i2.NgbDropdownModule,
|
|
1573
|
-
i2.NgbTimepickerModule,
|
|
1574
|
-
i2.NgbTypeaheadModule,
|
|
1575
|
-
],
|
|
1576
|
-
}]
|
|
1577
|
-
}] });
|
|
1578
|
-
var UiExtensionsModule = /** @class */ (function () {
|
|
1579
|
-
function UiExtensionsModule() {
|
|
1580
|
-
}
|
|
1581
|
-
return UiExtensionsModule;
|
|
1582
|
-
}());
|
|
1583
|
-
UiExtensionsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1584
|
-
UiExtensionsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] });
|
|
1585
|
-
UiExtensionsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, imports: [[BaseUiExtensionsModule], BaseUiExtensionsModule] });
|
|
1586
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, decorators: [{
|
|
1587
|
-
type: i0.NgModule,
|
|
1588
|
-
args: [{
|
|
1589
|
-
exports: [BaseUiExtensionsModule],
|
|
1590
|
-
imports: [BaseUiExtensionsModule],
|
|
1591
|
-
}]
|
|
1511
|
+
var BaseUiExtensionsModule = /** @class */ (function () {
|
|
1512
|
+
function BaseUiExtensionsModule() {
|
|
1513
|
+
}
|
|
1514
|
+
return BaseUiExtensionsModule;
|
|
1515
|
+
}());
|
|
1516
|
+
BaseUiExtensionsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1517
|
+
BaseUiExtensionsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
|
|
1518
|
+
PageToolbarComponent,
|
|
1519
|
+
GridActionsComponent,
|
|
1520
|
+
ExtensibleFormPropComponent,
|
|
1521
|
+
ExtensibleFormComponent,
|
|
1522
|
+
ExtensibleTableComponent,
|
|
1523
|
+
PropDataDirective,
|
|
1524
|
+
DisabledDirective], imports: [i1.CoreModule,
|
|
1525
|
+
i4.ThemeSharedModule,
|
|
1526
|
+
i6.NgxValidateCoreModule,
|
|
1527
|
+
i2.NgbDatepickerModule,
|
|
1528
|
+
i2.NgbDropdownModule,
|
|
1529
|
+
i2.NgbTimepickerModule,
|
|
1530
|
+
i2.NgbTypeaheadModule], exports: [DateTimePickerComponent,
|
|
1531
|
+
PageToolbarComponent,
|
|
1532
|
+
GridActionsComponent,
|
|
1533
|
+
ExtensibleFormComponent,
|
|
1534
|
+
ExtensibleTableComponent,
|
|
1535
|
+
PropDataDirective,
|
|
1536
|
+
DisabledDirective] });
|
|
1537
|
+
BaseUiExtensionsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, imports: [[
|
|
1538
|
+
i1.CoreModule,
|
|
1539
|
+
i4.ThemeSharedModule,
|
|
1540
|
+
i6.NgxValidateCoreModule,
|
|
1541
|
+
i2.NgbDatepickerModule,
|
|
1542
|
+
i2.NgbDropdownModule,
|
|
1543
|
+
i2.NgbTimepickerModule,
|
|
1544
|
+
i2.NgbTypeaheadModule,
|
|
1545
|
+
]] });
|
|
1546
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: BaseUiExtensionsModule, decorators: [{
|
|
1547
|
+
type: i0.NgModule,
|
|
1548
|
+
args: [{
|
|
1549
|
+
exports: [
|
|
1550
|
+
DateTimePickerComponent,
|
|
1551
|
+
PageToolbarComponent,
|
|
1552
|
+
GridActionsComponent,
|
|
1553
|
+
ExtensibleFormComponent,
|
|
1554
|
+
ExtensibleTableComponent,
|
|
1555
|
+
PropDataDirective,
|
|
1556
|
+
DisabledDirective,
|
|
1557
|
+
],
|
|
1558
|
+
declarations: [
|
|
1559
|
+
DateTimePickerComponent,
|
|
1560
|
+
PageToolbarComponent,
|
|
1561
|
+
GridActionsComponent,
|
|
1562
|
+
ExtensibleFormPropComponent,
|
|
1563
|
+
ExtensibleFormComponent,
|
|
1564
|
+
ExtensibleTableComponent,
|
|
1565
|
+
PropDataDirective,
|
|
1566
|
+
DisabledDirective,
|
|
1567
|
+
],
|
|
1568
|
+
imports: [
|
|
1569
|
+
i1.CoreModule,
|
|
1570
|
+
i4.ThemeSharedModule,
|
|
1571
|
+
i6.NgxValidateCoreModule,
|
|
1572
|
+
i2.NgbDatepickerModule,
|
|
1573
|
+
i2.NgbDropdownModule,
|
|
1574
|
+
i2.NgbTimepickerModule,
|
|
1575
|
+
i2.NgbTypeaheadModule,
|
|
1576
|
+
],
|
|
1577
|
+
}]
|
|
1578
|
+
}] });
|
|
1579
|
+
var UiExtensionsModule = /** @class */ (function () {
|
|
1580
|
+
function UiExtensionsModule() {
|
|
1581
|
+
}
|
|
1582
|
+
return UiExtensionsModule;
|
|
1583
|
+
}());
|
|
1584
|
+
UiExtensionsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1585
|
+
UiExtensionsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] });
|
|
1586
|
+
UiExtensionsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, imports: [[BaseUiExtensionsModule], BaseUiExtensionsModule] });
|
|
1587
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: UiExtensionsModule, decorators: [{
|
|
1588
|
+
type: i0.NgModule,
|
|
1589
|
+
args: [{
|
|
1590
|
+
exports: [BaseUiExtensionsModule],
|
|
1591
|
+
imports: [BaseUiExtensionsModule],
|
|
1592
|
+
}]
|
|
1592
1593
|
}] });
|
|
1593
1594
|
|
|
1594
|
-
function mergeWithDefaultActions(extension, defaultActions) {
|
|
1595
|
-
var contributors = [];
|
|
1596
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1597
|
-
contributors[_i - 2] = arguments[_i];
|
|
1598
|
-
}
|
|
1599
|
-
Object.keys(defaultActions).forEach(function (name) {
|
|
1600
|
-
var actions = extension.get(name);
|
|
1601
|
-
actions.clearContributors();
|
|
1602
|
-
actions.addContributor(function (actionList) { return actionList.addManyTail(defaultActions[name]); });
|
|
1603
|
-
contributors.forEach(function (contributor) { return (contributor[name] || []).forEach(function (callback) { return actions.addContributor(callback); }); });
|
|
1604
|
-
});
|
|
1595
|
+
function mergeWithDefaultActions(extension, defaultActions) {
|
|
1596
|
+
var contributors = [];
|
|
1597
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1598
|
+
contributors[_i - 2] = arguments[_i];
|
|
1599
|
+
}
|
|
1600
|
+
Object.keys(defaultActions).forEach(function (name) {
|
|
1601
|
+
var actions = extension.get(name);
|
|
1602
|
+
actions.clearContributors();
|
|
1603
|
+
actions.addContributor(function (actionList) { return actionList.addManyTail(defaultActions[name]); });
|
|
1604
|
+
contributors.forEach(function (contributor) { return (contributor[name] || []).forEach(function (callback) { return actions.addContributor(callback); }); });
|
|
1605
|
+
});
|
|
1605
1606
|
}
|
|
1606
1607
|
|
|
1607
|
-
function generateFormFromProps(data) {
|
|
1608
|
-
var extensions = data.getInjected(ExtensionsService);
|
|
1609
|
-
var identifier = data.getInjected(EXTENSIONS_IDENTIFIER);
|
|
1610
|
-
var form = new i2$1.FormGroup({});
|
|
1611
|
-
var extraForm = new i2$1.FormGroup({});
|
|
1612
|
-
form.addControl(EXTRA_PROPERTIES_KEY, extraForm);
|
|
1613
|
-
var record = data.record || {};
|
|
1614
|
-
var type = JSON.stringify(record) === '{}' ? 'create' : 'edit';
|
|
1615
|
-
var props = extensions[type + "FormProps"].get(identifier).props;
|
|
1616
|
-
var extraProperties = record[EXTRA_PROPERTIES_KEY] || {};
|
|
1617
|
-
props.forEach(function (_a) {
|
|
1618
|
-
var prop = _a.value;
|
|
1619
|
-
var name = prop.name;
|
|
1620
|
-
var isExtraProperty = prop.isExtra || name in extraProperties;
|
|
1621
|
-
var value = isExtraProperty ? extraProperties[name] : name in record ? record[name] : undefined;
|
|
1622
|
-
if (typeof value === 'undefined')
|
|
1623
|
-
value = prop.defaultValue;
|
|
1624
|
-
if (value) {
|
|
1625
|
-
var adapter = void 0;
|
|
1626
|
-
switch (prop.type) {
|
|
1627
|
-
case "date" /* Date */:
|
|
1628
|
-
adapter = new DateAdapter();
|
|
1629
|
-
value = adapter.toModel(adapter.fromModel(value));
|
|
1630
|
-
break;
|
|
1631
|
-
case "time" /* Time */:
|
|
1632
|
-
adapter = new TimeAdapter();
|
|
1633
|
-
value = adapter.toModel(adapter.fromModel(value));
|
|
1634
|
-
break;
|
|
1635
|
-
case "dateTime" /* DateTime */:
|
|
1636
|
-
adapter = new DateTimeAdapter();
|
|
1637
|
-
value = adapter.toModel(adapter.fromModel(value));
|
|
1638
|
-
break;
|
|
1639
|
-
default:
|
|
1640
|
-
break;
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
var formControl = new i2$1.FormControl(value, {
|
|
1644
|
-
asyncValidators: prop.asyncValidators(data),
|
|
1645
|
-
validators: prop.validators(data),
|
|
1646
|
-
});
|
|
1647
|
-
(isExtraProperty ? extraForm : form).addControl(name, formControl);
|
|
1648
|
-
});
|
|
1649
|
-
return form;
|
|
1608
|
+
function generateFormFromProps(data) {
|
|
1609
|
+
var extensions = data.getInjected(ExtensionsService);
|
|
1610
|
+
var identifier = data.getInjected(EXTENSIONS_IDENTIFIER);
|
|
1611
|
+
var form = new i2$1.FormGroup({});
|
|
1612
|
+
var extraForm = new i2$1.FormGroup({});
|
|
1613
|
+
form.addControl(EXTRA_PROPERTIES_KEY, extraForm);
|
|
1614
|
+
var record = data.record || {};
|
|
1615
|
+
var type = JSON.stringify(record) === '{}' ? 'create' : 'edit';
|
|
1616
|
+
var props = extensions[type + "FormProps"].get(identifier).props;
|
|
1617
|
+
var extraProperties = record[EXTRA_PROPERTIES_KEY] || {};
|
|
1618
|
+
props.forEach(function (_a) {
|
|
1619
|
+
var prop = _a.value;
|
|
1620
|
+
var name = prop.name;
|
|
1621
|
+
var isExtraProperty = prop.isExtra || name in extraProperties;
|
|
1622
|
+
var value = isExtraProperty ? extraProperties[name] : name in record ? record[name] : undefined;
|
|
1623
|
+
if (typeof value === 'undefined')
|
|
1624
|
+
value = prop.defaultValue;
|
|
1625
|
+
if (value) {
|
|
1626
|
+
var adapter = void 0;
|
|
1627
|
+
switch (prop.type) {
|
|
1628
|
+
case "date" /* Date */:
|
|
1629
|
+
adapter = new DateAdapter();
|
|
1630
|
+
value = adapter.toModel(adapter.fromModel(value));
|
|
1631
|
+
break;
|
|
1632
|
+
case "time" /* Time */:
|
|
1633
|
+
adapter = new TimeAdapter();
|
|
1634
|
+
value = adapter.toModel(adapter.fromModel(value));
|
|
1635
|
+
break;
|
|
1636
|
+
case "dateTime" /* DateTime */:
|
|
1637
|
+
adapter = new DateTimeAdapter();
|
|
1638
|
+
value = adapter.toModel(adapter.fromModel(value));
|
|
1639
|
+
break;
|
|
1640
|
+
default:
|
|
1641
|
+
break;
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
var formControl = new i2$1.FormControl(value, {
|
|
1645
|
+
asyncValidators: prop.asyncValidators(data),
|
|
1646
|
+
validators: prop.validators(data),
|
|
1647
|
+
});
|
|
1648
|
+
(isExtraProperty ? extraForm : form).addControl(name, formControl);
|
|
1649
|
+
});
|
|
1650
|
+
return form;
|
|
1650
1651
|
}
|
|
1651
1652
|
|
|
1652
|
-
function createExtraPropertyValueResolver(name) {
|
|
1653
|
-
return function (data) { return rxjs.of(data.record[EXTRA_PROPERTIES_KEY][name]); };
|
|
1654
|
-
}
|
|
1655
|
-
function mergeWithDefaultProps(extension, defaultProps) {
|
|
1656
|
-
var contributors = [];
|
|
1657
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1658
|
-
contributors[_i - 2] = arguments[_i];
|
|
1659
|
-
}
|
|
1660
|
-
Object.keys(defaultProps).forEach(function (name) {
|
|
1661
|
-
var props = extension.get(name);
|
|
1662
|
-
props.clearContributors();
|
|
1663
|
-
props.addContributor(function (propList) { return propList.addManyTail(defaultProps[name]); });
|
|
1664
|
-
contributors.forEach(function (contributor) { return (contributor[name] || []).forEach(function (callback) { return props.addContributor(callback); }); });
|
|
1665
|
-
});
|
|
1653
|
+
function createExtraPropertyValueResolver(name) {
|
|
1654
|
+
return function (data) { return rxjs.of(data.record[EXTRA_PROPERTIES_KEY][name]); };
|
|
1655
|
+
}
|
|
1656
|
+
function mergeWithDefaultProps(extension, defaultProps) {
|
|
1657
|
+
var contributors = [];
|
|
1658
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1659
|
+
contributors[_i - 2] = arguments[_i];
|
|
1660
|
+
}
|
|
1661
|
+
Object.keys(defaultProps).forEach(function (name) {
|
|
1662
|
+
var props = extension.get(name);
|
|
1663
|
+
props.clearContributors();
|
|
1664
|
+
props.addContributor(function (propList) { return propList.addManyTail(defaultProps[name]); });
|
|
1665
|
+
contributors.forEach(function (contributor) { return (contributor[name] || []).forEach(function (callback) { return props.addContributor(callback); }); });
|
|
1666
|
+
});
|
|
1666
1667
|
}
|
|
1667
1668
|
|
|
1668
|
-
function createEnum(members) {
|
|
1669
|
-
var enumObject = {};
|
|
1670
|
-
members.forEach(function (_a) {
|
|
1671
|
-
var _b = _a.name, name = _b === void 0 ? '' : _b, value = _a.value;
|
|
1672
|
-
enumObject[(enumObject[name] = value)] = name;
|
|
1673
|
-
});
|
|
1674
|
-
return enumObject;
|
|
1675
|
-
}
|
|
1676
|
-
function createEnumValueResolver(enumType, lookupEnum, propName) {
|
|
1677
|
-
return function (data) {
|
|
1678
|
-
var value = data.record[EXTRA_PROPERTIES_KEY][propName];
|
|
1679
|
-
var key = lookupEnum.transformed[value];
|
|
1680
|
-
var l10n = data.getInjected(i1.LocalizationService);
|
|
1681
|
-
var localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
|
|
1682
|
-
return createLocalizationStream(l10n, localizeEnum(key));
|
|
1683
|
-
};
|
|
1684
|
-
}
|
|
1685
|
-
function createEnumOptions(enumType, lookupEnum) {
|
|
1686
|
-
return function (data) {
|
|
1687
|
-
var l10n = data.getInjected(i1.LocalizationService);
|
|
1688
|
-
var localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
|
|
1689
|
-
return createLocalizationStream(l10n, lookupEnum.fields.map(function (_a) {
|
|
1690
|
-
var _b = _a.name, name = _b === void 0 ? '' : _b, value = _a.value;
|
|
1691
|
-
return ({
|
|
1692
|
-
key: localizeEnum(name),
|
|
1693
|
-
value: value,
|
|
1694
|
-
});
|
|
1695
|
-
}));
|
|
1696
|
-
};
|
|
1697
|
-
}
|
|
1698
|
-
function createLocalizationStream(l10n, mapTarget) {
|
|
1699
|
-
return rxjs.merge(rxjs.of(null), l10n.languageChange$).pipe(operators.map(function () { return mapTarget; }));
|
|
1700
|
-
}
|
|
1701
|
-
function createEnumLocalizer(l10n, enumType, lookupEnum) {
|
|
1702
|
-
var resource = lookupEnum.localizationResource;
|
|
1703
|
-
var shortType = getShortEnumType(enumType);
|
|
1704
|
-
return function (key) { return l10n.localizeWithFallbackSync([resource || ''], ['Enum:' + shortType + '.' + key, shortType + '.' + key, key], key); };
|
|
1705
|
-
}
|
|
1706
|
-
function getShortEnumType(enumType) {
|
|
1707
|
-
return enumType.split('.').pop();
|
|
1669
|
+
function createEnum(members) {
|
|
1670
|
+
var enumObject = {};
|
|
1671
|
+
members.forEach(function (_a) {
|
|
1672
|
+
var _b = _a.name, name = _b === void 0 ? '' : _b, value = _a.value;
|
|
1673
|
+
enumObject[(enumObject[name] = value)] = name;
|
|
1674
|
+
});
|
|
1675
|
+
return enumObject;
|
|
1676
|
+
}
|
|
1677
|
+
function createEnumValueResolver(enumType, lookupEnum, propName) {
|
|
1678
|
+
return function (data) {
|
|
1679
|
+
var value = data.record[EXTRA_PROPERTIES_KEY][propName];
|
|
1680
|
+
var key = lookupEnum.transformed[value];
|
|
1681
|
+
var l10n = data.getInjected(i1.LocalizationService);
|
|
1682
|
+
var localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
|
|
1683
|
+
return createLocalizationStream(l10n, localizeEnum(key));
|
|
1684
|
+
};
|
|
1685
|
+
}
|
|
1686
|
+
function createEnumOptions(enumType, lookupEnum) {
|
|
1687
|
+
return function (data) {
|
|
1688
|
+
var l10n = data.getInjected(i1.LocalizationService);
|
|
1689
|
+
var localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
|
|
1690
|
+
return createLocalizationStream(l10n, lookupEnum.fields.map(function (_a) {
|
|
1691
|
+
var _b = _a.name, name = _b === void 0 ? '' : _b, value = _a.value;
|
|
1692
|
+
return ({
|
|
1693
|
+
key: localizeEnum(name),
|
|
1694
|
+
value: value,
|
|
1695
|
+
});
|
|
1696
|
+
}));
|
|
1697
|
+
};
|
|
1698
|
+
}
|
|
1699
|
+
function createLocalizationStream(l10n, mapTarget) {
|
|
1700
|
+
return rxjs.merge(rxjs.of(null), l10n.languageChange$).pipe(operators.map(function () { return mapTarget; }));
|
|
1701
|
+
}
|
|
1702
|
+
function createEnumLocalizer(l10n, enumType, lookupEnum) {
|
|
1703
|
+
var resource = lookupEnum.localizationResource;
|
|
1704
|
+
var shortType = getShortEnumType(enumType);
|
|
1705
|
+
return function (key) { return l10n.localizeWithFallbackSync([resource || ''], ['Enum:' + shortType + '.' + key, shortType + '.' + key, key], key); };
|
|
1706
|
+
}
|
|
1707
|
+
function getShortEnumType(enumType) {
|
|
1708
|
+
return enumType.split('.').pop();
|
|
1708
1709
|
}
|
|
1709
1710
|
|
|
1710
|
-
function createDisplayNameLocalizationPipeKeyGenerator(localization) {
|
|
1711
|
-
var generateLocalizationPipeKey = i1.createLocalizationPipeKeyGenerator(localization);
|
|
1712
|
-
return function (displayName, fallback) {
|
|
1713
|
-
if (displayName && displayName.name)
|
|
1714
|
-
return generateLocalizationPipeKey([displayName.resource || ''], [displayName.name], displayName.name);
|
|
1715
|
-
var key = generateLocalizationPipeKey([fallback.resource || ''], ['DisplayName:' + fallback.name], undefined);
|
|
1716
|
-
if (key)
|
|
1717
|
-
return key;
|
|
1718
|
-
return generateLocalizationPipeKey([fallback.resource || ''], [fallback.name || ''], fallback.name);
|
|
1719
|
-
};
|
|
1711
|
+
function createDisplayNameLocalizationPipeKeyGenerator(localization) {
|
|
1712
|
+
var generateLocalizationPipeKey = i1.createLocalizationPipeKeyGenerator(localization);
|
|
1713
|
+
return function (displayName, fallback) {
|
|
1714
|
+
if (displayName && displayName.name)
|
|
1715
|
+
return generateLocalizationPipeKey([displayName.resource || ''], [displayName.name], displayName.name);
|
|
1716
|
+
var key = generateLocalizationPipeKey([fallback.resource || ''], ['DisplayName:' + fallback.name], undefined);
|
|
1717
|
+
if (key)
|
|
1718
|
+
return key;
|
|
1719
|
+
return generateLocalizationPipeKey([fallback.resource || ''], [fallback.name || ''], fallback.name);
|
|
1720
|
+
};
|
|
1720
1721
|
}
|
|
1721
1722
|
|
|
1722
|
-
function getValidatorsFromProperty(property) {
|
|
1723
|
-
var validators = [];
|
|
1724
|
-
property.attributes.forEach(function (attr) {
|
|
1725
|
-
if (attr.typeSimple && attr.typeSimple in i1.AbpValidators) {
|
|
1726
|
-
validators.push(i1.AbpValidators[attr.typeSimple](attr.config));
|
|
1727
|
-
}
|
|
1728
|
-
});
|
|
1729
|
-
return validators;
|
|
1723
|
+
function getValidatorsFromProperty(property) {
|
|
1724
|
+
var validators = [];
|
|
1725
|
+
property.attributes.forEach(function (attr) {
|
|
1726
|
+
if (attr.typeSimple && attr.typeSimple in i1.AbpValidators) {
|
|
1727
|
+
validators.push(i1.AbpValidators[attr.typeSimple](attr.config));
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
return validators;
|
|
1730
1731
|
}
|
|
1731
1732
|
|
|
1732
|
-
function selectObjectExtensions(configState) {
|
|
1733
|
-
return configState.getOne$('objectExtensions');
|
|
1734
|
-
}
|
|
1735
|
-
function selectLocalization(configState) {
|
|
1736
|
-
return configState.getOne$('localization');
|
|
1737
|
-
}
|
|
1738
|
-
function selectEnums(configState) {
|
|
1739
|
-
return selectObjectExtensions(configState).pipe(operators.map(function (extensions) { return Object.keys(extensions.enums).reduce(function (acc, key) {
|
|
1740
|
-
var _b = extensions.enums[key], fields = _b.fields, localizationResource = _b.localizationResource;
|
|
1741
|
-
acc[key] = {
|
|
1742
|
-
fields: fields,
|
|
1743
|
-
localizationResource: localizationResource,
|
|
1744
|
-
transformed: createEnum(fields),
|
|
1745
|
-
};
|
|
1746
|
-
return acc;
|
|
1747
|
-
}, {}); }));
|
|
1748
|
-
}
|
|
1749
|
-
function getObjectExtensionEntitiesFromStore(configState, moduleKey) {
|
|
1750
|
-
return selectObjectExtensions(configState).pipe(operators.map(function (extensions) {
|
|
1751
|
-
if (!extensions)
|
|
1752
|
-
return null;
|
|
1753
|
-
return (extensions.modules[moduleKey] || {})
|
|
1754
|
-
.entities;
|
|
1755
|
-
}), operators.map(function (entities) { return (isUndefined(entities) ? {} : entities); }), operators.filter(Boolean), operators.take(1));
|
|
1756
|
-
}
|
|
1757
|
-
function mapEntitiesToContributors(configState, resource) {
|
|
1758
|
-
return rxjs.pipe(operators.switchMap(function (entities) { return rxjs.zip(selectLocalization(configState), selectEnums(configState)).pipe(operators.map(function (_b) {
|
|
1759
|
-
var _c = __read(_b, 2), localization = _c[0], enums = _c[1];
|
|
1760
|
-
var generateDisplayName = createDisplayNameLocalizationPipeKeyGenerator(localization);
|
|
1761
|
-
return Object.keys(entities).reduce(function (acc, key) {
|
|
1762
|
-
acc.prop[key] = [];
|
|
1763
|
-
acc.createForm[key] = [];
|
|
1764
|
-
acc.editForm[key] = [];
|
|
1765
|
-
var entity = entities[key];
|
|
1766
|
-
if (!entity)
|
|
1767
|
-
return acc;
|
|
1768
|
-
var properties = entity.properties;
|
|
1769
|
-
if (!properties)
|
|
1770
|
-
return acc;
|
|
1771
|
-
var mapPropertiesToContributors = createPropertiesToContributorsMapper(generateDisplayName, resource, enums);
|
|
1772
|
-
return mapPropertiesToContributors(properties, acc, key);
|
|
1773
|
-
}, {
|
|
1774
|
-
prop: {},
|
|
1775
|
-
createForm: {},
|
|
1776
|
-
editForm: {},
|
|
1777
|
-
});
|
|
1778
|
-
})); }), operators.take(1));
|
|
1779
|
-
}
|
|
1780
|
-
function createPropertiesToContributorsMapper(generateDisplayName, resource, enums) {
|
|
1781
|
-
return function (properties, contributors, key) {
|
|
1782
|
-
var isExtra = true;
|
|
1783
|
-
var generateTypeaheadDisplayName = createTypeaheadDisplayNameGenerator(generateDisplayName, properties);
|
|
1784
|
-
Object.keys(properties).forEach(function (name) {
|
|
1785
|
-
var property = properties[name];
|
|
1786
|
-
var propName = name;
|
|
1787
|
-
var lookup = property.ui.lookup || {};
|
|
1788
|
-
var type = getTypeaheadType(lookup, name) || getTypeFromProperty(property);
|
|
1789
|
-
var generateDN = hasTypeaheadTextSuffix(name)
|
|
1790
|
-
? generateTypeaheadDisplayName
|
|
1791
|
-
: generateDisplayName;
|
|
1792
|
-
var displayName = generateDN(property.displayName, { name: name, resource: resource });
|
|
1793
|
-
if (property.ui.onTable.isVisible) {
|
|
1794
|
-
var sortable = Boolean(property.ui.onTable.isSortable);
|
|
1795
|
-
var columnWidth = type === "boolean" /* Boolean */ ? 150 : 250;
|
|
1796
|
-
var valueResolver = type === "enum" /* Enum */
|
|
1797
|
-
? createEnumValueResolver(property.type, enums[property.type], propName)
|
|
1798
|
-
: createExtraPropertyValueResolver(propName);
|
|
1799
|
-
var entityProp_1 = new EntityProp({
|
|
1800
|
-
type: type,
|
|
1801
|
-
name: propName,
|
|
1802
|
-
displayName: displayName,
|
|
1803
|
-
sortable: sortable,
|
|
1804
|
-
columnWidth: columnWidth,
|
|
1805
|
-
valueResolver: valueResolver,
|
|
1806
|
-
isExtra: isExtra,
|
|
1807
|
-
});
|
|
1808
|
-
var contributor = function (propList) { return propList.addTail(entityProp_1); };
|
|
1809
|
-
contributors.prop[key].push(contributor);
|
|
1810
|
-
}
|
|
1811
|
-
var isOnCreateForm = property.ui.onCreateForm.isVisible;
|
|
1812
|
-
var isOnEditForm = property.ui.onEditForm.isVisible;
|
|
1813
|
-
if (isOnCreateForm || isOnEditForm) {
|
|
1814
|
-
var defaultValue = property.defaultValue;
|
|
1815
|
-
var validators = function () { return getValidatorsFromProperty(property); };
|
|
1816
|
-
var options = void 0;
|
|
1817
|
-
if (type === "enum" /* Enum */)
|
|
1818
|
-
options = createEnumOptions(propName, enums[property.type || '']);
|
|
1819
|
-
else if (type === "typeahead" /* Typeahead */)
|
|
1820
|
-
options = createTypeaheadOptions(lookup);
|
|
1821
|
-
var formProp_1 = new FormProp({
|
|
1822
|
-
type: type,
|
|
1823
|
-
name: propName,
|
|
1824
|
-
displayName: displayName,
|
|
1825
|
-
options: options,
|
|
1826
|
-
defaultValue: defaultValue,
|
|
1827
|
-
validators: validators,
|
|
1828
|
-
isExtra: isExtra,
|
|
1829
|
-
});
|
|
1830
|
-
var formContributor = function (propList) { return propList.addTail(formProp_1); };
|
|
1831
|
-
if (isOnCreateForm)
|
|
1832
|
-
contributors.createForm[key].push(formContributor);
|
|
1833
|
-
if (isOnEditForm)
|
|
1834
|
-
contributors.editForm[key].push(formContributor);
|
|
1835
|
-
}
|
|
1836
|
-
});
|
|
1837
|
-
return contributors;
|
|
1838
|
-
};
|
|
1839
|
-
}
|
|
1840
|
-
function getTypeFromProperty(property) {
|
|
1841
|
-
var _a;
|
|
1842
|
-
return (_a = property === null || property === void 0 ? void 0 : property.typeSimple) === null || _a === void 0 ? void 0 : _a.replace(/\?$/, '');
|
|
1843
|
-
}
|
|
1844
|
-
function isUndefined(obj) {
|
|
1845
|
-
return typeof obj === 'undefined';
|
|
1733
|
+
function selectObjectExtensions(configState) {
|
|
1734
|
+
return configState.getOne$('objectExtensions');
|
|
1735
|
+
}
|
|
1736
|
+
function selectLocalization(configState) {
|
|
1737
|
+
return configState.getOne$('localization');
|
|
1738
|
+
}
|
|
1739
|
+
function selectEnums(configState) {
|
|
1740
|
+
return selectObjectExtensions(configState).pipe(operators.map(function (extensions) { return Object.keys(extensions.enums).reduce(function (acc, key) {
|
|
1741
|
+
var _b = extensions.enums[key], fields = _b.fields, localizationResource = _b.localizationResource;
|
|
1742
|
+
acc[key] = {
|
|
1743
|
+
fields: fields,
|
|
1744
|
+
localizationResource: localizationResource,
|
|
1745
|
+
transformed: createEnum(fields),
|
|
1746
|
+
};
|
|
1747
|
+
return acc;
|
|
1748
|
+
}, {}); }));
|
|
1749
|
+
}
|
|
1750
|
+
function getObjectExtensionEntitiesFromStore(configState, moduleKey) {
|
|
1751
|
+
return selectObjectExtensions(configState).pipe(operators.map(function (extensions) {
|
|
1752
|
+
if (!extensions)
|
|
1753
|
+
return null;
|
|
1754
|
+
return (extensions.modules[moduleKey] || {})
|
|
1755
|
+
.entities;
|
|
1756
|
+
}), operators.map(function (entities) { return (isUndefined(entities) ? {} : entities); }), operators.filter(Boolean), operators.take(1));
|
|
1757
|
+
}
|
|
1758
|
+
function mapEntitiesToContributors(configState, resource) {
|
|
1759
|
+
return rxjs.pipe(operators.switchMap(function (entities) { return rxjs.zip(selectLocalization(configState), selectEnums(configState)).pipe(operators.map(function (_b) {
|
|
1760
|
+
var _c = __read(_b, 2), localization = _c[0], enums = _c[1];
|
|
1761
|
+
var generateDisplayName = createDisplayNameLocalizationPipeKeyGenerator(localization);
|
|
1762
|
+
return Object.keys(entities).reduce(function (acc, key) {
|
|
1763
|
+
acc.prop[key] = [];
|
|
1764
|
+
acc.createForm[key] = [];
|
|
1765
|
+
acc.editForm[key] = [];
|
|
1766
|
+
var entity = entities[key];
|
|
1767
|
+
if (!entity)
|
|
1768
|
+
return acc;
|
|
1769
|
+
var properties = entity.properties;
|
|
1770
|
+
if (!properties)
|
|
1771
|
+
return acc;
|
|
1772
|
+
var mapPropertiesToContributors = createPropertiesToContributorsMapper(generateDisplayName, resource, enums);
|
|
1773
|
+
return mapPropertiesToContributors(properties, acc, key);
|
|
1774
|
+
}, {
|
|
1775
|
+
prop: {},
|
|
1776
|
+
createForm: {},
|
|
1777
|
+
editForm: {},
|
|
1778
|
+
});
|
|
1779
|
+
})); }), operators.take(1));
|
|
1780
|
+
}
|
|
1781
|
+
function createPropertiesToContributorsMapper(generateDisplayName, resource, enums) {
|
|
1782
|
+
return function (properties, contributors, key) {
|
|
1783
|
+
var isExtra = true;
|
|
1784
|
+
var generateTypeaheadDisplayName = createTypeaheadDisplayNameGenerator(generateDisplayName, properties);
|
|
1785
|
+
Object.keys(properties).forEach(function (name) {
|
|
1786
|
+
var property = properties[name];
|
|
1787
|
+
var propName = name;
|
|
1788
|
+
var lookup = property.ui.lookup || {};
|
|
1789
|
+
var type = getTypeaheadType(lookup, name) || getTypeFromProperty(property);
|
|
1790
|
+
var generateDN = hasTypeaheadTextSuffix(name)
|
|
1791
|
+
? generateTypeaheadDisplayName
|
|
1792
|
+
: generateDisplayName;
|
|
1793
|
+
var displayName = generateDN(property.displayName, { name: name, resource: resource });
|
|
1794
|
+
if (property.ui.onTable.isVisible) {
|
|
1795
|
+
var sortable = Boolean(property.ui.onTable.isSortable);
|
|
1796
|
+
var columnWidth = type === "boolean" /* Boolean */ ? 150 : 250;
|
|
1797
|
+
var valueResolver = type === "enum" /* Enum */
|
|
1798
|
+
? createEnumValueResolver(property.type, enums[property.type], propName)
|
|
1799
|
+
: createExtraPropertyValueResolver(propName);
|
|
1800
|
+
var entityProp_1 = new EntityProp({
|
|
1801
|
+
type: type,
|
|
1802
|
+
name: propName,
|
|
1803
|
+
displayName: displayName,
|
|
1804
|
+
sortable: sortable,
|
|
1805
|
+
columnWidth: columnWidth,
|
|
1806
|
+
valueResolver: valueResolver,
|
|
1807
|
+
isExtra: isExtra,
|
|
1808
|
+
});
|
|
1809
|
+
var contributor = function (propList) { return propList.addTail(entityProp_1); };
|
|
1810
|
+
contributors.prop[key].push(contributor);
|
|
1811
|
+
}
|
|
1812
|
+
var isOnCreateForm = property.ui.onCreateForm.isVisible;
|
|
1813
|
+
var isOnEditForm = property.ui.onEditForm.isVisible;
|
|
1814
|
+
if (isOnCreateForm || isOnEditForm) {
|
|
1815
|
+
var defaultValue = property.defaultValue;
|
|
1816
|
+
var validators = function () { return getValidatorsFromProperty(property); };
|
|
1817
|
+
var options = void 0;
|
|
1818
|
+
if (type === "enum" /* Enum */)
|
|
1819
|
+
options = createEnumOptions(propName, enums[property.type || '']);
|
|
1820
|
+
else if (type === "typeahead" /* Typeahead */)
|
|
1821
|
+
options = createTypeaheadOptions(lookup);
|
|
1822
|
+
var formProp_1 = new FormProp({
|
|
1823
|
+
type: type,
|
|
1824
|
+
name: propName,
|
|
1825
|
+
displayName: displayName,
|
|
1826
|
+
options: options,
|
|
1827
|
+
defaultValue: defaultValue,
|
|
1828
|
+
validators: validators,
|
|
1829
|
+
isExtra: isExtra,
|
|
1830
|
+
});
|
|
1831
|
+
var formContributor = function (propList) { return propList.addTail(formProp_1); };
|
|
1832
|
+
if (isOnCreateForm)
|
|
1833
|
+
contributors.createForm[key].push(formContributor);
|
|
1834
|
+
if (isOnEditForm)
|
|
1835
|
+
contributors.editForm[key].push(formContributor);
|
|
1836
|
+
}
|
|
1837
|
+
});
|
|
1838
|
+
return contributors;
|
|
1839
|
+
};
|
|
1840
|
+
}
|
|
1841
|
+
function getTypeFromProperty(property) {
|
|
1842
|
+
var _a;
|
|
1843
|
+
return (_a = property === null || property === void 0 ? void 0 : property.typeSimple) === null || _a === void 0 ? void 0 : _a.replace(/\?$/, '');
|
|
1844
|
+
}
|
|
1845
|
+
function isUndefined(obj) {
|
|
1846
|
+
return typeof obj === 'undefined';
|
|
1846
1847
|
}
|
|
1847
1848
|
|
|
1848
|
-
/**
|
|
1849
|
-
* Generated bundle index. Do not edit.
|
|
1849
|
+
/**
|
|
1850
|
+
* Generated bundle index. Do not edit.
|
|
1850
1851
|
*/
|
|
1851
1852
|
|
|
1852
1853
|
exports.ActionList = ActionList;
|