windows-plus-utilities 0.0.39 → 0.0.41

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.
Files changed (32) hide show
  1. package/context-menu/components/context-menu/context-menu.component.d.ts +34 -0
  2. package/context-menu/context-menu.module.d.ts +8 -0
  3. package/{table → context-menu}/index.d.ts +1 -1
  4. package/context-menu/public-api.d.ts +4 -0
  5. package/context-menu/util/interface/items/context-menu-items.interface.d.ts +8 -0
  6. package/context-menu/util/interface/position/context-menu-positions.interface.d.ts +8 -0
  7. package/esm2020/context-menu/components/context-menu/context-menu.component.mjs +51 -0
  8. package/esm2020/context-menu/context-menu.module.mjs +24 -0
  9. package/esm2020/context-menu/public-api.mjs +8 -0
  10. package/esm2020/context-menu/util/interface/items/context-menu-items.interface.mjs +2 -0
  11. package/esm2020/context-menu/util/interface/position/context-menu-positions.interface.mjs +2 -0
  12. package/esm2020/context-menu/windows-plus-utilities-context-menu.mjs +5 -0
  13. package/fesm2015/windows-plus-utilities-context-menu.mjs +83 -0
  14. package/fesm2015/windows-plus-utilities-context-menu.mjs.map +1 -0
  15. package/fesm2020/windows-plus-utilities-context-menu.mjs +83 -0
  16. package/fesm2020/windows-plus-utilities-context-menu.mjs.map +1 -0
  17. package/package.json +9 -9
  18. package/esm2020/table/components/table/table.component.mjs +0 -41
  19. package/esm2020/table/public-api.mjs +0 -8
  20. package/esm2020/table/table.module.mjs +0 -28
  21. package/esm2020/table/util/interface/config/table-configuration.interface.mjs +0 -2
  22. package/esm2020/table/util/types/table-data/table-data.type.mjs +0 -2
  23. package/esm2020/table/windows-plus-utilities-table.mjs +0 -5
  24. package/fesm2015/windows-plus-utilities-table.mjs +0 -77
  25. package/fesm2015/windows-plus-utilities-table.mjs.map +0 -1
  26. package/fesm2020/windows-plus-utilities-table.mjs +0 -77
  27. package/fesm2020/windows-plus-utilities-table.mjs.map +0 -1
  28. package/table/components/table/table.component.d.ts +0 -40
  29. package/table/public-api.d.ts +0 -4
  30. package/table/table.module.d.ts +0 -9
  31. package/table/util/interface/config/table-configuration.interface.d.ts +0 -12
  32. package/table/util/types/table-data/table-data.type.d.ts +0 -8
@@ -0,0 +1,34 @@
1
+ import { ContextMenuItem } from '../../public-api';
2
+ import { ContextMenuPosition } from '../../util/interface/position/context-menu-positions.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ContextMenuComponent {
5
+ /**
6
+ * @description an array containing the context menu items to be displayed
7
+ */
8
+ items: ContextMenuItem[];
9
+ /**
10
+ * @description an object containing the required context menu position
11
+ */
12
+ positions: ContextMenuPosition;
13
+ /**
14
+ * @description indicates whether the context menu is being shown
15
+ */
16
+ showContextMenu: boolean;
17
+ /**
18
+ * @author Alex Hodson
19
+ * @description toggles the component member which indicates the context menu visibility
20
+ */
21
+ toggleContextMenu(): void;
22
+ /**
23
+ * @author Alex Hodson
24
+ * @description handles a click outside of the context menu which will toggle the context menu display
25
+ */
26
+ documentClick(): void;
27
+ /**
28
+ * @author Alex Hodson
29
+ * @description handles the escape button being typed which will toggle the context menu display
30
+ */
31
+ escKeyClick(): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenuComponent, "wp-context-menu", never, { "items": "items"; "positions": "positions"; }, {}, never, never, false, never>;
34
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/context-menu/context-menu.component";
3
+ import * as i2 from "@angular/common";
4
+ export declare class ContextMenuModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ContextMenuModule, [typeof i1.ContextMenuComponent], [typeof i2.CommonModule], [typeof i1.ContextMenuComponent]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<ContextMenuModule>;
8
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
- /// <amd-module name="windows-plus-utilities/table" />
4
+ /// <amd-module name="windows-plus-utilities/context-menu" />
5
5
  export * from './public-api';
