@ng-atomic/components 20.67.0 → 20.73.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/fesm2022/ng-atomic-components-atoms-badge.mjs +4 -4
- package/fesm2022/ng-atomic-components-atoms-chips-input.mjs +3 -3
- package/fesm2022/ng-atomic-components-atoms-icon.mjs +6 -6
- package/fesm2022/ng-atomic-components-atoms-logo.mjs +9 -9
- package/fesm2022/ng-atomic-components-atoms-menu-button.mjs +13 -13
- package/fesm2022/ng-atomic-components-atoms-value-cell.mjs +17 -17
- package/fesm2022/ng-atomic-components-atoms.mjs +4 -4
- package/fesm2022/ng-atomic-components-extras-editor.mjs +14 -14
- package/fesm2022/ng-atomic-components-extras.mjs +4 -4
- package/fesm2022/ng-atomic-components-frames-app.mjs +30 -30
- package/fesm2022/ng-atomic-components-frames-auto-layout.mjs +8 -8
- package/fesm2022/ng-atomic-components-frames-breadcrumb-navbar.mjs +17 -17
- package/fesm2022/ng-atomic-components-frames-card.mjs +4 -4
- package/fesm2022/ng-atomic-components-frames-columns.mjs +25 -25
- package/fesm2022/ng-atomic-components-frames-divider.mjs +6 -6
- package/fesm2022/ng-atomic-components-frames-drawer.mjs +15 -15
- package/fesm2022/ng-atomic-components-frames-entrance.mjs +12 -12
- package/fesm2022/ng-atomic-components-frames-fab.mjs +14 -14
- package/fesm2022/ng-atomic-components-frames-horizontal-divider.mjs +7 -7
- package/fesm2022/ng-atomic-components-frames-line-up.mjs +14 -14
- package/fesm2022/ng-atomic-components-frames-loading.mjs +9 -9
- package/fesm2022/ng-atomic-components-frames-overlay.mjs +9 -9
- package/fesm2022/ng-atomic-components-frames-progress-bar.mjs +8 -8
- package/fesm2022/ng-atomic-components-frames-router-outlet.mjs +13 -13
- package/fesm2022/ng-atomic-components-frames-scroll.mjs +5 -5
- package/fesm2022/ng-atomic-components-frames-side-app.mjs +7 -7
- package/fesm2022/ng-atomic-components-frames-side-nav.mjs +15 -15
- package/fesm2022/ng-atomic-components-frames-smart-menu.mjs +4 -4
- package/fesm2022/ng-atomic-components-frames-tabs.mjs +5 -5
- package/fesm2022/ng-atomic-components-frames-toggle.mjs +3 -3
- package/fesm2022/ng-atomic-components-frames-vertical-hide.mjs +6 -6
- package/fesm2022/ng-atomic-components-frames.mjs +4 -4
- package/fesm2022/ng-atomic-components-molecules-action-input-field.mjs +3 -3
- package/fesm2022/ng-atomic-components-molecules-actions-column.mjs +10 -10
- package/fesm2022/ng-atomic-components-molecules-checkbox-column.mjs +10 -10
- package/fesm2022/ng-atomic-components-molecules-chips-input-field.mjs +13 -13
- package/fesm2022/ng-atomic-components-molecules-date-input-field.mjs +13 -13
- package/fesm2022/ng-atomic-components-molecules-date-range-input-field.mjs +11 -11
- package/fesm2022/ng-atomic-components-molecules-file-input-field.mjs +14 -14
- package/fesm2022/ng-atomic-components-molecules-grid-item.mjs +6 -6
- package/fesm2022/ng-atomic-components-molecules-header.mjs +8 -8
- package/fesm2022/ng-atomic-components-molecules-list-item.mjs +12 -12
- package/fesm2022/ng-atomic-components-molecules-loading-box.mjs +9 -9
- package/fesm2022/ng-atomic-components-molecules-navigation-list-item.mjs +11 -11
- package/fesm2022/ng-atomic-components-molecules-nested-menu.mjs +3 -3
- package/fesm2022/ng-atomic-components-molecules-select-input-field.mjs +15 -15
- package/fesm2022/ng-atomic-components-molecules-text-column.mjs +8 -8
- package/fesm2022/ng-atomic-components-molecules-text-input-field.mjs +15 -15
- package/fesm2022/ng-atomic-components-molecules-textarea-field.mjs +13 -13
- package/fesm2022/ng-atomic-components-molecules-thread-message.mjs +13 -13
- package/fesm2022/ng-atomic-components-molecules-tree-column.mjs +9 -9
- package/fesm2022/ng-atomic-components-organisms-action-buttons-section.mjs +10 -10
- package/fesm2022/ng-atomic-components-organisms-action-input-section.mjs +13 -13
- package/fesm2022/ng-atomic-components-organisms-agreement-input-section.mjs +9 -9
- package/fesm2022/ng-atomic-components-organisms-breadcrumb-navbar.mjs +17 -17
- package/fesm2022/ng-atomic-components-organisms-card-input-section.mjs +4 -4
- package/fesm2022/ng-atomic-components-organisms-chips-input-section.mjs +11 -11
- package/fesm2022/ng-atomic-components-organisms-cvc-and-exp-input-section.mjs +4 -4
- package/fesm2022/ng-atomic-components-organisms-date-input-section.mjs +13 -13
- package/fesm2022/ng-atomic-components-organisms-date-range-input-section.mjs +12 -12
- package/fesm2022/ng-atomic-components-organisms-definition-list.mjs +9 -9
- package/fesm2022/ng-atomic-components-organisms-file-input-section.mjs +13 -13
- package/fesm2022/ng-atomic-components-organisms-filters-section.mjs +3 -3
- package/fesm2022/ng-atomic-components-organisms-grid-cards-section.mjs +9 -9
- package/fesm2022/ng-atomic-components-organisms-grid-toolbar.mjs +8 -8
- package/fesm2022/ng-atomic-components-organisms-heading.mjs +5 -5
- package/fesm2022/ng-atomic-components-organisms-image-preview-section.mjs +4 -4
- package/fesm2022/ng-atomic-components-organisms-list.mjs +11 -11
- package/fesm2022/ng-atomic-components-organisms-markdown-preview-section.mjs +10 -10
- package/fesm2022/ng-atomic-components-organisms-menu-footer.mjs +8 -8
- package/fesm2022/ng-atomic-components-organisms-menu-header.mjs +9 -9
- package/fesm2022/ng-atomic-components-organisms-mermaid-section.mjs +5 -5
- package/fesm2022/ng-atomic-components-organisms-message-input-section.mjs +3 -3
- package/fesm2022/ng-atomic-components-organisms-messages-section.mjs +5 -5
- package/fesm2022/ng-atomic-components-organisms-navigation-list.mjs +10 -10
- package/fesm2022/ng-atomic-components-organisms-navigator.mjs +13 -13
- package/fesm2022/ng-atomic-components-organisms-number-input-section.mjs +15 -15
- package/fesm2022/ng-atomic-components-organisms-paginator.mjs +11 -11
- package/fesm2022/ng-atomic-components-organisms-password-input-section.mjs +15 -15
- package/fesm2022/ng-atomic-components-organisms-select-input-section.mjs +15 -15
- package/fesm2022/ng-atomic-components-organisms-selection-list.mjs +3 -3
- package/fesm2022/ng-atomic-components-organisms-slider-input-section.mjs +14 -14
- package/fesm2022/ng-atomic-components-organisms-social-login-section.mjs +4 -4
- package/fesm2022/ng-atomic-components-organisms-stripe-input-section.mjs +24 -24
- package/fesm2022/ng-atomic-components-organisms-table.mjs +28 -28
- package/fesm2022/ng-atomic-components-organisms-terminal.mjs +3 -3
- package/fesm2022/ng-atomic-components-organisms-text-input-section.mjs +15 -15
- package/fesm2022/ng-atomic-components-organisms-text-preview-section.mjs +10 -10
- package/fesm2022/ng-atomic-components-organisms-textarea-section.mjs +16 -16
- package/fesm2022/ng-atomic-components-organisms-thread-messages-section.mjs +13 -13
- package/fesm2022/ng-atomic-components-organisms-time-range-input-section.mjs +3 -3
- package/fesm2022/ng-atomic-components-organisms-toolbar.mjs +3 -3
- package/fesm2022/ng-atomic-components-organisms-tree-list.mjs +13 -13
- package/fesm2022/ng-atomic-components-organisms-vertical-divider.mjs +3 -3
- package/fesm2022/ng-atomic-components-organisms-video-section.mjs +20 -20
- package/fesm2022/ng-atomic-components-pages-_index.mjs +38 -38
- package/fesm2022/ng-atomic-components-pages-blank.mjs +3 -3
- package/fesm2022/ng-atomic-components-pages-columns.mjs +12 -12
- package/fesm2022/ng-atomic-components-pages-form.mjs +22 -22
- package/fesm2022/ng-atomic-components-pages-terms.mjs +11 -11
- package/fesm2022/ng-atomic-components-pages.mjs +4 -4
- package/fesm2022/ng-atomic-components-services-global-iframe.mjs +3 -3
- package/fesm2022/ng-atomic-components-templates-_index.mjs +38 -38
- package/fesm2022/ng-atomic-components-templates-background.mjs +7 -7
- package/fesm2022/ng-atomic-components-templates-code-editor.mjs +14 -14
- package/fesm2022/ng-atomic-components-templates-columns.mjs +14 -14
- package/fesm2022/ng-atomic-components-templates-entrance.mjs +12 -12
- package/fesm2022/ng-atomic-components-templates-form.mjs +35 -35
- package/fesm2022/ng-atomic-components-templates-icon-button-menu.mjs +11 -11
- package/fesm2022/ng-atomic-components-templates-loading.mjs +3 -3
- package/fesm2022/ng-atomic-components-templates-menu.mjs +11 -11
- package/fesm2022/ng-atomic-components-templates-selection.mjs +15 -15
- package/fesm2022/ng-atomic-components-templates-settings.mjs +7 -7
- package/fesm2022/ng-atomic-components-templates-tab-editor.mjs +3 -3
- package/fesm2022/ng-atomic-components-templates-term.mjs +11 -11
- package/fesm2022/ng-atomic-components-templates-thread.mjs +14 -14
- package/fesm2022/ng-atomic-components-templates.mjs +4 -4
- package/package.json +3 -15
- package/fesm2022/ng-atomic-components-organisms-graphql-editor.mjs +0 -114
- package/fesm2022/ng-atomic-components-organisms-tree-section.mjs +0 -208
- package/fesm2022/ng-atomic-components-templates-file-tree.mjs +0 -99
- package/types/ng-atomic-components-organisms-graphql-editor.d.ts +0 -31
- package/types/ng-atomic-components-organisms-tree-section.d.ts +0 -50
- package/types/ng-atomic-components-templates-file-tree.d.ts +0 -27
|
@@ -14,8 +14,8 @@ class TabEditorTemplate extends NgAtomicComponent {
|
|
|
14
14
|
this.trackByHash = (file) => `${file.name}-${file.lastModified}`;
|
|
15
15
|
this.files = [];
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TabEditorTemplate, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: TabEditorTemplate, isStandalone: true, selector: "templates-tab-editor", inputs: { files: "files" }, usesInheritance: true, ngImport: i0, template: `
|
|
19
19
|
<!-- <organisms-toolbar
|
|
20
20
|
[form]="store.form"
|
|
21
21
|
[actions]="store.actions"
|
|
@@ -40,7 +40,7 @@ class TabEditorTemplate extends NgAtomicComponent {
|
|
|
40
40
|
</mat-tab-group>
|
|
41
41
|
`, isInline: true, styles: [":host{width:100%;height:100%;background:#fff;display:block}:host mat-tab-group{height:calc(100% - 56px)}:host mat-tab-group ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "component", type: CodeEditorTemplate, selector: "templates-code-editor" }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TabEditorTemplate, decorators: [{
|
|
44
44
|
type: Component,
|
|
45
45
|
args: [{ selector: 'templates-tab-editor', imports: [
|
|
46
46
|
CommonModule,
|
|
@@ -20,16 +20,16 @@ class TermTemplateStore extends InjectableComponent {
|
|
|
20
20
|
name: '戻る',
|
|
21
21
|
icon: 'arrow_back',
|
|
22
22
|
},
|
|
23
|
-
], ...(ngDevMode ? [{ debugName: "navStartActions" }] : []));
|
|
24
|
-
this.navEndActions = input([], ...(ngDevMode ? [{ debugName: "navEndActions" }] : []));
|
|
25
|
-
this.title = input('title', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
26
|
-
this.src = input('title', ...(ngDevMode ? [{ debugName: "src" }] : []));
|
|
27
|
-
this.data = input('data', ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
23
|
+
], ...(ngDevMode ? [{ debugName: "navStartActions" }] : /* istanbul ignore next */ []));
|
|
24
|
+
this.navEndActions = input([], ...(ngDevMode ? [{ debugName: "navEndActions" }] : /* istanbul ignore next */ []));
|
|
25
|
+
this.title = input('title', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
26
|
+
this.src = input('title', ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
27
|
+
this.data = input('data', ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
28
28
|
}
|
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
30
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TermTemplateStore, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
30
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: TermTemplateStore, isStandalone: true, inputs: { navStartActions: { classPropertyName: "navStartActions", publicName: "navStartActions", isSignal: true, isRequired: false, transformFunction: null }, navEndActions: { classPropertyName: "navEndActions", publicName: "navEndActions", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TermTemplateStore, decorators: [{
|
|
33
33
|
type: Directive,
|
|
34
34
|
args: [{ standalone: true }]
|
|
35
35
|
}], propDecorators: { navStartActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "navStartActions", required: false }] }], navEndActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "navEndActions", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
@@ -39,8 +39,8 @@ class TermTemplate extends NgAtomicComponent {
|
|
|
39
39
|
this.store = inject(TermTemplateStore);
|
|
40
40
|
}
|
|
41
41
|
static { this.ActionId = ActionId; }
|
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
43
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TermTemplate, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: TermTemplate, isStandalone: true, selector: "templates-term", usesInheritance: true, hostDirectives: [{ directive: TermTemplateStore, inputs: ["navStartActions", "navStartActions", "navEndActions", "navEndActions", "title", "title", "src", "src", "data", "data"] }], ngImport: i0, template: `
|
|
44
44
|
<frames-scroll>
|
|
45
45
|
<organisms-navigator
|
|
46
46
|
[startActions]="store.navStartActions()"
|
|
@@ -58,7 +58,7 @@ class TermTemplate extends NgAtomicComponent {
|
|
|
58
58
|
</frames-scroll>
|
|
59
59
|
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;font-size:12px}:host frames-scroll markdown{display:block;width:100%;min-height:100%;box-sizing:border-box;padding:16px 32px 0;background-color:#fff}:host frames-scroll markdown ::ng-deep{color:#5c5c5c}:host frames-scroll markdown ::ng-deep h1{margin-block-start:0em;margin-block-end:0em;font-size:2em;color:#3d3d3d}:host frames-scroll markdown ::ng-deep h2{margin-block-start:1.5em;margin-block-end:1em;font-size:1.5em;font-weight:700;color:#3d3d3d}:host frames-scroll markdown ::ng-deep ul{margin-block-start:0px;padding-inline-start:16px;list-style-type:decimal}:host frames-scroll markdown ::ng-deep p{word-break:break-all}\n"], dependencies: [{ kind: "component", type: NavigatorOrganism, selector: "organisms-navigator" }, { kind: "component", type: HeaderMolecule, selector: "molecules-header" }, { kind: "ngmodule", type: MarkdownModule }, { kind: "component", type: i1.MarkdownComponent, selector: "markdown, [markdown]", inputs: ["data", "src", "disableSanitizer", "inline", "clipboard", "clipboardButtonComponent", "clipboardButtonTemplate", "emoji", "katex", "katexOptions", "mermaid", "mermaidOptions", "lineHighlight", "line", "lineOffset", "lineNumbers", "start", "commandLine", "filterOutput", "host", "prompt", "output", "user"], outputs: ["error", "load", "ready"] }, { kind: "component", type: ScrollFrame, selector: "frames-scroll" }] }); }
|
|
60
60
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TermTemplate, decorators: [{
|
|
62
62
|
type: Component,
|
|
63
63
|
args: [{ selector: 'templates-term', imports: [
|
|
64
64
|
NavigatorOrganism,
|
|
@@ -9,24 +9,24 @@ import { ThreadMessagesSectionOrganismStore } from '@ng-atomic/components/organi
|
|
|
9
9
|
|
|
10
10
|
class ThreadTemplateStore {
|
|
11
11
|
constructor() {
|
|
12
|
-
this.title = input('title', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
13
|
-
this.navStartActions = input([], ...(ngDevMode ? [{ debugName: "navStartActions" }] : []));
|
|
14
|
-
this.navEndActions = input([], ...(ngDevMode ? [{ debugName: "navEndActions" }] : []));
|
|
15
|
-
this.messages = input([], ...(ngDevMode ? [{ debugName: "messages" }] : []));
|
|
16
|
-
this.actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
17
|
-
this.placeholder = input('メッセージを入力', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
18
|
-
this.isMessageCreating = input(false, ...(ngDevMode ? [{ debugName: "isMessageCreating" }] : []));
|
|
12
|
+
this.title = input('title', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
13
|
+
this.navStartActions = input([], ...(ngDevMode ? [{ debugName: "navStartActions" }] : /* istanbul ignore next */ []));
|
|
14
|
+
this.navEndActions = input([], ...(ngDevMode ? [{ debugName: "navEndActions" }] : /* istanbul ignore next */ []));
|
|
15
|
+
this.messages = input([], ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
16
|
+
this.actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
17
|
+
this.placeholder = input('メッセージを入力', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.isMessageCreating = input(false, ...(ngDevMode ? [{ debugName: "isMessageCreating" }] : /* istanbul ignore next */ []));
|
|
19
19
|
this.form = input(new FormGroup({
|
|
20
20
|
name: new FormControl(''),
|
|
21
21
|
description: new FormControl(''),
|
|
22
22
|
message: new FormControl(''),
|
|
23
|
-
}), ...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
23
|
+
}), ...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
24
24
|
effect(() => console.debug('messages:', this.messages()));
|
|
25
25
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
27
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ThreadTemplateStore, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: ThreadTemplateStore, isStandalone: true, inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, navStartActions: { classPropertyName: "navStartActions", publicName: "navStartActions", isSignal: true, isRequired: false, transformFunction: null }, navEndActions: { classPropertyName: "navEndActions", publicName: "navEndActions", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, isMessageCreating: { classPropertyName: "isMessageCreating", publicName: "isMessageCreating", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ThreadTemplateStore, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{ standalone: true }]
|
|
32
32
|
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], navStartActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "navStartActions", required: false }] }], navEndActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "navEndActions", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], isMessageCreating: [{ type: i0.Input, args: [{ isSignal: true, alias: "isMessageCreating", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }] } });
|
|
@@ -44,8 +44,8 @@ class ThreadTemplate extends NgAtomicComponent {
|
|
|
44
44
|
ngAfterViewInit() {
|
|
45
45
|
this.scroll()?.scrollToBottom();
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ThreadTemplate, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: ThreadTemplate, isStandalone: true, selector: "templates-messages", host: { classAttribute: "template" }, viewQueries: [{ propertyName: "scroll", first: true, predicate: ScrollFrame, descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: ThreadTemplateStore, inputs: ["title", "title", "navStartActions", "navStartActions", "navEndActions", "navEndActions", "messages", "messages", "actions", "actions", "placeholder", "placeholder", "isMessageCreating", "isMessageCreating", "form", "form"] }], ngImport: i0, template: `
|
|
49
49
|
<frames-scroll>
|
|
50
50
|
<organisms-navigator
|
|
51
51
|
[startActions]="store.navStartActions()"
|
|
@@ -80,7 +80,7 @@ class ThreadTemplate extends NgAtomicComponent {
|
|
|
80
80
|
</frames-scroll>
|
|
81
81
|
`, isInline: true, styles: [":host{width:100%;height:100%;background:#fff;display:block}:host .message{display:block;height:100%;position:relative}:host .message organisms-textarea-section{position:absolute;overflow:hidden;--vertical-padding: 0px;width:100%;height:80px}\n"], dependencies: [{ kind: "component", type: TextareaSectionOrganism, selector: "organisms-textarea-section" }, { kind: "component", type: ScrollFrame, selector: "frames-scroll" }, { kind: "component", type: NavigatorOrganism, selector: "organisms-navigator" }, { kind: "directive", type: ThreadMessagesSectionOrganismStore, selector: "organisms-thread-messages-section", inputs: ["comments", "messages", "noCommentMessage", "commentActions", "messageActions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
82
82
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ThreadTemplate, decorators: [{
|
|
84
84
|
type: Component,
|
|
85
85
|
args: [{ selector: 'templates-messages', imports: [
|
|
86
86
|
TextareaSectionOrganism,
|
|
@@ -18,11 +18,11 @@ class NgAtomicTemplatesModule {
|
|
|
18
18
|
],
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
22
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
23
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: NgAtomicTemplatesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
22
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: NgAtomicTemplatesModule }); }
|
|
23
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: NgAtomicTemplatesModule }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: NgAtomicTemplatesModule, decorators: [{
|
|
26
26
|
type: NgModule,
|
|
27
27
|
args: [{}]
|
|
28
28
|
}] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-atomic/components",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.73.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/animations": "19.1.4",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@codemirror/state": "^6.0.0",
|
|
17
17
|
"@codemirror/theme-one-dark": "^6.0.0",
|
|
18
18
|
"@codemirror/view": "^6.0.0",
|
|
19
|
-
"@ng-atomic/common": "20.
|
|
19
|
+
"@ng-atomic/common": "20.73.0",
|
|
20
20
|
"@webcontainer/api": "^1.1.7",
|
|
21
21
|
"cm6-graphql": "^0.0.4",
|
|
22
22
|
"codemirror": "^6.0.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"resize-observer-polyfill": "^1.5.1",
|
|
30
30
|
"rxjs": "^7.0.0",
|
|
31
31
|
"xterm": "^5.3.0",
|
|
32
|
-
"@ng-atomic/core": "20.
|
|
32
|
+
"@ng-atomic/core": "20.73.0",
|
|
33
33
|
"@codemirror/lang-json": "^6.0.1",
|
|
34
34
|
"ngxtension": "^2.0.0",
|
|
35
35
|
"d3": "7.9.0",
|
|
@@ -310,10 +310,6 @@
|
|
|
310
310
|
"types": "./types/ng-atomic-components-organisms-filters-section.d.ts",
|
|
311
311
|
"default": "./fesm2022/ng-atomic-components-organisms-filters-section.mjs"
|
|
312
312
|
},
|
|
313
|
-
"./organisms/graphql-editor": {
|
|
314
|
-
"types": "./types/ng-atomic-components-organisms-graphql-editor.d.ts",
|
|
315
|
-
"default": "./fesm2022/ng-atomic-components-organisms-graphql-editor.mjs"
|
|
316
|
-
},
|
|
317
313
|
"./organisms/grid-cards-section": {
|
|
318
314
|
"types": "./types/ng-atomic-components-organisms-grid-cards-section.d.ts",
|
|
319
315
|
"default": "./fesm2022/ng-atomic-components-organisms-grid-cards-section.mjs"
|
|
@@ -434,10 +430,6 @@
|
|
|
434
430
|
"types": "./types/ng-atomic-components-organisms-tree-list.d.ts",
|
|
435
431
|
"default": "./fesm2022/ng-atomic-components-organisms-tree-list.mjs"
|
|
436
432
|
},
|
|
437
|
-
"./organisms/tree-section": {
|
|
438
|
-
"types": "./types/ng-atomic-components-organisms-tree-section.d.ts",
|
|
439
|
-
"default": "./fesm2022/ng-atomic-components-organisms-tree-section.mjs"
|
|
440
|
-
},
|
|
441
433
|
"./organisms/vertical-divider": {
|
|
442
434
|
"types": "./types/ng-atomic-components-organisms-vertical-divider.d.ts",
|
|
443
435
|
"default": "./fesm2022/ng-atomic-components-organisms-vertical-divider.mjs"
|
|
@@ -498,10 +490,6 @@
|
|
|
498
490
|
"types": "./types/ng-atomic-components-templates-entrance.d.ts",
|
|
499
491
|
"default": "./fesm2022/ng-atomic-components-templates-entrance.mjs"
|
|
500
492
|
},
|
|
501
|
-
"./templates/file-tree": {
|
|
502
|
-
"types": "./types/ng-atomic-components-templates-file-tree.d.ts",
|
|
503
|
-
"default": "./fesm2022/ng-atomic-components-templates-file-tree.mjs"
|
|
504
|
-
},
|
|
505
493
|
"./templates/form": {
|
|
506
494
|
"types": "./types/ng-atomic-components-templates-form.d.ts",
|
|
507
495
|
"default": "./fesm2022/ng-atomic-components-templates-form.mjs"
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { lineNumbers, keymap } from '@codemirror/view';
|
|
4
|
-
import { history, indentWithTab } from '@codemirror/commands';
|
|
5
|
-
import { closeBrackets, autocompletion } from '@codemirror/autocomplete';
|
|
6
|
-
import { bracketMatching, syntaxHighlighting } from '@codemirror/language';
|
|
7
|
-
import { oneDark, oneDarkHighlightStyle } from '@codemirror/theme-one-dark';
|
|
8
|
-
import { EditorState } from '@codemirror/state';
|
|
9
|
-
import { graphql } from 'cm6-graphql';
|
|
10
|
-
import { EditorView, basicSetup } from 'codemirror';
|
|
11
|
-
import { ReplaySubject, combineLatest, startWith, filter, distinctUntilChanged } from 'rxjs';
|
|
12
|
-
import { FormControl } from '@angular/forms';
|
|
13
|
-
import * as i1 from '@angular/common';
|
|
14
|
-
import { CommonModule } from '@angular/common';
|
|
15
|
-
import { EditorComponent } from '@ng-atomic/components/extras/editor';
|
|
16
|
-
import { NgAtomicComponent } from '@ng-atomic/core';
|
|
17
|
-
|
|
18
|
-
class GraphqlExtractor {
|
|
19
|
-
extract(output) {
|
|
20
|
-
return output.split('```')?.[1]?.replace(/^graphql/, '')?.replace(/^\n/, '') ?? '';
|
|
21
|
-
}
|
|
22
|
-
insert(query) {
|
|
23
|
-
return `\`\`\`graphql\n${query}\`\`\``;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
var ActionId;
|
|
27
|
-
(function (ActionId) {
|
|
28
|
-
ActionId["EXECUTE"] = "execute";
|
|
29
|
-
ActionId["SAVE"] = "save";
|
|
30
|
-
})(ActionId || (ActionId = {}));
|
|
31
|
-
class GraphqlEditorOrganism extends NgAtomicComponent {
|
|
32
|
-
constructor() {
|
|
33
|
-
super(...arguments);
|
|
34
|
-
this.schema$ = new ReplaySubject(1);
|
|
35
|
-
this.control = new FormControl('');
|
|
36
|
-
this.keyActions = [];
|
|
37
|
-
this.action = new EventEmitter();
|
|
38
|
-
}
|
|
39
|
-
set schema(value) {
|
|
40
|
-
this.schema$.next(value);
|
|
41
|
-
}
|
|
42
|
-
ngOnInit() {
|
|
43
|
-
combineLatest({
|
|
44
|
-
schema: this.schema$,
|
|
45
|
-
value: this.control.valueChanges.pipe(startWith(this.control.value), filter(value => value !== this.state?.doc?.toString())),
|
|
46
|
-
}).pipe(filter(({ schema }) => !!schema), distinctUntilChanged()).subscribe(params => {
|
|
47
|
-
console.debug('params:', params);
|
|
48
|
-
this.state = this.makeEditorState({ schema: params.schema, value: params.value ?? '' });
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
makeEditorState({ schema, value }) {
|
|
52
|
-
return EditorState.create({
|
|
53
|
-
doc: value,
|
|
54
|
-
extensions: [
|
|
55
|
-
makeKeymapExtension(this.keyActions, action => this.dispatch(action)),
|
|
56
|
-
EditorView.updateListener.of((update) => {
|
|
57
|
-
if (update.docChanged)
|
|
58
|
-
return;
|
|
59
|
-
this.control.setValue(update.state.doc.toString());
|
|
60
|
-
}),
|
|
61
|
-
...CODEMIRROR_EXTENSIONS,
|
|
62
|
-
makeGraphqlExtension(schema),
|
|
63
|
-
],
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: GraphqlEditorOrganism, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.6", type: GraphqlEditorOrganism, isStandalone: true, selector: "organisms-graphql-editor", inputs: { control: "control", schema: "schema", keyActions: "keyActions" }, outputs: { action: "action" }, usesInheritance: true, ngImport: i0, template: `<extras-editor *ngIf="state" [state]="state"></extras-editor>`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EditorComponent, selector: "extras-editor" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
68
|
-
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: GraphqlEditorOrganism, decorators: [{
|
|
70
|
-
type: Component,
|
|
71
|
-
args: [{ imports: [
|
|
72
|
-
CommonModule,
|
|
73
|
-
EditorComponent,
|
|
74
|
-
], selector: 'organisms-graphql-editor', template: `<extras-editor *ngIf="state" [state]="state"></extras-editor>`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
|
|
75
|
-
}], propDecorators: { control: [{
|
|
76
|
-
type: Input
|
|
77
|
-
}], schema: [{
|
|
78
|
-
type: Input
|
|
79
|
-
}], keyActions: [{
|
|
80
|
-
type: Input
|
|
81
|
-
}], action: [{
|
|
82
|
-
type: Output
|
|
83
|
-
}] } });
|
|
84
|
-
const CODEMIRROR_EXTENSIONS = [
|
|
85
|
-
basicSetup,
|
|
86
|
-
bracketMatching(),
|
|
87
|
-
closeBrackets(),
|
|
88
|
-
history(),
|
|
89
|
-
autocompletion(),
|
|
90
|
-
lineNumbers(),
|
|
91
|
-
oneDark,
|
|
92
|
-
syntaxHighlighting(oneDarkHighlightStyle),
|
|
93
|
-
];
|
|
94
|
-
function makeKeymapExtension(keyActions, callback) {
|
|
95
|
-
return keymap.of([
|
|
96
|
-
...keyActions.map(({ key, actionId }) => ({
|
|
97
|
-
key,
|
|
98
|
-
run: () => (callback({ id: actionId, payload: { key } }), true),
|
|
99
|
-
})),
|
|
100
|
-
indentWithTab,
|
|
101
|
-
]);
|
|
102
|
-
}
|
|
103
|
-
function makeGraphqlExtension(schema) {
|
|
104
|
-
return graphql(schema, {
|
|
105
|
-
onShowInDocs: (field, type, parentType) => alert(`Showing in docs.: Field: ${field}, Type: ${type}, ParentType: ${parentType}`),
|
|
106
|
-
onFillAllFields: (view, schema, _query, cursor, token) => alert(`Filling all fields. Token: ${token}`),
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Generated bundle index. Do not edit.
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
export { ActionId, GraphqlEditorOrganism, GraphqlExtractor };
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Output, Input, ChangeDetectionStrategy, Component } 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
|
-
const nodes = this.buildValueNode(this.dataSource.data ?? []);
|
|
92
|
-
const fields = this.buildFields(nodes);
|
|
93
|
-
const options = fields.map(field => ({
|
|
94
|
-
operation: Object.keys(field)[0],
|
|
95
|
-
fields: Object.values(field)[0],
|
|
96
|
-
variables: {
|
|
97
|
-
take: {
|
|
98
|
-
value: 10,
|
|
99
|
-
required: false,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
}));
|
|
103
|
-
const query = gql.query(options);
|
|
104
|
-
console.debug('parsed:', parse(query.query));
|
|
105
|
-
this.action.emit({
|
|
106
|
-
id: ActionId.CHANGE_QUERY,
|
|
107
|
-
payload: { query: format(query.query), variables: query.variables },
|
|
108
|
-
});
|
|
109
|
-
console.debug('query:', format(query.query));
|
|
110
|
-
}
|
|
111
|
-
ngOnInit() {
|
|
112
|
-
this.dataSource.data = this.buildNode(this.data, 0);
|
|
113
|
-
}
|
|
114
|
-
todoLeafItemSelectionToggle(node) {
|
|
115
|
-
console.debug('todoItemSelectionToggle', node);
|
|
116
|
-
if (this.selection.isSelected(node)) {
|
|
117
|
-
this.selection.deselect(node);
|
|
118
|
-
this.treeControl.collapse(node);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
this.selection.select(node);
|
|
122
|
-
this.treeControl.expand(node);
|
|
123
|
-
}
|
|
124
|
-
this.onChange();
|
|
125
|
-
}
|
|
126
|
-
descendantsAllSelected(node) {
|
|
127
|
-
const descendants = this.treeControl.getDescendants(node);
|
|
128
|
-
const descAllSelected = descendants.length > 0 &&
|
|
129
|
-
descendants.every(child => {
|
|
130
|
-
return this.selection.isSelected(child);
|
|
131
|
-
});
|
|
132
|
-
return descAllSelected;
|
|
133
|
-
}
|
|
134
|
-
descendantsPartiallySelected(node) {
|
|
135
|
-
const descendants = this.treeControl.getDescendants(node);
|
|
136
|
-
const result = descendants.some(child => this.selection.isSelected(child));
|
|
137
|
-
return result && !this.descendantsAllSelected(node);
|
|
138
|
-
}
|
|
139
|
-
nodeSelectionToggle(node) {
|
|
140
|
-
console.debug('todoItemSelectionToggle', this.selection.isSelected(node));
|
|
141
|
-
if (this.selection.isSelected(node)) {
|
|
142
|
-
this.selection.deselect(node);
|
|
143
|
-
this.treeControl.collapse(node);
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
this.selection.select(node);
|
|
147
|
-
this.treeControl.expand(node);
|
|
148
|
-
}
|
|
149
|
-
console.debug('todoItemSelectionToggle', node);
|
|
150
|
-
this.onChange();
|
|
151
|
-
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: TreeSectionOrganism, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.6", type: TreeSectionOrganism, isStandalone: true, selector: "organisms-tree-section", inputs: { data: "data" }, outputs: { action: "action" }, ngImport: i0, template: `
|
|
154
|
-
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
|
155
|
-
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle matTreeNodePadding>
|
|
156
|
-
<mat-checkbox
|
|
157
|
-
class="checklist-leaf-node"
|
|
158
|
-
[checked]="selection.isSelected(node)"
|
|
159
|
-
(change)="todoLeafItemSelectionToggle(node)"
|
|
160
|
-
>{{ node.item }} (a)</mat-checkbox>
|
|
161
|
-
</mat-tree-node>
|
|
162
|
-
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
|
|
163
|
-
<mat-checkbox
|
|
164
|
-
[checked]="descendantsAllSelected(node)"
|
|
165
|
-
[indeterminate]="descendantsPartiallySelected(node)"
|
|
166
|
-
(change)="nodeSelectionToggle(node)"
|
|
167
|
-
>{{ node.item }} (b)</mat-checkbox>
|
|
168
|
-
</mat-tree-node>
|
|
169
|
-
</mat-tree>
|
|
170
|
-
`, 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: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
171
|
-
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: TreeSectionOrganism, decorators: [{
|
|
173
|
-
type: Component,
|
|
174
|
-
args: [{ selector: 'organisms-tree-section', standalone: true, imports: [
|
|
175
|
-
CommonModule,
|
|
176
|
-
MatTreeModule,
|
|
177
|
-
MatButtonModule,
|
|
178
|
-
MatIconModule,
|
|
179
|
-
MatCheckboxModule,
|
|
180
|
-
], template: `
|
|
181
|
-
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
|
182
|
-
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle matTreeNodePadding>
|
|
183
|
-
<mat-checkbox
|
|
184
|
-
class="checklist-leaf-node"
|
|
185
|
-
[checked]="selection.isSelected(node)"
|
|
186
|
-
(change)="todoLeafItemSelectionToggle(node)"
|
|
187
|
-
>{{ node.item }} (a)</mat-checkbox>
|
|
188
|
-
</mat-tree-node>
|
|
189
|
-
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
|
|
190
|
-
<mat-checkbox
|
|
191
|
-
[checked]="descendantsAllSelected(node)"
|
|
192
|
-
[indeterminate]="descendantsPartiallySelected(node)"
|
|
193
|
-
(change)="nodeSelectionToggle(node)"
|
|
194
|
-
>{{ node.item }} (b)</mat-checkbox>
|
|
195
|
-
</mat-tree-node>
|
|
196
|
-
</mat-tree>
|
|
197
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
|
|
198
|
-
}], propDecorators: { data: [{
|
|
199
|
-
type: Input
|
|
200
|
-
}], action: [{
|
|
201
|
-
type: Output
|
|
202
|
-
}] } });
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Generated bundle index. Do not edit.
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
|
-
export { ActionId, FlatNode, Node, TreeSectionOrganism };
|