@operato/data-mapper 10.29.81 → 10.29.84

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.
@@ -0,0 +1,30 @@
1
+ import '../src/ox-data-mapper.js';
2
+ import '@material/web/icon/icon.js';
3
+ import { TemplateResult } from 'lit';
4
+ declare const _default: {
5
+ title: string;
6
+ component: string;
7
+ argTypes: {
8
+ sourceSchema: {
9
+ control: string;
10
+ };
11
+ targetSchema: {
12
+ control: string;
13
+ };
14
+ mappings: {
15
+ control: string;
16
+ };
17
+ };
18
+ };
19
+ export default _default;
20
+ interface Story<T> {
21
+ (args: T): TemplateResult;
22
+ args?: Partial<T>;
23
+ argTypes?: Record<string, unknown>;
24
+ }
25
+ interface ArgTypes {
26
+ sourceSchema: object;
27
+ targetSchema: object;
28
+ mappings: Object;
29
+ }
30
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,115 @@
1
+ import '../src/ox-data-mapper.js';
2
+ import '@material/web/icon/icon.js';
3
+ import { html } from 'lit';
4
+ export default {
5
+ title: 'ox-data-mapper',
6
+ component: 'ox-data-mapper',
7
+ argTypes: {
8
+ sourceSchema: { control: 'object' },
9
+ targetSchema: { control: 'object' },
10
+ mappings: { control: 'object' }
11
+ }
12
+ };
13
+ const Template = ({ sourceSchema, targetSchema, mappings }) => html `
14
+ <link
15
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
16
+ rel="stylesheet"
17
+ />
18
+ <link
19
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
20
+ rel="stylesheet"
21
+ />
22
+ <link
23
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
24
+ rel="stylesheet"
25
+ />
26
+
27
+ <link href="/themes/app-theme.css" rel="stylesheet" />
28
+ <link href="/themes/light.css" rel="stylesheet" />
29
+ <link href="/themes/dark.css" rel="stylesheet" />
30
+ <link href="/themes/spacing.css" rel="stylesheet" />
31
+ <link href="/themes/grist-theme.css" rel="stylesheet" />
32
+ <link href="/themes/form-theme.css" rel="stylesheet" />
33
+
34
+ <style>
35
+ ox-data-mapper {
36
+ height: 500px;
37
+ display: block;
38
+ margin: 100px;
39
+ padding: 0 10px;
40
+ background-color: cyan;
41
+ overflow-y: auto;
42
+ }
43
+ </style>
44
+
45
+ <ox-data-mapper
46
+ .sourceSchema=${sourceSchema}
47
+ .targetSchema=${targetSchema}
48
+ .mappings=${mappings}
49
+ ></ox-data-mapper>
50
+ `;
51
+ export const Regular = Template.bind({});
52
+ Regular.args = {
53
+ sourceSchema: {
54
+ id: 's1',
55
+ label: 'Order',
56
+ multiplicity: '*',
57
+ children: [
58
+ {
59
+ id: 's1-1',
60
+ label: 'Item',
61
+ multiplicity: '*',
62
+ children: [
63
+ { id: 's1-1-1', label: 'Name' },
64
+ { id: 's1-1-2', label: 'Price' },
65
+ { id: 's1-1-3', label: 'Name' },
66
+ { id: 's1-1-4', label: 'Price' },
67
+ { id: 's1-1-5', label: 'Name' },
68
+ { id: 's1-1-6', label: 'Price' },
69
+ { id: 's1-1-7', label: 'Name' },
70
+ { id: 's1-1-8', label: 'Price' },
71
+ { id: 's1-1-9', label: 'Name' },
72
+ { id: 's1-1-10', label: 'Price' }
73
+ ]
74
+ }
75
+ ]
76
+ },
77
+ targetSchema: {
78
+ id: 't1',
79
+ label: 'Invoice',
80
+ children: [
81
+ {
82
+ id: 't1-1',
83
+ label: 'Products',
84
+ multiplicity: '*',
85
+ children: [
86
+ { id: 't1-1-1', label: 'Product Name' },
87
+ { id: 't1-1-2', label: 'Cost' },
88
+ { id: 't1-1-3', label: 'Product Name' },
89
+ { id: 't1-1-4', label: 'Cost' },
90
+ { id: 't1-1-5', label: 'Product Name' },
91
+ { id: 't1-1-6', label: 'Cost' },
92
+ { id: 't1-1-7', label: 'Product Name' },
93
+ { id: 't1-1-8', label: 'Cost' }
94
+ ]
95
+ }
96
+ ]
97
+ },
98
+ mappings: [
99
+ {
100
+ id: '1',
101
+ inputs: ['s1'],
102
+ outputs: ['t1-1-1'],
103
+ mappingFunction: 'text-transform',
104
+ position: { x: 100, y: 50 }
105
+ },
106
+ {
107
+ id: '2',
108
+ inputs: ['s1-1-1', 's1-1-2'],
109
+ outputs: ['t1-1-2'],
110
+ mappingFunction: 'value-mapping',
111
+ position: { x: 100, y: 100 }
112
+ }
113
+ ]
114
+ };
115
+ //# sourceMappingURL=ox-data-mapper.stories.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/data-mapper",
3
- "version": "10.29.81",
3
+ "version": "10.29.84",
4
4
  "description": "User interface for tree structure data",
5
5
  "author": "heartyoh",
6
6
  "type": "module",
@@ -22,6 +22,21 @@
22
22
  "./package.json": "./package.json",
23
23
  "./ox-data-mapper.js": "./dist/src/ox-data-mapper.js"
24
24
  },
25
+ "files": [
26
+ "README.md",
27
+ "assets",
28
+ "dist",
29
+ "themes",
30
+ "translations",
31
+ "!**/*.map",
32
+ "!**/*.test.*",
33
+ "!**/*.spec.*",
34
+ "!**/test/**",
35
+ "!**/tests/**",
36
+ "!**/__tests__/**",
37
+ "!**/*.tsbuildinfo",
38
+ "!**/.DS_Store"
39
+ ],
25
40
  "typesVersions": {
26
41
  "*": {
27
42
  "ox-data-mapper.js": [
@@ -43,11 +58,11 @@
43
58
  },
44
59
  "dependencies": {
45
60
  "@lit/context": "1.1.4",
46
- "@operato/data-tree": "^10.29.81",
47
- "@operato/markdown": "^10.29.81",
48
- "@operato/popup": "^10.29.81",
49
- "@operato/property-editor": "^10.29.81",
50
- "@operato/styles": "^10.29.81",
61
+ "@operato/data-tree": "^10.29.83",
62
+ "@operato/markdown": "^10.29.83",
63
+ "@operato/popup": "^10.29.83",
64
+ "@operato/property-editor": "^10.29.84",
65
+ "@operato/styles": "^10.29.83",
51
66
  "i18next": "^24.2.1",
52
67
  "lit": "^3.1.2",
53
68
  "lodash-es": "^4.17.21"
@@ -85,5 +100,5 @@
85
100
  "prettier --write"
86
101
  ]
87
102
  },
88
- "gitHead": "e59c974dc6f94baeea7e1b21224bb347bbd222a7"
103
+ "gitHead": "a6c30e4a03a2a71b4aba24f09853d8be78655147"
89
104
  }