@@ -0,0 +1,4 @@
1
+ export * from './components/context-menu/context-menu.component';
2
+ export * from './context-menu.module';
3
+ export * from './util/interface/items/context-menu-items.interface';
4
+ export * from './util/interface/position/context-menu-positions.interface';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @author Alex Hodson
3
+ * @description an interface which defines the required properties for the context menu items
4
+ */
5
+ export interface ContextMenuItem {
6
+ 'label': string;
7
+ 'handleClick': (...args: any[]) => void;
8
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @author Alex Hodson
3
+ * @description an interface which defines the required properties when defining the context menus position
4
+ */
5
+ export interface ContextMenuPosition {
6
+ 'left.px': number;
7
+ 'top.px': number;
8
+ }
@@ -0,0 +1,51 @@
1
+ import { Component, HostListener, Input } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "@angular/common";
4
+ export class ContextMenuComponent {
5
+ constructor() {
6
+ /**
7
+ * @description indicates whether the context menu is being shown
8
+ */
9
+ this.showContextMenu = false;
10
+ }
11
+ /**
12
+ * @author Alex Hodson
13
+ * @description toggles the component member which indicates the context menu visibility
14
+ */
15
+ toggleContextMenu() {
16
+ this.showContextMenu = !this.showContextMenu;
17
+ }
18
+ /**
19
+ * @author Alex Hodson
20
+ * @description handles a click outside of the context menu which will toggle the context menu display
21
+ */
22
+ documentClick() {
23
+ if (this.showContextMenu)
24
+ this.toggleContextMenu();
25
+ }
26
+ /**
27
+ * @author Alex Hodson
28
+ * @description handles the escape button being typed which will toggle the context menu display
29
+ */
30
+ escKeyClick() {
31
+ if (this.showContextMenu)
32
+ this.toggleContextMenu();
33
+ }
34
+ }
35
+ ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
+ ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ContextMenuComponent, selector: "wp-context-menu", inputs: { items: "items", positions: "positions" }, host: { listeners: { "document:click": "documentClick()", "document:keyup.escape": "escKeyClick()" } }, ngImport: i0, template: "<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>", styles: ["#context-menu.show{display:block;position:absolute;left:0;right:0}#context-menu{display:none;position:relative;max-width:100px;width:100px}#context-menu #context-menu-container{border:1px solid var(--wp-lightGrey);background:#FFF;width:100%;box-shadow:0 8px 16px #0000004d}#context-menu #context-menu-container ul{list-style-type:none;padding:0;margin:0}#context-menu #context-menu-container ul li{padding:.5rem 1rem;border-bottom:1px solid var(--wp-lightGrey)}#context-menu #context-menu-container ul li:hover{background:var(--wp-lightGrey);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'wp-context-menu', template: "<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>", styles: ["#context-menu.show{display:block;position:absolute;left:0;right:0}#context-menu{display:none;position:relative;max-width:100px;width:100px}#context-menu #context-menu-container{border:1px solid var(--wp-lightGrey);background:#FFF;width:100%;box-shadow:0 8px 16px #0000004d}#context-menu #context-menu-container ul{list-style-type:none;padding:0;margin:0}#context-menu #context-menu-container ul li{padding:.5rem 1rem;border-bottom:1px solid var(--wp-lightGrey)}#context-menu #context-menu-container ul li:hover{background:var(--wp-lightGrey);cursor:pointer}\n"] }]
40
+ }], propDecorators: { items: [{
41
+ type: Input
42
+ }], positions: [{
43
+ type: Input
44
+ }], documentClick: [{
45
+ type: HostListener,
46
+ args: ['document:click']
47
+ }], escKeyClick: [{
48
+ type: HostListener,
49
+ args: ['document:keyup.escape']
50
+ }] } });
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC1tZW51LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvY29udGV4dC1tZW51L2NvbXBvbmVudHMvY29udGV4dC1tZW51L2NvbnRleHQtbWVudS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93aW5kb3dzLXBsdXMtdXRpbGl0aWVzL2NvbnRleHQtbWVudS9jb21wb25lbnRzL2NvbnRleHQtbWVudS9jb250ZXh0LW1lbnUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7QUFTL0QsTUFBTSxPQUFPLG9CQUFvQjtJQUxqQztRQWNDOztXQUVHO1FBQ0gsb0JBQWUsR0FBWSxLQUFLLENBQUE7S0F5QmhDO0lBeEJBOzs7T0FHRztJQUNILGlCQUFpQjtRQUNoQixJQUFJLENBQUMsZUFBZSxHQUFHLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQTt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6IHZvaWQge1xuICAgIGlmICh0aGlzLnNob3dDb250ZXh0TWVudSkgdGhpcy50b2dnbGVDb250ZXh0TWVudSgpXG4gIH1cblxuXHQvKipcblx0ICogQGF1dGhvciBBbGV4IEhvZHNvblxuXHQgKiBAZGVzY3JpcHRpb24gaGFuZGxlcyB0aGUgZXNjYXBlIGJ1dHRvbiBiZWluZyB0eXBlZCB3aGljaCB3aWxsIHRvZ2dsZSB0aGUgY29udGV4dCBtZW51IGRpc3BsYXlcblx0ICovXG4gIEBIb3N0TGlzdGVuZXIoJ2RvY3VtZW50OmtleXVwLmVzY2FwZScpXG4gIGVzY0tleUNsaWNrKCk6IHZvaWQge1xuICAgIGlmICh0aGlzLnNob3dDb250ZXh0TWVudSkgdGhpcy50b2dnbGVDb250ZXh0TWVudSgpXG4gIH1cbn1cbiIsIjxkaXYgaWQ9XCJjb250ZXh0LW1lbnVcIiBbbmdDbGFzc109XCJ7ICdzaG93Jzogc2hvd0NvbnRleHRNZW51IH1cIiBbbmdTdHlsZV09XCJwb3NpdGlvbnNcIj5cblx0PGRpdiBpZD1cImNvbnRleHQtbWVudS1jb250YWluZXJcIiBjbGFzcz1cImNvbnRleHQtbWVudVwiPlxuXHRcdDx1bCBjbGFzcz1cIm1lbnVcIj5cblx0XHRcdDxsaSBjbGFzcz1cInRleHQtZ3JleVwiPkVkaXQ8L2xpPlxuXHRcdFx0PGxpIGNsYXNzPVwidGV4dC1ncmV5XCI+RGVsZXRlPC9saT5cblx0XHQ8L3VsPlxuXHQ8L2Rpdj5cbjwvZGl2PiJdfQ==
@@ -0,0 +1,24 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { ContextMenuComponent } from './components/context-menu/context-menu.component';
4
+ import * as i0 from "@angular/core";
5
+ export class ContextMenuModule {
6
+ }
7
+ ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8
+ ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuComponent], imports: [CommonModule], exports: [ContextMenuComponent] });
9
+ ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, imports: [CommonModule] });
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, decorators: [{
11
+ type: NgModule,
12
+ args: [{
13
+ declarations: [
14
+ ContextMenuComponent
15
+ ],
16
+ imports: [
17
+ CommonModule
18
+ ],
19
+ exports: [
20
+ ContextMenuComponent
21
+ ]
22
+ }]
23
+ }] });
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC1tZW51Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvY29udGV4dC1tZW51L2NvbnRleHQtbWVudS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sa0RBQWtELENBQUM7O0FBZXhGLE1BQU0sT0FBTyxpQkFBaUI7OzhHQUFqQixpQkFBaUI7K0dBQWpCLGlCQUFpQixpQkFUMUIsb0JBQW9CLGFBR3BCLFlBQVksYUFHWixvQkFBb0I7K0dBR1gsaUJBQWlCLFlBTjFCLFlBQVk7MkZBTUgsaUJBQWlCO2tCQVg3QixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRTt3QkFDWixvQkFBb0I7cUJBQ3JCO29CQUNELE9BQU8sRUFBRTt3QkFDUCxZQUFZO3FCQUNiO29CQUNGLE9BQU8sRUFBRTt3QkFDTixvQkFBb0I7cUJBQ3RCO2lCQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5pbXBvcnQgeyBDb250ZXh0TWVudUNvbXBvbmVudCB9IGZyb20gJy4vY29tcG9uZW50cy9jb250ZXh0LW1lbnUvY29udGV4dC1tZW51LmNvbXBvbmVudCc7XG5cblxuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtcbiAgICBDb250ZXh0TWVudUNvbXBvbmVudFxuICBdLFxuICBpbXBvcnRzOiBbXG4gICAgQ29tbW9uTW9kdWxlXG4gIF0sXG5cdGV4cG9ydHM6IFtcbiAgICBDb250ZXh0TWVudUNvbXBvbmVudFxuXHRdXG59KVxuZXhwb3J0IGNsYXNzIENvbnRleHRNZW51TW9kdWxlIHsgfVxuIl19
@@ -0,0 +1,8 @@
1
+ /*
2
+ * Public API Surface of windows-plus-utilities
3
+ */
4
+ export * from './components/context-menu/context-menu.component';
5
+ export * from './context-menu.module';
6
+ export * from './util/interface/items/context-menu-items.interface';
7
+ export * from './util/interface/position/context-menu-positions.interface';
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvY29udGV4dC1tZW51L3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7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mVxdWlyZWQgcHJvcGVydGllcyBmb3IgdGhlIGNvbnRleHQgbWVudSBpdGVtc1xyXG4gKi9cclxuZXhwb3J0IGludGVyZmFjZSBDb250ZXh0TWVudUl0ZW0ge1xyXG5cdCdsYWJlbCc6IHN0cmluZyxcclxuXHQnaGFuZGxlQ2xpY2snOiAoLi4uYXJnczogYW55W10pID0+IHZvaWRcclxufSJdfQ==
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC1tZW51LXBvc2l0aW9ucy5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93aW5kb3dzLXBsdXMtdXRpbGl0aWVzL2NvbnRleHQtbWVudS91dGlsL2ludGVyZmFjZS9wb3NpdGlvbi9jb250ZXh0LW1lbnUtcG9zaXRpb25zLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXHJcbiAqIEBhdXRob3IgQWxleCBIb2Rzb25cclxuICogQGRlc2NyaXB0aW9uIGFuIGludGVyZmFjZSB3aGljaCBkZWZpbmVzIHRoZSByZXF1aXJlZCBwcm9wZXJ0aWVzIHdoZW4gZGVmaW5pbmcgdGhlIGNvbnRleHQgbWVudXMgcG9zaXRpb25cclxuICovXHJcbmV4cG9ydCBpbnRlcmZhY2UgQ29udGV4dE1lbnVQb3NpdGlvbiB7XHJcblx0J2xlZnQucHgnOiBudW1iZXIsXHJcblx0J3RvcC5weCc6IG51bWJlclxyXG59Il19
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2luZG93cy1wbHVzLXV0aWxpdGllcy1jb250ZXh0LW1lbnUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy93aW5kb3dzLXBsdXMtdXRpbGl0aWVzL2NvbnRleHQtbWVudS93aW5kb3dzLXBsdXMtdXRpbGl0aWVzLWNvbnRleHQtbWVudS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
@@ -0,0 +1,83 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Input, HostListener, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+
6
+ class ContextMenuComponent {
7
+ constructor() {
8
+ /**
9
+ * @description indicates whether the context menu is being shown
10
+ */
11
+ this.showContextMenu = false;
12
+ }
13
+ /**
14
+ * @author Alex Hodson
15
+ * @description toggles the component member which indicates the context menu visibility
16
+ */
17
+ toggleContextMenu() {
18
+ this.showContextMenu = !this.showContextMenu;
19
+ }
20
+ /**
21
+ * @author Alex Hodson
22
+ * @description handles a click outside of the context menu which will toggle the context menu display
23
+ */
24
+ documentClick() {
25
+ if (this.showContextMenu)
26
+ this.toggleContextMenu();
27
+ }
28
+ /**
29
+ * @author Alex Hodson
30
+ * @description handles the escape button being typed which will toggle the context menu display
31
+ */
32
+ escKeyClick() {
33
+ if (this.showContextMenu)
34
+ this.toggleContextMenu();
35
+ }
36
+ }
37
+ ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
38
+ ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ContextMenuComponent, selector: "wp-context-menu", inputs: { items: "items", positions: "positions" }, host: { listeners: { "document:click": "documentClick()", "document:keyup.escape": "escKeyClick()" } }, ngImport: i0, template: "<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>", styles: ["#context-menu.show{display:block;position:absolute;left:0;right:0}#context-menu{display:none;position:relative;max-width:100px;width:100px}#context-menu #context-menu-container{border:1px solid var(--wp-lightGrey);background:#FFF;width:100%;box-shadow:0 8px 16px #0000004d}#context-menu #context-menu-container ul{list-style-type:none;padding:0;margin:0}#context-menu #context-menu-container ul li{padding:.5rem 1rem;border-bottom:1px solid var(--wp-lightGrey)}#context-menu #context-menu-container ul li:hover{background:var(--wp-lightGrey);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuComponent, decorators: [{
40
+ type: Component,
41
+ args: [{ selector: 'wp-context-menu', template: "<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>", styles: ["#context-menu.show{display:block;position:absolute;left:0;right:0}#context-menu{display:none;position:relative;max-width:100px;width:100px}#context-menu #context-menu-container{border:1px solid var(--wp-lightGrey);background:#FFF;width:100%;box-shadow:0 8px 16px #0000004d}#context-menu #context-menu-container ul{list-style-type:none;padding:0;margin:0}#context-menu #context-menu-container ul li{padding:.5rem 1rem;border-bottom:1px solid var(--wp-lightGrey)}#context-menu #context-menu-container ul li:hover{background:var(--wp-lightGrey);cursor:pointer}\n"] }]
42
+ }], propDecorators: { items: [{
43
+ type: Input
44
+ }], positions: [{
45
+ type: Input
46
+ }], documentClick: [{
47
+ type: HostListener,
48
+ args: ['document:click']
49
+ }], escKeyClick: [{
50
+ type: HostListener,
51
+ args: ['document:keyup.escape']
52
+ }] } });
53
+
54
+ class ContextMenuModule {
55
+ }
56
+ ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
57
+ ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuComponent], imports: [CommonModule], exports: [ContextMenuComponent] });
58
+ ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, imports: [CommonModule] });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, decorators: [{
60
+ type: NgModule,
61
+ args: [{
62
+ declarations: [
63
+ ContextMenuComponent
64
+ ],
65
+ imports: [
66
+ CommonModule
67
+ ],
68
+ exports: [
69
+ ContextMenuComponent
70
+ ]
71
+ }]
72
+ }] });
73
+
74
+ /*
75
+ * Public API Surface of windows-plus-utilities
76
+ */
77
+
78
+ /**
79
+ * Generated bundle index. Do not edit.
80
+ */
81
+
82
+ export { ContextMenuComponent, ContextMenuModule };
83
+ //# sourceMappingURL=windows-plus-utilities-context-menu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows-plus-utilities-context-menu.mjs","sources":["../../../projects/windows-plus-utilities/context-menu/components/context-menu/context-menu.component.ts","../../../projects/windows-plus-utilities/context-menu/components/context-menu/context-menu.component.html","../../../projects/windows-plus-utilities/context-menu/context-menu.module.ts","../../../projects/windows-plus-utilities/context-menu/public-api.ts","../../../projects/windows-plus-utilities/context-menu/windows-plus-utilities-context-menu.ts"],"sourcesContent":["import { Component, HostListener, Input } from '@angular/core';\nimport { ContextMenuItem } from '../../public-api'\nimport { ContextMenuPosition } from '../../util/interface/position/context-menu-positions.interface'\n\n@Component({\n selector: 'wp-context-menu',\n templateUrl: './context-menu.component.html',\n styleUrls: ['./context-menu.component.sass']\n})\nexport class ContextMenuComponent {\n\t/**\n\t * @description an array containing the context menu items to be displayed\n\t */\n\t@Input() items: ContextMenuItem[]\n\t/**\n\t * @description an object containing the required context menu position\n\t */\n\t@Input() positions: ContextMenuPosition\n\t/**\n\t * @description indicates whether the context menu is being shown \n\t */\n\tshowContextMenu: boolean = false\n\t/**\n\t * @author Alex Hodson\n\t * @description toggles the component member which indicates the context menu visibility\n\t */\n\ttoggleContextMenu(): void {\n\t\tthis.showContextMenu = !this.showContextMenu\n\t}\n\t/**\n\t * @author Alex Hodson\n\t * @description handles a click outside of the context menu which will toggle the context menu display\n\t */\n\t@HostListener('document:click')\n documentClick(): void {\n if (this.showContextMenu) this.toggleContextMenu()\n }\n\n\t/**\n\t * @author Alex Hodson\n\t * @description handles the escape button being typed which will toggle the context menu display\n\t */\n @HostListener('document:keyup.escape')\n escKeyClick(): void {\n if (this.showContextMenu) this.toggleContextMenu()\n }\n}\n","<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ContextMenuComponent } from './components/context-menu/context-menu.component';\n\n\n\n@NgModule({\n declarations: [\n ContextMenuComponent\n ],\n imports: [\n CommonModule\n ],\n\texports: [\n ContextMenuComponent\n\t]\n})\nexport class ContextMenuModule { }\n","/*\r\n * Public API Surface of windows-plus-utilities\r\n */\r\n\r\nexport * from './components/context-menu/context-menu.component';\r\nexport * from './context-menu.module';\r\nexport * from './util/interface/items/context-menu-items.interface'\r\nexport * from './util/interface/position/context-menu-positions.interface'\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,oBAAoB,CAAA;AALjC,IAAA,WAAA,GAAA;AAcC;;AAEG;AACH,QAAA,IAAe,CAAA,eAAA,GAAY,KAAK,CAAA;KAyBhC;AAxBA;;;AAGG;IACH,iBAAiB,GAAA;AAChB,QAAA,IAAI,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,eAAe,CAAA;KAC5C;AACD;;;AAGG;IAEF,aAAa,GAAA;QACX,IAAI,IAAI,CAAC,eAAe;YAAE,IAAI,CAAC,iBAAiB,EAAE,CAAA;KACnD;AAEF;;;AAGG;IAEF,WAAW,GAAA;QACT,IAAI,IAAI,CAAC,eAAe;YAAE,IAAI,CAAC,iBAAiB,EAAE,CAAA;KACnD;;iHApCU,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,mNCTjC,qSAOM,EAAA,MAAA,EAAA,CAAA,ijBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EA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A;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,oBAAA,OAAO,EAAE;wBACN,oBAAoB;AACtB,qBAAA;iBACD,CAAA;;;AChBD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,83 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Input, HostListener, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+
6
+ class ContextMenuComponent {
7
+ constructor() {
8
+ /**
9
+ * @description indicates whether the context menu is being shown
10
+ */
11
+ this.showContextMenu = false;
12
+ }
13
+ /**
14
+ * @author Alex Hodson
15
+ * @description toggles the component member which indicates the context menu visibility
16
+ */
17
+ toggleContextMenu() {
18
+ this.showContextMenu = !this.showContextMenu;
19
+ }
20
+ /**
21
+ * @author Alex Hodson
22
+ * @description handles a click outside of the context menu which will toggle the context menu display
23
+ */
24
+ documentClick() {
25
+ if (this.showContextMenu)
26
+ this.toggleContextMenu();
27
+ }
28
+ /**
29
+ * @author Alex Hodson
30
+ * @description handles the escape button being typed which will toggle the context menu display
31
+ */
32
+ escKeyClick() {
33
+ if (this.showContextMenu)
34
+ this.toggleContextMenu();
35
+ }
36
+ }
37
+ ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
38
+ ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: ContextMenuComponent, selector: "wp-context-menu", inputs: { items: "items", positions: "positions" }, host: { listeners: { "document:click": "documentClick()", "document:keyup.escape": "escKeyClick()" } }, ngImport: i0, template: "<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>", styles: ["#context-menu.show{display:block;position:absolute;left:0;right:0}#context-menu{display:none;position:relative;max-width:100px;width:100px}#context-menu #context-menu-container{border:1px solid var(--wp-lightGrey);background:#FFF;width:100%;box-shadow:0 8px 16px #0000004d}#context-menu #context-menu-container ul{list-style-type:none;padding:0;margin:0}#context-menu #context-menu-container ul li{padding:.5rem 1rem;border-bottom:1px solid var(--wp-lightGrey)}#context-menu #context-menu-container ul li:hover{background:var(--wp-lightGrey);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuComponent, decorators: [{
40
+ type: Component,
41
+ args: [{ selector: 'wp-context-menu', template: "<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>", styles: ["#context-menu.show{display:block;position:absolute;left:0;right:0}#context-menu{display:none;position:relative;max-width:100px;width:100px}#context-menu #context-menu-container{border:1px solid var(--wp-lightGrey);background:#FFF;width:100%;box-shadow:0 8px 16px #0000004d}#context-menu #context-menu-container ul{list-style-type:none;padding:0;margin:0}#context-menu #context-menu-container ul li{padding:.5rem 1rem;border-bottom:1px solid var(--wp-lightGrey)}#context-menu #context-menu-container ul li:hover{background:var(--wp-lightGrey);cursor:pointer}\n"] }]
42
+ }], propDecorators: { items: [{
43
+ type: Input
44
+ }], positions: [{
45
+ type: Input
46
+ }], documentClick: [{
47
+ type: HostListener,
48
+ args: ['document:click']
49
+ }], escKeyClick: [{
50
+ type: HostListener,
51
+ args: ['document:keyup.escape']
52
+ }] } });
53
+
54
+ class ContextMenuModule {
55
+ }
56
+ ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
57
+ ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuComponent], imports: [CommonModule], exports: [ContextMenuComponent] });
58
+ ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, imports: [CommonModule] });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: ContextMenuModule, decorators: [{
60
+ type: NgModule,
61
+ args: [{
62
+ declarations: [
63
+ ContextMenuComponent
64
+ ],
65
+ imports: [
66
+ CommonModule
67
+ ],
68
+ exports: [
69
+ ContextMenuComponent
70
+ ]
71
+ }]
72
+ }] });
73
+
74
+ /*
75
+ * Public API Surface of windows-plus-utilities
76
+ */
77
+
78
+ /**
79
+ * Generated bundle index. Do not edit.
80
+ */
81
+
82
+ export { ContextMenuComponent, ContextMenuModule };
83
+ //# sourceMappingURL=windows-plus-utilities-context-menu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows-plus-utilities-context-menu.mjs","sources":["../../../projects/windows-plus-utilities/context-menu/components/context-menu/context-menu.component.ts","../../../projects/windows-plus-utilities/context-menu/components/context-menu/context-menu.component.html","../../../projects/windows-plus-utilities/context-menu/context-menu.module.ts","../../../projects/windows-plus-utilities/context-menu/public-api.ts","../../../projects/windows-plus-utilities/context-menu/windows-plus-utilities-context-menu.ts"],"sourcesContent":["import { Component, HostListener, Input } from '@angular/core';\nimport { ContextMenuItem } from '../../public-api'\nimport { ContextMenuPosition } from '../../util/interface/position/context-menu-positions.interface'\n\n@Component({\n selector: 'wp-context-menu',\n templateUrl: './context-menu.component.html',\n styleUrls: ['./context-menu.component.sass']\n})\nexport class ContextMenuComponent {\n\t/**\n\t * @description an array containing the context menu items to be displayed\n\t */\n\t@Input() items: ContextMenuItem[]\n\t/**\n\t * @description an object containing the required context menu position\n\t */\n\t@Input() positions: ContextMenuPosition\n\t/**\n\t * @description indicates whether the context menu is being shown \n\t */\n\tshowContextMenu: boolean = false\n\t/**\n\t * @author Alex Hodson\n\t * @description toggles the component member which indicates the context menu visibility\n\t */\n\ttoggleContextMenu(): void {\n\t\tthis.showContextMenu = !this.showContextMenu\n\t}\n\t/**\n\t * @author Alex Hodson\n\t * @description handles a click outside of the context menu which will toggle the context menu display\n\t */\n\t@HostListener('document:click')\n documentClick(): void {\n if (this.showContextMenu) this.toggleContextMenu()\n }\n\n\t/**\n\t * @author Alex Hodson\n\t * @description handles the escape button being typed which will toggle the context menu display\n\t */\n @HostListener('document:keyup.escape')\n escKeyClick(): void {\n if (this.showContextMenu) this.toggleContextMenu()\n }\n}\n","<div id=\"context-menu\" [ngClass]=\"{ 'show': showContextMenu }\" [ngStyle]=\"positions\">\n\t<div id=\"context-menu-container\" class=\"context-menu\">\n\t\t<ul class=\"menu\">\n\t\t\t<li class=\"text-grey\">Edit</li>\n\t\t\t<li class=\"text-grey\">Delete</li>\n\t\t</ul>\n\t</div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ContextMenuComponent } from './components/context-menu/context-menu.component';\n\n\n\n@NgModule({\n declarations: [\n ContextMenuComponent\n ],\n imports: [\n CommonModule\n ],\n\texports: [\n ContextMenuComponent\n\t]\n})\nexport class ContextMenuModule { }\n","/*\r\n * Public API Surface of windows-plus-utilities\r\n */\r\n\r\nexport * from './components/context-menu/context-menu.component';\r\nexport * from './context-menu.module';\r\nexport * from './util/interface/items/context-menu-items.interface'\r\nexport * from './util/interface/position/context-menu-positions.interface'\r\n","/**\n * Generated bundle index.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
6
  "@angular/core": "^15.1.2",
