@ngageoint/mage.web-core-lib 6.2.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/README.md +24 -0
- package/bundles/ngageoint-mage.web-core-lib-common.umd.js +146 -0
- package/bundles/ngageoint-mage.web-core-lib-common.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-common.umd.min.js +2 -0
- package/bundles/ngageoint-mage.web-core-lib-common.umd.min.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-event.umd.js +14 -0
- package/bundles/ngageoint-mage.web-core-lib-event.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-event.umd.min.js +2 -0
- package/bundles/ngageoint-mage.web-core-lib-event.umd.min.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-feed.umd.js +114 -0
- package/bundles/ngageoint-mage.web-core-lib-feed.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-feed.umd.min.js +2 -0
- package/bundles/ngageoint-mage.web-core-lib-feed.umd.min.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-paging.umd.js +313 -0
- package/bundles/ngageoint-mage.web-core-lib-paging.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-paging.umd.min.js +16 -0
- package/bundles/ngageoint-mage.web-core-lib-paging.umd.min.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-plugin.umd.js +11 -0
- package/bundles/ngageoint-mage.web-core-lib-plugin.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-plugin.umd.min.js +2 -0
- package/bundles/ngageoint-mage.web-core-lib-plugin.umd.min.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-static-icon.umd.js +391 -0
- package/bundles/ngageoint-mage.web-core-lib-static-icon.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-static-icon.umd.min.js +2 -0
- package/bundles/ngageoint-mage.web-core-lib-static-icon.umd.min.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-user.umd.js +492 -0
- package/bundles/ngageoint-mage.web-core-lib-user.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib-user.umd.min.js +16 -0
- package/bundles/ngageoint-mage.web-core-lib-user.umd.min.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib.umd.js +32 -0
- package/bundles/ngageoint-mage.web-core-lib.umd.js.map +1 -0
- package/bundles/ngageoint-mage.web-core-lib.umd.min.js +2 -0
- package/bundles/ngageoint-mage.web-core-lib.umd.min.js.map +1 -0
- package/common/mage-common.module.d.ts +7 -0
- package/common/ngageoint-mage.web-core-lib-common.d.ts +5 -0
- package/common/package.json +12 -0
- package/common/public-api.d.ts +2 -0
- package/common/xhr-img.component.d.ts +58 -0
- package/esm2015/common/mage-common.module.js +26 -0
- package/esm2015/common/ngageoint-mage.web-core-lib-common.js +5 -0
- package/esm2015/common/public-api.js +3 -0
- package/esm2015/common/xhr-img.component.js +109 -0
- package/esm2015/event/event-read.service.js +3 -0
- package/esm2015/event/event.model.js +1 -0
- package/esm2015/event/ngageoint-mage.web-core-lib-event.js +5 -0
- package/esm2015/event/public-api.js +2 -0
- package/esm2015/feed/feed.model.js +1 -0
- package/esm2015/feed/feed.service.js +105 -0
- package/esm2015/feed/ngageoint-mage.web-core-lib-feed.js +5 -0
- package/esm2015/feed/public-api.js +2 -0
- package/esm2015/mage-core-lib.module.js +20 -0
- package/esm2015/ngageoint-mage.web-core-lib.js +5 -0
- package/esm2015/paging/ngageoint-mage.web-core-lib-paging.js +5 -0
- package/esm2015/paging/paging.cdk-data-source.adapter.js +52 -0
- package/esm2015/paging/paging.model.js +25 -0
- package/esm2015/paging/public-api.js +3 -0
- package/esm2015/plugin/ngageoint-mage.web-core-lib-plugin.js +4 -0
- package/esm2015/plugin/plugin.model.js +1 -0
- package/esm2015/plugin/public-api.js +1 -0
- package/esm2015/public-api.js +5 -0
- package/esm2015/static-icon/ngageoint-mage.web-core-lib-static-icon.js +5 -0
- package/esm2015/static-icon/public-api.js +7 -0
- package/esm2015/static-icon/static-icon-form-field/static-icon-form-field.component.js +152 -0
- package/esm2015/static-icon/static-icon-img/static-icon-img.component.js +35 -0
- package/esm2015/static-icon/static-icon-select/static-icon-select.component.js +61 -0
- package/esm2015/static-icon/static-icon.model.js +10 -0
- package/esm2015/static-icon/static-icon.module.js +55 -0
- package/esm2015/static-icon/static-icon.service.js +82 -0
- package/esm2015/user/ngageoint-mage.web-core-lib-user.js +5 -0
- package/esm2015/user/public-api.js +4 -0
- package/esm2015/user/user-read.service.js +40 -0
- package/esm2015/user/user-select/user-select.component.js +165 -0
- package/esm2015/user/user.model.js +1 -0
- package/esm2015/user/user.module.js +65 -0
- package/esm5/common/mage-common.module.js +30 -0
- package/esm5/common/ngageoint-mage.web-core-lib-common.js +5 -0
- package/esm5/common/public-api.js +3 -0
- package/esm5/common/xhr-img.component.js +112 -0
- package/esm5/event/event-read.service.js +3 -0
- package/esm5/event/event.model.js +1 -0
- package/esm5/event/ngageoint-mage.web-core-lib-event.js +5 -0
- package/esm5/event/public-api.js +2 -0
- package/esm5/feed/feed.model.js +1 -0
- package/esm5/feed/feed.service.js +108 -0
- package/esm5/feed/ngageoint-mage.web-core-lib-feed.js +5 -0
- package/esm5/feed/public-api.js +2 -0
- package/esm5/mage-core-lib.module.js +24 -0
- package/esm5/ngageoint-mage.web-core-lib.js +5 -0
- package/esm5/paging/ngageoint-mage.web-core-lib-paging.js +5 -0
- package/esm5/paging/paging.cdk-data-source.adapter.js +60 -0
- package/esm5/paging/paging.model.js +25 -0
- package/esm5/paging/public-api.js +3 -0
- package/esm5/plugin/ngageoint-mage.web-core-lib-plugin.js +4 -0
- package/esm5/plugin/plugin.model.js +1 -0
- package/esm5/plugin/public-api.js +1 -0
- package/esm5/public-api.js +5 -0
- package/esm5/static-icon/ngageoint-mage.web-core-lib-static-icon.js +5 -0
- package/esm5/static-icon/public-api.js +7 -0
- package/esm5/static-icon/static-icon-form-field/static-icon-form-field.component.js +157 -0
- package/esm5/static-icon/static-icon-img/static-icon-img.component.js +38 -0
- package/esm5/static-icon/static-icon-select/static-icon-select.component.js +65 -0
- package/esm5/static-icon/static-icon.model.js +10 -0
- package/esm5/static-icon/static-icon.module.js +59 -0
- package/esm5/static-icon/static-icon.service.js +84 -0
- package/esm5/user/ngageoint-mage.web-core-lib-user.js +5 -0
- package/esm5/user/public-api.js +4 -0
- package/esm5/user/user-read.service.js +42 -0
- package/esm5/user/user-select/user-select.component.js +175 -0
- package/esm5/user/user.model.js +1 -0
- package/esm5/user/user.module.js +69 -0
- package/event/event-read.service.d.ts +11 -0
- package/event/event.model.d.ts +6 -0
- package/event/ngageoint-mage.web-core-lib-event.d.ts +5 -0
- package/event/package.json +12 -0
- package/event/public-api.d.ts +2 -0
- package/feed/feed.model.d.ts +83 -0
- package/feed/feed.service.d.ts +40 -0
- package/feed/ngageoint-mage.web-core-lib-feed.d.ts +5 -0
- package/feed/package.json +12 -0
- package/feed/public-api.d.ts +2 -0
- package/fesm2015/ngageoint-mage.web-core-lib-common.js +137 -0
- package/fesm2015/ngageoint-mage.web-core-lib-common.js.map +1 -0
- package/fesm2015/ngageoint-mage.web-core-lib-event.js +10 -0
- package/fesm2015/ngageoint-mage.web-core-lib-event.js.map +1 -0
- package/fesm2015/ngageoint-mage.web-core-lib-feed.js +111 -0
- package/fesm2015/ngageoint-mage.web-core-lib-feed.js.map +1 -0
- package/fesm2015/ngageoint-mage.web-core-lib-paging.js +83 -0
- package/fesm2015/ngageoint-mage.web-core-lib-paging.js.map +1 -0
- package/fesm2015/ngageoint-mage.web-core-lib-plugin.js +4 -0
- package/fesm2015/ngageoint-mage.web-core-lib-plugin.js.map +1 -0
- package/fesm2015/ngageoint-mage.web-core-lib-static-icon.js +379 -0
- package/fesm2015/ngageoint-mage.web-core-lib-static-icon.js.map +1 -0
- package/fesm2015/ngageoint-mage.web-core-lib-user.js +267 -0
- package/fesm2015/ngageoint-mage.web-core-lib-user.js.map +1 -0
- package/fesm2015/ngageoint-mage.web-core-lib.js +30 -0
- package/fesm2015/ngageoint-mage.web-core-lib.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib-common.js +142 -0
- package/fesm5/ngageoint-mage.web-core-lib-common.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib-event.js +10 -0
- package/fesm5/ngageoint-mage.web-core-lib-event.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib-feed.js +113 -0
- package/fesm5/ngageoint-mage.web-core-lib-feed.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib-paging.js +90 -0
- package/fesm5/ngageoint-mage.web-core-lib-paging.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib-plugin.js +4 -0
- package/fesm5/ngageoint-mage.web-core-lib-plugin.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib-static-icon.js +392 -0
- package/fesm5/ngageoint-mage.web-core-lib-static-icon.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib-user.js +280 -0
- package/fesm5/ngageoint-mage.web-core-lib-user.js.map +1 -0
- package/fesm5/ngageoint-mage.web-core-lib.js +33 -0
- package/fesm5/ngageoint-mage.web-core-lib.js.map +1 -0
- package/mage-core-lib.module.d.ts +6 -0
- package/ngageoint-mage.web-core-lib.d.ts +5 -0
- package/package.json +35 -0
- package/paging/ngageoint-mage.web-core-lib-paging.d.ts +5 -0
- package/paging/package.json +12 -0
- package/paging/paging.cdk-data-source.adapter.d.ts +20 -0
- package/paging/paging.model.d.ts +27 -0
- package/paging/public-api.d.ts +2 -0
- package/plugin/ngageoint-mage.web-core-lib-plugin.d.ts +5 -0
- package/plugin/package.json +12 -0
- package/plugin/plugin.model.d.ts +13 -0
- package/plugin/public-api.d.ts +1 -0
- package/public-api.d.ts +1 -0
- package/static-icon/ngageoint-mage.web-core-lib-static-icon.d.ts +5 -0
- package/static-icon/package.json +12 -0
- package/static-icon/public-api.d.ts +6 -0
- package/static-icon/static-icon-form-field/static-icon-form-field.component.d.ts +31 -0
- package/static-icon/static-icon-img/static-icon-img.component.d.ts +12 -0
- package/static-icon/static-icon-select/static-icon-select.component.d.ts +21 -0
- package/static-icon/static-icon.model.d.ts +19 -0
- package/static-icon/static-icon.module.d.ts +13 -0
- package/static-icon/static-icon.service.d.ts +20 -0
- package/user/ngageoint-mage.web-core-lib-user.d.ts +5 -0
- package/user/package.json +12 -0
- package/user/public-api.d.ts +4 -0
- package/user/user-read.service.d.ts +24 -0
- package/user/user-select/user-select.component.d.ts +38 -0
- package/user/user.model.d.ts +85 -0
- package/user/user.module.d.ts +16 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { __extends, __spread } from 'tslib';
|
|
2
|
+
import { DataSource } from '@angular/cdk/collections';
|
|
3
|
+
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
var pageForItemIndex = function (itemIndex, pageSize) {
|
|
6
|
+
if (typeof pageSize === 'object') {
|
|
7
|
+
pageSize = pageSize.pageSize;
|
|
8
|
+
}
|
|
9
|
+
return Math.floor(itemIndex / pageSize);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Return the range of item indexes for the given page and page size. The last
|
|
13
|
+
* end portion of the range is exclusive, so when indexing an array the last
|
|
14
|
+
* item of the page would have position `end - 1`. This allows one to pass the
|
|
15
|
+
* values to `Array.slice()`.
|
|
16
|
+
* @param pageIndex
|
|
17
|
+
* @param pageSize
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
var itemRangeOfPage = function (pageIndex, pageSize) {
|
|
21
|
+
if (typeof pageIndex === 'object') {
|
|
22
|
+
pageSize = pageIndex.pageSize;
|
|
23
|
+
pageIndex = pageIndex.pageIndex;
|
|
24
|
+
}
|
|
25
|
+
var start = pageSize * pageIndex;
|
|
26
|
+
var end = start + pageSize;
|
|
27
|
+
return [start, end];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This class is an adaptation from the [Angular Material Guide](https://v8.material.angular.io/cdk/scrolling/overview), _"Specifying data" example_, also
|
|
32
|
+
* available on [StackBlitz](https://stackblitz.com/angular/mrbkjagnnra?file=src%2Fapp%2Fcdk-virtual-scroll-data-source-example.ts).
|
|
33
|
+
*/
|
|
34
|
+
var PagingDataSource = /** @class */ (function (_super) {
|
|
35
|
+
__extends(PagingDataSource, _super);
|
|
36
|
+
function PagingDataSource(pageSize, fetchPage) {
|
|
37
|
+
var _this = _super.call(this) || this;
|
|
38
|
+
_this.pageSize = pageSize;
|
|
39
|
+
_this.fetchPage = fetchPage;
|
|
40
|
+
_this.data = null;
|
|
41
|
+
_this.data$ = new BehaviorSubject([]);
|
|
42
|
+
_this.fetchedPages = new Set();
|
|
43
|
+
_this.subscription = new Subscription();
|
|
44
|
+
return _this;
|
|
45
|
+
}
|
|
46
|
+
PagingDataSource.prototype.connect = function (collectionViewer) {
|
|
47
|
+
var _this = this;
|
|
48
|
+
this.subscription.add(collectionViewer.viewChange.subscribe(function (range) {
|
|
49
|
+
var startPage = _this.pageForItemIndex(range.start);
|
|
50
|
+
var endPage = _this.pageForItemIndex(range.end - 1);
|
|
51
|
+
for (var page = startPage; page <= endPage; page++) {
|
|
52
|
+
_this.fetch(page);
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
return this.data$;
|
|
56
|
+
};
|
|
57
|
+
PagingDataSource.prototype.disconnect = function () {
|
|
58
|
+
this.subscription.unsubscribe();
|
|
59
|
+
};
|
|
60
|
+
PagingDataSource.prototype.pageForItemIndex = function (index) {
|
|
61
|
+
return pageForItemIndex(index, this.pageSize);
|
|
62
|
+
};
|
|
63
|
+
PagingDataSource.prototype.fetch = function (pageIndex) {
|
|
64
|
+
var _this = this;
|
|
65
|
+
if (this.fetchedPages.has(pageIndex)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.fetchedPages.add(pageIndex);
|
|
69
|
+
var includeTotalCount = !this.data;
|
|
70
|
+
this.fetchPage({ pageSize: this.pageSize, pageIndex: pageIndex, includeTotalCount: includeTotalCount }).subscribe(function (page) {
|
|
71
|
+
var _a;
|
|
72
|
+
if (!_this.data) {
|
|
73
|
+
if (typeof (page.totalCount) !== 'number') {
|
|
74
|
+
throw new Error('data is null and no total count is available to inform allocation');
|
|
75
|
+
}
|
|
76
|
+
_this.data = Array.from({ length: page.totalCount });
|
|
77
|
+
}
|
|
78
|
+
(_a = _this.data).splice.apply(_a, __spread([pageIndex * _this.pageSize, _this.pageSize], page.items));
|
|
79
|
+
_this.data$.next(_this.data);
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
return PagingDataSource;
|
|
83
|
+
}(DataSource));
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Generated bundle index. Do not edit.
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
export { PagingDataSource, itemRangeOfPage, pageForItemIndex };
|
|
90
|
+
//# sourceMappingURL=ngageoint-mage.web-core-lib-paging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngageoint-mage.web-core-lib-paging.js","sources":["ng://@ngageoint/mage.web-core-lib/paging/paging.model.ts","ng://@ngageoint/mage.web-core-lib/paging/paging.cdk-data-source.adapter.ts","ng://@ngageoint/mage.web-core-lib/paging/ngageoint-mage.web-core-lib-paging.ts"],"sourcesContent":["\nexport interface PagingParameters {\n pageSize: number,\n pageIndex: number,\n includeTotalCount?: boolean | null\n}\n\nexport interface PageOf<T> {\n pageSize: number,\n pageIndex: number,\n totalCount?: number | null,\n next?: PagingParameters | null\n prev?: PagingParameters | null\n items: T[]\n}\n\nexport const pageForItemIndex = (itemIndex: number, pageSize: number | PagingParameters): number => {\n if (typeof pageSize === 'object') {\n pageSize = pageSize.pageSize\n }\n return Math.floor(itemIndex / pageSize)\n}\n\n/**\n * Return the range of item indexes for the given page and page size. The last\n * end portion of the range is exclusive, so when indexing an array the last\n * item of the page would have position `end - 1`. This allows one to pass the\n * values to `Array.slice()`.\n * @param pageIndex\n * @param pageSize\n * @returns\n */\nexport const itemRangeOfPage: {\n (pageIndex: number, pageSize: number): [ number, number ]\n (paging: PagingParameters)\n} = (pageIndex: number | PagingParameters, pageSize?: number): [ number, number ] => {\n if (typeof pageIndex === 'object') {\n pageSize = pageIndex.pageSize\n pageIndex = pageIndex.pageIndex\n }\n const start = pageSize * pageIndex\n const end = start + pageSize\n return [ start, end ]\n}\n","import { CollectionViewer, DataSource } from '@angular/cdk/collections'\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs'\nimport { pageForItemIndex, PageOf, PagingParameters } from './paging.model'\n\n/**\n * This class is an adaptation from the [Angular Material Guide](https://v8.material.angular.io/cdk/scrolling/overview), _\"Specifying data\" example_, also\n * available on [StackBlitz](https://stackblitz.com/angular/mrbkjagnnra?file=src%2Fapp%2Fcdk-virtual-scroll-data-source-example.ts).\n */\nexport class PagingDataSource<T> extends DataSource<T> {\n\n private data: T[] | null = null\n private data$ = new BehaviorSubject<T[]>([])\n private fetchedPages = new Set<number>()\n private subscription = new Subscription()\n\n constructor(private pageSize: number, private fetchPage: (paging: PagingParameters) => Observable<PageOf<T>>) {\n super()\n }\n\n connect(collectionViewer: CollectionViewer): Observable<T[]> {\n this.subscription.add(collectionViewer.viewChange.subscribe(range => {\n const startPage = this.pageForItemIndex(range.start)\n const endPage = this.pageForItemIndex(range.end - 1)\n for (let page = startPage; page <= endPage; page++) {\n this.fetch(page)\n }\n }))\n return this.data$\n }\n\n disconnect(): void {\n this.subscription.unsubscribe()\n }\n\n private pageForItemIndex(index: number): number {\n return pageForItemIndex(index, this.pageSize)\n }\n\n private fetch(pageIndex: number) {\n if (this.fetchedPages.has(pageIndex)) {\n return\n }\n this.fetchedPages.add(pageIndex)\n const includeTotalCount = !this.data\n this.fetchPage({ pageSize: this.pageSize, pageIndex: pageIndex, includeTotalCount }).subscribe(page => {\n if (!this.data) {\n if (typeof(page.totalCount) !== 'number') {\n throw new Error('data is null and no total count is available to inform allocation')\n }\n this.data = Array.from({ length: page.totalCount })\n }\n this.data.splice(pageIndex * this.pageSize, this.pageSize, ...page.items)\n this.data$.next(this.data)\n })\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;IAgBa,gBAAgB,GAAG,UAAC,SAAiB,EAAE,QAAmC;IACrF,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAA;KAC7B;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAA;AACzC,EAAC;AAED;;;;;;;;;IASa,eAAe,GAGxB,UAAC,SAAoC,EAAE,QAAiB;IAC1D,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;QAC7B,SAAS,GAAG,SAAS,CAAC,SAAS,CAAA;KAChC;IACD,IAAM,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAA;IAClC,IAAM,GAAG,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC5B,OAAO,CAAE,KAAK,EAAE,GAAG,CAAE,CAAA;AACvB;;ACvCA;;;;;IAIyC,oCAAa;IAOpD,0BAAoB,QAAgB,EAAU,SAA8D;QAA5G,YACE,iBAAO,SACR;QAFmB,cAAQ,GAAR,QAAQ,CAAQ;QAAU,eAAS,GAAT,SAAS,CAAqD;QALpG,UAAI,GAAe,IAAI,CAAA;QACvB,WAAK,GAAG,IAAI,eAAe,CAAM,EAAE,CAAC,CAAA;QACpC,kBAAY,GAAG,IAAI,GAAG,EAAU,CAAA;QAChC,kBAAY,GAAG,IAAI,YAAY,EAAE,CAAA;;KAIxC;IAED,kCAAO,GAAP,UAAQ,gBAAkC;QAA1C,iBASC;QARC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,gBAAgB,CAAC,UAAU,CAAC,SAAS,CAAC,UAAA,KAAK;YAC/D,IAAM,SAAS,GAAG,KAAI,CAAC,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,IAAI,EAAC,MAAM,qBAAC,SAAS,GAAG,KAAI,CAAC,QAAQ,EAAE,KAAI,CAAC,QAAQ,GAAK,IAAI,CAAC,KAAK,GAAC;YACzE,KAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAI,CAAC,IAAI,CAAC,CAAA;SAC3B,CAAC,CAAA;KACH;IACH,uBAAC;AAAD,CA/CA,CAAyC,UAAU;;ACRnD;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngageoint-mage.web-core-lib-plugin.js","sources":["ng://@ngageoint/mage.web-core-lib/plugin/ngageoint-mage.web-core-lib-plugin.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;"}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf, ScrollingModule } from '@angular/cdk/scrolling';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ɵɵinject, ɵɵdefineInjectable, ɵsetClassMetadata, Injectable, ɵɵdirectiveInject, ɵɵdefineComponent, ɵɵProvidersFeature, ɵɵNgOnChangesFeature, ɵɵelementStart, ɵɵelement, ɵɵelementEnd, ɵɵproperty, ɵɵadvance, Component, Input, ɵɵtext, ɵɵtextInterpolate, ɵɵsanitizeUrl, ɵɵtemplate, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
|
|
4
|
+
import { FormGroup, FormControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControlStatusGroup, FormGroupDirective, DefaultValueAccessor, NgControlStatus, FormControlName, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { MatCard, MatCardHeader, MatCardTitle, MatCardModule } from '@angular/material/card';
|
|
6
|
+
import { XhrImgComponent, MageCommonModule } from '@ngageoint/mage.web-core-lib/common';
|
|
7
|
+
import { HttpParams, HttpClient } from '@angular/common/http';
|
|
8
|
+
import { Observable, throwError } from 'rxjs';
|
|
9
|
+
import { catchError } from 'rxjs/operators';
|
|
10
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
11
|
+
import { PagingDataSource } from '@ngageoint/mage.web-core-lib/paging';
|
|
12
|
+
|
|
13
|
+
var contentPathOfIcon = function (icon) {
|
|
14
|
+
if (!icon) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (typeof icon !== 'string') {
|
|
18
|
+
icon = icon.id;
|
|
19
|
+
}
|
|
20
|
+
return "/api/icons/" + icon + "/content";
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var StaticIconService = /** @class */ (function () {
|
|
24
|
+
function StaticIconService(http) {
|
|
25
|
+
this.http = http;
|
|
26
|
+
}
|
|
27
|
+
StaticIconService.prototype.fetchIcons = function (fetch) {
|
|
28
|
+
var now = Date.now();
|
|
29
|
+
var results = new Observable(function (observer) {
|
|
30
|
+
var icons = [];
|
|
31
|
+
var remaining = 100;
|
|
32
|
+
while (remaining--) {
|
|
33
|
+
var id = now - remaining;
|
|
34
|
+
icons.unshift({
|
|
35
|
+
id: String(id),
|
|
36
|
+
title: "Icon " + id,
|
|
37
|
+
fileName: "icon-" + id + ".png",
|
|
38
|
+
sourceUrl: "https://test.mage/" + id + ".png",
|
|
39
|
+
contentPath: "/icons/" + id + "/content"
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
setTimeout(function () {
|
|
43
|
+
observer.next({
|
|
44
|
+
pageSize: 100,
|
|
45
|
+
pageIndex: 0,
|
|
46
|
+
totalCount: 100,
|
|
47
|
+
items: icons
|
|
48
|
+
});
|
|
49
|
+
observer.complete();
|
|
50
|
+
}, 0);
|
|
51
|
+
return {
|
|
52
|
+
unsubscribe: function () { }
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
return results;
|
|
56
|
+
};
|
|
57
|
+
StaticIconService.prototype.fetchIconById = function (id) {
|
|
58
|
+
return this.http.get("/api/icons/" + id).pipe(catchError(function (err, caught) {
|
|
59
|
+
// TODO: this is probably better practice to insulate app layer from
|
|
60
|
+
// http errors
|
|
61
|
+
// if (err instanceof HttpErrorResponse) {
|
|
62
|
+
// if (err.status === 404) {
|
|
63
|
+
// return null
|
|
64
|
+
// }
|
|
65
|
+
// }
|
|
66
|
+
return throwError(err);
|
|
67
|
+
}));
|
|
68
|
+
};
|
|
69
|
+
StaticIconService.prototype.fetchIconBySourceUrl = function (url) {
|
|
70
|
+
return this.http.get("/api/icons", {
|
|
71
|
+
params: new HttpParams().set('source_url', url)
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
StaticIconService.prototype.fetchIconByReference = function (ref) {
|
|
75
|
+
if (ref.id) {
|
|
76
|
+
return this.fetchIconById(ref.id);
|
|
77
|
+
}
|
|
78
|
+
else if (ref.sourceUrl) {
|
|
79
|
+
return this.fetchIconBySourceUrl(ref.sourceUrl);
|
|
80
|
+
}
|
|
81
|
+
throw new Error('no icon id or source url');
|
|
82
|
+
};
|
|
83
|
+
StaticIconService.prototype.registerIconUrl = function (url) {
|
|
84
|
+
throw new Error('unimplemented');
|
|
85
|
+
};
|
|
86
|
+
StaticIconService.prototype.uploadIcon = function () {
|
|
87
|
+
throw new Error('unimplemented');
|
|
88
|
+
};
|
|
89
|
+
StaticIconService.ɵfac = function StaticIconService_Factory(t) { return new (t || StaticIconService)(ɵɵinject(HttpClient)); };
|
|
90
|
+
StaticIconService.ɵprov = ɵɵdefineInjectable({ token: StaticIconService, factory: StaticIconService.ɵfac, providedIn: 'root' });
|
|
91
|
+
return StaticIconService;
|
|
92
|
+
}());
|
|
93
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(StaticIconService, [{
|
|
94
|
+
type: Injectable,
|
|
95
|
+
args: [{
|
|
96
|
+
providedIn: 'root'
|
|
97
|
+
}]
|
|
98
|
+
}], function () { return [{ type: HttpClient }]; }, null); })();
|
|
99
|
+
|
|
100
|
+
var StaticIconFormFieldComponent = /** @class */ (function () {
|
|
101
|
+
function StaticIconFormFieldComponent(iconService, httpClient, sanitizer) {
|
|
102
|
+
var _this = this;
|
|
103
|
+
this.iconService = iconService;
|
|
104
|
+
this.httpClient = httpClient;
|
|
105
|
+
this.sanitizer = sanitizer;
|
|
106
|
+
this.iconRef = null;
|
|
107
|
+
this.form = new FormGroup({
|
|
108
|
+
iconRefToken: new FormControl(null),
|
|
109
|
+
iconRefType: new FormControl(null, Validators.required)
|
|
110
|
+
});
|
|
111
|
+
this.onChange = function (iconRef) { };
|
|
112
|
+
this.onValidatorChange = function () { };
|
|
113
|
+
this.onTouched = function () { };
|
|
114
|
+
this.form.valueChanges.subscribe(function (x) {
|
|
115
|
+
_this.iconRef = iconRefForFormValue(x);
|
|
116
|
+
_this.onChange(_this.iconRef);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
StaticIconFormFieldComponent.prototype.registerOnValidatorChange = function (fn) {
|
|
120
|
+
this.onValidatorChange = fn;
|
|
121
|
+
};
|
|
122
|
+
StaticIconFormFieldComponent.prototype.ngOnChanges = function (changes) { };
|
|
123
|
+
StaticIconFormFieldComponent.prototype.ngOnDestroy = function () { };
|
|
124
|
+
StaticIconFormFieldComponent.prototype.onSelectIcon = function () { };
|
|
125
|
+
StaticIconFormFieldComponent.prototype.writeValue = function (iconRef) {
|
|
126
|
+
this.iconRef = iconRef;
|
|
127
|
+
var formValue = formValueForIconRef(iconRef);
|
|
128
|
+
this.form.setValue(formValue, { emitEvent: false });
|
|
129
|
+
this.resolveIconRef();
|
|
130
|
+
};
|
|
131
|
+
StaticIconFormFieldComponent.prototype.registerOnChange = function (fn) {
|
|
132
|
+
this.onChange = fn;
|
|
133
|
+
};
|
|
134
|
+
StaticIconFormFieldComponent.prototype.registerOnTouched = function (fn) {
|
|
135
|
+
this.onTouched = fn;
|
|
136
|
+
};
|
|
137
|
+
StaticIconFormFieldComponent.prototype.setDisabledState = function (isDisabled) {
|
|
138
|
+
if (isDisabled) {
|
|
139
|
+
this.form.disable();
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
this.form.enable();
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
StaticIconFormFieldComponent.prototype.validate = function (control) {
|
|
146
|
+
return this.form.errors;
|
|
147
|
+
};
|
|
148
|
+
StaticIconFormFieldComponent.prototype.resolveIconRef = function () {
|
|
149
|
+
var _this = this;
|
|
150
|
+
if (!this.iconRef) {
|
|
151
|
+
this.icon = null;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this.iconService.fetchIconByReference(this.iconRef).subscribe(function (x) {
|
|
155
|
+
_this.icon = x;
|
|
156
|
+
if (!_this.icon) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
StaticIconFormFieldComponent.ɵfac = function StaticIconFormFieldComponent_Factory(t) { return new (t || StaticIconFormFieldComponent)(ɵɵdirectiveInject(StaticIconService), ɵɵdirectiveInject(HttpClient), ɵɵdirectiveInject(DomSanitizer)); };
|
|
162
|
+
StaticIconFormFieldComponent.ɵcmp = ɵɵdefineComponent({ type: StaticIconFormFieldComponent, selectors: [["mage-static-icon-form-field"]], features: [ɵɵProvidersFeature([
|
|
163
|
+
{
|
|
164
|
+
provide: NG_VALUE_ACCESSOR,
|
|
165
|
+
multi: true,
|
|
166
|
+
useExisting: StaticIconFormFieldComponent
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
provide: NG_VALIDATORS,
|
|
170
|
+
multi: true,
|
|
171
|
+
useExisting: StaticIconFormFieldComponent
|
|
172
|
+
},
|
|
173
|
+
]), ɵɵNgOnChangesFeature], decls: 4, vars: 2, consts: [[3, "formGroup"], [1, "icon-image", 3, "src"], ["type", "hidden", "formControlName", "iconRefType"], ["type", "hidden", "formControlName", "iconRefToken"]], template: function StaticIconFormFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
174
|
+
ɵɵelementStart(0, "div", 0);
|
|
175
|
+
ɵɵelement(1, "mage-xhr-img", 1);
|
|
176
|
+
ɵɵelement(2, "input", 2);
|
|
177
|
+
ɵɵelement(3, "input", 3);
|
|
178
|
+
ɵɵelementEnd();
|
|
179
|
+
} if (rf & 2) {
|
|
180
|
+
ɵɵproperty("formGroup", ctx.form);
|
|
181
|
+
ɵɵadvance(1);
|
|
182
|
+
ɵɵproperty("src", ctx.icon == null ? null : ctx.icon.contentPath);
|
|
183
|
+
} }, directives: [NgControlStatusGroup, FormGroupDirective, XhrImgComponent, DefaultValueAccessor, NgControlStatus, FormControlName], styles: [".icon-image[_ngcontent-%COMP%]{display:block;height:3em;width:3em}"] });
|
|
184
|
+
return StaticIconFormFieldComponent;
|
|
185
|
+
}());
|
|
186
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(StaticIconFormFieldComponent, [{
|
|
187
|
+
type: Component,
|
|
188
|
+
args: [{
|
|
189
|
+
selector: 'mage-static-icon-form-field',
|
|
190
|
+
templateUrl: './static-icon-form-field.component.html',
|
|
191
|
+
styleUrls: ['./static-icon-form-field.component.scss'],
|
|
192
|
+
providers: [
|
|
193
|
+
{
|
|
194
|
+
provide: NG_VALUE_ACCESSOR,
|
|
195
|
+
multi: true,
|
|
196
|
+
useExisting: StaticIconFormFieldComponent
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
provide: NG_VALIDATORS,
|
|
200
|
+
multi: true,
|
|
201
|
+
useExisting: StaticIconFormFieldComponent
|
|
202
|
+
},
|
|
203
|
+
]
|
|
204
|
+
}]
|
|
205
|
+
}], function () { return [{ type: StaticIconService }, { type: HttpClient }, { type: DomSanitizer }]; }, null); })();
|
|
206
|
+
var IconRefType;
|
|
207
|
+
(function (IconRefType) {
|
|
208
|
+
IconRefType["Registered"] = "id";
|
|
209
|
+
IconRefType["SourceUrl"] = "sourceUrl";
|
|
210
|
+
})(IconRefType || (IconRefType = {}));
|
|
211
|
+
function iconRefForFormValue(x) {
|
|
212
|
+
var _a, _b;
|
|
213
|
+
if (!x.iconRefType) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
switch (x.iconRefType) {
|
|
217
|
+
case IconRefType.Registered:
|
|
218
|
+
return _a = {}, _a[IconRefType.Registered] = x.iconRefToken, _a;
|
|
219
|
+
case IconRefType.SourceUrl:
|
|
220
|
+
return _b = {}, _b[IconRefType.SourceUrl] = x.iconRefToken, _b;
|
|
221
|
+
default:
|
|
222
|
+
throw new Error('invalid icon ref type: ' + x.iconRefToken);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function formValueForIconRef(x) {
|
|
226
|
+
if (!x) {
|
|
227
|
+
return {
|
|
228
|
+
iconRefType: null,
|
|
229
|
+
iconRefToken: null
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
var iconRefType = null;
|
|
233
|
+
var iconRefToken = null;
|
|
234
|
+
if (x.hasOwnProperty(IconRefType.Registered)) {
|
|
235
|
+
iconRefType = IconRefType.Registered || null;
|
|
236
|
+
iconRefToken = x[IconRefType.Registered] || null;
|
|
237
|
+
}
|
|
238
|
+
else if (x.hasOwnProperty(IconRefType.SourceUrl)) {
|
|
239
|
+
iconRefType = IconRefType.SourceUrl || null;
|
|
240
|
+
iconRefToken = x[IconRefType.SourceUrl] || null;
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
iconRefType: iconRefType,
|
|
244
|
+
iconRefToken: iconRefToken
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
var StaticIconImgComponent = /** @class */ (function () {
|
|
249
|
+
function StaticIconImgComponent() {
|
|
250
|
+
}
|
|
251
|
+
StaticIconImgComponent.prototype.ngOnInit = function () {
|
|
252
|
+
};
|
|
253
|
+
StaticIconImgComponent.prototype.ngOnChanges = function (changes) {
|
|
254
|
+
if (changes.iconRef) {
|
|
255
|
+
if (this.iconRef) {
|
|
256
|
+
this.iconPath = contentPathOfIcon(this.iconRef);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
this.iconPath = null;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
StaticIconImgComponent.ɵfac = function StaticIconImgComponent_Factory(t) { return new (t || StaticIconImgComponent)(); };
|
|
264
|
+
StaticIconImgComponent.ɵcmp = ɵɵdefineComponent({ type: StaticIconImgComponent, selectors: [["mage-static-icon-img"]], inputs: { iconRef: "iconRef" }, features: [ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "src"]], template: function StaticIconImgComponent_Template(rf, ctx) { if (rf & 1) {
|
|
265
|
+
ɵɵelement(0, "mage-xhr-img", 0);
|
|
266
|
+
} if (rf & 2) {
|
|
267
|
+
ɵɵproperty("src", ctx.iconPath);
|
|
268
|
+
} }, directives: [XhrImgComponent], encapsulation: 2 });
|
|
269
|
+
return StaticIconImgComponent;
|
|
270
|
+
}());
|
|
271
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(StaticIconImgComponent, [{
|
|
272
|
+
type: Component,
|
|
273
|
+
args: [{
|
|
274
|
+
selector: 'mage-static-icon-img',
|
|
275
|
+
template: "<mage-xhr-img [src]=\"iconPath\"></mage-xhr-img>",
|
|
276
|
+
}]
|
|
277
|
+
}], function () { return []; }, { iconRef: [{
|
|
278
|
+
type: Input
|
|
279
|
+
}] }); })();
|
|
280
|
+
|
|
281
|
+
function StaticIconSelectComponent_mat_card_2_Template(rf, ctx) { if (rf & 1) {
|
|
282
|
+
ɵɵelementStart(0, "mat-card", 3);
|
|
283
|
+
ɵɵelementStart(1, "mat-card-header");
|
|
284
|
+
ɵɵelementStart(2, "mat-card-title");
|
|
285
|
+
ɵɵtext(3);
|
|
286
|
+
ɵɵelementEnd();
|
|
287
|
+
ɵɵelementEnd();
|
|
288
|
+
ɵɵelement(4, "img", 4);
|
|
289
|
+
ɵɵelementEnd();
|
|
290
|
+
} if (rf & 2) {
|
|
291
|
+
var icon_r1 = ctx.$implicit;
|
|
292
|
+
ɵɵadvance(3);
|
|
293
|
+
ɵɵtextInterpolate(icon_r1.title);
|
|
294
|
+
ɵɵadvance(1);
|
|
295
|
+
ɵɵproperty("src", icon_r1.path, ɵɵsanitizeUrl);
|
|
296
|
+
} }
|
|
297
|
+
var StaticIconSelectComponent = /** @class */ (function () {
|
|
298
|
+
function StaticIconSelectComponent(iconService) {
|
|
299
|
+
var _this = this;
|
|
300
|
+
this.iconService = iconService;
|
|
301
|
+
this.icons = null;
|
|
302
|
+
this.dataSource = new PagingDataSource(250, function (paging) {
|
|
303
|
+
return _this.iconService.fetchIcons(paging);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
StaticIconSelectComponent.prototype.ngOnInit = function () {
|
|
307
|
+
var _this = this;
|
|
308
|
+
this.iconService.fetchIcons().subscribe(function (x) {
|
|
309
|
+
_this.icons = x.items;
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
StaticIconSelectComponent.prototype.onBrowseForUploadIcon = function () {
|
|
313
|
+
throw new Error('unimplemented');
|
|
314
|
+
};
|
|
315
|
+
StaticIconSelectComponent.ɵfac = function StaticIconSelectComponent_Factory(t) { return new (t || StaticIconSelectComponent)(ɵɵdirectiveInject(StaticIconService)); };
|
|
316
|
+
StaticIconSelectComponent.ɵcmp = ɵɵdefineComponent({ type: StaticIconSelectComponent, selectors: [["static-icon-select"]], decls: 3, vars: 2, consts: [[1, "icon-select"], [3, "itemSize"], ["class", "icon-select-item", 4, "cdkVirtualFor", "cdkVirtualForOf"], [1, "icon-select-item"], ["mat-card-img", "", 3, "src"]], template: function StaticIconSelectComponent_Template(rf, ctx) { if (rf & 1) {
|
|
317
|
+
ɵɵelementStart(0, "div", 0);
|
|
318
|
+
ɵɵelementStart(1, "cdk-virtual-scroll-viewport", 1);
|
|
319
|
+
ɵɵtemplate(2, StaticIconSelectComponent_mat_card_2_Template, 5, 2, "mat-card", 2);
|
|
320
|
+
ɵɵelementEnd();
|
|
321
|
+
ɵɵelementEnd();
|
|
322
|
+
} if (rf & 2) {
|
|
323
|
+
ɵɵadvance(1);
|
|
324
|
+
ɵɵproperty("itemSize", 40);
|
|
325
|
+
ɵɵadvance(1);
|
|
326
|
+
ɵɵproperty("cdkVirtualForOf", ctx.icons);
|
|
327
|
+
} }, directives: [CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf, MatCard, MatCardHeader, MatCardTitle], styles: ["virtual-scroll[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,33%);grid-auto-rows:min-content;grid-gap:0;justify-content:center;gap:0}"] });
|
|
328
|
+
return StaticIconSelectComponent;
|
|
329
|
+
}());
|
|
330
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(StaticIconSelectComponent, [{
|
|
331
|
+
type: Component,
|
|
332
|
+
args: [{
|
|
333
|
+
selector: 'static-icon-select',
|
|
334
|
+
templateUrl: './static-icon-select.component.html',
|
|
335
|
+
styleUrls: ['./static-icon-select.component.scss']
|
|
336
|
+
}]
|
|
337
|
+
}], function () { return [{ type: StaticIconService }]; }, null); })();
|
|
338
|
+
|
|
339
|
+
var StaticIconModule = /** @class */ (function () {
|
|
340
|
+
function StaticIconModule() {
|
|
341
|
+
}
|
|
342
|
+
StaticIconModule.ɵmod = ɵɵdefineNgModule({ type: StaticIconModule });
|
|
343
|
+
StaticIconModule.ɵinj = ɵɵdefineInjector({ factory: function StaticIconModule_Factory(t) { return new (t || StaticIconModule)(); }, imports: [[
|
|
344
|
+
CommonModule,
|
|
345
|
+
FormsModule,
|
|
346
|
+
ReactiveFormsModule,
|
|
347
|
+
MatCardModule,
|
|
348
|
+
MageCommonModule,
|
|
349
|
+
ScrollingModule
|
|
350
|
+
]] });
|
|
351
|
+
return StaticIconModule;
|
|
352
|
+
}());
|
|
353
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(StaticIconModule, { declarations: [StaticIconFormFieldComponent,
|
|
354
|
+
StaticIconImgComponent,
|
|
355
|
+
StaticIconSelectComponent], imports: [CommonModule,
|
|
356
|
+
FormsModule,
|
|
357
|
+
ReactiveFormsModule,
|
|
358
|
+
MatCardModule,
|
|
359
|
+
MageCommonModule,
|
|
360
|
+
ScrollingModule], exports: [StaticIconFormFieldComponent,
|
|
361
|
+
StaticIconImgComponent,
|
|
362
|
+
StaticIconSelectComponent] }); })();
|
|
363
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(StaticIconModule, [{
|
|
364
|
+
type: NgModule,
|
|
365
|
+
args: [{
|
|
366
|
+
imports: [
|
|
367
|
+
CommonModule,
|
|
368
|
+
FormsModule,
|
|
369
|
+
ReactiveFormsModule,
|
|
370
|
+
MatCardModule,
|
|
371
|
+
MageCommonModule,
|
|
372
|
+
ScrollingModule
|
|
373
|
+
],
|
|
374
|
+
declarations: [
|
|
375
|
+
StaticIconFormFieldComponent,
|
|
376
|
+
StaticIconImgComponent,
|
|
377
|
+
StaticIconSelectComponent,
|
|
378
|
+
],
|
|
379
|
+
exports: [
|
|
380
|
+
StaticIconFormFieldComponent,
|
|
381
|
+
StaticIconImgComponent,
|
|
382
|
+
StaticIconSelectComponent,
|
|
383
|
+
]
|
|
384
|
+
}]
|
|
385
|
+
}], null, null); })();
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Generated bundle index. Do not edit.
|
|
389
|
+
*/
|
|
390
|
+
|
|
391
|
+
export { StaticIconFormFieldComponent, StaticIconImgComponent, StaticIconModule, StaticIconSelectComponent, StaticIconService, contentPathOfIcon };
|
|
392
|
+
//# sourceMappingURL=ngageoint-mage.web-core-lib-static-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngageoint-mage.web-core-lib-static-icon.js","sources":["ng://@ngageoint/mage.web-core-lib/static-icon/static-icon.model.ts","ng://@ngageoint/mage.web-core-lib/static-icon/static-icon.service.ts","ng://@ngageoint/mage.web-core-lib/static-icon/static-icon-form-field/static-icon-form-field.component.ts","ng://@ngageoint/mage.web-core-lib/static-icon/static-icon-form-field/static-icon-form-field.component.html","ng://@ngageoint/mage.web-core-lib/static-icon/static-icon-img/static-icon-img.component.ts","ng://@ngageoint/mage.web-core-lib/static-icon/static-icon-select/static-icon-select.component.html","ng://@ngageoint/mage.web-core-lib/static-icon/static-icon-select/static-icon-select.component.ts","ng://@ngageoint/mage.web-core-lib/static-icon/static-icon.module.ts","ng://@ngageoint/mage.web-core-lib/static-icon/ngageoint-mage.web-core-lib-static-icon.ts"],"sourcesContent":["\nexport interface StaticIcon {\n id: string\n sourceUrl: string\n contentPath: string\n title?: string\n summary?: string\n fileName?: string\n tags?: string[]\n}\n\nexport interface RegisteredStaticIconReference {\n id: string\n sourceUrl?: never\n}\n\nexport interface SourceUrlStaticIconReference {\n sourceUrl: string\n id?: never\n}\n\nexport const contentPathOfIcon = (icon?: StaticIcon | RegisteredStaticIconReference | string | null | undefined): string | undefined => {\n if (!icon) {\n return\n }\n if (typeof icon !== 'string') {\n icon = icon.id\n }\n return `/api/icons/${icon}/content`\n}\n\nexport type StaticIconReference = RegisteredStaticIconReference | SourceUrlStaticIconReference\n","import { HttpClient, HttpParams } from '@angular/common/http'\nimport { Injectable } from '@angular/core';\nimport { Observable, throwError } from 'rxjs'\nimport { catchError } from 'rxjs/operators'\nimport { PageOf, PagingParameters } from '@ngageoint/mage.web-core-lib/paging'\nimport { StaticIcon, StaticIconReference } from './static-icon.model'\n\n\nexport interface IconFetch extends PagingParameters {\n searchText?: string\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StaticIconService {\n\n constructor(private http: HttpClient) { }\n\n fetchIcons(fetch?: IconFetch): Observable<PageOf<StaticIcon>> {\n const now = Date.now()\n const results = new Observable<PageOf<StaticIcon>>(observer => {\n const icons: StaticIcon[] = []\n let remaining = 100\n while (remaining--) {\n const id = now - remaining\n icons.unshift({\n id: String(id),\n title: `Icon ${id}`,\n fileName: `icon-${id}.png`,\n sourceUrl: `https://test.mage/${id}.png`,\n contentPath: `/icons/${id}/content`\n })\n }\n setTimeout(() => {\n observer.next({\n pageSize: 100,\n pageIndex: 0,\n totalCount: 100,\n items: icons\n })\n observer.complete()\n }, 0)\n return {\n unsubscribe() { }\n }\n })\n return results\n }\n\n fetchIconById(id: string): Observable<StaticIcon | null> {\n return this.http.get<StaticIcon>(`/api/icons/${id}`).pipe(\n catchError((err, caught) => {\n // TODO: this is probably better practice to insulate app layer from\n // http errors\n // if (err instanceof HttpErrorResponse) {\n // if (err.status === 404) {\n // return null\n // }\n // }\n return throwError(err)\n })\n )\n }\n\n fetchIconBySourceUrl(url: string): Observable<StaticIcon> {\n return this.http.get<StaticIcon | null>(`/api/icons`, {\n params: new HttpParams().set('source_url', url)\n })\n }\n\n fetchIconByReference(ref: StaticIconReference): Observable<StaticIcon | null> {\n if (ref.id) {\n return this.fetchIconById(ref.id)\n }\n else if (ref.sourceUrl) {\n return this.fetchIconBySourceUrl(ref.sourceUrl)\n }\n throw new Error('no icon id or source url')\n }\n\n registerIconUrl(url: string): Observable<StaticIcon> {\n throw new Error('unimplemented')\n }\n\n uploadIcon(): void {\n throw new Error('unimplemented')\n }\n}\n","import { HttpClient } from '@angular/common/http'\nimport { Component, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'\nimport { AbstractControl, ControlValueAccessor, FormControl, FormGroup, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator, Validators } from '@angular/forms'\nimport { DomSanitizer } from '@angular/platform-browser'\nimport { StaticIcon, StaticIconReference } from '../static-icon.model'\nimport { StaticIconService } from '../static-icon.service'\n\n\n@Component({\n selector: 'mage-static-icon-form-field',\n templateUrl: './static-icon-form-field.component.html',\n styleUrls: ['./static-icon-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: StaticIconFormFieldComponent\n },\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: StaticIconFormFieldComponent\n },\n ]\n})\nexport class StaticIconFormFieldComponent implements OnChanges, OnDestroy, ControlValueAccessor, Validator {\n\n iconRef: StaticIconReference = null\n\n form: FormGroup = new FormGroup({\n iconRefToken: new FormControl(null),\n iconRefType: new FormControl(null, Validators.required)\n })\n icon: StaticIcon | null\n\n private onChange: (iconRef: StaticIconReference) => void = (iconRef: StaticIconReference) => {}\n private onValidatorChange: () => void = () => {}\n private onTouched: () => void = () => {}\n\n constructor(private iconService: StaticIconService, private httpClient: HttpClient, private sanitizer: DomSanitizer) {\n this.form.valueChanges.subscribe((x: IconRefFormValue) => {\n this.iconRef = iconRefForFormValue(x)\n this.onChange(this.iconRef)\n })\n }\n\n registerOnValidatorChange?(fn: () => void): void {\n this.onValidatorChange = fn\n }\n\n ngOnChanges(changes: SimpleChanges) { }\n\n ngOnDestroy() { }\n\n onSelectIcon() { }\n\n writeValue(iconRef: StaticIconReference): void {\n this.iconRef = iconRef\n const formValue = formValueForIconRef(iconRef)\n this.form.setValue(formValue, { emitEvent: false })\n this.resolveIconRef()\n }\n\n registerOnChange(fn: (x: StaticIconReference | null) => void): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn\n }\n\n setDisabledState?(isDisabled: boolean): void {\n if (isDisabled) {\n this.form.disable()\n }\n else {\n this.form.enable()\n }\n }\n\n validate(control: AbstractControl): ValidationErrors {\n return this.form.errors\n }\n\n private resolveIconRef() {\n if (!this.iconRef) {\n this.icon = null\n return\n }\n this.iconService.fetchIconByReference(this.iconRef).subscribe(x => {\n this.icon = x\n if (!this.icon) {\n return\n }\n })\n }\n}\n\nenum IconRefType {\n Registered = 'id',\n SourceUrl = 'sourceUrl'\n}\n\ntype IconRefFormValue = {\n iconRefToken: string | null\n iconRefType: IconRefType | null\n}\n\nfunction iconRefForFormValue(x: IconRefFormValue): StaticIconReference | null {\n if (!x.iconRefType) {\n return null\n }\n switch (x.iconRefType) {\n case IconRefType.Registered:\n return { [IconRefType.Registered]: x.iconRefToken }\n case IconRefType.SourceUrl:\n return { [IconRefType.SourceUrl]: x.iconRefToken }\n default:\n throw new Error('invalid icon ref type: ' + x.iconRefToken)\n }\n}\n\nfunction formValueForIconRef(x: StaticIconReference | null): IconRefFormValue {\n if (!x) {\n return {\n iconRefType: null,\n iconRefToken: null\n }\n }\n let iconRefType: IconRefType | null = null\n let iconRefToken: string | null = null\n if (x.hasOwnProperty(IconRefType.Registered)) {\n iconRefType = IconRefType.Registered || null\n iconRefToken = x[IconRefType.Registered] || null\n }\n else if (x.hasOwnProperty(IconRefType.SourceUrl)) {\n iconRefType = IconRefType.SourceUrl || null\n iconRefToken = x[IconRefType.SourceUrl] || null\n }\n return {\n iconRefType,\n iconRefToken\n }\n}\n","<div [formGroup]=\"form\">\n <mage-xhr-img class=\"icon-image\" [src]=\"icon?.contentPath\"></mage-xhr-img>\n <input type=\"hidden\" formControlName=\"iconRefType\"/>\n <input type=\"hidden\" formControlName=\"iconRefToken\"/>\n</div>","import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { RegisteredStaticIconReference, contentPathOfIcon } from '../static-icon.model'\n\n@Component({\n selector: 'mage-static-icon-img',\n template: `<mage-xhr-img [src]=\"iconPath\"></mage-xhr-img>`,\n})\nexport class StaticIconImgComponent implements OnInit, OnChanges {\n\n @Input()\n iconRef: RegisteredStaticIconReference | string | null\n iconPath: string | null\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.iconRef) {\n if (this.iconRef) {\n this.iconPath = contentPathOfIcon(this.iconRef)\n }\n else {\n this.iconPath = null\n }\n }\n }\n}\n","<div class=\"icon-select\">\n <cdk-virtual-scroll-viewport [itemSize]=\"40\">\n <mat-card *cdkVirtualFor=\"let icon of icons\" class=icon-select-item>\n <mat-card-header>\n <mat-card-title>{{icon.title}}</mat-card-title>\n </mat-card-header>\n <img mat-card-img [src]=\"icon.path\" />\n </mat-card>\n </cdk-virtual-scroll-viewport>\n</div>\n<!--\n <button mat-button class=\"add__button\" type=\"button\" color=\"primary\" (click)=\"file.click()\">\n Upload Icon\n </button>\n <input [hidden]=\"true\" type=\"file\" #file multiple (change)=\"onAttachmentFile($event)\">\n-->","import { Component, OnInit } from '@angular/core'\nimport { PagingParameters, PagingDataSource } from '@ngageoint/mage.web-core-lib/paging'\nimport { StaticIcon } from '../static-icon.model'\nimport { StaticIconService } from '../static-icon.service'\n\nexport interface StaticIconSelectItem {\n id: string\n path: string\n title: string\n fileName: string\n}\n\n@Component({\n selector: 'static-icon-select',\n templateUrl: './static-icon-select.component.html',\n styleUrls: ['./static-icon-select.component.scss']\n})\nexport class StaticIconSelectComponent implements OnInit {\n\n icons: StaticIcon[] | null = null\n dataSource: PagingDataSource<StaticIcon>\n\n constructor(\n private iconService: StaticIconService\n ) {\n this.dataSource = new PagingDataSource<StaticIcon>(250, (paging: PagingParameters) => {\n return this.iconService.fetchIcons(paging)\n })\n }\n\n ngOnInit() {\n this.iconService.fetchIcons().subscribe(x => {\n this.icons = x.items\n })\n }\n\n onBrowseForUploadIcon() {\n throw new Error('unimplemented')\n }\n}\n\n","import { ScrollingModule } from '@angular/cdk/scrolling'\nimport { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms'\nimport { MatCardModule } from '@angular/material/card'\nimport { MageCommonModule } from '@ngageoint/mage.web-core-lib/common'\nimport { StaticIconFormFieldComponent } from './static-icon-form-field/static-icon-form-field.component'\nimport { StaticIconImgComponent } from './static-icon-img/static-icon-img.component'\nimport { StaticIconSelectComponent } from './static-icon-select/static-icon-select.component'\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatCardModule,\n MageCommonModule,\n ScrollingModule\n ],\n declarations: [\n StaticIconFormFieldComponent,\n StaticIconImgComponent,\n StaticIconSelectComponent,\n ],\n exports: [\n StaticIconFormFieldComponent,\n StaticIconImgComponent,\n StaticIconSelectComponent,\n ]\n})\nexport class StaticIconModule {}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":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