- {{model}}
+
+ {{ model }}
-
-
-
-
-
-
-
-
diff --git a/projects/swimlane/ngx-dnd/src/lib/declarations.d.ts b/projects/swimlane/ngx-dnd/src/lib/declarations.d.ts
index ec12fff..0db0b54 100644
--- a/projects/swimlane/ngx-dnd/src/lib/declarations.d.ts
+++ b/projects/swimlane/ngx-dnd/src/lib/declarations.d.ts
@@ -23,7 +23,3 @@ declare module '*.html' {
const value: any;
export default value;
}
-
-declare module '@swimlane/dragula' {
- export = dragula;
-}
diff --git a/projects/swimlane/ngx-dnd/src/lib/services/drake-store.service.ts b/projects/swimlane/ngx-dnd/src/lib/services/drake-store.service.ts
index 52284d0..997029f 100644
--- a/projects/swimlane/ngx-dnd/src/lib/services/drake-store.service.ts
+++ b/projects/swimlane/ngx-dnd/src/lib/services/drake-store.service.ts
@@ -1,12 +1,9 @@
import { Injectable } from '@angular/core';
-import * as dragulaNamespace from '@swimlane/dragula';
+import dragula from '@swimlane/dragula';
import { DroppableDirective } from '../directives/ngx-droppable.directive';
import { DraggableDirective } from '../directives/ngx-draggable.directive';
-// see https://github.com/dherges/ng-packagr/issues/217
-const dragula = dragulaNamespace;
-
/**
* Central service that handles all events
*
@@ -16,8 +13,8 @@ const dragula = dragulaNamespace;
export class DrakeStoreService {
private droppableMap = new WeakMap
();
private draggableMap = new WeakMap();
- private dragulaOptions: dragulaNamespace.DragulaOptions;
- private drake: dragulaNamespace.Drake;
+ private dragulaOptions: dragula.DragulaOptions;
+ private drake: dragula.Drake;
constructor() {
this.dragulaOptions = this.createDrakeOptions();
@@ -46,7 +43,7 @@ export class DrakeStoreService {
this.draggableMap.delete(draggable.element);
}
- createDrakeOptions(): dragulaNamespace.DragulaOptions {
+ createDrakeOptions(): dragula.DragulaOptions {
const accepts = (el: any, target: any /*, source: any, sibling: any */) => {
if (el.contains(target)) {
return false;
diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts
index 8720ba0..dcb8afe 100644
--- a/src/app/app.component.spec.ts
+++ b/src/app/app.component.spec.ts
@@ -1,36 +1,25 @@
import { TestBed, waitForAsync } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
- beforeEach(
- waitForAsync(() => {
- TestBed.configureTestingModule({
- declarations: [AppComponent]
- }).compileComponents();
- })
- );
- it(
- 'should create the app',
- waitForAsync(() => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.debugElement.componentInstance;
- expect(app).toBeTruthy();
- })
- );
- it(
- `should have as title 'my-docspa-project'`,
- waitForAsync(() => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.debugElement.componentInstance;
- expect(app.title).toEqual('my-docspa-project');
- })
- );
- it(
- 'should render title in a h1 tag',
- waitForAsync(() => {
- const fixture = TestBed.createComponent(AppComponent);
- fixture.detectChanges();
- const compiled = fixture.debugElement.nativeElement;
- expect(compiled.querySelector('h1').textContent).toContain('Welcome to my-docspa-project!');
- })
- );
+ beforeEach(waitForAsync(() => {
+ TestBed.configureTestingModule({
+ declarations: [AppComponent]
+ }).compileComponents();
+ }));
+ it('should create the app', waitForAsync(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app).toBeTruthy();
+ }));
+ it(`should have as title 'my-docspa-project'`, waitForAsync(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.debugElement.componentInstance;
+ expect(app.title).toEqual('my-docspa-project');
+ }));
+ it('should render title in a h1 tag', waitForAsync(() => {
+ const fixture = TestBed.createComponent(AppComponent);
+ fixture.detectChanges();
+ const compiled = fixture.debugElement.nativeElement;
+ expect(compiled.querySelector('h1').textContent).toContain('Welcome to my-docspa-project!');
+ }));
});
diff --git a/src/app/builder/builder.component.spec.ts b/src/app/builder/builder.component.spec.ts
index e6b7d22..18a67c8 100644
--- a/src/app/builder/builder.component.spec.ts
+++ b/src/app/builder/builder.component.spec.ts
@@ -6,13 +6,11 @@ describe('BuilderComponent', () => {
let component: BuilderComponent;
let fixture: ComponentFixture;
- beforeEach(
- waitForAsync(() => {
- TestBed.configureTestingModule({
- declarations: [BuilderComponent]
- }).compileComponents();
- })
- );
+ beforeEach(waitForAsync(() => {
+ TestBed.configureTestingModule({
+ declarations: [BuilderComponent]
+ }).compileComponents();
+ }));
beforeEach(() => {
fixture = TestBed.createComponent(BuilderComponent);
diff --git a/src/docs/sortables.md b/src/docs/sortables.md
index 1d56062..7fa19de 100644
--- a/src/docs/sortables.md
+++ b/src/docs/sortables.md
@@ -32,16 +32,14 @@
## From Array model
```html { run context='{ "orderableList": ["Item 1", "Item 2", "Item 3"] }' }
-
-
+
- orderableList = {{orderableList | json}}
+orderableList = {{orderableList}}
```
[[spoiler | Directives]]
-| ```html
+| `html
|
|
|
-| ```
+| `
[[spoiler | Components]]
-| ```html
+| `html
|
|
-| ```
+| `
## Nested
```html { playground context='{ "orderableLists": [["Item 1a", "Item 2a", "Item 3a"], ["Item 1b", "Item 2b", "Item 3b"]] }' }
-
-
+
```
## Nested with Containers
```html { playground context='{ "nestedLists": [ { "label": "Item 1", "children": [] }, { "label": "Item 2", "children": [ { "label": "Item 2a", "children": [] }, { "label": "Item 2b", "children": [] }, { "label": "Item 2c", "children": [] } ] }, { "label": "Item 3", "children": [ { "label": "Item 3a", "children": [] }, { "label": "Item 3b", "children": [] }, { "label": "Item 3c", "children": [] } ] }] }' }
-
-
-````
+
+```