@ng-atomic/components 5.13.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/smart-menu-button/smart-menu-button.atom.d.ts +3 -3
- package/esm2020/atoms/chips-input/chips-input.atom.mjs +9 -3
- package/esm2020/atoms/icon/icon.atom.mjs +2 -2
- package/esm2020/atoms/smart-menu-button/smart-menu-button.atom.mjs +49 -5
- package/esm2020/frames/auto-layout/auto-layout.frame.mjs +2 -2
- package/esm2020/frames/divider/divider.frame.mjs +3 -3
- package/esm2020/frames/drawer/drawer.frame.mjs +2 -2
- package/esm2020/frames/line-up/line-up.animations.mjs +8 -5
- package/esm2020/frames/line-up/line-up.frame.mjs +3 -4
- package/esm2020/frames/overlay/overlay.frame.mjs +2 -2
- package/esm2020/frames/scroll/scroll.frame.mjs +2 -2
- package/esm2020/frames/smart-menu/smart-menu.frame.mjs +2 -2
- package/esm2020/molecules/actions-column/actions-column.molecule.mjs +26 -4
- package/esm2020/molecules/chips-input-field/chips-input-field.molecule.mjs +48 -5
- package/esm2020/molecules/date-input-field/date-input-field.molecule.mjs +2 -2
- package/esm2020/molecules/navigation-list-item/navigation-list-item.molecule.mjs +5 -5
- package/esm2020/molecules/select-input-field/select-input-field.molecule.mjs +2 -2
- package/esm2020/molecules/smart-column/smart-column.molecule.mjs +3 -3
- package/esm2020/organisms/action-buttons-section/action-buttons-section.organism.mjs +2 -2
- package/esm2020/organisms/card-input-section/card-input-section.organism.mjs +2 -2
- package/esm2020/organisms/cvc-and-exp-input-section/cvc-and-exp-input-section.organism.mjs +2 -2
- package/esm2020/organisms/date-input-section/date-input-section.organism.mjs +2 -2
- package/esm2020/organisms/grid-toolbar/grid-toolbar.organism.mjs +50 -24
- package/esm2020/organisms/heading/heading.organism.mjs +2 -2
- package/esm2020/organisms/mermaid-section/mermaid-section.organism.mjs +2 -1
- package/esm2020/organisms/messages-section/messages-section.organism.mjs +2 -2
- package/esm2020/organisms/navigation-list/navigation-list.organism.mjs +19 -3
- package/esm2020/organisms/navigator/navigator.organism.mjs +39 -3
- package/esm2020/organisms/paginator/paginator.organism.mjs +1 -5
- package/esm2020/organisms/select-input-section/select-input-section.organism.mjs +2 -2
- package/esm2020/organisms/smart-table/smart-table.organism.mjs +86 -10
- package/esm2020/organisms/social-login-section/social-login-section.organism.mjs +2 -2
- package/esm2020/organisms/text-input-section/text-input-section.organism.mjs +2 -2
- package/esm2020/organisms/textarea-section/textarea-section.organism.mjs +2 -2
- package/esm2020/organisms/tree-section/index.mjs +2 -0
- package/esm2020/organisms/tree-section/ng-atomic-components-organisms-tree-section.mjs +5 -0
- package/esm2020/organisms/tree-section/tree-section.organism.mjs +227 -0
- package/esm2020/pages/blank/blank.page.mjs +3 -3
- package/esm2020/pages/blank/blank.route.mjs +2 -2
- package/esm2020/pages/blank/blank.routes.mjs +3 -0
- package/esm2020/pages/blank/index.mjs +1 -2
- package/esm2020/templates/entrance/entrance.template.mjs +2 -2
- package/esm2020/templates/menu/menu.template.mjs +25 -3
- package/esm2020/templates/smart-crud/smart-crud.template.mjs +2 -2
- package/esm2020/templates/smart-index/smart-index.template.mjs +116 -18
- package/fesm2015/ng-atomic-components-atoms-chips-input.mjs +8 -2
- package/fesm2015/ng-atomic-components-atoms-chips-input.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-atoms-icon.mjs +2 -2
- package/fesm2015/ng-atomic-components-atoms-smart-menu-button.mjs +48 -4
- package/fesm2015/ng-atomic-components-atoms-smart-menu-button.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-frames-auto-layout.mjs +2 -2
- package/fesm2015/ng-atomic-components-frames-divider.mjs +2 -2
- package/fesm2015/ng-atomic-components-frames-divider.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-frames-drawer.mjs +2 -2
- package/fesm2015/ng-atomic-components-frames-line-up.mjs +9 -7
- package/fesm2015/ng-atomic-components-frames-line-up.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-frames-overlay.mjs +2 -2
- package/fesm2015/ng-atomic-components-frames-scroll.mjs +2 -2
- package/fesm2015/ng-atomic-components-frames-smart-menu.mjs +2 -2
- package/fesm2015/ng-atomic-components-molecules-actions-column.mjs +25 -3
- package/fesm2015/ng-atomic-components-molecules-actions-column.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-molecules-chips-input-field.mjs +47 -4
- package/fesm2015/ng-atomic-components-molecules-chips-input-field.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-molecules-date-input-field.mjs +2 -2
- package/fesm2015/ng-atomic-components-molecules-navigation-list-item.mjs +4 -4
- package/fesm2015/ng-atomic-components-molecules-navigation-list-item.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-molecules-select-input-field.mjs +2 -2
- package/fesm2015/ng-atomic-components-molecules-smart-column.mjs +2 -2
- package/fesm2015/ng-atomic-components-molecules-smart-column.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-organisms-action-buttons-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-card-input-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-cvc-and-exp-input-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-date-input-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-grid-toolbar.mjs +49 -23
- package/fesm2015/ng-atomic-components-organisms-grid-toolbar.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-organisms-heading.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-mermaid-section.mjs +1 -0
- package/fesm2015/ng-atomic-components-organisms-mermaid-section.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-organisms-messages-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-navigation-list.mjs +18 -2
- package/fesm2015/ng-atomic-components-organisms-navigation-list.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-organisms-navigator.mjs +38 -2
- package/fesm2015/ng-atomic-components-organisms-navigator.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-organisms-paginator.mjs +0 -4
- package/fesm2015/ng-atomic-components-organisms-paginator.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-organisms-select-input-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-smart-table.mjs +85 -9
- package/fesm2015/ng-atomic-components-organisms-smart-table.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-organisms-social-login-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-text-input-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-textarea-section.mjs +2 -2
- package/fesm2015/ng-atomic-components-organisms-tree-section.mjs +237 -0
- package/fesm2015/ng-atomic-components-organisms-tree-section.mjs.map +1 -0
- package/fesm2015/ng-atomic-components-pages-blank-blank.routes-09f8841a.mjs +7 -0
- package/fesm2015/ng-atomic-components-pages-blank-blank.routes-09f8841a.mjs.map +1 -0
- package/fesm2015/ng-atomic-components-pages-blank.mjs +5 -32
- package/fesm2015/ng-atomic-components-pages-blank.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-templates-entrance.mjs +2 -2
- package/fesm2015/ng-atomic-components-templates-menu.mjs +24 -2
- package/fesm2015/ng-atomic-components-templates-menu.mjs.map +1 -1
- package/fesm2015/ng-atomic-components-templates-smart-crud.mjs +2 -2
- package/fesm2015/ng-atomic-components-templates-smart-index.mjs +115 -17
- package/fesm2015/ng-atomic-components-templates-smart-index.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-atoms-chips-input.mjs +8 -2
- package/fesm2020/ng-atomic-components-atoms-chips-input.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-atoms-icon.mjs +2 -2
- package/fesm2020/ng-atomic-components-atoms-smart-menu-button.mjs +48 -4
- package/fesm2020/ng-atomic-components-atoms-smart-menu-button.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-frames-auto-layout.mjs +2 -2
- package/fesm2020/ng-atomic-components-frames-divider.mjs +2 -2
- package/fesm2020/ng-atomic-components-frames-divider.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-frames-drawer.mjs +2 -2
- package/fesm2020/ng-atomic-components-frames-line-up.mjs +9 -7
- package/fesm2020/ng-atomic-components-frames-line-up.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-frames-overlay.mjs +2 -2
- package/fesm2020/ng-atomic-components-frames-scroll.mjs +2 -2
- package/fesm2020/ng-atomic-components-frames-smart-menu.mjs +2 -2
- package/fesm2020/ng-atomic-components-molecules-actions-column.mjs +25 -3
- package/fesm2020/ng-atomic-components-molecules-actions-column.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-molecules-chips-input-field.mjs +47 -4
- package/fesm2020/ng-atomic-components-molecules-chips-input-field.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-molecules-date-input-field.mjs +2 -2
- package/fesm2020/ng-atomic-components-molecules-navigation-list-item.mjs +4 -4
- package/fesm2020/ng-atomic-components-molecules-navigation-list-item.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-molecules-select-input-field.mjs +2 -2
- package/fesm2020/ng-atomic-components-molecules-smart-column.mjs +2 -2
- package/fesm2020/ng-atomic-components-molecules-smart-column.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-organisms-action-buttons-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-card-input-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-cvc-and-exp-input-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-date-input-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-grid-toolbar.mjs +49 -23
- package/fesm2020/ng-atomic-components-organisms-grid-toolbar.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-organisms-heading.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-mermaid-section.mjs +1 -0
- package/fesm2020/ng-atomic-components-organisms-mermaid-section.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-organisms-messages-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-navigation-list.mjs +18 -2
- package/fesm2020/ng-atomic-components-organisms-navigation-list.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-organisms-navigator.mjs +38 -2
- package/fesm2020/ng-atomic-components-organisms-navigator.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-organisms-paginator.mjs +0 -4
- package/fesm2020/ng-atomic-components-organisms-paginator.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-organisms-select-input-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-smart-table.mjs +85 -9
- package/fesm2020/ng-atomic-components-organisms-smart-table.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-organisms-social-login-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-text-input-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-textarea-section.mjs +2 -2
- package/fesm2020/ng-atomic-components-organisms-tree-section.mjs +234 -0
- package/fesm2020/ng-atomic-components-organisms-tree-section.mjs.map +1 -0
- package/fesm2020/ng-atomic-components-pages-blank-blank.routes-09f8841a.mjs +7 -0
- package/fesm2020/ng-atomic-components-pages-blank-blank.routes-09f8841a.mjs.map +1 -0
- package/fesm2020/ng-atomic-components-pages-blank.mjs +5 -32
- package/fesm2020/ng-atomic-components-pages-blank.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-templates-entrance.mjs +2 -2
- package/fesm2020/ng-atomic-components-templates-menu.mjs +24 -2
- package/fesm2020/ng-atomic-components-templates-menu.mjs.map +1 -1
- package/fesm2020/ng-atomic-components-templates-smart-crud.mjs +2 -2
- package/fesm2020/ng-atomic-components-templates-smart-index.mjs +115 -17
- package/fesm2020/ng-atomic-components-templates-smart-index.mjs.map +1 -1
- package/molecules/actions-column/actions-column.molecule.d.ts +2 -2
- package/organisms/grid-toolbar/grid-toolbar.organism.d.ts +3 -1
- package/organisms/navigator/navigator.organism.d.ts +3 -3
- package/organisms/paginator/paginator.organism.d.ts +0 -5
- package/organisms/smart-table/smart-table.organism.d.ts +6 -8
- package/organisms/tree-section/index.d.ts +1 -0
- package/organisms/tree-section/tree-section.organism.d.ts +49 -0
- package/package.json +13 -19
- package/pages/blank/blank.page.d.ts +1 -1
- package/pages/blank/blank.routes.d.ts +2 -0
- package/pages/blank/index.d.ts +0 -1
- package/templates/smart-index/smart-index.template.d.ts +16 -12
- package/esm2020/organisms/back-navigator/back-navigator.organism.mjs +0 -44
- package/esm2020/organisms/back-navigator/index.mjs +0 -2
- package/esm2020/organisms/back-navigator/ng-atomic-components-organisms-back-navigator.mjs +0 -5
- package/esm2020/organisms/top-navigator/index.mjs +0 -2
- package/esm2020/organisms/top-navigator/ng-atomic-components-organisms-top-navigator.mjs +0 -5
- package/esm2020/organisms/top-navigator/top-navigator.organism.mjs +0 -32
- package/esm2020/pages/blank/blank.module.mjs +0 -25
- package/fesm2015/ng-atomic-components-organisms-back-navigator.mjs +0 -51
- package/fesm2015/ng-atomic-components-organisms-back-navigator.mjs.map +0 -1
- package/fesm2015/ng-atomic-components-organisms-top-navigator.mjs +0 -39
- package/fesm2015/ng-atomic-components-organisms-top-navigator.mjs.map +0 -1
- package/fesm2020/ng-atomic-components-organisms-back-navigator.mjs +0 -51
- package/fesm2020/ng-atomic-components-organisms-back-navigator.mjs.map +0 -1
- package/fesm2020/ng-atomic-components-organisms-top-navigator.mjs +0 -39
- package/fesm2020/ng-atomic-components-organisms-top-navigator.mjs.map +0 -1
- package/organisms/back-navigator/back-navigator.organism.d.ts +0 -13
- package/organisms/back-navigator/index.d.ts +0 -1
- package/organisms/top-navigator/index.d.ts +0 -1
- package/organisms/top-navigator/top-navigator.organism.d.ts +0 -13
- package/pages/blank/blank.module.d.ts +0 -9
|
@@ -5,7 +5,6 @@ import * as i1 from '@angular/common';
|
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import * as i2 from '@angular/material/paginator';
|
|
7
7
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
8
|
-
import { startWith, map, shareReplay, tap } from 'rxjs';
|
|
9
8
|
|
|
10
9
|
class PaginatorOrganism {
|
|
11
10
|
constructor() {
|
|
@@ -16,9 +15,6 @@ class PaginatorOrganism {
|
|
|
16
15
|
});
|
|
17
16
|
this.pageSizeOptions = [10, 50, 100];
|
|
18
17
|
}
|
|
19
|
-
get formValue$() {
|
|
20
|
-
return this.form.valueChanges.pipe(startWith(null), map(() => this.form.getRawValue()), shareReplay(1), tap((value) => console.debug('value:', value)));
|
|
21
|
-
}
|
|
22
18
|
onPageChange(page) {
|
|
23
19
|
this.form.patchValue({
|
|
24
20
|
pageIndex: page.pageIndex,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-atomic-components-organisms-paginator.mjs","sources":["../../../../../packages/@ng-atomic/components/src/lib/organisms/paginator/paginator.organism.ts","../../../../../packages/@ng-atomic/components/src/lib/organisms/paginator/ng-atomic-components-organisms-paginator.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"ng-atomic-components-organisms-paginator.mjs","sources":["../../../../../packages/@ng-atomic/components/src/lib/organisms/paginator/paginator.organism.ts","../../../../../packages/@ng-atomic/components/src/lib/organisms/paginator/ng-atomic-components-organisms-paginator.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { LegacyPageEvent as PageEvent } from '@angular/material/legacy-paginator';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { MatPaginatorModule } from '@angular/material/paginator';\n\n@Component({\n selector: 'organisms-paginator',\n standalone: true,\n imports: [\n CommonModule,\n MatPaginatorModule,\n ],\n template: `\n <mat-paginator\n [length]=\"(form.get(['length']).valueChanges | async) ?? form.get(['length']).value\"\n [pageSize]=\"(form.get(['pageSize']).valueChanges | async) ?? form.get(['pageSize']).value\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPageChange($event)\"\n aria-label=\"Select page\">\n </mat-paginator>\n `,\n styleUrls: ['./paginator.organism.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'organism'},\n})\nexport class PaginatorOrganism {\n \n @Input()\n form = new FormGroup({\n pageIndex: new FormControl(0),\n pageSize: new FormControl(0),\n length: new FormControl(0),\n });\n\n @Input()\n pageSizeOptions: number[] = [10, 50, 100];\n\n protected onPageChange(page: PageEvent) {\n this.form.patchValue({\n pageIndex: page.pageIndex,\n pageSize: page.pageSize,\n length: page.length,\n });\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA0Ba,iBAAiB,CAAA;AApB9B,IAAA,WAAA,GAAA;QAuBE,IAAI,CAAA,IAAA,GAAG,IAAI,SAAS,CAAC;AACnB,YAAA,SAAS,EAAE,IAAI,WAAW,CAAC,CAAC,CAAC;AAC7B,YAAA,QAAQ,EAAE,IAAI,WAAW,CAAC,CAAC,CAAC;AAC5B,YAAA,MAAM,EAAE,IAAI,WAAW,CAAC,CAAC,CAAC;AAC3B,SAAA,CAAC,CAAC;QAGH,IAAe,CAAA,eAAA,GAAa,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AAU3C,KAAA;AARW,IAAA,YAAY,CAAC,IAAe,EAAA;AACpC,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;AACpB,SAAA,CAAC,CAAC;KACJ;;8GAlBU,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAblB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;GAQT,EAXC,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wMAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,mFACZ,kBAAkB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;2FAeT,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApB7B,SAAS;+BACE,qBAAqB,EAAA,UAAA,EACnB,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,kBAAkB;qBACnB,EACS,QAAA,EAAA,CAAA;;;;;;;;GAQT,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAC,KAAK,EAAE,UAAU,EAAC,EAAA,MAAA,EAAA,CAAA,wMAAA,CAAA,EAAA,CAAA;8BAKzB,IAAI,EAAA,CAAA;sBADH,KAAK;gBAQN,eAAe,EAAA,CAAA;sBADd,KAAK;;;ACnCR;;AAEG;;;;"}
|
|
@@ -12,13 +12,13 @@ class SelectInputSectionOrganism {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
SelectInputSectionOrganism.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SelectInputSectionOrganism, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
-
SelectInputSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: SelectInputSectionOrganism, isStandalone: true, selector: "organisms-select-input-section", inputs: { label: "label", control: "control", options: "options" }, ngImport: i0, template: "<molecules-select-input-field\n [label]=\"label\"\n [control]=\"control\"\n [options]=\"options\"\n></molecules-select-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-select-input-section-
|
|
15
|
+
SelectInputSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: SelectInputSectionOrganism, isStandalone: true, selector: "organisms-select-input-section", inputs: { label: "label", control: "control", options: "options" }, ngImport: i0, template: "<molecules-select-input-field\n [label]=\"label\"\n [control]=\"control\"\n [options]=\"options\"\n></molecules-select-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-select-input-section-zJ6M: var(--horizontal-padding)}:host{display:block;width:100%;padding:0 var(--horizontal-padding-SCOPED-IN-select-input-section-zJ6M);box-sizing:border-box}:host .molecule.input-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SelectInputFieldMolecule, selector: "molecules-select-input-field", inputs: ["label", "appearance", "control", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SelectInputSectionOrganism, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
18
|
args: [{ selector: 'organisms-select-input-section', standalone: true, imports: [
|
|
19
19
|
CommonModule,
|
|
20
20
|
SelectInputFieldMolecule,
|
|
21
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<molecules-select-input-field\n [label]=\"label\"\n [control]=\"control\"\n [options]=\"options\"\n></molecules-select-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-select-input-section-
|
|
21
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<molecules-select-input-field\n [label]=\"label\"\n [control]=\"control\"\n [options]=\"options\"\n></molecules-select-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-select-input-section-zJ6M: var(--horizontal-padding)}:host{display:block;width:100%;padding:0 var(--horizontal-padding-SCOPED-IN-select-input-section-zJ6M);box-sizing:border-box}:host .molecule.input-field{width:100%}\n"] }]
|
|
22
22
|
}], propDecorators: { label: [{
|
|
23
23
|
type: Input
|
|
24
24
|
}], control: [{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { __classPrivateFieldGet } from 'tslib';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
3
|
+
import { inject, EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
3
4
|
import * as i1 from '@angular/common';
|
|
4
5
|
import { CommonModule } from '@angular/common';
|
|
5
6
|
import * as i3 from '@angular/material/table';
|
|
@@ -13,19 +14,21 @@ import { DomainModule } from '@ng-atomic/common/pipes/domain';
|
|
|
13
14
|
import { ActionsColumnMolecule } from '@ng-atomic/components/molecules/actions-column';
|
|
14
15
|
import { CheckboxColumnMolecule } from '@ng-atomic/components/molecules/checkbox-column';
|
|
15
16
|
import { SmartColumnMolecule } from '@ng-atomic/components/molecules/smart-column';
|
|
17
|
+
import { SortService } from '@ng-atomic/common/services/form/sort';
|
|
16
18
|
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
17
19
|
import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree';
|
|
18
20
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
19
21
|
import { TreeColumnMolecule } from '@ng-atomic/components/molecules/tree-column';
|
|
20
22
|
|
|
23
|
+
var _SmartTableOrganism_form;
|
|
21
24
|
class SmartTableOrganism {
|
|
22
25
|
constructor() {
|
|
26
|
+
_SmartTableOrganism_form.set(this, inject(SortService));
|
|
23
27
|
this._columns = [];
|
|
24
28
|
this.childrenKey = 'children';
|
|
25
|
-
this.itemActions =
|
|
26
|
-
this.pageSize = 0;
|
|
29
|
+
this.itemActions = [];
|
|
27
30
|
this.selection = new SelectionModel(true, []);
|
|
28
|
-
this.
|
|
31
|
+
this.form = __classPrivateFieldGet(this, _SmartTableOrganism_form, "f").build();
|
|
29
32
|
this.action = new EventEmitter();
|
|
30
33
|
this.headerClick = new EventEmitter();
|
|
31
34
|
this.checkboxClick = new EventEmitter();
|
|
@@ -49,8 +52,46 @@ class SmartTableOrganism {
|
|
|
49
52
|
return new MatTreeFlatDataSource(this.treeControl, treeFlattener, data);
|
|
50
53
|
}
|
|
51
54
|
}
|
|
55
|
+
_SmartTableOrganism_form = new WeakMap();
|
|
52
56
|
SmartTableOrganism.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SmartTableOrganism, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
-
SmartTableOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: SmartTableOrganism, isStandalone: true, selector: "organisms-smart-table", inputs: { _columns: ["columns", "_columns"], childrenKey: "childrenKey", items: "items", itemActions: "itemActions",
|
|
57
|
+
SmartTableOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: SmartTableOrganism, isStandalone: true, selector: "organisms-smart-table", inputs: { _columns: ["columns", "_columns"], childrenKey: "childrenKey", items: "items", itemActions: "itemActions", selection: "selection", form: "form" }, outputs: { action: "action", headerClick: "headerClick", checkboxClick: "checkboxClick", pageChange: "pageChange", itemCheck: "itemCheck" }, host: { classAttribute: "organism" }, ngImport: i0, template: `
|
|
58
|
+
<table mat-table [dataSource]="dataSource" matSort matSortDisableClear matSortDirection="desc">
|
|
59
|
+
<ng-container *ngFor="let name of columns; trackBy: trackByColumnName" [ngSwitch]="name">
|
|
60
|
+
<molecules-checkbox-column
|
|
61
|
+
*ngSwitchCase="'__checkbox'"
|
|
62
|
+
name="__checkbox"
|
|
63
|
+
[selection]="selection"
|
|
64
|
+
(checkboxClick)="checkboxClick.emit($event)"
|
|
65
|
+
></molecules-checkbox-column>
|
|
66
|
+
<molecules-actions-column
|
|
67
|
+
*ngSwitchCase="'__actions'"
|
|
68
|
+
name="__actions"
|
|
69
|
+
[itemActions]="itemActions"
|
|
70
|
+
(action)="action.emit($event)"
|
|
71
|
+
></molecules-actions-column>
|
|
72
|
+
<ng-container *ngSwitchDefault>
|
|
73
|
+
<molecules-tree-column
|
|
74
|
+
*ngIf="name.startsWith('__tree_')"
|
|
75
|
+
[name]="name"
|
|
76
|
+
[headerText]="name | D"
|
|
77
|
+
[sort]="form.value.key === name ? form.value.order : 'none'"
|
|
78
|
+
[treeControl]="treeControl"
|
|
79
|
+
(headerClick)="headerClick.emit(name)"
|
|
80
|
+
></molecules-tree-column>
|
|
81
|
+
<molecules-smart-column
|
|
82
|
+
*ngIf="!name.startsWith('__tree_')"
|
|
83
|
+
[name]="name"
|
|
84
|
+
[headerText]="name | D"
|
|
85
|
+
[sort]="form.value.key === name ? form.value.order : 'none'"
|
|
86
|
+
(headerClick)="headerClick.emit(name)"
|
|
87
|
+
></molecules-smart-column>
|
|
88
|
+
</ng-container>
|
|
89
|
+
</ng-container>
|
|
90
|
+
<tr mat-header-row *matHeaderRowDef="columns; sticky: true"></tr>
|
|
91
|
+
<tr mat-row *matRowDef="let item; columns: columns;"></tr>
|
|
92
|
+
<div class="mat-row" *matNoDataRow>No Data</div>
|
|
93
|
+
</table>
|
|
94
|
+
`, isInline: true, styles: [":host{--width: 100%;--width-SCOPED-IN-smart-table-JGDG: var(--width);--cell: 8px;--cell-SCOPED-IN-smart-table-JGDG: var(--cell);--column-vertical-padding: 4px;--column-vertical-padding-SCOPED-IN-smart-table-JGDG: var(--column-vertical-padding)}:host{position:relative;display:block;width:100%;height:100%;overflow:scroll}:host::-webkit-scrollbar{display:none}:host table{width:100%;max-height:100%}:host table .nowrap{width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host table ::ng-deep th,:host table ::ng-deep td{padding:0 var(--column-vertical-padding-SCOPED-IN-smart-table-JGDG)}:host .no-data-message{display:flex;justify-content:flex-start;align-items:center;width:calc(var(--width-SCOPED-IN-smart-table-JGDG) - var(--cell-SCOPED-IN-smart-table-JGDG) * 4);height:3em;padding-left:calc(var(--cell-SCOPED-IN-smart-table-JGDG) * 2);padding-right:calc(var(--cell-SCOPED-IN-smart-table-JGDG) * 2)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: DomainModule }, { kind: "pipe", type: i2.DomainPipe, name: "D" }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i3.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: ActionsColumnMolecule, selector: "molecules-actions-column", inputs: ["name", "itemActions"], outputs: ["action"] }, { kind: "component", type: CheckboxColumnMolecule, selector: "molecules-checkbox-column", inputs: ["name", "selection"], outputs: ["checkboxClick"] }, { kind: "component", type: SmartColumnMolecule, selector: "molecules-smart-column", inputs: ["sort"], outputs: ["headerClick"] }, { kind: "component", type: TreeColumnMolecule, selector: "molecules-tree-column", inputs: ["sort", "treeControl"], outputs: ["headerClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
54
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SmartTableOrganism, decorators: [{
|
|
55
96
|
type: Component,
|
|
56
97
|
args: [{ selector: 'organisms-smart-table', standalone: true, imports: [
|
|
@@ -65,7 +106,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
65
106
|
CheckboxColumnMolecule,
|
|
66
107
|
SmartColumnMolecule,
|
|
67
108
|
TreeColumnMolecule,
|
|
68
|
-
],
|
|
109
|
+
], template: `
|
|
110
|
+
<table mat-table [dataSource]="dataSource" matSort matSortDisableClear matSortDirection="desc">
|
|
111
|
+
<ng-container *ngFor="let name of columns; trackBy: trackByColumnName" [ngSwitch]="name">
|
|
112
|
+
<molecules-checkbox-column
|
|
113
|
+
*ngSwitchCase="'__checkbox'"
|
|
114
|
+
name="__checkbox"
|
|
115
|
+
[selection]="selection"
|
|
116
|
+
(checkboxClick)="checkboxClick.emit($event)"
|
|
117
|
+
></molecules-checkbox-column>
|
|
118
|
+
<molecules-actions-column
|
|
119
|
+
*ngSwitchCase="'__actions'"
|
|
120
|
+
name="__actions"
|
|
121
|
+
[itemActions]="itemActions"
|
|
122
|
+
(action)="action.emit($event)"
|
|
123
|
+
></molecules-actions-column>
|
|
124
|
+
<ng-container *ngSwitchDefault>
|
|
125
|
+
<molecules-tree-column
|
|
126
|
+
*ngIf="name.startsWith('__tree_')"
|
|
127
|
+
[name]="name"
|
|
128
|
+
[headerText]="name | D"
|
|
129
|
+
[sort]="form.value.key === name ? form.value.order : 'none'"
|
|
130
|
+
[treeControl]="treeControl"
|
|
131
|
+
(headerClick)="headerClick.emit(name)"
|
|
132
|
+
></molecules-tree-column>
|
|
133
|
+
<molecules-smart-column
|
|
134
|
+
*ngIf="!name.startsWith('__tree_')"
|
|
135
|
+
[name]="name"
|
|
136
|
+
[headerText]="name | D"
|
|
137
|
+
[sort]="form.value.key === name ? form.value.order : 'none'"
|
|
138
|
+
(headerClick)="headerClick.emit(name)"
|
|
139
|
+
></molecules-smart-column>
|
|
140
|
+
</ng-container>
|
|
141
|
+
</ng-container>
|
|
142
|
+
<tr mat-header-row *matHeaderRowDef="columns; sticky: true"></tr>
|
|
143
|
+
<tr mat-row *matRowDef="let item; columns: columns;"></tr>
|
|
144
|
+
<div class="mat-row" *matNoDataRow>No Data</div>
|
|
145
|
+
</table>
|
|
146
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'organism' }, styles: [":host{--width: 100%;--width-SCOPED-IN-smart-table-JGDG: var(--width);--cell: 8px;--cell-SCOPED-IN-smart-table-JGDG: var(--cell);--column-vertical-padding: 4px;--column-vertical-padding-SCOPED-IN-smart-table-JGDG: var(--column-vertical-padding)}:host{position:relative;display:block;width:100%;height:100%;overflow:scroll}:host::-webkit-scrollbar{display:none}:host table{width:100%;max-height:100%}:host table .nowrap{width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host table ::ng-deep th,:host table ::ng-deep td{padding:0 var(--column-vertical-padding-SCOPED-IN-smart-table-JGDG)}:host .no-data-message{display:flex;justify-content:flex-start;align-items:center;width:calc(var(--width-SCOPED-IN-smart-table-JGDG) - var(--cell-SCOPED-IN-smart-table-JGDG) * 4);height:3em;padding-left:calc(var(--cell-SCOPED-IN-smart-table-JGDG) * 2);padding-right:calc(var(--cell-SCOPED-IN-smart-table-JGDG) * 2)}\n"] }]
|
|
69
147
|
}], propDecorators: { _columns: [{
|
|
70
148
|
type: Input,
|
|
71
149
|
args: ['columns']
|
|
@@ -75,11 +153,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
75
153
|
type: Input
|
|
76
154
|
}], itemActions: [{
|
|
77
155
|
type: Input
|
|
78
|
-
}], pageSize: [{
|
|
79
|
-
type: Input
|
|
80
156
|
}], selection: [{
|
|
81
157
|
type: Input
|
|
82
|
-
}],
|
|
158
|
+
}], form: [{
|
|
83
159
|
type: Input
|
|
84
160
|
}], action: [{
|
|
85
161
|
type: Output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-atomic-components-organisms-smart-table.mjs","sources":["../../../../../packages/@ng-atomic/components/src/lib/organisms/smart-table/smart-table.organism.ts","../../../../../packages/@ng-atomic/components/src/lib/organisms/smart-table/
|
|
1
|
+
{"version":3,"file":"ng-atomic-components-organisms-smart-table.mjs","sources":["../../../../../packages/@ng-atomic/components/src/lib/organisms/smart-table/smart-table.organism.ts","../../../../../packages/@ng-atomic/components/src/lib/organisms/smart-table/ng-atomic-components-organisms-smart-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { DomainModule } from '@ng-atomic/common/pipes/domain';\nimport { ActionsColumnMolecule } from '@ng-atomic/components/molecules/actions-column';\nimport { CheckboxColumnMolecule } from '@ng-atomic/components/molecules/checkbox-column';\nimport { SmartColumnMolecule } from '@ng-atomic/components/molecules/smart-column';\nimport { Actions, Action } from '@ng-atomic/common/models';\nimport { SortService } from '@ng-atomic/common/services/form/sort';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n MatTreeFlatDataSource,\n MatTreeFlattener,\n} from '@angular/material/tree';\nimport { DataSource, SelectionModel } from '@angular/cdk/collections';\nimport { TreeColumnMolecule } from '@ng-atomic/components/molecules/tree-column';\n\n\n@Component({\n selector: 'organisms-smart-table',\n standalone: true,\n imports: [\n CommonModule,\n DomainModule,\n MatTableModule,\n MatCheckboxModule,\n MatMenuModule,\n MatButtonModule,\n MatIconModule,\n ActionsColumnMolecule,\n CheckboxColumnMolecule,\n SmartColumnMolecule,\n TreeColumnMolecule,\n ],\n template: `\n <table mat-table [dataSource]=\"dataSource\" matSort matSortDisableClear matSortDirection=\"desc\">\n <ng-container *ngFor=\"let name of columns; trackBy: trackByColumnName\" [ngSwitch]=\"name\">\n <molecules-checkbox-column\n *ngSwitchCase=\"'__checkbox'\"\n name=\"__checkbox\"\n [selection]=\"selection\"\n (checkboxClick)=\"checkboxClick.emit($event)\"\n ></molecules-checkbox-column>\n <molecules-actions-column \n *ngSwitchCase=\"'__actions'\" \n name=\"__actions\"\n [itemActions]=\"itemActions\"\n (action)=\"action.emit($event)\"\n ></molecules-actions-column>\n <ng-container *ngSwitchDefault>\n <molecules-tree-column\n *ngIf=\"name.startsWith('__tree_')\"\n [name]=\"name\"\n [headerText]=\"name | D\"\n [sort]=\"form.value.key === name ? form.value.order : 'none'\"\n [treeControl]=\"treeControl\"\n (headerClick)=\"headerClick.emit(name)\"\n ></molecules-tree-column>\n <molecules-smart-column\n *ngIf=\"!name.startsWith('__tree_')\"\n [name]=\"name\"\n [headerText]=\"name | D\"\n [sort]=\"form.value.key === name ? form.value.order : 'none'\"\n (headerClick)=\"headerClick.emit(name)\"\n ></molecules-smart-column>\n </ng-container>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"columns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let item; columns: columns;\"></tr>\n <div class=\"mat-row\" *matNoDataRow>No Data</div>\n </table>\n `,\n styleUrls: ['./smart-table.organism.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'organism'}\n})\nexport class SmartTableOrganism<Item extends object> {\n #form = inject(SortService);\n protected dataSource: DataSource<Item>;\n\n @Input('columns')\n _columns: (keyof Item)[] = [];\n\n get columns(): (keyof Item | string)[] {\n return [...this._columns];\n }\n\n @Input()\n childrenKey = 'children';\n\n @Input()\n set items(items: Item[]) {\n this.dataSource = this.buildTreeFlatDatasource(items, this.childrenKey);\n }\n\n @Input()\n itemActions: Actions = [];\n\n @Input()\n selection = new SelectionModel<string>(true, []);\n\n @Input()\n form = this.#form.build();\n\n @Output()\n action = new EventEmitter<Action>();\n\n @Output()\n headerClick = new EventEmitter<string>();\n \n @Output()\n checkboxClick = new EventEmitter<[Item, boolean]>();\n\n @Output()\n pageChange = new EventEmitter();\n\n @Output()\n itemCheck = new EventEmitter<[Item, boolean]>();\n \n protected trackByColumnName = (columnName: string) => columnName;\n\n protected treeControl = new FlatTreeControl<any>(\n (node) => node.level,\n (node) => node.isExpandable\n );\n\n buildTreeFlatDatasource<T = any>(data: T[], key = 'children') {\n const treeFlattener = new MatTreeFlattener(\n (node: any, level: number) => ({\n ...node,\n isExpandable: (node[key] ?? []).length > 0,\n level,\n }),\n (node) => node.level,\n (node) => node.isExpandable,\n (node) => node[key]\n );\n \n return new MatTreeFlatDataSource(this.treeControl, treeFlattener, data);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAgFa,kBAAkB,CAAA;AA1D/B,IAAA,WAAA,GAAA;AA2DE,QAAA,wBAAA,CAAA,GAAA,CAAA,IAAA,EAAQ,MAAM,CAAC,WAAW,CAAC,CAAC,CAAA;QAI5B,IAAQ,CAAA,QAAA,GAAmB,EAAE,CAAC;QAO9B,IAAW,CAAA,WAAA,GAAG,UAAU,CAAC;QAQzB,IAAW,CAAA,WAAA,GAAY,EAAE,CAAC;QAG1B,IAAS,CAAA,SAAA,GAA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EAAA,CAAA;sBADT,MAAM;gBAIP,SAAS,EAAA,CAAA;sBADR,MAAM;;;ACxHT;;AAEG;;;;"}
|
|
@@ -10,13 +10,13 @@ class SocialLoginSectionOrganism {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
SocialLoginSectionOrganism.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SocialLoginSectionOrganism, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
SocialLoginSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: SocialLoginSectionOrganism, isStandalone: true, selector: "organisms-social-login-section", outputs: { signInWithGoogleButtonClick: "signInWithGoogleButtonClick" }, ngImport: i0, template: "<button \n mat-raised-button \n color=\"primary\" \n (click)=\"signInWithGoogleButtonClick.emit()\"\n>Google\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u30ED\u30B0\u30A4\u30F3</button>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-heading-
|
|
13
|
+
SocialLoginSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: SocialLoginSectionOrganism, isStandalone: true, selector: "organisms-social-login-section", outputs: { signInWithGoogleButtonClick: "signInWithGoogleButtonClick" }, ngImport: i0, template: "<button \n mat-raised-button \n color=\"primary\" \n (click)=\"signInWithGoogleButtonClick.emit()\"\n>Google\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u30ED\u30B0\u30A4\u30F3</button>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-heading-20yW: var(--horizontal-padding)}:host{display:block;width:100%;padding:0 var(--horizontal-padding-SCOPED-IN-heading-20yW);box-sizing:border-box}:host button{width:100%;height:56px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
14
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SocialLoginSectionOrganism, decorators: [{
|
|
15
15
|
type: Component,
|
|
16
16
|
args: [{ selector: 'organisms-social-login-section', standalone: true, imports: [
|
|
17
17
|
CommonModule,
|
|
18
18
|
MatButtonModule,
|
|
19
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button \n mat-raised-button \n color=\"primary\" \n (click)=\"signInWithGoogleButtonClick.emit()\"\n>Google\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u30ED\u30B0\u30A4\u30F3</button>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-heading-
|
|
19
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button \n mat-raised-button \n color=\"primary\" \n (click)=\"signInWithGoogleButtonClick.emit()\"\n>Google\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u30ED\u30B0\u30A4\u30F3</button>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-heading-20yW: var(--horizontal-padding)}:host{display:block;width:100%;padding:0 var(--horizontal-padding-SCOPED-IN-heading-20yW);box-sizing:border-box}:host button{width:100%;height:56px}\n"] }]
|
|
20
20
|
}], propDecorators: { signInWithGoogleButtonClick: [{
|
|
21
21
|
type: Output
|
|
22
22
|
}] } });
|
|
@@ -13,13 +13,13 @@ class TextInputSectionOrganism {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
TextInputSectionOrganism.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: TextInputSectionOrganism, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
-
TextInputSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: TextInputSectionOrganism, isStandalone: true, selector: "organisms-text-input-section", inputs: { label: "label", placeholder: "placeholder", type: "type", hint: "hint", control: "control" }, ngImport: i0, template: "<molecules-text-input-field\n [type]=\"type\"\n [control]=\"control\"\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n></molecules-text-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-text-input-section-
|
|
16
|
+
TextInputSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: TextInputSectionOrganism, isStandalone: true, selector: "organisms-text-input-section", inputs: { label: "label", placeholder: "placeholder", type: "type", hint: "hint", control: "control" }, ngImport: i0, template: "<molecules-text-input-field\n [type]=\"type\"\n [control]=\"control\"\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n></molecules-text-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-text-input-section-doTk: var(--horizontal-padding)}:host{display:block;width:100%;padding:0 var(--horizontal-padding-SCOPED-IN-text-input-section-doTk);box-sizing:border-box}:host .molecule.input-field,:host mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TextInputFieldMolecule, selector: "molecules-text-input-field", inputs: ["appearance", "type", "name", "label", "control", "placeholder", "hint"] }] });
|
|
17
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: TextInputSectionOrganism, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{ selector: 'organisms-text-input-section', standalone: true, imports: [
|
|
20
20
|
CommonModule,
|
|
21
21
|
TextInputFieldMolecule,
|
|
22
|
-
], template: "<molecules-text-input-field\n [type]=\"type\"\n [control]=\"control\"\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n></molecules-text-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-text-input-section-
|
|
22
|
+
], template: "<molecules-text-input-field\n [type]=\"type\"\n [control]=\"control\"\n [label]=\"label\"\n [placeholder]=\"placeholder\"\n></molecules-text-input-field>", styles: [":host{--horizontal-padding: 16px;--horizontal-padding-SCOPED-IN-text-input-section-doTk: var(--horizontal-padding)}:host{display:block;width:100%;padding:0 var(--horizontal-padding-SCOPED-IN-text-input-section-doTk);box-sizing:border-box}:host .molecule.input-field,:host mat-form-field{width:100%}\n"] }]
|
|
23
23
|
}], propDecorators: { label: [{
|
|
24
24
|
type: Input
|
|
25
25
|
}], placeholder: [{
|
|
@@ -13,13 +13,13 @@ class TextareaSectionOrganism {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
TextareaSectionOrganism.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: TextareaSectionOrganism, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
-
TextareaSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: TextareaSectionOrganism, isStandalone: true, selector: "organisms-textarea-section", inputs: { label: "label", rows: "rows", control: "control" }, outputs: { action: "action" }, ngImport: i0, template: "<molecules-textarea-field\n [control]=\"control\"\n [label]=\"label\"\n [rows]=\"rows\"\n (action)=\"action.emit($event)\"\n></molecules-textarea-field>", styles: [":host{--vertical-padding: 16px;--vertical-padding-SCOPED-IN-textarea-section-
|
|
16
|
+
TextareaSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: TextareaSectionOrganism, isStandalone: true, selector: "organisms-textarea-section", inputs: { label: "label", rows: "rows", control: "control" }, outputs: { action: "action" }, ngImport: i0, template: "<molecules-textarea-field\n [control]=\"control\"\n [label]=\"label\"\n [rows]=\"rows\"\n (action)=\"action.emit($event)\"\n></molecules-textarea-field>", styles: [":host{--vertical-padding: 16px;--vertical-padding-SCOPED-IN-textarea-section-witm: var(--vertical-padding)}:host{display:block;padding:0 var(--vertical-padding-SCOPED-IN-textarea-section-witm);box-sizing:border-box}:host molecules-textarea-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TextareaFieldMolecule, selector: "molecules-textarea-field", inputs: ["label", "hint", "placeholder", "control", "rows"], outputs: ["action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: TextareaSectionOrganism, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{ selector: 'organisms-textarea-section', standalone: true, imports: [
|
|
20
20
|
CommonModule,
|
|
21
21
|
TextareaFieldMolecule,
|
|
22
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<molecules-textarea-field\n [control]=\"control\"\n [label]=\"label\"\n [rows]=\"rows\"\n (action)=\"action.emit($event)\"\n></molecules-textarea-field>", styles: [":host{--vertical-padding: 16px;--vertical-padding-SCOPED-IN-textarea-section-
|
|
22
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<molecules-textarea-field\n [control]=\"control\"\n [label]=\"label\"\n [rows]=\"rows\"\n (action)=\"action.emit($event)\"\n></molecules-textarea-field>", styles: [":host{--vertical-padding: 16px;--vertical-padding-SCOPED-IN-textarea-section-witm: var(--vertical-padding)}:host{display:block;padding:0 var(--vertical-padding-SCOPED-IN-textarea-section-witm);box-sizing:border-box}:host molecules-textarea-field{width:100%}\n"] }]
|
|
23
23
|
}], propDecorators: { label: [{
|
|
24
24
|
type: Input
|
|
25
25
|
}], rows: [{
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/material/tree';
|
|
5
|
+
import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
|
|
6
|
+
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
7
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
9
|
+
import * as i2 from '@angular/material/checkbox';
|
|
10
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
11
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
12
|
+
import * as gql from 'gql-query-builder';
|
|
13
|
+
import { print, parse } from 'graphql';
|
|
14
|
+
|
|
15
|
+
function format(query) {
|
|
16
|
+
return print(parse(query));
|
|
17
|
+
}
|
|
18
|
+
class Node {
|
|
19
|
+
}
|
|
20
|
+
class FlatNode {
|
|
21
|
+
}
|
|
22
|
+
var ActionId;
|
|
23
|
+
(function (ActionId) {
|
|
24
|
+
ActionId["CHANGE_QUERY"] = "[@ng-atomic/components/organisms/tree-section] Change Query";
|
|
25
|
+
})(ActionId || (ActionId = {}));
|
|
26
|
+
class TreeSectionOrganism {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.flatNodeMap = new Map();
|
|
29
|
+
this.nestedNodeMap = new Map();
|
|
30
|
+
this.getLevel = (node) => node.level;
|
|
31
|
+
this.isExpandable = (node) => node.expandable;
|
|
32
|
+
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
|
|
33
|
+
this.hasChild = (_, _nodeData) => _nodeData.expandable;
|
|
34
|
+
this.getChildren = (node) => node.children;
|
|
35
|
+
this.transformer = (node, level) => {
|
|
36
|
+
const existingNode = this.nestedNodeMap.get(node);
|
|
37
|
+
const flatNode = existingNode && existingNode.item === node.item ? existingNode : new FlatNode();
|
|
38
|
+
flatNode.item = node.item;
|
|
39
|
+
flatNode.level = level;
|
|
40
|
+
flatNode.expandable = !!node.children?.length;
|
|
41
|
+
this.flatNodeMap.set(flatNode, node);
|
|
42
|
+
this.nestedNodeMap.set(node, flatNode);
|
|
43
|
+
return flatNode;
|
|
44
|
+
};
|
|
45
|
+
this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
|
|
46
|
+
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
|
47
|
+
this.selection = new SelectionModel(true);
|
|
48
|
+
this.data = {};
|
|
49
|
+
this.action = new EventEmitter();
|
|
50
|
+
}
|
|
51
|
+
buildNode(obj, level) {
|
|
52
|
+
return Object.keys(obj).reduce((accumulator, key) => {
|
|
53
|
+
const value = obj[key];
|
|
54
|
+
const node = new Node();
|
|
55
|
+
node.item = key;
|
|
56
|
+
if (value != null) {
|
|
57
|
+
if (typeof value === 'object') {
|
|
58
|
+
node.children = this.buildNode(value, level + 1);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
node.item = value;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return accumulator.concat(node);
|
|
65
|
+
}, []);
|
|
66
|
+
}
|
|
67
|
+
buildValueNode(nodes) {
|
|
68
|
+
return (nodes ?? []).map(node => {
|
|
69
|
+
const flatNode = this.nestedNodeMap.get(node);
|
|
70
|
+
node.value = this.selection.isSelected(flatNode);
|
|
71
|
+
node.children = this.buildValueNode(node.children);
|
|
72
|
+
return node;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
buildFields(nodes) {
|
|
76
|
+
return nodes.reduce((acc, node) => {
|
|
77
|
+
if (node.value) {
|
|
78
|
+
if (node?.children?.length) {
|
|
79
|
+
return [...acc, { [node.item]: this.buildFields(node.children) }];
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return [...acc, node.item];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return [...acc];
|
|
87
|
+
}
|
|
88
|
+
}, []);
|
|
89
|
+
}
|
|
90
|
+
onChange() {
|
|
91
|
+
console.debug('this.dataSource.data:', this.dataSource.data);
|
|
92
|
+
const nodes = this.buildValueNode(this.dataSource.data ?? []);
|
|
93
|
+
console.debug('nodes:', nodes);
|
|
94
|
+
const fields = this.buildFields(nodes);
|
|
95
|
+
console.debug('fields:', fields);
|
|
96
|
+
const options = fields.map(field => ({
|
|
97
|
+
operation: Object.keys(field)[0],
|
|
98
|
+
fields: Object.values(field)[0],
|
|
99
|
+
variables: {
|
|
100
|
+
take: {
|
|
101
|
+
value: 10,
|
|
102
|
+
required: false,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
}));
|
|
106
|
+
const query = gql.query(options);
|
|
107
|
+
console.debug('parsed:', parse(query.query));
|
|
108
|
+
this.action.emit({
|
|
109
|
+
id: ActionId.CHANGE_QUERY,
|
|
110
|
+
payload: { query: format(query.query), variables: query.variables },
|
|
111
|
+
});
|
|
112
|
+
console.debug('query:', format(query.query));
|
|
113
|
+
}
|
|
114
|
+
ngOnInit() {
|
|
115
|
+
// const TREE_DATA = {
|
|
116
|
+
// Groceries: {
|
|
117
|
+
// 'Almond Meal flour': null,
|
|
118
|
+
// 'Organic eggs': null,
|
|
119
|
+
// 'Protein Powder': null,
|
|
120
|
+
// Fruits: {
|
|
121
|
+
// Apple: null,
|
|
122
|
+
// Berries: ['Blueberry', 'Raspberry'],
|
|
123
|
+
// Orange: null,
|
|
124
|
+
// },
|
|
125
|
+
// },
|
|
126
|
+
// Reminders: [
|
|
127
|
+
// 'Cook dinner',
|
|
128
|
+
// 'Read the Material Design spec',
|
|
129
|
+
// 'Upgrade Application to Angular',
|
|
130
|
+
// {
|
|
131
|
+
// etst: ['test'],
|
|
132
|
+
// }
|
|
133
|
+
// ],
|
|
134
|
+
// };
|
|
135
|
+
this.dataSource.data = this.buildNode(this.data, 0);
|
|
136
|
+
}
|
|
137
|
+
todoLeafItemSelectionToggle(node) {
|
|
138
|
+
console.debug('todoItemSelectionToggle', node);
|
|
139
|
+
if (this.selection.isSelected(node)) {
|
|
140
|
+
this.selection.deselect(node);
|
|
141
|
+
this.treeControl.collapse(node);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.selection.select(node);
|
|
145
|
+
this.treeControl.expand(node);
|
|
146
|
+
}
|
|
147
|
+
this.onChange();
|
|
148
|
+
}
|
|
149
|
+
/** Whether all the descendants of the node are selected. */
|
|
150
|
+
descendantsAllSelected(node) {
|
|
151
|
+
const descendants = this.treeControl.getDescendants(node);
|
|
152
|
+
const descAllSelected = descendants.length > 0 &&
|
|
153
|
+
descendants.every(child => {
|
|
154
|
+
return this.selection.isSelected(child);
|
|
155
|
+
});
|
|
156
|
+
return descAllSelected;
|
|
157
|
+
}
|
|
158
|
+
/** Whether part of the descendants are selected */
|
|
159
|
+
descendantsPartiallySelected(node) {
|
|
160
|
+
const descendants = this.treeControl.getDescendants(node);
|
|
161
|
+
const result = descendants.some(child => this.selection.isSelected(child));
|
|
162
|
+
return result && !this.descendantsAllSelected(node);
|
|
163
|
+
}
|
|
164
|
+
nodeSelectionToggle(node) {
|
|
165
|
+
console.debug('todoItemSelectionToggle', this.selection.isSelected(node));
|
|
166
|
+
if (this.selection.isSelected(node)) {
|
|
167
|
+
this.selection.deselect(node);
|
|
168
|
+
this.treeControl.collapse(node);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.selection.select(node);
|
|
172
|
+
this.treeControl.expand(node);
|
|
173
|
+
}
|
|
174
|
+
console.debug('todoItemSelectionToggle', node);
|
|
175
|
+
this.onChange();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
TreeSectionOrganism.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: TreeSectionOrganism, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
TreeSectionOrganism.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: TreeSectionOrganism, isStandalone: true, selector: "organisms-tree-section", inputs: { data: "data" }, outputs: { action: "action" }, ngImport: i0, template: `
|
|
180
|
+
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
|
181
|
+
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle matTreeNodePadding>
|
|
182
|
+
<mat-checkbox
|
|
183
|
+
class="checklist-leaf-node"
|
|
184
|
+
[checked]="selection.isSelected(node)"
|
|
185
|
+
(change)="todoLeafItemSelectionToggle(node)"
|
|
186
|
+
>{{ node.item }} (a)</mat-checkbox>
|
|
187
|
+
</mat-tree-node>
|
|
188
|
+
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
|
|
189
|
+
<mat-checkbox
|
|
190
|
+
[checked]="descendantsAllSelected(node)"
|
|
191
|
+
[indeterminate]="descendantsPartiallySelected(node)"
|
|
192
|
+
(change)="nodeSelectionToggle(node)"
|
|
193
|
+
>{{ node.item }} (b)</mat-checkbox>
|
|
194
|
+
</mat-tree-node>
|
|
195
|
+
</mat-tree>
|
|
196
|
+
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i1.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: TreeSectionOrganism, decorators: [{
|
|
198
|
+
type: Component,
|
|
199
|
+
args: [{ selector: 'organisms-tree-section', standalone: true, imports: [
|
|
200
|
+
CommonModule,
|
|
201
|
+
MatTreeModule,
|
|
202
|
+
MatButtonModule,
|
|
203
|
+
MatIconModule,
|
|
204
|
+
MatCheckboxModule,
|
|
205
|
+
], template: `
|
|
206
|
+
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
|
207
|
+
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle matTreeNodePadding>
|
|
208
|
+
<mat-checkbox
|
|
209
|
+
class="checklist-leaf-node"
|
|
210
|
+
[checked]="selection.isSelected(node)"
|
|
211
|
+
(change)="todoLeafItemSelectionToggle(node)"
|
|
212
|
+
>{{ node.item }} (a)</mat-checkbox>
|
|
213
|
+
</mat-tree-node>
|
|
214
|
+
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
|
|
215
|
+
<mat-checkbox
|
|
216
|
+
[checked]="descendantsAllSelected(node)"
|
|
217
|
+
[indeterminate]="descendantsPartiallySelected(node)"
|
|
218
|
+
(change)="nodeSelectionToggle(node)"
|
|
219
|
+
>{{ node.item }} (b)</mat-checkbox>
|
|
220
|
+
</mat-tree-node>
|
|
221
|
+
</mat-tree>
|
|
222
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
|
|
223
|
+
}], propDecorators: { data: [{
|
|
224
|
+
type: Input
|
|
225
|
+
}], action: [{
|
|
226
|
+
type: Output
|
|
227
|
+
}] } });
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Generated bundle index. Do not edit.
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
export { ActionId, FlatNode, Node, TreeSectionOrganism };
|
|
234
|
+
//# sourceMappingURL=ng-atomic-components-organisms-tree-section.mjs.map
|