@abp/ng.theme.shared 5.0.0 → 5.1.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/{esm2015/abp-ng.theme.shared.js → esm2020/abp-ng.theme.shared.mjs} +0 -0
- package/{esm2015/extensions/abp-ng.theme.shared-extensions.js → esm2020/extensions/abp-ng.theme.shared-extensions.mjs} +0 -0
- package/esm2020/extensions/lib/adapters/date-time.adapter.mjs +44 -0
- package/{esm2015/extensions/lib/adapters/date.adapter.js → esm2020/extensions/lib/adapters/date.adapter.mjs} +4 -4
- package/{esm2015/extensions/lib/adapters/time.adapter.js → esm2020/extensions/lib/adapters/time.adapter.mjs} +4 -4
- package/{esm2015/extensions/lib/components/abstract-actions/abstract-actions.component.js → esm2020/extensions/lib/components/abstract-actions/abstract-actions.component.mjs} +4 -4
- package/{esm2015/extensions/lib/components/date-time-picker/date-time-picker.component.js → esm2020/extensions/lib/components/date-time-picker/date-time-picker.component.mjs} +5 -5
- package/esm2020/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +159 -0
- package/esm2020/extensions/lib/components/extensible-form/extensible-form.component.mjs +64 -0
- package/esm2020/extensions/lib/components/extensible-table/extensible-table.component.mjs +128 -0
- package/esm2020/extensions/lib/components/grid-actions/grid-actions.component.mjs +39 -0
- package/esm2020/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +40 -0
- package/{esm2015/extensions/lib/constants/extra-properties.js → esm2020/extensions/lib/constants/extra-properties.mjs} +0 -0
- package/{esm2015/extensions/lib/directives/disabled.directive.js → esm2020/extensions/lib/directives/disabled.directive.mjs} +4 -4
- package/{esm2015/extensions/lib/directives/prop-data.directive.js → esm2020/extensions/lib/directives/prop-data.directive.mjs} +4 -4
- package/{esm2015/extensions/lib/enums/props.enum.js → esm2020/extensions/lib/enums/props.enum.mjs} +0 -0
- package/{esm2015/extensions/lib/models/actions.js → esm2020/extensions/lib/models/actions.mjs} +0 -0
- package/{esm2015/extensions/lib/models/entity-actions.js → esm2020/extensions/lib/models/entity-actions.mjs} +0 -0
- package/esm2020/extensions/lib/models/entity-props.mjs +36 -0
- package/{esm2015/extensions/lib/models/form-props.js → esm2020/extensions/lib/models/form-props.mjs} +0 -0
- package/{esm2015/extensions/lib/models/internal/object-extensions.js → esm2020/extensions/lib/models/internal/object-extensions.mjs} +0 -0
- package/{esm2015/extensions/lib/models/object-extensions.js → esm2020/extensions/lib/models/object-extensions.mjs} +0 -0
- package/{esm2015/extensions/lib/models/props.js → esm2020/extensions/lib/models/props.mjs} +0 -0
- package/{esm2015/extensions/lib/models/toolbar-actions.js → esm2020/extensions/lib/models/toolbar-actions.mjs} +0 -0
- package/{esm2015/extensions/lib/services/extensions.service.js → esm2020/extensions/lib/services/extensions.service.mjs} +4 -4
- package/{esm2015/extensions/lib/tokens/extensions.token.js → esm2020/extensions/lib/tokens/extensions.token.mjs} +0 -0
- package/{esm2015/extensions/lib/ui-extensions.module.js → esm2020/extensions/lib/ui-extensions.module.mjs} +9 -9
- package/{esm2015/extensions/lib/utils/actions.util.js → esm2020/extensions/lib/utils/actions.util.mjs} +0 -0
- package/{esm2015/extensions/lib/utils/enum.util.js → esm2020/extensions/lib/utils/enum.util.mjs} +0 -0
- package/{esm2015/extensions/lib/utils/factory.util.js → esm2020/extensions/lib/utils/factory.util.mjs} +0 -0
- package/{esm2015/extensions/lib/utils/form-props.util.js → esm2020/extensions/lib/utils/form-props.util.mjs} +0 -0
- package/{esm2015/extensions/lib/utils/localization.util.js → esm2020/extensions/lib/utils/localization.util.mjs} +0 -0
- package/{esm2015/extensions/lib/utils/props.util.js → esm2020/extensions/lib/utils/props.util.mjs} +0 -0
- package/{esm2015/extensions/lib/utils/state.util.js → esm2020/extensions/lib/utils/state.util.mjs} +2 -3
- package/{esm2015/extensions/lib/utils/typeahead.util.js → esm2020/extensions/lib/utils/typeahead.util.mjs} +0 -0
- package/{esm2015/extensions/lib/utils/validation.util.js → esm2020/extensions/lib/utils/validation.util.mjs} +0 -0
- package/{esm2015/extensions/public-api.js → esm2020/extensions/public-api.mjs} +0 -0
- package/{esm2015/lib/animations/bounce.animations.js → esm2020/lib/animations/bounce.animations.mjs} +0 -0
- package/{esm2015/lib/animations/collapse.animations.js → esm2020/lib/animations/collapse.animations.mjs} +0 -0
- package/{esm2015/lib/animations/fade.animations.js → esm2020/lib/animations/fade.animations.mjs} +0 -0
- package/{esm2015/lib/animations/index.js → esm2020/lib/animations/index.mjs} +0 -0
- package/{esm2015/lib/animations/modal.animations.js → esm2020/lib/animations/modal.animations.mjs} +0 -0
- package/{esm2015/lib/animations/slide.animations.js → esm2020/lib/animations/slide.animations.mjs} +0 -0
- package/{esm2015/lib/animations/toast.animations.js → esm2020/lib/animations/toast.animations.mjs} +0 -0
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +43 -0
- package/esm2020/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +19 -0
- package/esm2020/lib/components/button/button.component.mjs +97 -0
- package/esm2020/lib/components/confirmation/confirmation.component.mjs +36 -0
- package/esm2020/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +59 -0
- package/{esm2015/lib/components/index.js → esm2020/lib/components/index.mjs} +0 -0
- package/{esm2015/lib/components/loader-bar/loader-bar.component.js → esm2020/lib/components/loader-bar/loader-bar.component.mjs} +6 -11
- package/{esm2015/lib/components/loading/loading.component.js → esm2020/lib/components/loading/loading.component.mjs} +5 -5
- package/{esm2015/lib/components/modal/modal-close.directive.js → esm2020/lib/components/modal/modal-close.directive.mjs} +5 -6
- package/{esm2015/lib/components/modal/modal-ref.service.js → esm2020/lib/components/modal/modal-ref.service.mjs} +4 -4
- package/esm2020/lib/components/modal/modal.component.mjs +189 -0
- package/esm2020/lib/components/toast/toast.component.mjs +55 -0
- package/esm2020/lib/components/toast-container/toast-container.component.mjs +43 -0
- package/{esm2015/lib/constants/styles.js → esm2020/lib/constants/styles.mjs} +0 -0
- package/{esm2015/lib/constants/validation.js → esm2020/lib/constants/validation.mjs} +0 -0
- package/{esm2015/lib/directives/ellipsis.directive.js → esm2020/lib/directives/ellipsis.directive.mjs} +8 -8
- package/{esm2015/lib/directives/index.js → esm2020/lib/directives/index.mjs} +0 -0
- package/esm2020/lib/directives/loading.directive.mjs +89 -0
- package/{esm2015/lib/directives/ngx-datatable-default.directive.js → esm2020/lib/directives/ngx-datatable-default.directive.mjs} +4 -4
- package/{esm2015/lib/directives/ngx-datatable-list.directive.js → esm2020/lib/directives/ngx-datatable-list.directive.mjs} +4 -4
- package/{esm2015/lib/enums/index.js → esm2020/lib/enums/index.mjs} +0 -0
- package/{esm2015/lib/enums/route-names.js → esm2020/lib/enums/route-names.mjs} +0 -0
- package/{esm2015/lib/handlers/document-dir.handler.js → esm2020/lib/handlers/document-dir.handler.mjs} +4 -4
- package/esm2020/lib/handlers/error.handler.mjs +286 -0
- package/{esm2015/lib/handlers/index.js → esm2020/lib/handlers/index.mjs} +0 -0
- package/{esm2015/lib/models/common.js → esm2020/lib/models/common.mjs} +0 -0
- package/{esm2015/lib/models/confirmation.js → esm2020/lib/models/confirmation.mjs} +0 -0
- package/esm2020/lib/models/index.mjs +7 -0
- package/esm2020/lib/models/nav-item.mjs +7 -0
- package/{esm2015/lib/models/statistics.js → esm2020/lib/models/statistics.mjs} +0 -0
- package/{esm2015/lib/models/toaster.js → esm2020/lib/models/toaster.mjs} +0 -0
- package/esm2020/lib/models/user-menu.mjs +4 -0
- package/{esm2015/lib/providers/index.js → esm2020/lib/providers/index.mjs} +0 -0
- package/{esm2015/lib/providers/ng-bootstrap-config.provider.js → esm2020/lib/providers/ng-bootstrap-config.provider.mjs} +0 -0
- package/{esm2015/lib/providers/route.provider.js → esm2020/lib/providers/route.provider.mjs} +0 -0
- package/esm2020/lib/services/abstract-menu.service.mjs +50 -0
- package/{esm2015/lib/services/confirmation.service.js → esm2020/lib/services/confirmation.service.mjs} +4 -4
- package/{esm2015/lib/services/index.js → esm2020/lib/services/index.mjs} +2 -1
- package/esm2020/lib/services/nav-items.service.mjs +17 -0
- package/esm2020/lib/services/page-alert.service.mjs +28 -0
- package/esm2020/lib/services/toaster.service.mjs +103 -0
- package/esm2020/lib/services/user-menu.service.mjs +17 -0
- package/esm2020/lib/theme-shared.module.mjs +162 -0
- package/{esm2015/lib/tokens/append-content.token.js → esm2020/lib/tokens/append-content.token.mjs} +0 -0
- package/esm2020/lib/tokens/http-error.token.mjs +14 -0
- package/{esm2015/lib/tokens/index.js → esm2020/lib/tokens/index.mjs} +0 -0
- package/{esm2015/lib/tokens/ngx-datatable-messages.token.js → esm2020/lib/tokens/ngx-datatable-messages.token.mjs} +0 -0
- package/{esm2015/lib/tokens/suppress-unsaved-changes-warning.token.js → esm2020/lib/tokens/suppress-unsaved-changes-warning.token.mjs} +0 -0
- package/{esm2015/lib/utils/date-parser-formatter.js → esm2020/lib/utils/date-parser-formatter.mjs} +5 -6
- package/{esm2015/lib/utils/index.js → esm2020/lib/utils/index.mjs} +0 -0
- package/{esm2015/lib/utils/validation-utils.js → esm2020/lib/utils/validation-utils.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/{esm2015/testing/abp-ng.theme.shared-testing.js → esm2020/testing/abp-ng.theme.shared-testing.mjs} +0 -0
- package/{esm2015/testing/lib/models/config.js → esm2020/testing/lib/models/config.mjs} +0 -0
- package/{esm2015/testing/lib/models/index.js → esm2020/testing/lib/models/index.mjs} +0 -0
- package/esm2020/testing/lib/theme-shared-testing.module.mjs +46 -0
- package/{esm2015/testing/public-api.js → esm2020/testing/public-api.mjs} +0 -0
- package/extensions/lib/models/entity-props.d.ts +1 -1
- package/extensions/lib/tokens/extensions.token.d.ts +1 -1
- package/extensions/package.json +5 -5
- package/fesm2015/abp-ng.theme.shared-extensions.mjs +1329 -0
- package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +1 -0
- package/fesm2015/{abp-ng.theme.shared-testing.js → abp-ng.theme.shared-testing.mjs} +5 -5
- package/fesm2015/abp-ng.theme.shared-testing.mjs.map +1 -0
- package/fesm2015/{abp-ng.theme.shared.js → abp-ng.theme.shared.mjs} +174 -175
- package/fesm2015/abp-ng.theme.shared.mjs.map +1 -0
- package/{fesm2015/abp-ng.theme.shared-extensions.js → fesm2020/abp-ng.theme.shared-extensions.mjs} +80 -99
- package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +1 -0
- package/fesm2020/abp-ng.theme.shared-testing.mjs +57 -0
- package/fesm2020/abp-ng.theme.shared-testing.mjs.map +1 -0
- package/fesm2020/abp-ng.theme.shared.mjs +2202 -0
- package/fesm2020/abp-ng.theme.shared.mjs.map +1 -0
- package/lib/models/index.d.ts +2 -1
- package/lib/models/user-menu.d.ts +8 -0
- package/lib/services/abstract-menu.service.d.ts +12 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/nav-items.service.d.ts +3 -8
- package/lib/services/user-menu.service.d.ts +8 -0
- package/package.json +38 -8
- package/testing/package.json +5 -5
- package/bundles/abp-ng.theme.shared-extensions.umd.js +0 -1904
- package/bundles/abp-ng.theme.shared-extensions.umd.js.map +0 -1
- package/bundles/abp-ng.theme.shared-testing.umd.js +0 -82
- package/bundles/abp-ng.theme.shared-testing.umd.js.map +0 -1
- package/bundles/abp-ng.theme.shared.umd.js +0 -2506
- package/bundles/abp-ng.theme.shared.umd.js.map +0 -1
- package/esm2015/extensions/lib/adapters/date-time.adapter.js +0 -34
- package/esm2015/extensions/lib/components/extensible-form/extensible-form-prop.component.js +0 -164
- package/esm2015/extensions/lib/components/extensible-form/extensible-form.component.js +0 -70
- package/esm2015/extensions/lib/components/extensible-table/extensible-table.component.js +0 -134
- package/esm2015/extensions/lib/components/grid-actions/grid-actions.component.js +0 -45
- package/esm2015/extensions/lib/components/page-toolbar/page-toolbar.component.js +0 -46
- package/esm2015/extensions/lib/models/entity-props.js +0 -34
- package/esm2015/lib/components/breadcrumb/breadcrumb.component.js +0 -49
- package/esm2015/lib/components/breadcrumb-items/breadcrumb-items.component.js +0 -22
- package/esm2015/lib/components/button/button.component.js +0 -98
- package/esm2015/lib/components/confirmation/confirmation.component.js +0 -40
- package/esm2015/lib/components/http-error-wrapper/http-error-wrapper.component.js +0 -65
- package/esm2015/lib/components/modal/modal.component.js +0 -188
- package/esm2015/lib/components/toast/toast.component.js +0 -61
- package/esm2015/lib/components/toast-container/toast-container.component.js +0 -49
- package/esm2015/lib/directives/loading.directive.js +0 -90
- package/esm2015/lib/handlers/error.handler.js +0 -292
- package/esm2015/lib/models/index.js +0 -6
- package/esm2015/lib/models/nav-item.js +0 -7
- package/esm2015/lib/services/nav-items.service.js +0 -51
- package/esm2015/lib/services/page-alert.service.js +0 -26
- package/esm2015/lib/services/toaster.service.js +0 -103
- package/esm2015/lib/theme-shared.module.js +0 -165
- package/esm2015/lib/tokens/http-error.token.js +0 -10
- package/esm2015/testing/lib/theme-shared-testing.module.js +0 -43
- package/fesm2015/abp-ng.theme.shared-extensions.js.map +0 -1
- package/fesm2015/abp-ng.theme.shared-testing.js.map +0 -1
- package/fesm2015/abp-ng.theme.shared.js.map +0 -1
|
@@ -1,1904 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@ng-bootstrap/ng-bootstrap'), require('@angular/forms'), require('@ngx-validate/core'), require('@abp/ng.core'), require('rxjs'), require('rxjs/operators'), require('@abp/utils'), require('@swimlane/ngx-datatable'), require('@abp/ng.theme.shared')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@abp/ng.theme.shared/extensions', ['exports', '@angular/core', '@angular/common', '@ng-bootstrap/ng-bootstrap', '@angular/forms', '@ngx-validate/core', '@abp/ng.core', 'rxjs', 'rxjs/operators', '@abp/utils', '@swimlane/ngx-datatable', '@abp/ng.theme.shared'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abp = global.abp || {}, global.abp.ng = global.abp.ng || {}, global.abp.ng.theme = global.abp.ng.theme || {}, global.abp.ng.theme.shared = global.abp.ng.theme.shared || {}, global.abp.ng.theme.shared.extensions = {}), global.ng.core, global.ng.common, global.i2, global.ng.forms, global.i6, global.i1, global.rxjs, global.rxjs.operators, global.utils, global.i2$2, global.abp.ng.theme.shared));
|
|
5
|
-
})(this, (function (exports, i0, i5, i2, i2$1, i6, i1, rxjs, operators, utils, i2$2, i4) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
29
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
30
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
-
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
32
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
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
|
|
67
|
-
}] });
|
|
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;
|
|
385
|
-
}
|
|
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
|
|
427
|
-
}] });
|
|
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));
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
function selfFactory(dependency) {
|
|
466
|
-
return dependency;
|
|
467
|
-
}
|
|
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]", 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
|
-
}] } });
|
|
532
|
-
|
|
533
|
-
var EXTRA_PROPERTIES_KEY = 'extraProperties';
|
|
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, '');
|
|
585
|
-
}
|
|
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
|
|
614
|
-
}] } });
|
|
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)\">\r\n <ng-template ngSwitchCase=\"input\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"hidden\">\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"checkbox\">\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n ></ng-template>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"select\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"multiselect\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n multiple=\"multiple\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"typeahead\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"date\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"time\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"dateTime\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"textarea\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n </ng-template>\r\n</div>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\"\r\n >{{ prop.displayName | abpLocalization }} {{ asterisk }}</label\r\n >\r\n</ng-template>\r\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
|
-
}
|
|
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');
|
|
774
|
-
var PROP_DATA_STREAM = new i0.InjectionToken('PROP_DATA_STREAM');
|
|
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;
|
|
840
|
-
}());
|
|
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;
|
|
882
|
-
}(Action));
|
|
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;
|
|
952
|
-
}());
|
|
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 = options.valueResolver || (function (data) { return rxjs.of(data.record[_this.name]); });
|
|
986
|
-
_this.action = options.action;
|
|
987
|
-
_this.component = options.component;
|
|
988
|
-
_this.enumList = options.enumList;
|
|
989
|
-
return _this;
|
|
990
|
-
}
|
|
991
|
-
EntityProp.create = function (options) {
|
|
992
|
-
return new EntityProp(options);
|
|
993
|
-
};
|
|
994
|
-
EntityProp.createMany = function (arrayOfOptions) {
|
|
995
|
-
return arrayOfOptions.map(EntityProp.create);
|
|
996
|
-
};
|
|
997
|
-
return EntityProp;
|
|
998
|
-
}(Prop));
|
|
999
|
-
|
|
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;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
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;
|
|
1126
|
-
}(Action));
|
|
1127
|
-
|
|
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
|
-
}]
|
|
1145
|
-
}] });
|
|
1146
|
-
|
|
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']
|
|
1185
|
-
}] } });
|
|
1186
|
-
|
|
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\">\r\n <ng-container *abpPropData=\"let data; fromList: propList; withRecord: record\">\r\n <ng-container *ngFor=\"let prop of propList; let first = first; trackBy: track.by('name')\">\r\n <ng-container *ngIf=\"prop.visible(data)\">\r\n <ng-container\r\n [formGroupName]=\"extraPropertiesKey\"\r\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\r\n >\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"></abp-extensible-form-prop>\r\n </ng-container>\r\n\r\n <ng-template #tempDefault>\r\n <abp-extensible-form-prop\r\n *ngIf=\"form.get(prop.name)\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n ></abp-extensible-form-prop>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>\r\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: [
|
|
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
|
|
1254
|
-
}] } });
|
|
1255
|
-
|
|
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
|
|
1277
|
-
}] } });
|
|
1278
|
-
|
|
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\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <ng-container\r\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-container\r\n *ngIf=\"actionList.length === 1\"\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n></ng-container>\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\r\n <ng-template #ellipsis>\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n *abpPermission=\"action.permission\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n class=\"btn btn-primary text-center\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\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 });
|
|
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
|
|
1317
|
-
}] } });
|
|
1318
|
-
|
|
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\">\r\n <ngx-datatable-column\r\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\r\n <ngx-datatable-column\r\n [width]=\"columnWidths[i + 1] || 200\"\r\n [name]=\"prop.displayName | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission\">\r\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\r\n <div\r\n *ngIf=\"!row['_' + prop.name].component; else component\"\r\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #component>\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ng-container>\r\n</ngx-datatable>\r\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
|
|
1457
|
-
}] } });
|
|
1458
|
-
|
|
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\">\r\n <div\r\n class=\"col-auto px-1 pt-0 pt-md-2\"\r\n [class.pe-0]=\"last\"\r\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\r\n >\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <ng-container *abpPermission=\"action.permission\">\r\n <ng-container *ngIf=\"action.component as component; else button\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: createInjector(action)\"\r\n ></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #button>\r\n <button (click)=\"action.action(data)\" type=\"button\" class=\"btn btn-primary btn-sm\">\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n {{ action.text | abpLocalization }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\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
|
-
}]
|
|
1504
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
1505
|
-
|
|
1506
|
-
var objectExtensions = /*#__PURE__*/Object.freeze({
|
|
1507
|
-
__proto__: null
|
|
1508
|
-
});
|
|
1509
|
-
|
|
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
|
-
}]
|
|
1592
|
-
}] });
|
|
1593
|
-
|
|
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
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
|
|
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;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
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
|
-
});
|
|
1666
|
-
}
|
|
1667
|
-
|
|
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();
|
|
1708
|
-
}
|
|
1709
|
-
|
|
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
|
-
};
|
|
1720
|
-
}
|
|
1721
|
-
|
|
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;
|
|
1730
|
-
}
|
|
1731
|
-
|
|
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';
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
/**
|
|
1849
|
-
* Generated bundle index. Do not edit.
|
|
1850
|
-
*/
|
|
1851
|
-
|
|
1852
|
-
exports.ActionList = ActionList;
|
|
1853
|
-
exports.BaseUiExtensionsModule = BaseUiExtensionsModule;
|
|
1854
|
-
exports.CreateFormPropsFactory = CreateFormPropsFactory;
|
|
1855
|
-
exports.DateAdapter = DateAdapter;
|
|
1856
|
-
exports.DateTimeAdapter = DateTimeAdapter;
|
|
1857
|
-
exports.DateTimePickerComponent = DateTimePickerComponent;
|
|
1858
|
-
exports.DisabledDirective = DisabledDirective;
|
|
1859
|
-
exports.EXTENSIONS_ACTION_CALLBACK = EXTENSIONS_ACTION_CALLBACK;
|
|
1860
|
-
exports.EXTENSIONS_ACTION_DATA = EXTENSIONS_ACTION_DATA;
|
|
1861
|
-
exports.EXTENSIONS_ACTION_TYPE = EXTENSIONS_ACTION_TYPE;
|
|
1862
|
-
exports.EXTENSIONS_IDENTIFIER = EXTENSIONS_IDENTIFIER;
|
|
1863
|
-
exports.EXTRA_PROPERTIES_KEY = EXTRA_PROPERTIES_KEY;
|
|
1864
|
-
exports.EditFormPropsFactory = EditFormPropsFactory;
|
|
1865
|
-
exports.EntityAction = EntityAction;
|
|
1866
|
-
exports.EntityActionList = EntityActionList;
|
|
1867
|
-
exports.EntityActions = EntityActions;
|
|
1868
|
-
exports.EntityActionsFactory = EntityActionsFactory;
|
|
1869
|
-
exports.EntityProp = EntityProp;
|
|
1870
|
-
exports.EntityPropList = EntityPropList;
|
|
1871
|
-
exports.EntityProps = EntityProps;
|
|
1872
|
-
exports.EntityPropsFactory = EntityPropsFactory;
|
|
1873
|
-
exports.ExtensibleFormComponent = ExtensibleFormComponent;
|
|
1874
|
-
exports.ExtensibleFormPropComponent = ExtensibleFormPropComponent;
|
|
1875
|
-
exports.ExtensibleTableComponent = ExtensibleTableComponent;
|
|
1876
|
-
exports.ExtensionsService = ExtensionsService;
|
|
1877
|
-
exports.FormProp = FormProp;
|
|
1878
|
-
exports.FormPropData = FormPropData;
|
|
1879
|
-
exports.FormPropList = FormPropList;
|
|
1880
|
-
exports.FormProps = FormProps;
|
|
1881
|
-
exports.GridActionsComponent = GridActionsComponent;
|
|
1882
|
-
exports.ObjectExtensions = objectExtensions;
|
|
1883
|
-
exports.PROP_DATA_STREAM = PROP_DATA_STREAM;
|
|
1884
|
-
exports.PageToolbarComponent = PageToolbarComponent;
|
|
1885
|
-
exports.PropDataDirective = PropDataDirective;
|
|
1886
|
-
exports.PropList = PropList;
|
|
1887
|
-
exports.TimeAdapter = TimeAdapter;
|
|
1888
|
-
exports.ToolbarAction = ToolbarAction;
|
|
1889
|
-
exports.ToolbarActionList = ToolbarActionList;
|
|
1890
|
-
exports.ToolbarActions = ToolbarActions;
|
|
1891
|
-
exports.ToolbarActionsFactory = ToolbarActionsFactory;
|
|
1892
|
-
exports.ToolbarComponent = ToolbarComponent;
|
|
1893
|
-
exports.UiExtensionsModule = UiExtensionsModule;
|
|
1894
|
-
exports.createExtraPropertyValueResolver = createExtraPropertyValueResolver;
|
|
1895
|
-
exports.generateFormFromProps = generateFormFromProps;
|
|
1896
|
-
exports.getObjectExtensionEntitiesFromStore = getObjectExtensionEntitiesFromStore;
|
|
1897
|
-
exports.mapEntitiesToContributors = mapEntitiesToContributors;
|
|
1898
|
-
exports.mergeWithDefaultActions = mergeWithDefaultActions;
|
|
1899
|
-
exports.mergeWithDefaultProps = mergeWithDefaultProps;
|
|
1900
|
-
|
|
1901
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1902
|
-
|
|
1903
|
-
}));
|
|
1904
|
-
//# sourceMappingURL=abp-ng.theme.shared-extensions.umd.js.map
|