@smartbit4all/ng-client 1.0.3 → 1.0.5
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/esm2020/lib/view-context/smart-view-context.service.mjs +2 -1
- package/fesm2015/smartbit4all-ng-client.mjs +1 -0
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +1 -0
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/package.json +4 -2
- package/schematics/collection.json +11 -0
- package/schematics/smart-component/schema.json +20 -0
- package/schematics/smart-component/templates/__name@dasherize__.component.css.template +0 -0
- package/schematics/smart-component/templates/__name@dasherize__.component.html.template +3 -0
- package/schematics/smart-component/templates/__name@dasherize__.component.ts.template +26 -0
- package/smartbit4all-ng-client-1.0.5.tgz +0 -0
- package/smartbit4all-ng-client-1.0.3.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartbit4all/ng-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"schematics": "./schematics/collection.json",
|
|
4
5
|
"peerDependencies": {
|
|
5
6
|
"@angular/common": "^13.2.0",
|
|
6
7
|
"@angular/core": "^13.2.0",
|
|
@@ -10,7 +11,8 @@
|
|
|
10
11
|
"@smartbit4all/navigation": "^1.0.2",
|
|
11
12
|
"@smartbit4all/table": "^1.5.44",
|
|
12
13
|
"@smartbit4all/icon": "^1.0.1",
|
|
13
|
-
"rxjs": "^7.5.7"
|
|
14
|
+
"rxjs": "^7.5.7",
|
|
15
|
+
"copyfiles": "^2.4.1"
|
|
14
16
|
},
|
|
15
17
|
"dependencies": {
|
|
16
18
|
"tslib": "^2.3.0"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"smart-component": {
|
|
5
|
+
"description": "This schematic generates a component that extends SmartComponent.",
|
|
6
|
+
"factory": "./smart-component/index#smartComponentGenerator",
|
|
7
|
+
"schema": "./smart-component/schema.json",
|
|
8
|
+
"aliases": ["sc"]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "smart-component",
|
|
4
|
+
"title": "Smart Ng Client Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"description": "The name of the component",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"path": {
|
|
12
|
+
"description": "Where should be created the file",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "path",
|
|
15
|
+
"x-prompt": "Where should be created the file?",
|
|
16
|
+
"default": "src/app"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": []
|
|
20
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { SmartComponent, SmartViewContextService, UiActionModel } from '@smartbit4all/ng-client';
|
|
3
|
+
import { AuthenticationService } from 'src/app/services/authentication.service';
|
|
4
|
+
import { Pages } from 'src/app/viewcontext/view-context.pages';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-<%= dasherize(name) %>',
|
|
8
|
+
templateUrl: './<%= dasherize(name) %>.component.html',
|
|
9
|
+
styleUrls: ['./<%= dasherize(name) %>.component.css']
|
|
10
|
+
})
|
|
11
|
+
export class <%= classify(name) %>Component extends SmartComponent<any> {
|
|
12
|
+
// TODO: set the proper type for SmartComponent<any>
|
|
13
|
+
|
|
14
|
+
uiActionModels: UiActionModel[] = [];
|
|
15
|
+
|
|
16
|
+
constructor(auth: AuthenticationService, viewContext: SmartViewContextService) {
|
|
17
|
+
super(auth, viewContext, Pages.<%= classify(name) %>);
|
|
18
|
+
this.modelChanged.subscribe(() => {
|
|
19
|
+
this.loaded();
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
loaded(): void {
|
|
24
|
+
throw new Error('loaded method not implemented');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
Binary file
|
|
Binary file
|