@rxap/schematic-angular 19.1.1-dev.3 → 19.2.0-dev.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/CHANGELOG.md +9 -0
- package/GUIDES.md +160 -0
- package/README.md +164 -0
- package/package.json +8 -8
- package/src/examples/feature/dashboard/dashboard-accordion/schematics.yaml +226 -0
- package/src/examples/feature/dashboard/dashboard-table/schematic.yml +103 -0
- package/src/examples/feature/dashboard-template/dashboard-template-table/schematic.yml +95 -0
- package/src/examples/feature/machine/machine-accordion/schematic.yaml +83 -0
- package/src/examples/feature/machine/machine-table/schematic.yaml +139 -0
- package/src/examples/feature/machine-definition/machine-definition-details/data-definition-modbus-tcp-table/schematic.yaml +63 -0
- package/src/examples/feature/machine-definition/machine-definition-details/data-definition-opc-ua-table/schematic.yaml +58 -0
- package/src/examples/feature/machine-definition/machine-definition-details/data-definition-open-platform-protocol-table/schematic.yaml +49 -0
- package/src/examples/feature/machine-definition/machine-definition-details/data-definition-s7-iso-on-tcp-table/schematic.yaml +64 -0
- package/src/examples/feature/machine-definition/machine-definition-details/data-trigger-table/schematic.yaml +43 -0
- package/src/examples/feature/machine-definition/machine-definition-details/message-group-table/schematic.yaml +41 -0
- package/src/examples/feature/machine-definition/machine-definition-details/message-trigger-connection-table/schematic.yaml +38 -0
- package/src/examples/feature/machine-definition/machine-definition-details/physical-unit-table/schematic.yaml +41 -0
- package/src/examples/feature/machine-definition/machine-definition-table/schematic.yaml +107 -0
- package/src/examples/feature/node-red/node-red-table/schematic.yaml +114 -0
- package/src/examples/feature/report/report-accordion/schematic.yaml +318 -0
- package/src/examples/feature/report/report-table/schematic.yaml +66 -0
- package/src/examples/feature/service-network/company-accordion/schematic.yaml +119 -0
- package/src/examples/feature/service-network/service-network-accordion/schematic.yml +65 -0
- package/src/examples/feature/thing/thing-table/schematic.yml +115 -0
- package/src/examples/feature/user/user-table/schematic.yaml +99 -0
- package/src/examples/schematics.yaml +18 -0
- package/src/guides/backend.md +49 -0
- package/src/guides/form-component.md +58 -0
- package/src/guides/form-control.md +269 -0
- package/src/guides/header-button.md +57 -0
- package/src/guides/table-action.md +120 -0
- package/src/guides/table-column.md +185 -0
- package/src/guides/table-component.md +51 -0
- package/src/guides/table-filter.md +69 -0
- package/src/guides/table-modifiers.md +22 -0
- package/src/guides/upstream.md +49 -0
- package/src/lib/angular-options.js +0 -1
- package/src/lib/angular-options.js.map +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Table Filter Guide
|
|
2
|
+
|
|
3
|
+
Table filters provide a way for users to narrow down the data shown in the table through various input controls.
|
|
4
|
+
|
|
5
|
+
## Filter Configuration
|
|
6
|
+
|
|
7
|
+
Filters are defined in the `filterList` array. Each filter corresponds to a form control.
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
filterList:
|
|
11
|
+
- name: status
|
|
12
|
+
kind: select
|
|
13
|
+
label: Filter by Status
|
|
14
|
+
options:
|
|
15
|
+
- label: Active
|
|
16
|
+
value: active
|
|
17
|
+
- label: Inactive
|
|
18
|
+
value: inactive
|
|
19
|
+
- name: search
|
|
20
|
+
kind: input
|
|
21
|
+
label: Search by Name
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Filter Kinds
|
|
25
|
+
|
|
26
|
+
The `kind` property specifies the type of form control used for the filter.
|
|
27
|
+
|
|
28
|
+
| Kind | Description |
|
|
29
|
+
| :--- | :--- |
|
|
30
|
+
| `input` | Standard text input. |
|
|
31
|
+
| `select` | Dropdown selection. |
|
|
32
|
+
| `checkbox` | Boolean toggle. |
|
|
33
|
+
| `textarea` | multi-line text input. |
|
|
34
|
+
| `date` | Date picker. |
|
|
35
|
+
| `slide-toggle` | Material slide toggle. |
|
|
36
|
+
| `autocomplete` | Input with autocomplete suggestions. |
|
|
37
|
+
| `table-select` | Opens a table for selection. |
|
|
38
|
+
|
|
39
|
+
## Common Properties
|
|
40
|
+
|
|
41
|
+
| Property | Type | Description |
|
|
42
|
+
| :--- | :--- | :--- |
|
|
43
|
+
| `name` | `string` | The parameter name used in the API call. |
|
|
44
|
+
| `label` | `string` | The label shown to the user. |
|
|
45
|
+
| `kind` | `string` | The type of control. |
|
|
46
|
+
| `default` | `any` | Initial value for the filter. |
|
|
47
|
+
| `placeholder`| `string` | Placeholder text for inputs. |
|
|
48
|
+
|
|
49
|
+
## Inline Column Filters
|
|
50
|
+
|
|
51
|
+
You can also enable filters directly on columns using the `hasFilter` property in `columnList`.
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
columnList:
|
|
55
|
+
- name: email
|
|
56
|
+
hasFilter: true
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
When `hasFilter` is true, the schematic automatically adds a filter control for that column. You can customize this control using `filterControl`.
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
columnList:
|
|
63
|
+
- name: createdAt
|
|
64
|
+
kind: date
|
|
65
|
+
hasFilter: true
|
|
66
|
+
filterControl:
|
|
67
|
+
kind: date
|
|
68
|
+
label: Created After
|
|
69
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Table Modifiers Guide
|
|
2
|
+
|
|
3
|
+
Modifiers are strings that tweak the behavior or appearance of the table component.
|
|
4
|
+
|
|
5
|
+
## Available Modifiers
|
|
6
|
+
|
|
7
|
+
| Modifier | Description |
|
|
8
|
+
| :--- | :--- |
|
|
9
|
+
| `navigation-back-header` | Adds a back button to the table header. |
|
|
10
|
+
| `without-title` | Hides the table title. |
|
|
11
|
+
| `show-archived-slide` | Adds a slide toggle to show/hide archived items. |
|
|
12
|
+
| `with-header` | Ensures the table has a header section. |
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
Define modifiers as an array of strings in your schematic configuration.
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
modifiers:
|
|
20
|
+
- navigation-back-header
|
|
21
|
+
- show-archived-slide
|
|
22
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Upstream Data Guide
|
|
2
|
+
|
|
3
|
+
The `upstream` property is used for advanced data source configurations, particularly when working with complex APIs or mapping structures.
|
|
4
|
+
|
|
5
|
+
## Upstream Kinds
|
|
6
|
+
|
|
7
|
+
Currently, the primary kind supported is `open-api`.
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
upstream:
|
|
11
|
+
kind: open-api
|
|
12
|
+
operationId: getUsers
|
|
13
|
+
scope: admin
|
|
14
|
+
mapper:
|
|
15
|
+
kind: paged
|
|
16
|
+
pageIndex: offset
|
|
17
|
+
pageSize: limit
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Configuration Properties
|
|
21
|
+
|
|
22
|
+
| Property | Type | Description |
|
|
23
|
+
| :--- | :--- | :--- |
|
|
24
|
+
| `kind` | `string` | The type of upstream source (e.g., `open-api`). |
|
|
25
|
+
| `operationId` | `string` | The API operation ID. |
|
|
26
|
+
| `scope` | `string` | (Optional) A scope indicator for the data. |
|
|
27
|
+
| `mapper` | `object` | Defines how API parameters map to table pagination/sorting. |
|
|
28
|
+
|
|
29
|
+
## Mapper Kinds
|
|
30
|
+
|
|
31
|
+
### `paged`
|
|
32
|
+
Maps pagination, sorting, and filtering parameters.
|
|
33
|
+
|
|
34
|
+
- `pageIndex`: Name of the page index parameter (e.g., `page`).
|
|
35
|
+
- `pageSize`: Name of the page size parameter (e.g., `limit`).
|
|
36
|
+
- `sortBy`: Name of the sort field parameter.
|
|
37
|
+
- `sortDirection`: Name of the sort direction parameter.
|
|
38
|
+
- `list`: Path to the data list in the response.
|
|
39
|
+
- `total`: Path to the total count in the response.
|
|
40
|
+
|
|
41
|
+
### `options`
|
|
42
|
+
Maps data to an options structure (label/value pairs).
|
|
43
|
+
|
|
44
|
+
- `toFunction`: Conversion function (`ToOptions`, `ToOptionsFromObject`).
|
|
45
|
+
- `toValue`: Field to use as value.
|
|
46
|
+
- `toDisplay`: Field to use as label.
|
|
47
|
+
|
|
48
|
+
### `resolve`
|
|
49
|
+
Resolves a specific value from the upstream source.
|
|
@@ -23,7 +23,6 @@ function AssertAngularOptionsNameProperty(options) {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
function PrintAngularOptions(schematicName, options) {
|
|
26
|
-
console.log(JSON.stringify(options));
|
|
27
26
|
(0, schematics_utilities_1.PrintGeneralOptions)(schematicName, options);
|
|
28
27
|
const { name, context, nestModule, controllerName, backend, directory, componentName, } = options;
|
|
29
28
|
if (name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/angular-options.ts"],"names":[],"mappings":";;AAmCA,0DAwBC;AAID,4EAIC;AAED,
|
|
1
|
+
{"version":3,"file":"angular-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/angular-options.ts"],"names":[],"mappings":";;AAmCA,0DAwBC;AAID,4EAIC;AAED,kDA4DC;AAjID,qEAKoC;AACpC,+CAIyB;AACzB,2DAAuD;AACvD,+DAGmC;AAoBnC,SAAgB,uBAAuB,CAAC,OAAuB;;IAC7D,IAAI,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,KAAK,CAAC;IACrC,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,MAAA,OAAO,CAAC,OAAO,mCAAI,QAAQ,CAAC,CAAC;IACvD,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,iBAAiB,GAAG,IAAA,6CAAsB,kCAC3C,OAAO,KACV,OAAO,IACP,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,iCACf,iBAAiB,KACpB,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,IAAA,qBAAS,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,EAC9E,IAAI,EAAE,OAAO,CAAC,IAAI,CA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