@@ -32,6 +32,14 @@
32
32
  "node": "./fesm2015/windows-plus-utilities.mjs",
33
33
  "default": "./fesm2020/windows-plus-utilities.mjs"
34
34
  },
35
+ "./context-menu": {
36
+ "types": "./context-menu/index.d.ts",
37
+ "esm2020": "./esm2020/context-menu/windows-plus-utilities-context-menu.mjs",
38
+ "es2020": "./fesm2020/windows-plus-utilities-context-menu.mjs",
39
+ "es2015": "./fesm2015/windows-plus-utilities-context-menu.mjs",
40
+ "node": "./fesm2015/windows-plus-utilities-context-menu.mjs",
41
+ "default": "./fesm2020/windows-plus-utilities-context-menu.mjs"
42
+ },
35
43
  "./custom-card": {
36
44
  "types": "./custom-card/index.d.ts",
37
45
  "esm2020": "./esm2020/custom-card/windows-plus-utilities-custom-card.mjs",
@@ -64,14 +72,6 @@
64
72
  "node": "./fesm2015/windows-plus-utilities-section-header.mjs",
65
73
  "default": "./fesm2020/windows-plus-utilities-section-header.mjs"
66
74
  },
67
- "./table": {
68
- "types": "./table/index.d.ts",
69
- "esm2020": "./esm2020/table/windows-plus-utilities-table.mjs",
70
- "es2020": "./fesm2020/windows-plus-utilities-table.mjs",
71
- "es2015": "./fesm2015/windows-plus-utilities-table.mjs",
72
- "node": "./fesm2015/windows-plus-utilities-table.mjs",
73
- "default": "./fesm2020/windows-plus-utilities-table.mjs"
74
- },
75
75
  "./util": {
76
76
  "types": "./util/index.d.ts",
77
77
  "esm2020": "./esm2020/util/windows-plus-utilities-util.mjs",
@@ -1,41 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/common";
4
- import * as i2 from "windows-plus-form-fields/custom-button";
5
- export class TableComponent {
6
- /**
7
- * @author Alex Hodson
8
- * @description class constructor specifying the required services and properties for the component
9
- */
10
- constructor() { }
11
- /**
12
- * @author Alex Hodson
13
- * @description the method to be run when the component is rendered
14
- */
15
- ngOnInit() {
16
- }
17
- /**
18
- * @author Alex Hodson
19
- * @description identifies whether the given element is a string or number; If so, the element can be rendered normally
20
- * @param element the element to be checked
21
- * @returns whether the given element is a string or number
22
- */
23
- isString(element) {
24
- return typeof element === 'string' || typeof element === 'number' || element == null;
25
- }
26
- }
27
- TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TableComponent, selector: "wp-table", inputs: { id: "id", title: "title", headers: "headers", tableData: "tableData" }, ngImport: i0, template: "<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>", styles: [".table-responsive{max-height:500px;width:100%;overflow-y:auto}table{table-layout:fixed}table .thead{font-size:14px;font-family:--wp-fontFamily}table .thead-blue th{background:var(--wp-secondaryBlue);color:#fff}table th{position:sticky;top:0}table .table-cell{font-size:14px;font-family:--wp-fontFamily;padding:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.CustomButtonComponent, selector: "wp-custom-button", inputs: ["value", "type", "colour", "id", "outline", "disabled", "icon"], outputs: ["handleClick"] }] });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableComponent, decorators: [{
30
- type: Component,
31
- args: [{ selector: 'wp-table', template: "<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>", styles: [".table-responsive{max-height:500px;width:100%;overflow-y:auto}table{table-layout:fixed}table .thead{font-size:14px;font-family:--wp-fontFamily}table .thead-blue th{background:var(--wp-secondaryBlue);color:#fff}table th{position:sticky;top:0}table .table-cell{font-size:14px;font-family:--wp-fontFamily;padding:5px}\n"] }]
32
- }], ctorParameters: function () { return []; }, propDecorators: { id: [{
33
- type: Input
34
- }], title: [{
35
- type: Input
36
- }], headers: [{
37
- type: Input
38
- }], tableData: [{
39
- type: Input
40
- }] } });
41
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvd2luZG93cy1wbHVzLXV0aWxpdGllcy90YWJsZS9jb21wb25lbnRzL3RhYmxlL3RhYmxlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvdGFibGUvY29tcG9uZW50cy90YWJsZS90YWJsZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBa0IsTUFBTSxlQUFlLENBQUM7Ozs7QUFRakUsTUFBTSxPQUFPLGNBQWM7SUFpQjFCOzs7T0FHRztJQUNILGdCQUFnQixDQUFDO0lBQ2pCOzs7T0FHRztJQUNILFFBQVE7SUFDUixDQUFDO0lBQ0Q7Ozs7O09BS0c7SUFDSCxRQUFRLENBQUMsT0FBa0I7UUFDMUIsT0FBTyxPQUFPLE9BQU8sS0FBSyxRQUFRLElBQUksT0FBTyxPQUFPLEtBQUssUUFBUSxJQUFJLE9BQU8sSUFBSSxJQUFJLENBQUE7SUFDckYsQ0FBQzs7MkdBcENXLGNBQWM7K0ZBQWQsY0FBYyxrSUNSM0IsK2hEQXdDTTsyRkRoQ08sY0FBYztrQkFMMUIsU0FBUzsrQkFDRSxVQUFVOzBFQVFaLEVBQUU7c0JBQVYsS0FBSztnQkFJRy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x0XHRcdFx0XHRcdFx0XHRbdHlwZV09XCJyb3dbaGVhZGVyXS50eXBlXCJcblx0XHRcdFx0XHRcdFx0XHRcdFx0W2NvbG91cl09XCJyb3dbaGVhZGVyXS5jb2xvdXJcIlxuXHRcdFx0XHRcdFx0XHRcdFx0XHRbb3V0bGluZV09XCJyb3dbaGVhZGVyXS5vdXRsaW5lXCJcblx0XHRcdFx0XHRcdFx0XHRcdFx0W2Rpc2FibGVkXT1cInJvd1toZWFkZXJdLmRpc2FibGVkXCJcblx0XHRcdFx0XHRcdFx0XHRcdFx0W2ljb25dPVwicm93W2hlYWRlcl0uaWNvblwiXG5cdFx0XHRcdFx0XHRcdFx0XHRcdChoYW5kbGVDbGljayk9XCJyb3dbaGVhZGVyXS5oYW5kbGVDbGljaygkZXZlbnQpXCJcblx0XHRcdFx0XHRcdFx0XHRcdD48L3dwLWN1c3RvbS1idXR0b24+XG5cdFx0XHRcdFx0XHRcdFx0PC9kaXY+XG5cdFx0XHRcdFx0XHRcdDwvbmctY29udGFpbmVyPlxuXHRcdFx0XHRcdFx0PC90ZD5cblx0XHRcdFx0XHQ8L3RyPlxuXHRcdFx0XHQ8L3Rib2R5PlxuXHRcdFx0PC90YWJsZT5cblx0XHQ8L2Rpdj5cblx0PC9uZy10ZW1wbGF0ZT5cblx0PG5nLXRlbXBsYXRlICNlbXB0eUJsb2NrPlxuXHRcdDxwIGNsYXNzPVwidGV4dC1ncmV5XCI+VGhlcmUgaXMgbm8gZGF0YSB0byBzaG93PC9wPlxuXHQ8L25nLXRlbXBsYXRlPlxuPC9kaXY+Il19
@@ -1,8 +0,0 @@
1
- /*
2
- * Public API Surface of windows-plus-utilities
3
- */
4
- export * from './components/table/table.component';
5
- export * from './util/interface/config/table-configuration.interface';
6
- export * from './util/types/table-data/table-data.type';
7
- export * from './table.module';
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvdGFibGUvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsb0NBQW9DLENBQUM7QUFDbkQsY0FBYyx1REFBdUQsQ0FBQztBQUN0RSxjQUFjLHlDQUF5QyxDQUFDO0FBQ3hELGNBQWMsZ0JBQWdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygd2luZG93cy1wbHVzLXV0aWxpdGllc1xyXG4gKi9cclxuXHJcbmV4cG9ydCAqIGZyb20gJy4vY29tcG9uZW50cy90YWJsZS90YWJsZS5jb21wb25lbnQnO1xyXG5leHBvcnQgKiBmcm9tICcuL3V0aWwvaW50ZXJmYWNlL2NvbmZpZy90YWJsZS1jb25maWd1cmF0aW9uLmludGVyZmFjZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vdXRpbC90eXBlcy90YWJsZS1kYXRhL3RhYmxlLWRhdGEudHlwZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vdGFibGUubW9kdWxlJztcclxuIl19
@@ -1,28 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { TableComponent } from './components/table/table.component';
4
- import { CustomButtonModule } from 'windows-plus-form-fields/custom-button';
5
- import * as i0 from "@angular/core";
6
- export class TableModule {
7
- }
8
- TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
- TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TableModule, declarations: [TableComponent], imports: [CommonModule,
10
- CustomButtonModule], exports: [TableComponent] });
11
- TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, imports: [CommonModule,
12
- CustomButtonModule] });
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, decorators: [{
14
- type: NgModule,
15
- args: [{
16
- declarations: [
17
- TableComponent
18
- ],
19
- imports: [
20
- CommonModule,
21
- CustomButtonModule,
22
- ],
23
- exports: [
24
- TableComponent
25
- ]
26
- }]
27
- }] });
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvd2luZG93cy1wbHVzLXV0aWxpdGllcy90YWJsZS90YWJsZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLG9DQUFvQyxDQUFDO0FBQ3BFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHdDQUF3QyxDQUFDOztBQWM1RSxNQUFNLE9BQU8sV0FBVzs7d0dBQVgsV0FBVzt5R0FBWCxXQUFXLGlCQVZwQixjQUFjLGFBR2pCLFlBQVk7UUFDWCxrQkFBa0IsYUFHaEIsY0FBYzt5R0FHTCxXQUFXLFlBUHZCLFlBQVk7UUFDWCxrQkFBa0I7MkZBTVAsV0FBVztrQkFadkIsUUFBUTttQkFBQztvQkFDUixZQUFZLEVBQUU7d0JBQ1osY0FBYztxQkFDZjtvQkFDRCxPQUFPLEVBQUU7d0JBQ1YsWUFBWTt3QkFDWCxrQkFBa0I7cUJBQ2pCO29CQUNELE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5cGUgVGFibGVEYXRhID0geyBba2V5OiBzdHJpbmddOiBDdXN0b21CdXR0b25Db25maWd8c3RyaW5nfG51bWJlciB9Il19
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2luZG93cy1wbHVzLXV0aWxpdGllcy10YWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3dpbmRvd3MtcGx1cy11dGlsaXRpZXMvdGFibGUvd2luZG93cy1wbHVzLXV0aWxpdGllcy10YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
@@ -1,77 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from 'windows-plus-form-fields/custom-button';
6
- import { CustomButtonModule } from 'windows-plus-form-fields/custom-button';
7
-
8
- class TableComponent {
9
- /**
10
- * @author Alex Hodson
11
- * @description class constructor specifying the required services and properties for the component
12
- */
13
- constructor() { }
14
- /**
15
- * @author Alex Hodson
16
- * @description the method to be run when the component is rendered
17
- */
18
- ngOnInit() {
19
- }
20
- /**
21
- * @author Alex Hodson
22
- * @description identifies whether the given element is a string or number; If so, the element can be rendered normally
23
- * @param element the element to be checked
24
- * @returns whether the given element is a string or number
25
- */
26
- isString(element) {
27
- return typeof element === 'string' || typeof element === 'number' || element == null;
28
- }
29
- }
30
- TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TableComponent, selector: "wp-table", inputs: { id: "id", title: "title", headers: "headers", tableData: "tableData" }, ngImport: i0, template: "<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>", styles: [".table-responsive{max-height:500px;width:100%;overflow-y:auto}table{table-layout:fixed}table .thead{font-size:14px;font-family:--wp-fontFamily}table .thead-blue th{background:var(--wp-secondaryBlue);color:#fff}table th{position:sticky;top:0}table .table-cell{font-size:14px;font-family:--wp-fontFamily;padding:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.CustomButtonComponent, selector: "wp-custom-button", inputs: ["value", "type", "colour", "id", "outline", "disabled", "icon"], outputs: ["handleClick"] }] });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableComponent, decorators: [{
33
- type: Component,
34
- args: [{ selector: 'wp-table', template: "<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>", styles: [".table-responsive{max-height:500px;width:100%;overflow-y:auto}table{table-layout:fixed}table .thead{font-size:14px;font-family:--wp-fontFamily}table .thead-blue th{background:var(--wp-secondaryBlue);color:#fff}table th{position:sticky;top:0}table .table-cell{font-size:14px;font-family:--wp-fontFamily;padding:5px}\n"] }]
35
- }], ctorParameters: function () { return []; }, propDecorators: { id: [{
36
- type: Input
37
- }], title: [{
38
- type: Input
39
- }], headers: [{
40
- type: Input
41
- }], tableData: [{
42
- type: Input
43
- }] } });
44
-
45
- class TableModule {
46
- }
47
- TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
48
- TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TableModule, declarations: [TableComponent], imports: [CommonModule,
49
- CustomButtonModule], exports: [TableComponent] });
50
- TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, imports: [CommonModule,
51
- CustomButtonModule] });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, decorators: [{
53
- type: NgModule,
54
- args: [{
55
- declarations: [
56
- TableComponent
57
- ],
58
- imports: [
59
- CommonModule,
60
- CustomButtonModule,
61
- ],
62
- exports: [
63
- TableComponent
64
- ]
65
- }]
66
- }] });
67
-
68
- /*
69
- * Public API Surface of windows-plus-utilities
70
- */
71
-
72
- /**
73
- * Generated bundle index. Do not edit.
74
- */
75
-
76
- export { TableComponent, TableModule };
77
- //# sourceMappingURL=windows-plus-utilities-table.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"windows-plus-utilities-table.mjs","sources":["../../../projects/windows-plus-utilities/table/components/table/table.component.ts","../../../projects/windows-plus-utilities/table/components/table/table.component.html","../../../projects/windows-plus-utilities/table/table.module.ts","../../../projects/windows-plus-utilities/table/public-api.ts","../../../projects/windows-plus-utilities/table/windows-plus-utilities-table.ts"],"sourcesContent":["import { Component, Input, OnInit, Output } from '@angular/core';\nimport { TableData } from '../../util/types/table-data/table-data.type'\n\n@Component({\n selector: 'wp-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.sass']\n})\nexport class TableComponent implements OnInit {\n\t/**\n\t * @description the identifier of the table element\n\t */\n\t@Input() id: string\n\t/**\n\t * @description the title of the table\n\t */\n\t@Input() title: string\n\t/**\n\t * @description the table headers\n\t */\n\t@Input() headers: string\n\t/**\n\t * @description the table data to be displayed\n\t */\n\t@Input() tableData: TableData[]\n\t/**\n\t * @author Alex Hodson\n\t * @description class constructor specifying the required services and properties for the component\n\t */\n\tconstructor() { }\n\t/**\n\t * @author Alex Hodson\n\t * @description the method to be run when the component is rendered\n\t */\n\tngOnInit(): void {\n\t}\n\t/**\n\t * @author Alex Hodson\n\t * @description identifies whether the given element is a string or number; If so, the element can be rendered normally\n\t * @param element the element to be checked\n\t * @returns whether the given element is a string or number\n\t */\n\tisString(element: TableData): boolean {\n\t\treturn typeof element === 'string' || typeof element === 'number' || element == null\n\t}\n}\n","<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TableComponent } from './components/table/table.component';\nimport { CustomButtonModule } from 'windows-plus-form-fields/custom-button';\n\n@NgModule({\n declarations: [\n TableComponent\n ],\n imports: [\n\tCommonModule,\n\t\tCustomButtonModule,\n ],\n exports: [\n TableComponent\n ]\n})\nexport class TableModule { }\n","/*\r\n * Public API Surface of windows-plus-utilities\r\n */\r\n\r\nexport * from './components/table/table.component';\r\nexport * from './util/interface/config/table-configuration.interface';\r\nexport * from './util/types/table-data/table-data.type';\r\nexport * from './table.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAQa,cAAc,CAAA;AAiB1B;;;AAGG;AACH,IAAA,WAAA,GAAA,GAAiB;AACjB;;;AAGG;IACH,QAAQ,GAAA;KACP;AACD;;;;;AAKG;AACH,IAAA,QAAQ,CAAC,OAAkB,EAAA;AAC1B,QAAA,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,IAAI,CAAA;KACpF;;2GApCW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,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AA,EAAA,CAAA;0EAQZ,EAAE,EAAA,CAAA;sBAAV,KAAK;gBAIG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBAIG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBAIG,SAAS,EAAA,CAAA;sBAAjB,KAAK;;;MEPM,WAAW,CAAA;;wGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAX,WAAW,EAAA,YAAA,EAAA,CAVpB,cAAc,CAAA,EAAA,OAAA,EAAA,CAGjB,YAAY;QACX,kBAAkB,aAGhB,cAAc,CAAA,EAAA,CAAA,CAAA;AAGL,WAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAPvB,YAAY;QACX,kBAAkB,CAAA,EAAA,CAAA,CAAA;2FAMP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAZvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,cAAc;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACV,YAAY;wBACX,kBAAkB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,cAAc;AACf,qBAAA;iBACF,CAAA;;;AChBD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,77 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from 'windows-plus-form-fields/custom-button';
6
- import { CustomButtonModule } from 'windows-plus-form-fields/custom-button';
7
-
8
- class TableComponent {
9
- /**
10
- * @author Alex Hodson
11
- * @description class constructor specifying the required services and properties for the component
12
- */
13
- constructor() { }
14
- /**
15
- * @author Alex Hodson
16
- * @description the method to be run when the component is rendered
17
- */
18
- ngOnInit() {
19
- }
20
- /**
21
- * @author Alex Hodson
22
- * @description identifies whether the given element is a string or number; If so, the element can be rendered normally
23
- * @param element the element to be checked
24
- * @returns whether the given element is a string or number
25
- */
26
- isString(element) {
27
- return typeof element === 'string' || typeof element === 'number' || element == null;
28
- }
29
- }
30
- TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TableComponent, selector: "wp-table", inputs: { id: "id", title: "title", headers: "headers", tableData: "tableData" }, ngImport: i0, template: "<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>", styles: [".table-responsive{max-height:500px;width:100%;overflow-y:auto}table{table-layout:fixed}table .thead{font-size:14px;font-family:--wp-fontFamily}table .thead-blue th{background:var(--wp-secondaryBlue);color:#fff}table th{position:sticky;top:0}table .table-cell{font-size:14px;font-family:--wp-fontFamily;padding:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.CustomButtonComponent, selector: "wp-custom-button", inputs: ["value", "type", "colour", "id", "outline", "disabled", "icon"], outputs: ["handleClick"] }] });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableComponent, decorators: [{
33
- type: Component,
34
- args: [{ selector: 'wp-table', template: "<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>", styles: [".table-responsive{max-height:500px;width:100%;overflow-y:auto}table{table-layout:fixed}table .thead{font-size:14px;font-family:--wp-fontFamily}table .thead-blue th{background:var(--wp-secondaryBlue);color:#fff}table th{position:sticky;top:0}table .table-cell{font-size:14px;font-family:--wp-fontFamily;padding:5px}\n"] }]
35
- }], ctorParameters: function () { return []; }, propDecorators: { id: [{
36
- type: Input
37
- }], title: [{
38
- type: Input
39
- }], headers: [{
40
- type: Input
41
- }], tableData: [{
42
- type: Input
43
- }] } });
44
-
45
- class TableModule {
46
- }
47
- TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
48
- TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TableModule, declarations: [TableComponent], imports: [CommonModule,
49
- CustomButtonModule], exports: [TableComponent] });
50
- TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, imports: [CommonModule,
51
- CustomButtonModule] });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TableModule, decorators: [{
53
- type: NgModule,
54
- args: [{
55
- declarations: [
56
- TableComponent
57
- ],
58
- imports: [
59
- CommonModule,
60
- CustomButtonModule,
61
- ],
62
- exports: [
63
- TableComponent
64
- ]
65
- }]
66
- }] });
67
-
68
- /*
69
- * Public API Surface of windows-plus-utilities
70
- */
71
-
72
- /**
73
- * Generated bundle index. Do not edit.
74
- */
75
-
76
- export { TableComponent, TableModule };
77
- //# sourceMappingURL=windows-plus-utilities-table.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"windows-plus-utilities-table.mjs","sources":["../../../projects/windows-plus-utilities/table/components/table/table.component.ts","../../../projects/windows-plus-utilities/table/components/table/table.component.html","../../../projects/windows-plus-utilities/table/table.module.ts","../../../projects/windows-plus-utilities/table/public-api.ts","../../../projects/windows-plus-utilities/table/windows-plus-utilities-table.ts"],"sourcesContent":["import { Component, Input, OnInit, Output } from '@angular/core';\nimport { TableData } from '../../util/types/table-data/table-data.type'\n\n@Component({\n selector: 'wp-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.sass']\n})\nexport class TableComponent implements OnInit {\n\t/**\n\t * @description the identifier of the table element\n\t */\n\t@Input() id: string\n\t/**\n\t * @description the title of the table\n\t */\n\t@Input() title: string\n\t/**\n\t * @description the table headers\n\t */\n\t@Input() headers: string\n\t/**\n\t * @description the table data to be displayed\n\t */\n\t@Input() tableData: TableData[]\n\t/**\n\t * @author Alex Hodson\n\t * @description class constructor specifying the required services and properties for the component\n\t */\n\tconstructor() { }\n\t/**\n\t * @author Alex Hodson\n\t * @description the method to be run when the component is rendered\n\t */\n\tngOnInit(): void {\n\t}\n\t/**\n\t * @author Alex Hodson\n\t * @description identifies whether the given element is a string or number; If so, the element can be rendered normally\n\t * @param element the element to be checked\n\t * @returns whether the given element is a string or number\n\t */\n\tisString(element: TableData): boolean {\n\t\treturn typeof element === 'string' || typeof element === 'number' || element == null\n\t}\n}\n","<div>\n\t<h2 class=\"lead\">{{title}}</h2>\n\t<div *ngIf=\"tableData.length > 0 then tableBlock else emptyBlock\"></div>\n\t<ng-template #tableBlock>\n\t\t<div class=\"scrollable-wrap\">\n\t\t\t<table [id]=\"id\" class=\"table table-responsive\">\n\t\t\t\t<thead class=\"thead thead-blue\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th *ngFor=\"let header of headers\">{{header}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let row of tableData\">\n\t\t\t\t\t\t<td class=\"table-cell text-grey\" *ngFor=\"let header of headers\">\n\t\t\t\t\t\t\t<ng-container [ngSwitch]=\"true\">\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"isString(row[header])\">\n\t\t\t\t\t\t\t\t\t{{row[header]}}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div *ngSwitchCase=\"!isString(row[header])\">\n\t\t\t\t\t\t\t\t\t<wp-custom-button \n\t\t\t\t\t\t\t\t\t\t[id]=\"row[header].id\"\n\t\t\t\t\t\t\t\t\t\t[value]=\"row[header].value\"\n\t\t\t\t\t\t\t\t\t\t[type]=\"row[header].type\"\n\t\t\t\t\t\t\t\t\t\t[colour]=\"row[header].colour\"\n\t\t\t\t\t\t\t\t\t\t[outline]=\"row[header].outline\"\n\t\t\t\t\t\t\t\t\t\t[disabled]=\"row[header].disabled\"\n\t\t\t\t\t\t\t\t\t\t[icon]=\"row[header].icon\"\n\t\t\t\t\t\t\t\t\t\t(handleClick)=\"row[header].handleClick($event)\"\n\t\t\t\t\t\t\t\t\t></wp-custom-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #emptyBlock>\n\t\t<p class=\"text-grey\">There is no data to show</p>\n\t</ng-template>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TableComponent } from './components/table/table.component';\nimport { CustomButtonModule } from 'windows-plus-form-fields/custom-button';\n\n@NgModule({\n declarations: [\n TableComponent\n ],\n imports: [\n\tCommonModule,\n\t\tCustomButtonModule,\n ],\n exports: [\n TableComponent\n ]\n})\nexport class TableModule { }\n","/*\r\n * Public API Surface of windows-plus-utilities\r\n */\r\n\r\nexport * from './components/table/table.component';\r\nexport * from './util/interface/config/table-configuration.interface';\r\nexport * from './util/types/table-data/table-data.type';\r\nexport * from './table.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAQa,cAAc,CAAA;AAiB1B;;;AAGG;AACH,IAAA,WAAA,GAAA,GAAiB;AACjB;;;AAGG;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table-data/table-data.type';
3
- import * as i0 from "@angular/core";
4
- export declare class TableComponent implements OnInit {
5
- /**
6
- * @description the identifier of the table element
7
- */
8
- id: string;
9
- /**
10
- * @description the title of the table
11
- */
12
- title: string;
13
- /**
14
- * @description the table headers
15
- */
16
- headers: string;
17
- /**
18
- * @description the table data to be displayed
19
- */
20
- tableData: TableData[];
21
- /**
22
- * @author Alex Hodson
23
- * @description class constructor specifying the required services and properties for the component
24
- */
25
- constructor();
26
- /**
27
- * @author Alex Hodson
28
- * @description the method to be run when the component is rendered
29
- */
30
- ngOnInit(): void;
31
- /**
32
- * @author Alex Hodson
33
- * @description identifies whether the given element is a string or number; If so, the element can be rendered normally
34
- * @param element the element to be checked
35
- * @returns whether the given element is a string or number
36
- */
37
- isString(element: TableData): boolean;
38
- static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
39
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "wp-table", never, { "id": "id"; "title": "title"; "headers": "headers"; "tableData": "tableData"; }, {}, never, never, false, never>;
40
- }
@@ -1,4 +0,0 @@
1
- export * from './components/table/table.component';
2
- export * from './util/interface/config/table-configuration.interface';
3
- export * from './util/types/table-data/table-data.type';
4
- export * from './table.module';
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./components/table/table.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "windows-plus-form-fields/custom-button";
5
- export declare class TableModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<TableModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<TableModule, [typeof i1.TableComponent], [typeof i2.CommonModule, typeof i3.CustomButtonModule], [typeof i1.TableComponent]>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<TableModule>;
9
- }
@@ -1,12 +0,0 @@
1
- import { TableData } from '../../types/table-data/table-data.type';
2
- /**
3
- * @author Alex Hodson
4
- * @description an interface which defines the properties required by the table
5
- */
6
- export interface TableConfiguration {
7
- 'id': string;
8
- 'title': string;
9
- 'headers': string[];
10
- 'tableData': TableData[];
11
- 'condition'?: (...args: any[]) => boolean;
12
- }
@@ -1,8 +0,0 @@
1
- import { CustomButtonConfig } from 'windows-plus-form-fields/custom-button';
2
- /**
3
- * @author Alex Hodson
4
- * @description a union type which defines the available types for a tables data
5
- */
6
- export type TableData = {
7
- [key: string]: CustomButtonConfig | string | number;
8
- };