@_linked/shape-ui 2.3.0 → 2.3.2
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/lib/esm/components/AvatarEditor.d.ts +19 -0
- package/lib/esm/components/AvatarEditor.js +6 -0
- package/lib/esm/components/AvatarEditor.js.map +1 -0
- package/lib/esm/components/CheckboxEditor.d.ts +20 -0
- package/lib/esm/components/CheckboxEditor.js +41 -0
- package/lib/esm/components/CheckboxEditor.js.map +1 -0
- package/lib/esm/components/DateEditor.d.ts +19 -0
- package/lib/esm/components/DateEditor.js +22 -0
- package/lib/esm/components/DateEditor.js.map +1 -0
- package/lib/esm/components/RadioButtonEditor.d.ts +22 -0
- package/lib/esm/components/RadioButtonEditor.js +39 -0
- package/lib/esm/components/RadioButtonEditor.js.map +1 -0
- package/lib/esm/components/SelectEditor.d.ts +20 -0
- package/lib/esm/components/SelectEditor.js +30 -0
- package/lib/esm/components/SelectEditor.js.map +1 -0
- package/lib/esm/components/SwitchEditor.d.ts +20 -0
- package/lib/esm/components/SwitchEditor.js +23 -0
- package/lib/esm/components/SwitchEditor.js.map +1 -0
- package/lib/esm/components/TextareaEditor.d.ts +22 -0
- package/lib/esm/components/TextareaEditor.js +15 -0
- package/lib/esm/components/TextareaEditor.js.map +1 -0
- package/lib/esm/components/ToggleEditor.d.ts +21 -0
- package/lib/esm/components/ToggleEditor.js +23 -0
- package/lib/esm/components/ToggleEditor.js.map +1 -0
- package/lib/esm/index.d.ts +10 -0
- package/lib/esm/index.js +24 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/shape/types.d.ts +697 -0
- package/lib/esm/shape/types.js +212 -0
- package/lib/esm/shape/types.js.map +1 -0
- package/package.json +3 -2
- package/src/index.ts +25 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape Builder Types for Create Now
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for SHACL shapes used in the Shape Builder.
|
|
5
|
+
* Shapes define validation constraints and form generation rules for ontology classes.
|
|
6
|
+
*
|
|
7
|
+
* Key concepts:
|
|
8
|
+
* - NodeShape: Top-level shape targeting a class (sh:targetClass)
|
|
9
|
+
* - PropertyShape: Constraints for a property path within a NodeShape
|
|
10
|
+
* - PropertyGroup: UI organization for form generation (sh:group)
|
|
11
|
+
* - PropertyPath: Simple or complex property paths (sh:path)
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Mapping from user-friendly types to XSD datatypes
|
|
15
|
+
*/
|
|
16
|
+
export const DATATYPE_MAP = {
|
|
17
|
+
text: 'xsd:string',
|
|
18
|
+
string: 'xsd:string',
|
|
19
|
+
integer: 'xsd:integer',
|
|
20
|
+
number: 'xsd:decimal',
|
|
21
|
+
decimal: 'xsd:decimal',
|
|
22
|
+
float: 'xsd:float',
|
|
23
|
+
double: 'xsd:double',
|
|
24
|
+
boolean: 'xsd:boolean',
|
|
25
|
+
date: 'xsd:date',
|
|
26
|
+
datetime: 'xsd:dateTime',
|
|
27
|
+
time: 'xsd:time',
|
|
28
|
+
uri: 'xsd:anyURI',
|
|
29
|
+
url: 'xsd:anyURI',
|
|
30
|
+
language: 'xsd:language',
|
|
31
|
+
langString: 'rdf:langString',
|
|
32
|
+
html: 'rdf:HTML',
|
|
33
|
+
};
|
|
34
|
+
/** Current draft version for migrations */
|
|
35
|
+
export const CURRENT_SHAPE_DRAFT_VERSION = 1;
|
|
36
|
+
// ============================================================================
|
|
37
|
+
// Type Guards & Helpers
|
|
38
|
+
// ============================================================================
|
|
39
|
+
/**
|
|
40
|
+
* Check if a property shape targets an object property
|
|
41
|
+
*/
|
|
42
|
+
export function isObjectPropertyShape(shape) {
|
|
43
|
+
return shape.path.finalProperty.propertyType === 'object';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a property shape targets a datatype property
|
|
47
|
+
*/
|
|
48
|
+
export function isDatatypePropertyShape(shape) {
|
|
49
|
+
return shape.path.finalProperty.propertyType === 'datatype';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get the effective nodeKind for a property shape
|
|
53
|
+
*/
|
|
54
|
+
export function getEffectiveNodeKind(shape) {
|
|
55
|
+
if (shape.nodeKind)
|
|
56
|
+
return shape.nodeKind;
|
|
57
|
+
return isObjectPropertyShape(shape) ? 'IRI' : 'Literal';
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Check if cardinality means "required"
|
|
61
|
+
*/
|
|
62
|
+
export function isRequired(cardinality) {
|
|
63
|
+
var _a;
|
|
64
|
+
return ((_a = cardinality.minCount) !== null && _a !== void 0 ? _a : 0) >= 1;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Check if cardinality means "single value"
|
|
68
|
+
*/
|
|
69
|
+
export function isSingleValue(cardinality) {
|
|
70
|
+
return cardinality.maxCount === 1;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Serialize a PropertyValue to Turtle syntax
|
|
74
|
+
*/
|
|
75
|
+
export function serializePropertyValue(value) {
|
|
76
|
+
if (value.isUri) {
|
|
77
|
+
return `<${value.value}>`;
|
|
78
|
+
}
|
|
79
|
+
if (value.language) {
|
|
80
|
+
return `"${value.value}"@${value.language}`;
|
|
81
|
+
}
|
|
82
|
+
if (value.datatype) {
|
|
83
|
+
return `"${value.value}"^^${value.datatype}`;
|
|
84
|
+
}
|
|
85
|
+
return `"${value.value}"`;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Check if datatype is numeric
|
|
89
|
+
*/
|
|
90
|
+
export function isNumericDatatype(datatype) {
|
|
91
|
+
if (!datatype)
|
|
92
|
+
return false;
|
|
93
|
+
return ['xsd:integer', 'xsd:decimal', 'xsd:float', 'xsd:double'].includes(datatype);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Check if datatype is string-based
|
|
97
|
+
*/
|
|
98
|
+
export function isStringDatatype(datatype) {
|
|
99
|
+
if (!datatype)
|
|
100
|
+
return false;
|
|
101
|
+
return ['xsd:string', 'rdf:langString', 'rdf:HTML'].includes(datatype);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Convert a SimplePropertyShape to a full BuilderPropertyShape
|
|
105
|
+
*/
|
|
106
|
+
export function simpleToFullPropertyShape(simple) {
|
|
107
|
+
var _a;
|
|
108
|
+
const path = simple.path
|
|
109
|
+
? createSimplePath(simple.path.predicate, simple.path.predicateName)
|
|
110
|
+
: createSimplePath('http://example.org/unknownProperty', simple.name);
|
|
111
|
+
// Update final property type based on constraints
|
|
112
|
+
if (simple.classUri) {
|
|
113
|
+
path.finalProperty.propertyType = 'object';
|
|
114
|
+
path.finalProperty.rangeClassUri = simple.classUri;
|
|
115
|
+
}
|
|
116
|
+
else if (simple.datatype) {
|
|
117
|
+
path.finalProperty.propertyType = 'datatype';
|
|
118
|
+
path.finalProperty.rangeDatatype = simple.datatype;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
id: simple.id,
|
|
122
|
+
name: simple.name,
|
|
123
|
+
description: simple.description,
|
|
124
|
+
path,
|
|
125
|
+
order: (_a = simple.order) !== null && _a !== void 0 ? _a : 0,
|
|
126
|
+
groupId: simple.groupId || '',
|
|
127
|
+
nodeKind: simple.nodeKind,
|
|
128
|
+
cardinality: {
|
|
129
|
+
minCount: simple.minCount,
|
|
130
|
+
maxCount: simple.maxCount,
|
|
131
|
+
},
|
|
132
|
+
objectConstraints: simple.classUri ? { class: simple.classUri } : undefined,
|
|
133
|
+
datatypeConstraints: simple.datatype ? {
|
|
134
|
+
datatype: simple.datatype,
|
|
135
|
+
stringConstraints: (simple.minLength !== undefined || simple.maxLength !== undefined || simple.pattern) ? {
|
|
136
|
+
minLength: simple.minLength,
|
|
137
|
+
maxLength: simple.maxLength,
|
|
138
|
+
pattern: simple.pattern,
|
|
139
|
+
flags: simple.flags,
|
|
140
|
+
} : undefined,
|
|
141
|
+
numericConstraints: (simple.minInclusive !== undefined || simple.maxInclusive !== undefined ||
|
|
142
|
+
simple.minExclusive !== undefined || simple.maxExclusive !== undefined) ? {
|
|
143
|
+
minInclusive: simple.minInclusive,
|
|
144
|
+
maxInclusive: simple.maxInclusive,
|
|
145
|
+
minExclusive: simple.minExclusive,
|
|
146
|
+
maxExclusive: simple.maxExclusive,
|
|
147
|
+
} : undefined,
|
|
148
|
+
} : undefined,
|
|
149
|
+
displayPriority: simple.displayPriority,
|
|
150
|
+
isPrimaryDisplay: simple.isPrimaryDisplay,
|
|
151
|
+
isUniqueIdentifier: simple.isUniqueIdentifier,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Convert a full BuilderPropertyShape to a SimplePropertyShape
|
|
156
|
+
*/
|
|
157
|
+
export function fullToSimplePropertyShape(full) {
|
|
158
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
159
|
+
return {
|
|
160
|
+
id: full.id,
|
|
161
|
+
name: full.name,
|
|
162
|
+
description: full.description,
|
|
163
|
+
path: full.path ? {
|
|
164
|
+
type: 'predicate',
|
|
165
|
+
predicate: full.path.root.predicateUri || full.path.sparqlPath,
|
|
166
|
+
predicateName: full.path.root.predicateName,
|
|
167
|
+
} : undefined,
|
|
168
|
+
order: full.order,
|
|
169
|
+
groupId: full.groupId,
|
|
170
|
+
minCount: (_a = full.cardinality) === null || _a === void 0 ? void 0 : _a.minCount,
|
|
171
|
+
maxCount: (_b = full.cardinality) === null || _b === void 0 ? void 0 : _b.maxCount,
|
|
172
|
+
datatype: (_c = full.datatypeConstraints) === null || _c === void 0 ? void 0 : _c.datatype,
|
|
173
|
+
classUri: (_d = full.objectConstraints) === null || _d === void 0 ? void 0 : _d.class,
|
|
174
|
+
nodeKind: full.nodeKind,
|
|
175
|
+
minLength: (_f = (_e = full.datatypeConstraints) === null || _e === void 0 ? void 0 : _e.stringConstraints) === null || _f === void 0 ? void 0 : _f.minLength,
|
|
176
|
+
maxLength: (_h = (_g = full.datatypeConstraints) === null || _g === void 0 ? void 0 : _g.stringConstraints) === null || _h === void 0 ? void 0 : _h.maxLength,
|
|
177
|
+
pattern: (_k = (_j = full.datatypeConstraints) === null || _j === void 0 ? void 0 : _j.stringConstraints) === null || _k === void 0 ? void 0 : _k.pattern,
|
|
178
|
+
flags: (_m = (_l = full.datatypeConstraints) === null || _l === void 0 ? void 0 : _l.stringConstraints) === null || _m === void 0 ? void 0 : _m.flags,
|
|
179
|
+
minInclusive: (_p = (_o = full.datatypeConstraints) === null || _o === void 0 ? void 0 : _o.numericConstraints) === null || _p === void 0 ? void 0 : _p.minInclusive,
|
|
180
|
+
maxInclusive: (_r = (_q = full.datatypeConstraints) === null || _q === void 0 ? void 0 : _q.numericConstraints) === null || _r === void 0 ? void 0 : _r.maxInclusive,
|
|
181
|
+
minExclusive: (_t = (_s = full.datatypeConstraints) === null || _s === void 0 ? void 0 : _s.numericConstraints) === null || _t === void 0 ? void 0 : _t.minExclusive,
|
|
182
|
+
maxExclusive: (_v = (_u = full.datatypeConstraints) === null || _u === void 0 ? void 0 : _u.numericConstraints) === null || _v === void 0 ? void 0 : _v.maxExclusive,
|
|
183
|
+
displayPriority: full.displayPriority,
|
|
184
|
+
isPrimaryDisplay: full.isPrimaryDisplay,
|
|
185
|
+
isUniqueIdentifier: full.isUniqueIdentifier,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Generate a simple predicate path from a property URI
|
|
190
|
+
*/
|
|
191
|
+
export function createSimplePath(propertyUri, propertyName, propertyType = 'datatype', rangeClassUri, rangeDatatype) {
|
|
192
|
+
const name = propertyName || propertyUri.split(/[#/]/).pop() || propertyUri;
|
|
193
|
+
return {
|
|
194
|
+
id: crypto.randomUUID(),
|
|
195
|
+
name,
|
|
196
|
+
root: {
|
|
197
|
+
type: 'predicate',
|
|
198
|
+
predicateUri: propertyUri,
|
|
199
|
+
predicateName: name,
|
|
200
|
+
},
|
|
201
|
+
sparqlPath: propertyUri,
|
|
202
|
+
turtlePath: `<${propertyUri}>`,
|
|
203
|
+
finalProperty: {
|
|
204
|
+
uri: propertyUri,
|
|
205
|
+
name,
|
|
206
|
+
propertyType,
|
|
207
|
+
rangeClassUri,
|
|
208
|
+
rangeDatatype,
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/shape/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgDH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,aAAa;IACtB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,QAAQ,EAAE,cAAc;IACxB,UAAU,EAAE,gBAAgB;IAC5B,IAAI,EAAE,UAAU;CACjB,CAAC;AA4jBF,2CAA2C;AAC3C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AA+B7C,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAA2B;IAC/D,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,KAAK,QAAQ,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAA2B;IACjE,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,KAAK,UAAU,CAAC;AAC9D,CAAC;AAED;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AAC,eAAe;QACrC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;KAC5C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,WAAmB,EACnB,YAAqB,EACrB,eAAsC,UAAU,EAChD,aAAsB,EACtB,aAAsB;IAEtB,MAAM,IAAI,GAAG,YAAY,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,WAAW,CAAC;IAC5E,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE;QACvB,IAAI;QACJ,IAAI,EAAE;YACJ,IAAI,EAAE,WAAW;YACjB,YAAY,EAAE,WAAW;YACzB,aAAa,EAAE,IAAI;SACpB;QACD,UAAU,EAAE,WAAW;QACvB,UAAU,EAAE,IAAI,WAAW,GAAG;QAC9B,aAAa,EAAE;YACb,GAAG,EAAE,WAAW;YAChB,IAAI;YACJ,YAAY;YACZ,aAAa;YACb,aAAa;SACd;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/linked-fw/shape-ui.git"
|
|
12
12
|
},
|
|
13
|
-
"version": "2.3.
|
|
13
|
+
"version": "2.3.2",
|
|
14
|
+
"packageManager": "npm@11.19.1",
|
|
14
15
|
"type": "module",
|
|
15
16
|
"linkedPackage": true,
|
|
16
17
|
"main": "lib/esm/index.js",
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"license": "ISC",
|
|
19
20
|
"scripts": {
|
|
20
21
|
"start": "npm exec linked dev",
|
|
21
|
-
"build": "rimraf ./lib &&
|
|
22
|
+
"build": "rimraf ./lib && npm run build-esm && npm run copy-to-lib",
|
|
22
23
|
"build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && tsc -p tsconfig-esm.json",
|
|
23
24
|
"copy-to-lib": "echo 'copying CSS + JSON assets to lib folder' && copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/esm"
|
|
24
25
|
},
|
package/src/index.ts
CHANGED
|
@@ -86,8 +86,33 @@ export {default as NodeValuesEditor} from './components/NodeValuesEditor.js';
|
|
|
86
86
|
export {NodeBadge} from './components/NodeBadge.js';
|
|
87
87
|
export {FilterBadge} from './components/FilterBadge.js';
|
|
88
88
|
|
|
89
|
+
// Per-datatype value editors. Consumers reach these by direct path
|
|
90
|
+
// (`@_linked/shape-ui/components/SelectEditor`), which only resolves against a
|
|
91
|
+
// built `lib/` if the file is reachable from an entry — so they are exported
|
|
92
|
+
// here as well. Not every one has a consumer in this workspace yet; they are
|
|
93
|
+
// part of the package's surface regardless of who happens to use them today.
|
|
94
|
+
export {CheckboxEditor} from './components/CheckboxEditor.js';
|
|
95
|
+
export {RadioButtonEditor} from './components/RadioButtonEditor.js';
|
|
96
|
+
export {SelectEditor} from './components/SelectEditor.js';
|
|
97
|
+
export {SwitchEditor} from './components/SwitchEditor.js';
|
|
98
|
+
export {TextareaEditor} from './components/TextareaEditor.js';
|
|
99
|
+
export {ToggleEditor} from './components/ToggleEditor.js';
|
|
100
|
+
export {AvatarEditor} from './components/AvatarEditor.js';
|
|
101
|
+
export {DateEditor} from './components/DateEditor.js';
|
|
102
|
+
export {TextfieldEditor} from './components/TextfieldEditor.js';
|
|
103
|
+
// ImageValueEditor is deliberately NOT exported yet. It never compiled — it is
|
|
104
|
+
// written against a core API that has since moved on (`NodeShape.namedNode`,
|
|
105
|
+
// `PropertyShapeWire.uri`, `NodeReferenceValue.label`, `ImageObject.save()`),
|
|
106
|
+
// and it reads instances through `getShapeClass(...).getLocalInstances()`, a
|
|
107
|
+
// live-shape pattern the codebase has moved away from. Exporting it fails the
|
|
108
|
+
// build with 5 type errors. It needs porting, not a compile fix.
|
|
109
|
+
|
|
89
110
|
// ─── Shape domain ────────────────────────────────────────────────────────────
|
|
90
111
|
export * from './shape/contracts.js';
|
|
91
112
|
export * from './shape/naming.js';
|
|
92
113
|
export * from './shape/nodeDisplay.js';
|
|
93
114
|
export * from './shape/propertyVisibility.js';
|
|
115
|
+
// 1,158 lines of pure shape-domain types plus 13 runtime exports (DATATYPE_MAP,
|
|
116
|
+
// the shape-kind predicates). The consuming app re-exports this whole module
|
|
117
|
+
// for 34 importers, by direct path — so it has to reach lib/.
|
|
118
|
+
export * from './shape/types.js';
|