@cratis/components 4.34.1 → 4.35.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.
Files changed (37) hide show
  1. package/compat-manifest.json +11 -11
  2. package/dist/esm/SchemaEditor/SchemaEditorLabels.d.ts +2 -0
  3. package/dist/esm/SchemaEditor/SchemaEditorLabels.d.ts.map +1 -1
  4. package/dist/esm/SchemaEditor/SchemaEditorLabels.js.map +1 -1
  5. package/dist/esm/SchemaEditor/Tree/GlyphMenu.d.ts +32 -0
  6. package/dist/esm/SchemaEditor/Tree/GlyphMenu.d.ts.map +1 -0
  7. package/dist/esm/SchemaEditor/Tree/GlyphMenu.js +25 -0
  8. package/dist/esm/SchemaEditor/Tree/GlyphMenu.js.map +1 -0
  9. package/dist/esm/SchemaEditor/Tree/PropertyType.d.ts +2 -0
  10. package/dist/esm/SchemaEditor/Tree/PropertyType.d.ts.map +1 -1
  11. package/dist/esm/SchemaEditor/Tree/PropertyType.js +1 -0
  12. package/dist/esm/SchemaEditor/Tree/PropertyType.js.map +1 -1
  13. package/dist/esm/SchemaEditor/Tree/PropertyTypeGlyph.d.ts.map +1 -1
  14. package/dist/esm/SchemaEditor/Tree/PropertyTypeGlyph.js +2 -1
  15. package/dist/esm/SchemaEditor/Tree/PropertyTypeGlyph.js.map +1 -1
  16. package/dist/esm/SchemaEditor/Tree/keywordApplicability.d.ts.map +1 -1
  17. package/dist/esm/SchemaEditor/Tree/keywordApplicability.js +1 -0
  18. package/dist/esm/SchemaEditor/Tree/keywordApplicability.js.map +1 -1
  19. package/dist/esm/SchemaEditor/Tree/propertyTypeDisplay.d.ts.map +1 -1
  20. package/dist/esm/SchemaEditor/Tree/propertyTypeDisplay.js +2 -0
  21. package/dist/esm/SchemaEditor/Tree/propertyTypeDisplay.js.map +1 -1
  22. package/dist/esm/SchemaEditor/Tree/schemaConversion.d.ts.map +1 -1
  23. package/dist/esm/SchemaEditor/Tree/schemaConversion.js +2 -0
  24. package/dist/esm/SchemaEditor/Tree/schemaConversion.js.map +1 -1
  25. package/dist/esm/SchemaEditor/Tree/schemaPropertyType.d.ts.map +1 -1
  26. package/dist/esm/SchemaEditor/Tree/schemaPropertyType.js +2 -0
  27. package/dist/esm/SchemaEditor/Tree/schemaPropertyType.js.map +1 -1
  28. package/dist/esm/SchemaEditor/defaultSchemaEditorLabels.d.ts.map +1 -1
  29. package/dist/esm/SchemaEditor/defaultSchemaEditorLabels.js +1 -0
  30. package/dist/esm/SchemaEditor/defaultSchemaEditorLabels.js.map +1 -1
  31. package/dist/esm/SchemaEditor/index.d.ts +3 -0
  32. package/dist/esm/SchemaEditor/index.d.ts.map +1 -1
  33. package/dist/esm/SchemaEditor/index.js +2 -0
  34. package/dist/esm/SchemaEditor/index.js.map +1 -1
  35. package/dist/esm/styles.SchemaEditor.css +2 -0
  36. package/dist/esm/styles.css +2 -0
  37. package/package.json +1 -1
@@ -68,7 +68,7 @@
68
68
  {
69
69
  "name": "@cratis/components",
70
70
  "role": "core",
71
- "version": "4.34.1",
71
+ "version": "4.35.0",
72
72
  "releaseMajorRange": ">=4 <5",
73
73
  "independentRelease": false,
74
74
  "private": false,
@@ -92,7 +92,7 @@
92
92
  {
93
93
  "name": "@cratis/eslint-plugin-components",
94
94
  "role": "eslint",
95
- "version": "4.34.1",
95
+ "version": "4.35.0",
96
96
  "releaseMajorRange": ">=4 <5",
97
97
  "independentRelease": false,
98
98
  "private": false,
@@ -105,7 +105,7 @@
105
105
  {
106
106
  "name": "@cratis/components.migrator",
107
107
  "role": "migrator",
108
- "version": "4.34.1",
108
+ "version": "4.35.0",
109
109
  "releaseMajorRange": ">=4 <5",
110
110
  "independentRelease": false,
111
111
  "private": false,
@@ -116,13 +116,13 @@
116
116
  {
117
117
  "name": "@cratis/components.conformance",
118
118
  "role": "conformance",
119
- "version": "4.34.1",
119
+ "version": "4.35.0",
120
120
  "releaseMajorRange": ">=4 <5",
121
121
  "independentRelease": false,
122
122
  "private": false,
123
123
  "packageAccess": "public",
124
124
  "peerDependencies": {
125
- "@cratis/components": "4.34.1",
125
+ "@cratis/components": "4.35.0",
126
126
  "react": "^19.0.0",
127
127
  "react-dom": "^19.0.0"
128
128
  },
@@ -132,13 +132,13 @@
132
132
  {
133
133
  "name": "@cratis/components.mui",
134
134
  "role": "renderer-adapter",
135
- "version": "4.34.1",
135
+ "version": "4.35.0",
136
136
  "releaseMajorRange": ">=4 <5",
137
137
  "independentRelease": false,
138
138
  "private": false,
139
139
  "packageAccess": "public",
140
140
  "peerDependencies": {
141
- "@cratis/components": "4.34.1",
141
+ "@cratis/components": "4.35.0",
142
142
  "@emotion/react": ">=11.5 <12",
143
143
  "@emotion/styled": ">=11.11 <12",
144
144
  "@mui/material": ">=9 <10",
@@ -188,13 +188,13 @@
188
188
  {
189
189
  "name": "@cratis/components.primereact",
190
190
  "role": "renderer-adapter",
191
- "version": "4.34.1",
191
+ "version": "4.35.0",
192
192
  "releaseMajorRange": ">=4 <5",
193
193
  "independentRelease": false,
194
194
  "private": false,
195
195
  "packageAccess": "public",
196
196
  "peerDependencies": {
197
- "@cratis/components": "4.34.1",
197
+ "@cratis/components": "4.35.0",
198
198
  "@primereact/core": ">=11 <12",
199
199
  "@primereact/ui": ">=11 <12",
200
200
  "@primeuix/themes": ">=3 <4",
@@ -256,13 +256,13 @@
256
256
  {
257
257
  "name": "@cratis/components.primereact10",
258
258
  "role": "renderer-adapter",
259
- "version": "4.34.1",
259
+ "version": "4.35.0",
260
260
  "releaseMajorRange": ">=4 <5",
261
261
  "independentRelease": false,
262
262
  "private": false,
263
263
  "packageAccess": "public",
264
264
  "peerDependencies": {
265
- "@cratis/components": "4.34.1",
265
+ "@cratis/components": "4.35.0",
266
266
  "primereact": ">=10.9.9 <11",
267
267
  "react": "^19.0.0",
268
268
  "react-dom": "^19.0.0"
@@ -92,6 +92,8 @@ export interface SchemaEditorLabels {
92
92
  typeDate?: string;
93
93
  /** Tree layout: name of the `time` type. */
94
94
  typeTime?: string;
95
+ /** Tree layout: name of the unique identifier (GUID) type. */
96
+ typeUniqueIdentifier?: string;
95
97
  /** Tree layout: name of the list-of-text type. */
96
98
  typeStringArray?: string;
97
99
  /** Tree layout: name of the list-of-numbers type. */
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaEditorLabels.d.ts","sourceRoot":"","sources":["../../../SchemaEditor/SchemaEditorLabels.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,wBAAwB,EAAE,MAAM,CAAC;IACjC,qEAAqE;IACrE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IAEpB,4HAA4H;IAC5H,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACpD,iHAAiH;IACjH,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,2EAA2E;I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;IACrD,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mGAAmG;IACnG,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,yEAAyE;IACzE,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaEditorLabels.js","sourceRoot":"","sources":["../../../SchemaEditor/SchemaEditorLabels.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG","sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * User-facing strings for {@link SchemaEditor}. Every field is optional; pass a\n * partial `labels` to override any of them (for localization). Omitted fields\n * fall back to {@link defaultSchemaEditorLabels} (English).\n */\nexport interface SchemaEditorLabels {\n /** Menu action that enters edit mode. */\n edit: string;\n /** Menu action that saves changes. */\n save: string;\n /** Menu action that cancels editing. */\n cancel: string;\n /** Menu action that adds a property. */\n addProperty: string;\n /** Accessible name for the action menubar. */\n actions: string;\n /** Accessible name and tooltip for the back button. */\n navigateBack: string;\n /** Shown when the schema has no properties. */\n emptyMessage: string;\n /** Accessible name for the \"drill into array item definition\" button. */\n navigateToItemDefinition: string;\n /** Accessible name for the \"drill into object properties\" button. */\n navigateToProperties: string;\n /** Accessible name for a property-name input. */\n propertyName: string;\n /** Accessible name for a property-type selector. */\n propertyType: string;\n /** Accessible name for an array item-type selector. */\n arrayItemType: string;\n /** Accessible name for the \"remove property\" button. */\n deleteProperty: string;\n /** Validation message shown when the schema cannot be represented as valid JSON. */\n invalidJson: string;\n\n /** Tree layout and capabilities: accessible name of the editor when the host supplies none. Default `Schema properties`. */\n schema?: string;\n /** Tree layout: accessible name of the button that adds a property to a nested object. */\n addPropertyTo?: (propertyName: string) => string;\n /** Tree layout: accessible name of the list of properties nested under a property. */\n nestedProperties?: (propertyName: string) => string;\n /** Tree layout: accessible name of the input used to rename a property. Receives the property's current name. */\n propertyNameFor?: (propertyName: string) => string;\n /** Tree layout: tooltip of the control that starts renaming a property. */\n renameHint?: string;\n /** Tree layout: accessible name of the button that removes a property. */\n deletePropertyFor?: (propertyName: string) => string;\n /** Tree layout: accessible name of the button that opens the menu of types; receives the current type's name. */\n changeType?: (propertyName: string, typeName: string) => string;\n /** Tree layout: accessible name of the menu of types. */\n propertyTypes?: string;\n /** Heading of the concepts in the menu of types. */\n concepts?: string;\n /** Disabled hint in the menu of types when concepts are enabled but none are defined. */\n noConcepts?: string;\n /** Visible text of the toggle for whether a property must be present (`allowRequired`). */\n required?: string;\n /** Accessible name of the toggle for whether a property must be present. */\n requiredProperty?: (propertyName: string) => string;\n /** Explains what the required toggle means. */\n requiredHelp?: string;\n /** Accessible name of the toggle that makes a property the key of its object (`allowKeyProperty`). */\n keyProperty?: (propertyName: string) => string;\n /** Tooltip of the key toggle while the property is not the key. */\n setAsKey?: string;\n /** Tooltip of the key toggle while the property is the key. */\n isKey?: string;\n /** Tree layout: accessible name of the Generated toggle. */\n generatedProperty?: (propertyName: string) => string;\n /** Tree layout: tooltip of the Generated toggle while the value is entered. */\n setAsGenerated?: string;\n /** Tree layout: tooltip of the Generated toggle while the value is generated. */\n isGenerated?: string;\n /** Column header of the key column in the table layout. */\n keyColumn?: string;\n /** Column header of the required column in the table layout. */\n requiredColumn?: string;\n /** Why a property cannot be renamed or removed (`isPropertyProtected`). */\n protectedProperty?: string;\n /** Tree layout: validation message for a blank name. */\n nameRequired?: string;\n /** Tree layout: validation message for a name that would shadow a member every object inherits. */\n nameReserved?: (name: string) => string;\n /** Tree layout: validation message for a name a sibling already uses. */\n nameDuplicate?: (name: string) => string;\n /** Tree layout: name of the `string` type. */\n typeString?: string;\n /** Tree layout: name of the `number` type. */\n typeNumber?: string;\n /** Tree layout: name of the `boolean` type. */\n typeBoolean?: string;\n /** Tree layout: name of the `date` type. */\n typeDate?: string;\n /** Tree layout: name of the `time` type. */\n typeTime?: string;\n /** Tree layout: name of the list-of-text type. */\n typeStringArray?: string;\n /** Tree layout: name of the list-of-numbers type. */\n typeNumberArray?: string;\n /** Tree layout: name of the nested object type. */\n typeObject?: string;\n /** Tree layout: name of the list-of-objects type. */\n typeObjectArray?: string;\n}\n"]}
1
+ {"version":3,"file":"SchemaEditorLabels.js","sourceRoot":"","sources":["../../../SchemaEditor/SchemaEditorLabels.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG","sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * User-facing strings for {@link SchemaEditor}. Every field is optional; pass a\n * partial `labels` to override any of them (for localization). Omitted fields\n * fall back to {@link defaultSchemaEditorLabels} (English).\n */\nexport interface SchemaEditorLabels {\n /** Menu action that enters edit mode. */\n edit: string;\n /** Menu action that saves changes. */\n save: string;\n /** Menu action that cancels editing. */\n cancel: string;\n /** Menu action that adds a property. */\n addProperty: string;\n /** Accessible name for the action menubar. */\n actions: string;\n /** Accessible name and tooltip for the back button. */\n navigateBack: string;\n /** Shown when the schema has no properties. */\n emptyMessage: string;\n /** Accessible name for the \"drill into array item definition\" button. */\n navigateToItemDefinition: string;\n /** Accessible name for the \"drill into object properties\" button. */\n navigateToProperties: string;\n /** Accessible name for a property-name input. */\n propertyName: string;\n /** Accessible name for a property-type selector. */\n propertyType: string;\n /** Accessible name for an array item-type selector. */\n arrayItemType: string;\n /** Accessible name for the \"remove property\" button. */\n deleteProperty: string;\n /** Validation message shown when the schema cannot be represented as valid JSON. */\n invalidJson: string;\n\n /** Tree layout and capabilities: accessible name of the editor when the host supplies none. Default `Schema properties`. */\n schema?: string;\n /** Tree layout: accessible name of the button that adds a property to a nested object. */\n addPropertyTo?: (propertyName: string) => string;\n /** Tree layout: accessible name of the list of properties nested under a property. */\n nestedProperties?: (propertyName: string) => string;\n /** Tree layout: accessible name of the input used to rename a property. Receives the property's current name. */\n propertyNameFor?: (propertyName: string) => string;\n /** Tree layout: tooltip of the control that starts renaming a property. */\n renameHint?: string;\n /** Tree layout: accessible name of the button that removes a property. */\n deletePropertyFor?: (propertyName: string) => string;\n /** Tree layout: accessible name of the button that opens the menu of types; receives the current type's name. */\n changeType?: (propertyName: string, typeName: string) => string;\n /** Tree layout: accessible name of the menu of types. */\n propertyTypes?: string;\n /** Heading of the concepts in the menu of types. */\n concepts?: string;\n /** Disabled hint in the menu of types when concepts are enabled but none are defined. */\n noConcepts?: string;\n /** Visible text of the toggle for whether a property must be present (`allowRequired`). */\n required?: string;\n /** Accessible name of the toggle for whether a property must be present. */\n requiredProperty?: (propertyName: string) => string;\n /** Explains what the required toggle means. */\n requiredHelp?: string;\n /** Accessible name of the toggle that makes a property the key of its object (`allowKeyProperty`). */\n keyProperty?: (propertyName: string) => string;\n /** Tooltip of the key toggle while the property is not the key. */\n setAsKey?: string;\n /** Tooltip of the key toggle while the property is the key. */\n isKey?: string;\n /** Tree layout: accessible name of the Generated toggle. */\n generatedProperty?: (propertyName: string) => string;\n /** Tree layout: tooltip of the Generated toggle while the value is entered. */\n setAsGenerated?: string;\n /** Tree layout: tooltip of the Generated toggle while the value is generated. */\n isGenerated?: string;\n /** Column header of the key column in the table layout. */\n keyColumn?: string;\n /** Column header of the required column in the table layout. */\n requiredColumn?: string;\n /** Why a property cannot be renamed or removed (`isPropertyProtected`). */\n protectedProperty?: string;\n /** Tree layout: validation message for a blank name. */\n nameRequired?: string;\n /** Tree layout: validation message for a name that would shadow a member every object inherits. */\n nameReserved?: (name: string) => string;\n /** Tree layout: validation message for a name a sibling already uses. */\n nameDuplicate?: (name: string) => string;\n /** Tree layout: name of the `string` type. */\n typeString?: string;\n /** Tree layout: name of the `number` type. */\n typeNumber?: string;\n /** Tree layout: name of the `boolean` type. */\n typeBoolean?: string;\n /** Tree layout: name of the `date` type. */\n typeDate?: string;\n /** Tree layout: name of the `time` type. */\n typeTime?: string;\n /** Tree layout: name of the unique identifier (GUID) type. */\n typeUniqueIdentifier?: string;\n /** Tree layout: name of the list-of-text type. */\n typeStringArray?: string;\n /** Tree layout: name of the list-of-numbers type. */\n typeNumberArray?: string;\n /** Tree layout: name of the nested object type. */\n typeObject?: string;\n /** Tree layout: name of the list-of-objects type. */\n typeObjectArray?: string;\n}\n"]}
@@ -0,0 +1,32 @@
1
+ import { type ReactNode } from 'react';
2
+ import { PropertyType } from './PropertyType.js';
3
+ /** One entry of a {@link GlyphMenu}. */
4
+ export interface GlyphMenuItem<TKey extends string | number> {
5
+ /** What is reported when the entry is chosen. */
6
+ key: TKey;
7
+ /** The name shown beside the glyph. */
8
+ label: string;
9
+ /** The property type whose glyph and color the entry borrows. */
10
+ glyph: PropertyType;
11
+ }
12
+ /** Props for {@link GlyphMenu}. */
13
+ export interface GlyphMenuProps<TKey extends string | number> {
14
+ /** The entries, in order. */
15
+ items: readonly GlyphMenuItem<TKey>[];
16
+ /** The chosen entry. */
17
+ value: TKey;
18
+ /** Called with the key of the entry the user chose. */
19
+ onChange: (key: TKey) => void;
20
+ /** The accessible name of the menu and its trigger. */
21
+ label: string;
22
+ /** Stable name for tests and assistive technology. */
23
+ name?: string;
24
+ /** Disables the trigger. */
25
+ disabled?: boolean;
26
+ }
27
+ /**
28
+ * A single-choice menu that lists its entries the way the schema editor's type menu does: a colored glyph
29
+ * followed by the name. The trigger shows the chosen entry the same way.
30
+ */
31
+ export declare const GlyphMenu: <TKey extends string | number>({ items, value, onChange, label, name, disabled }: GlyphMenuProps<TKey>) => ReactNode;
32
+ //# sourceMappingURL=GlyphMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlyphMenu.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/GlyphMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAG9C,wCAAwC;AACxC,MAAM,WAAW,aAAa,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IACvD,iDAAiD;IACjD,GAAG,EAAE,IAAI,CAAC;IACV,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,KAAK,EAAE,YAAY,CAAC;CACvB;AAED,mCAAmC;AACnC,MAAM,WAAW,cAAc,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IACxD,6BAA6B;IAC7B,KAAK,EAAE,SAAS,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,wBAAwB;IACxB,KAAK,EAAE,IAAI,CAAC;IACZ,uDAAuD;IACvD,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9B,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,IAAI,SAAS,MAAM,GAAG,MAAM,qDAAqD,cAAc,CAAC,IAAI,CAAC,KAAG,SAwCjI,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { UNSAFE_PortalProvider } from 'react-aria';
3
+ import { Button } from 'react-aria-components/Button';
4
+ import { MenuTrigger, Popover, Menu, MenuItem } from 'react-aria-components/Menu';
5
+ import { zIndexAboveDialog, OVERLAY_OFFSET } from '../../renderer/dialogStack.js';
6
+ import { useNearestDialogZIndex } from '../../renderer/DialogStackContext.js';
7
+ import { unstable_useOverlayEnvironment } from '../../renderer/RendererContext.js';
8
+ import { PropertyTypeGlyph } from './PropertyTypeGlyph.js';
9
+
10
+ const GlyphMenu = ({ items, value, onChange, label, name, disabled }) => {
11
+ const overlayEnvironment = unstable_useOverlayEnvironment();
12
+ const nearestDialogZIndex = useNearestDialogZIndex();
13
+ const zIndex = nearestDialogZIndex === null
14
+ ? 'var(--cratis-z-index-overlay)'
15
+ : zIndexAboveDialog(nearestDialogZIndex, OVERLAY_OFFSET);
16
+ const chosen = items.find(item => item.key === value);
17
+ return (jsx(UNSAFE_PortalProvider, { getContainer: overlayEnvironment.getContainer, children: jsxs(MenuTrigger, { children: [jsxs(Button, { "aria-label": label, isDisabled: disabled, className: 'cratis-schema-editor__type-button', "data-name": name, children: [chosen && jsx(PropertyTypeGlyph, { type: chosen.glyph }), chosen?.label] }), jsx(Popover, { className: 'cratis-schema-editor__menu', style: { zIndex }, children: jsx(Menu, { "aria-label": label, className: 'cratis-schema-editor__menu-list', onAction: key => {
18
+ const picked = items.find(item => String(item.key) === String(key));
19
+ if (picked)
20
+ onChange(picked.key);
21
+ }, children: items.map(item => (jsxs(MenuItem, { id: String(item.key), textValue: item.label, className: 'cratis-schema-editor__menu-item', children: [jsx(PropertyTypeGlyph, { type: item.glyph }), item.label] }, String(item.key)))) }) })] }) }));
22
+ };
23
+
24
+ export { GlyphMenu };
25
+ //# sourceMappingURL=GlyphMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlyphMenu.js","sources":["../../../../SchemaEditor/Tree/GlyphMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { type ReactNode } from 'react';\nimport { UNSAFE_PortalProvider } from 'react-aria';\nimport { Button } from 'react-aria-components/Button';\nimport { MenuTrigger, Popover, Menu, MenuItem } from 'react-aria-components/Menu';\nimport { zIndexAboveDialog, OVERLAY_OFFSET } from '../../renderer/dialogStack';\nimport { useNearestDialogZIndex } from '../../renderer/DialogStackContext';\nimport { unstable_useOverlayEnvironment } from '../../renderer/RendererContext';\nimport { PropertyType } from './PropertyType';\nimport { PropertyTypeGlyph } from './PropertyTypeGlyph';\n\n/** One entry of a {@link GlyphMenu}. */\nexport interface GlyphMenuItem<TKey extends string | number> {\n /** What is reported when the entry is chosen. */\n key: TKey;\n /** The name shown beside the glyph. */\n label: string;\n /** The property type whose glyph and color the entry borrows. */\n glyph: PropertyType;\n}\n\n/** Props for {@link GlyphMenu}. */\nexport interface GlyphMenuProps<TKey extends string | number> {\n /** The entries, in order. */\n items: readonly GlyphMenuItem<TKey>[];\n /** The chosen entry. */\n value: TKey;\n /** Called with the key of the entry the user chose. */\n onChange: (key: TKey) => void;\n /** The accessible name of the menu and its trigger. */\n label: string;\n /** Stable name for tests and assistive technology. */\n name?: string;\n /** Disables the trigger. */\n disabled?: boolean;\n}\n\n/**\n * A single-choice menu that lists its entries the way the schema editor's type menu does: a colored glyph\n * followed by the name. The trigger shows the chosen entry the same way.\n */\nexport const GlyphMenu = <TKey extends string | number>({ items, value, onChange, label, name, disabled }: GlyphMenuProps<TKey>): ReactNode => {\n const overlayEnvironment = unstable_useOverlayEnvironment();\n const nearestDialogZIndex = useNearestDialogZIndex();\n const zIndex = nearestDialogZIndex === null\n ? 'var(--cratis-z-index-overlay)'\n : zIndexAboveDialog(nearestDialogZIndex, OVERLAY_OFFSET);\n const chosen = items.find(item => item.key === value);\n\n return (\n <UNSAFE_PortalProvider getContainer={overlayEnvironment.getContainer}>\n <MenuTrigger>\n <Button\n aria-label={label}\n isDisabled={disabled}\n className='cratis-schema-editor__type-button'\n data-name={name}\n >\n {chosen && <PropertyTypeGlyph type={chosen.glyph} />}\n {chosen?.label}\n </Button>\n <Popover className='cratis-schema-editor__menu' style={{ zIndex }}>\n <Menu\n aria-label={label}\n className='cratis-schema-editor__menu-list'\n onAction={key => {\n const picked = items.find(item => String(item.key) === String(key));\n if (picked) onChange(picked.key);\n }}\n >\n {items.map(item => (\n <MenuItem key={String(item.key)} id={String(item.key)} textValue={item.label} className='cratis-schema-editor__menu-item'>\n <PropertyTypeGlyph type={item.glyph} />\n {item.label}\n </MenuItem>\n ))}\n </Menu>\n </Popover>\n </MenuTrigger>\n </UNSAFE_PortalProvider>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;AA2CO,MAAM,SAAS,GAAG,CAA+B,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAwB,KAAe;AAC1I,IAAA,MAAM,kBAAkB,GAAG,8BAA8B,EAAE;AAC3D,IAAA,MAAM,mBAAmB,GAAG,sBAAsB,EAAE;AACpD,IAAA,MAAM,MAAM,GAAG,mBAAmB,KAAK;AACnC,UAAE;AACF,UAAE,iBAAiB,CAAC,mBAAmB,EAAE,cAAc,CAAC;AAC5D,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,KAAK,CAAC;AAErD,IAAA,QACIA,GAAA,CAAC,qB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ACM;AAEhC;;"}
@@ -10,6 +10,8 @@ export declare enum PropertyType {
10
10
  Date = "date",
11
11
  /** A time of day. */
12
12
  Time = "time",
13
+ /** A unique identifier (a GUID), stored as a string with the `uuid` format. */
14
+ UniqueIdentifier = "uniqueIdentifier",
13
15
  /** A nested object with its own properties. */
14
16
  Object = "object",
15
17
  /** A list of text values. */
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyType.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/PropertyType.ts"],"names":[],"mappings":"AAGA,sDAAsD;AACtD,oBAAY,YAAY;IACpB,YAAY;IACZ,MAAM,WAAW;IACjB,uCAAuC;IACvC,MAAM,WAAW;IACjB,6BAA6B;IAC7B,OAAO,YAAY;IACnB,uBAAuB;IACvB,IAAI,SAAS;IACb,qBAAqB;IACrB,IAAI,SAAS;IACb,+CAA+C;IAC/C,MAAM,WAAW;IACjB,6BAA6B;IAC7B,WAAW,gBAAgB;IAC3B,yBAAyB;IACzB,WAAW,gBAAgB;IAC3B,+DAA+D;IAC/D,WAAW,gBAAgB;CAC9B"}
1
+ {"version":3,"file":"PropertyType.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/PropertyType.ts"],"names":[],"mappings":"AAGA,sDAAsD;AACtD,oBAAY,YAAY;IACpB,YAAY;IACZ,MAAM,WAAW;IACjB,uCAAuC;IACvC,MAAM,WAAW;IACjB,6BAA6B;IAC7B,OAAO,YAAY;IACnB,uBAAuB;IACvB,IAAI,SAAS;IACb,qBAAqB;IACrB,IAAI,SAAS;IACb,+EAA+E;IAC/E,gBAAgB,qBAAqB;IACrC,+CAA+C;IAC/C,MAAM,WAAW;IACjB,6BAA6B;IAC7B,WAAW,gBAAgB;IAC3B,yBAAyB;IACzB,WAAW,gBAAgB;IAC3B,+DAA+D;IAC/D,WAAW,gBAAgB;CAC9B"}
@@ -5,6 +5,7 @@ var PropertyType;
5
5
  PropertyType["Boolean"] = "boolean";
6
6
  PropertyType["Date"] = "date";
7
7
  PropertyType["Time"] = "time";
8
+ PropertyType["UniqueIdentifier"] = "uniqueIdentifier";
8
9
  PropertyType["Object"] = "object";
9
10
  PropertyType["StringArray"] = "stringArray";
10
11
  PropertyType["NumberArray"] = "numberArray";
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyType.js","sources":["../../../../SchemaEditor/Tree/PropertyType.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/** The kinds of value a {@link Property} can hold. */\nexport enum PropertyType {\n /** Text. */\n String = 'string',\n /** A number, integer or fractional. */\n Number = 'number',\n /** A true or false value. */\n Boolean = 'boolean',\n /** A calendar date. */\n Date = 'date',\n /** A time of day. */\n Time = 'time',\n /** A nested object with its own properties. */\n Object = 'object',\n /** A list of text values. */\n StringArray = 'stringArray',\n /** A list of numbers. */\n NumberArray = 'numberArray',\n /** A list of nested objects, each with the same properties. */\n ObjectArray = 'objectArray',\n}\n"],"names":[],"mappings":"IAIY;AAAZ,CAAA,UAAY,YAAY,EAAA;AAEpB,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB,IAAA,YAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AAEnB,IAAA,YAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AAEb,IAAA,YAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AAEb,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAE3B,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAE3B,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC/B,CAAC,EAnBW,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;;"}
1
+ {"version":3,"file":"PropertyType.js","sources":["../../../../SchemaEditor/Tree/PropertyType.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/** The kinds of value a {@link Property} can hold. */\nexport enum PropertyType {\n /** Text. */\n String = 'string',\n /** A number, integer or fractional. */\n Number = 'number',\n /** A true or false value. */\n Boolean = 'boolean',\n /** A calendar date. */\n Date = 'date',\n /** A time of day. */\n Time = 'time',\n /** A unique identifier (a GUID), stored as a string with the `uuid` format. */\n UniqueIdentifier = 'uniqueIdentifier',\n /** A nested object with its own properties. */\n Object = 'object',\n /** A list of text values. */\n StringArray = 'stringArray',\n /** A list of numbers. */\n NumberArray = 'numberArray',\n /** A list of nested objects, each with the same properties. */\n ObjectArray = 'objectArray',\n}\n"],"names":[],"mappings":"IAIY;AAAZ,CAAA,UAAY,YAAY,EAAA;AAEpB,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB,IAAA,YAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AAEnB,IAAA,YAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AAEb,IAAA,YAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AAEb,IAAA,YAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AAErC,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAEjB,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAE3B,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAE3B,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC/B,CAAC,EArBW,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyTypeGlyph.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/PropertyTypeGlyph.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAoC9C,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACnC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAAc,sBAAsB,gCAEjE,CAAC"}
1
+ {"version":3,"file":"PropertyTypeGlyph.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/PropertyTypeGlyph.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAyC9C,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACnC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAAc,sBAAsB,gCAEjE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { PropertyType } from './PropertyType.js';
3
3
 
4
4
  const iconProps = {
@@ -18,6 +18,7 @@ const glyphs = {
18
18
  [PropertyType.Boolean]: 'T/F',
19
19
  [PropertyType.Date]: (jsxs("svg", { ...iconProps, children: [jsx("rect", { x: '1', y: '2.5', width: '10', height: '8.5', rx: '1.5' }), jsx("path", { d: 'M1 5.5h10M4 1v3M8 1v3' })] })),
20
20
  [PropertyType.Time]: (jsxs("svg", { ...iconProps, children: [jsx("circle", { cx: '6', cy: '6', r: '4.5' }), jsx("path", { d: 'M6 3.5v2.5l2 1' })] })),
21
+ [PropertyType.UniqueIdentifier]: (jsx("svg", { ...iconProps, children: jsx("path", { d: 'M4.5 1.5 3.5 10.5M8.5 1.5 7.5 10.5M1.5 4h9M1.5 8h9' }) })),
21
22
  [PropertyType.Object]: '{}',
22
23
  [PropertyType.StringArray]: '[A]',
23
24
  [PropertyType.NumberArray]: '[#]',
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyTypeGlyph.js","sources":["../../../../SchemaEditor/Tree/PropertyTypeGlyph.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PropertyType } from './PropertyType';\n\nconst iconProps = {\n viewBox: '0 0 12 12',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.5,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n width: 11,\n height: 11,\n 'aria-hidden': true,\n} as const;\n\nconst glyphs: Record<PropertyType, React.ReactNode> = {\n [PropertyType.String]: 'Aa',\n [PropertyType.Number]: '123',\n [PropertyType.Boolean]: 'T/F',\n [PropertyType.Date]: (\n <svg {...iconProps}>\n <rect x='1' y='2.5' width='10' height='8.5' rx='1.5' />\n <path d='M1 5.5h10M4 1v3M8 1v3' />\n </svg>\n ),\n [PropertyType.Time]: (\n <svg {...iconProps}>\n <circle cx='6' cy='6' r='4.5' />\n <path d='M6 3.5v2.5l2 1' />\n </svg>\n ),\n [PropertyType.Object]: '{}',\n [PropertyType.StringArray]: '[A]',\n [PropertyType.NumberArray]: '[#]',\n [PropertyType.ObjectArray]: '[{}]',\n};\n\n/** Props for the glyph of a property type. */\nexport interface PropertyTypeGlyphProps {\n /** The type whose glyph is shown. */\n type: PropertyType;\n}\n\n/**\n * A short colored chip identifying a property type at a glance. It is decorative: the type's name is always\n * next to it, so it is hidden from assistive technology.\n */\nexport const PropertyTypeGlyph = ({ type }: PropertyTypeGlyphProps) => (\n <span className='cratis-schema-editor__badge-glyph' data-property-type={type} aria-hidden='true'>{glyphs[type]}</span>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAKA,MAAM,SAAS,GAAG;AACd,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,cAAc;AACtB,IAAA,WAAW,EAAE,GAAG;AAChB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,cAAc,EAAE,OAAO;AACvB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MA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AAA,EAAE,MAAM,CAAC,IAAI,CAAC,EAAA,CAAQ;;"}
1
+ {"version":3,"file":"PropertyTypeGlyph.js","sources":["../../../../SchemaEditor/Tree/PropertyTypeGlyph.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PropertyType } from './PropertyType';\n\nconst iconProps = {\n viewBox: '0 0 12 12',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.5,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n width: 11,\n height: 11,\n 'aria-hidden': true,\n} as const;\n\nconst glyphs: Record<PropertyType, React.ReactNode> = {\n [PropertyType.String]: 'Aa',\n [PropertyType.Number]: '123',\n [PropertyType.Boolean]: 'T/F',\n [PropertyType.Date]: (\n <svg {...iconProps}>\n <rect x='1' y='2.5' width='10' height='8.5' rx='1.5' />\n <path d='M1 5.5h10M4 1v3M8 1v3' />\n </svg>\n ),\n [PropertyType.Time]: (\n <svg {...iconProps}>\n <circle cx='6' cy='6' r='4.5' />\n <path d='M6 3.5v2.5l2 1' />\n </svg>\n ),\n [PropertyType.UniqueIdentifier]: (\n <svg {...iconProps}>\n <path d='M4.5 1.5 3.5 10.5M8.5 1.5 7.5 10.5M1.5 4h9M1.5 8h9' />\n </svg>\n ),\n [PropertyType.Object]: '{}',\n [PropertyType.StringArray]: '[A]',\n [PropertyType.NumberArray]: '[#]',\n [PropertyType.ObjectArray]: '[{}]',\n};\n\n/** Props for the glyph of a property type. */\nexport interface PropertyTypeGlyphProps {\n /** The type whose glyph is shown. */\n type: PropertyType;\n}\n\n/**\n * A short colored chip identifying a property type at a glance. It is decorative: the type's name is always\n * next to it, so it is hidden from assistive technology.\n */\nexport const PropertyTypeGlyph = ({ type }: PropertyTypeGlyphProps) => (\n <span className='cratis-schema-editor__badge-glyph' data-property-type={type} aria-hidden='true'>{glyphs[type]}</span>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAKA,MAAM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CAExE"}
1
+ {"version":3,"file":"keywordApplicability.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/keywordApplicability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AA8B9C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,CAc3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,GAAG,OAAO,CAEpG;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC3C,IAAI,EAAE,aAAa,EACnB,EAAE,EAAE,aAAa,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExE"}
@@ -17,6 +17,7 @@ const typeFamilies = {
17
17
  [PropertyType.String]: KeywordFamily.String,
18
18
  [PropertyType.Date]: KeywordFamily.String,
19
19
  [PropertyType.Time]: KeywordFamily.String,
20
+ [PropertyType.UniqueIdentifier]: KeywordFamily.None,
20
21
  [PropertyType.Number]: KeywordFamily.Number,
21
22
  [PropertyType.Boolean]: KeywordFamily.None,
22
23
  [PropertyType.Object]: KeywordFamily.Object,
@@ -1 +1 @@
1
- {"version":3,"file":"keywordApplicability.js","sources":["../../../../SchemaEditor/Tree/keywordApplicability.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { KeywordFamily } from './KeywordFamily';\nimport { PropertyType } from './PropertyType';\n\nconst annotations: ReadonlySet<string> = new Set(['title', 'description', '$comment', 'deprecated', 'readOnly', 'writeOnly']);\n\nconst refinementKeywords: ReadonlySet<string> = new Set(['default', 'enum', 'const', 'examples', 'multipleOf']);\n\nconst familyKeywords: Readonly<Record<KeywordFamily, ReadonlySet<string>>> = {\n [KeywordFamily.None]: new Set(),\n [KeywordFamily.String]: new Set(['minLength', 'maxLength', 'pattern', 'contentEncoding', 'contentMediaType']),\n [KeywordFamily.Number]: new Set(['minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum', 'multipleOf']),\n [KeywordFamily.Array]: new Set(['minItems', 'maxItems', 'uniqueItems', 'contains', 'minContains', 'maxContains']),\n [KeywordFamily.Object]: new Set([\n 'minProperties', 'maxProperties', 'additionalProperties', 'patternProperties', 'propertyNames',\n 'dependentRequired', 'dependentSchemas', 'unevaluatedProperties',\n ]),\n};\n\nconst typeFamilies: Readonly<Record<PropertyType, KeywordFamily>> = {\n [PropertyType.String]: KeywordFamily.String,\n [PropertyType.Date]: KeywordFamily.String,\n [PropertyType.Time]: KeywordFamily.String,\n [PropertyType.Number]: KeywordFamily.Number,\n [PropertyType.Boolean]: KeywordFamily.None,\n [PropertyType.Object]: KeywordFamily.Object,\n [PropertyType.StringArray]: KeywordFamily.Array,\n [PropertyType.NumberArray]: KeywordFamily.Array,\n [PropertyType.ObjectArray]: KeywordFamily.Array,\n};\n\n/**\n * The keyword family of a property type.\n * @param type The property type.\n * @returns The family whose constraints apply to values of the type.\n */\nexport function propertyTypeFamily(type: PropertyType): KeywordFamily {\n return typeFamilies[type];\n}\n\n/**\n * The keyword family of a JSON Schema `type` value.\n * @param type The `type` keyword of a schema node.\n * @returns The family whose constraints apply to values of the type.\n */\nexport function jsonTypeFamily(type: unknown): KeywordFamily {\n switch (type) {\n case 'string':\n return KeywordFamily.String;\n case 'number':\n case 'integer':\n return KeywordFamily.Number;\n case 'array':\n return KeywordFamily.Array;\n case 'object':\n return KeywordFamily.Object;\n default:\n return KeywordFamily.None;\n }\n}\n\n/**\n * Whether a standard keyword that the editor does not model still applies after the type changed.\n * Annotations always apply and a family's constraints apply while the family stays the same; value\n * keywords (default, enum, const, examples), type refinements and every other keyword do not. The modelled\n * keywords (type, format, items, properties, required) and `x-` keywords are not decided here.\n * @param keyword The keyword name.\n * @param from The family of the type before the change.\n * @param to The family of the type after the change.\n * @returns True when the keyword applies to the new type.\n */\nexport function isKeywordApplicable(keyword: string, from: KeywordFamily, to: KeywordFamily): boolean {\n return annotations.has(keyword) || (from === to && familyKeywords[to].has(keyword));\n}\n\n/**\n * Keeps the keywords that still apply after the type changed.\n * @param keywords The standard keywords the editor does not model.\n * @param from The family of the type before the change.\n * @param to The family of the type after the change.\n * @returns The keywords that apply; empty when none do.\n */\nexport function keywordsAfterTypeChange(\n keywords: Readonly<Record<string, unknown>>,\n from: KeywordFamily,\n to: KeywordFamily,\n): Record<string, unknown> {\n return Object.fromEntries(Object.entries(keywords).filter(([keyword]) => isKeywordApplicable(keyword, from, to)));\n}\n\n/**\n * Whether a keyword survives a change between refinements of one type, such as integer and number: the\n * constraints stay, but the value keywords and `multipleOf` described the old refinement.\n * @param keyword The keyword name.\n * @returns True when the keyword still applies.\n */\nexport function isKeywordApplicableToRefinement(keyword: string): boolean {\n return !refinementKeywords.has(keyword);\n}\n"],"names":[],"mappings":";;;AAMA,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAE7H,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AAE/G,MAAM,cAAc,GAAyD;AACzE,IAAA,CAAC,aAAa,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE;AAC/B,IAAA,CAAC,aAAa,CAAC,MAAM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C;AAC7B;AAOM,SAAU,cAAc,CAAC,IAAa,EAAA;IACxC,QAAQ,IAAI;AACR,QAAA,KAAK,QAAQ;YACT,OAAO,aAAa,CAAC,MAAM;AAC/B,QAAA,KAAK,QAAQ;AACb,QAAA,KAAK,SAAS;YACV,OAAO,aAAa,CAAC,MAAM;AAC/B,QAAA,KAAK,OAAO;YACR,OAAO,aAAa,CAAC,KAAK;AAC9B,QAAA,KAAK,QAAQ;YACT,OAAO,aAAa,CAAC,MAAM;AAC/B,QAAA;YACI,OAAO,aAAa,CAAC,IAAI;;AAErC;SAYgB,mBAAmB,CAAC,OAAe,EAAE,IAAmB,EAAE,EAAiB,EAAA;IACvF,OAAO,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,EAAE,IAAI,cAAc,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACvF;SASgB,uBAAuB,CACnC,QAA2C,EAC3C,IAAmB,EACnB,EAAiB,EAAA;AAEjB,IAAA,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,mBAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AACrH;AAQM,SAAU,+BAA+B,CAAC,OAAe,EAAA;AAC3D,IAAA,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC;AAC3C;;"}
1
+ {"version":3,"file":"keywordApplicability.js","sources":["../../../../SchemaEditor/Tree/keywordApplicability.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { KeywordFamily } from './KeywordFamily';\nimport { PropertyType } from './PropertyType';\n\nconst annotations: ReadonlySet<string> = new Set(['title', 'description', '$comment', 'deprecated', 'readOnly', 'writeOnly']);\n\nconst refinementKeywords: ReadonlySet<string> = new Set(['default', 'enum', 'const', 'examples', 'multipleOf']);\n\nconst familyKeywords: Readonly<Record<KeywordFamily, ReadonlySet<string>>> = {\n [KeywordFamily.None]: new Set(),\n [KeywordFamily.String]: new Set(['minLength', 'maxLength', 'pattern', 'contentEncoding', 'contentMediaType']),\n [KeywordFamily.Number]: new Set(['minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum', 'multipleOf']),\n [KeywordFamily.Array]: new Set(['minItems', 'maxItems', 'uniqueItems', 'contains', 'minContains', 'maxContains']),\n [KeywordFamily.Object]: new Set([\n 'minProperties', 'maxProperties', 'additionalProperties', 'patternProperties', 'propertyNames',\n 'dependentRequired', 'dependentSchemas', 'unevaluatedProperties',\n ]),\n};\n\nconst typeFamilies: Readonly<Record<PropertyType, KeywordFamily>> = {\n [PropertyType.String]: KeywordFamily.String,\n [PropertyType.Date]: KeywordFamily.String,\n [PropertyType.Time]: KeywordFamily.String,\n [PropertyType.UniqueIdentifier]: KeywordFamily.None,\n [PropertyType.Number]: KeywordFamily.Number,\n [PropertyType.Boolean]: KeywordFamily.None,\n [PropertyType.Object]: KeywordFamily.Object,\n [PropertyType.StringArray]: KeywordFamily.Array,\n [PropertyType.NumberArray]: KeywordFamily.Array,\n [PropertyType.ObjectArray]: KeywordFamily.Array,\n};\n\n/**\n * The keyword family of a property type.\n * @param type The property type.\n * @returns The family whose constraints apply to values of the type.\n */\nexport function propertyTypeFamily(type: PropertyType): KeywordFamily {\n return typeFamilies[type];\n}\n\n/**\n * The keyword family of a JSON Schema `type` value.\n * @param type The `type` keyword of a schema node.\n * @returns The family whose constraints apply to values of the type.\n */\nexport function jsonTypeFamily(type: unknown): KeywordFamily {\n switch (type) {\n case 'string':\n return KeywordFamily.String;\n case 'number':\n case 'integer':\n return KeywordFamily.Number;\n case 'array':\n return KeywordFamily.Array;\n case 'object':\n return KeywordFamily.Object;\n default:\n return KeywordFamily.None;\n }\n}\n\n/**\n * Whether a standard keyword that the editor does not model still applies after the type changed.\n * Annotations always apply and a family's constraints apply while the family stays the same; value\n * keywords (default, enum, const, examples), type refinements and every other keyword do not. The modelled\n * keywords (type, format, items, properties, required) and `x-` keywords are not decided here.\n * @param keyword The keyword name.\n * @param from The family of the type before the change.\n * @param to The family of the type after the change.\n * @returns True when the keyword applies to the new type.\n */\nexport function isKeywordApplicable(keyword: string, from: KeywordFamily, to: KeywordFamily): boolean {\n return annotations.has(keyword) || (from === to && familyKeywords[to].has(keyword));\n}\n\n/**\n * Keeps the keywords that still apply after the type changed.\n * @param keywords The standard keywords the editor does not model.\n * @param from The family of the type before the change.\n * @param to The family of the type after the change.\n * @returns The keywords that apply; empty when none do.\n */\nexport function keywordsAfterTypeChange(\n keywords: Readonly<Record<string, unknown>>,\n from: KeywordFamily,\n to: KeywordFamily,\n): Record<string, unknown> {\n return Object.fromEntries(Object.entries(keywords).filter(([keyword]) => isKeywordApplicable(keyword, from, to)));\n}\n\n/**\n * Whether a keyword survives a change between refinements of one type, such as integer and number: the\n * constraints stay, but the value keywords and `multipleOf` described the old refinement.\n * @param keyword The keyword name.\n * @returns True when the keyword still applies.\n */\nexport function isKeywordApplicableToRefinement(keyword: string): boolean {\n return !refinementKeywords.has(keyword);\n}\n"],"names":[],"mappings":";;;AAMA,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAE7H,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AAE/G,MAAM,cAAc,GAAyD;AACzE,IAAA,CAAC,aAAa,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE;AAC/B,IAAA,CAAC,aAAa,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AA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EAAE,SAAS,YAAY,EAKzD,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAYjG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAE/D"}
1
+ {"version":3,"file":"propertyTypeDisplay.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/propertyTypeDisplay.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAAuB,CAAC;AAEhE,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,EAAE,SAAS,YAAY,EAOzD,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,EAAE,SAAS,YAAY,EAKzD,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAajG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAE/D"}
@@ -6,6 +6,7 @@ const primitivePropertyTypes = [
6
6
  PropertyType.Boolean,
7
7
  PropertyType.Date,
8
8
  PropertyType.Time,
9
+ PropertyType.UniqueIdentifier,
9
10
  ];
10
11
  const compositePropertyTypes = [
11
12
  PropertyType.StringArray,
@@ -19,6 +20,7 @@ function propertyTypeName(type, labels) {
19
20
  case PropertyType.Boolean: return labels.typeBoolean;
20
21
  case PropertyType.Date: return labels.typeDate;
21
22
  case PropertyType.Time: return labels.typeTime;
23
+ case PropertyType.UniqueIdentifier: return labels.typeUniqueIdentifier;
22
24
  case PropertyType.StringArray: return labels.typeStringArray;
23
25
  case PropertyType.NumberArray: return labels.typeNumberArray;
24
26
  case PropertyType.Object: return labels.typeObject;
@@ -1 +1 @@
1
- {"version":3,"file":"propertyTypeDisplay.js","sources":["../../../../SchemaEditor/Tree/propertyTypeDisplay.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PropertyType } from './PropertyType';\nimport type { SchemaEditorLabels } from '../SchemaEditorLabels';\n\n/** The types the menu offers first, in order. Concepts follow them. */\nexport const primitivePropertyTypes: readonly PropertyType[] = [\n PropertyType.String,\n PropertyType.Number,\n PropertyType.Boolean,\n PropertyType.Date,\n PropertyType.Time,\n];\n\n/** The types the menu offers after the concepts, in order. */\nexport const compositePropertyTypes: readonly PropertyType[] = [\n PropertyType.StringArray,\n PropertyType.NumberArray,\n PropertyType.Object,\n PropertyType.ObjectArray,\n];\n\n/**\n * The display name of a property type.\n * @param type The type.\n * @param labels The resolved labels.\n * @returns The localized name.\n */\nexport function propertyTypeName(type: PropertyType, labels: Required<SchemaEditorLabels>): string {\n switch (type) {\n case PropertyType.Number: return labels.typeNumber;\n case PropertyType.Boolean: return labels.typeBoolean;\n case PropertyType.Date: return labels.typeDate;\n case PropertyType.Time: return labels.typeTime;\n case PropertyType.StringArray: return labels.typeStringArray;\n case PropertyType.NumberArray: return labels.typeNumberArray;\n case PropertyType.Object: return labels.typeObject;\n case PropertyType.ObjectArray: return labels.typeObjectArray;\n default: return labels.typeString;\n }\n}\n\n/**\n * Whether values of the type carry nested properties.\n * @param type The type.\n * @returns `true` for objects and lists of objects.\n */\nexport function hasNestedProperties(type: PropertyType): boolean {\n return type === PropertyType.Object || type === PropertyType.ObjectArray;\n}\n"],"names":[],"mappings":";;AAOO,MAAM,sBAAsB,GAA4B;AAC3D,IAAA,YAAY,CAAC,MAAM;AACnB,IAAA,YAAY,CAAC,MAAM;AACnB,IAAA,YAAY,CAAC,OAAO;AACpB,IAAA,YAAY,CAAC,IAAI;AACjB,IAAA,YAAY,CAAC,IAAI;;AAId,MAAM,sBAAsB,GAA4B;AAC3D,IAAA,YAAY,CAAC,WAAW;AACxB,IAAA,YAAY,CAAC,WAAW;AACxB,IAAA,YAAY,CAAC,MAAM;AACnB,IAAA,YAAY,CAAC,WAAW;;AAStB,SAAU,gBAAgB,CAAC,IAAkB,EAAE,MAAoC,EAAA;IACrF,QAAQ,IAAI;QACR,KAAK,YAAY,CAAC,MAAM,EAAE,OAAO,MAAM,CAAC,UAAU;QAClD,KAAK,YAAY,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC,WAAW;QACpD,KAAK,YAAY,CAAC,IAAI,EAAE,OAAO,MAAM,CAAC,QAAQ;QAC9C,KAAK,YAAY,CAAC,IAAI,EAAE,OAAO,MAAM,CAAC,QAAQ;QAC9C,KAAK,YAAY,CAAC,WAAW,EAAE,OAAO,MAAM,CAAC,eAAe;QAC5D,KAAK,YAAY,CAAC,WAAW,EAAE,OAAO,MAAM,CAAC,eAAe;QAC5D,KAAK,YAAY,CAAC,MAAM,EAAE,OAAO,MAAM,CAAC,UAAU;QAClD,KAAK,YAAY,CAAC,WAAW,EAAE,OAAO,MAAM,CAAC,eAAe;AAC5D,QAAA,SAAS,OAAO,MAAM,CAAC,UAAU;;AAEzC;AAOM,SAAU,mBAAmB,CAAC,IAAkB,EAAA;IAClD,OAAO,IAAI,KAAK,YAAY,CAAC,MAAM,IAAI,IAAI,KAAK,YAAY,CAAC,WAAW;AAC5E;;"}
1
+ {"version":3,"file":"propertyTypeDisplay.js","sources":["../../../../SchemaEditor/Tree/propertyTypeDisplay.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PropertyType } from './PropertyType';\nimport type { SchemaEditorLabels } from '../SchemaEditorLabels';\n\n/** The types the menu offers first, in order. Concepts follow them. */\nexport const primitivePropertyTypes: readonly PropertyType[] = [\n PropertyType.String,\n PropertyType.Number,\n PropertyType.Boolean,\n PropertyType.Date,\n PropertyType.Time,\n PropertyType.UniqueIdentifier,\n];\n\n/** The types the menu offers after the concepts, in order. */\nexport const compositePropertyTypes: readonly PropertyType[] = [\n PropertyType.StringArray,\n PropertyType.NumberArray,\n PropertyType.Object,\n PropertyType.ObjectArray,\n];\n\n/**\n * The display name of a property type.\n * @param type The type.\n * @param labels The resolved labels.\n * @returns The localized name.\n */\nexport function propertyTypeName(type: PropertyType, labels: Required<SchemaEditorLabels>): string {\n switch (type) {\n case PropertyType.Number: return labels.typeNumber;\n case PropertyType.Boolean: return labels.typeBoolean;\n case PropertyType.Date: return labels.typeDate;\n case PropertyType.Time: return labels.typeTime;\n case PropertyType.UniqueIdentifier: return labels.typeUniqueIdentifier;\n case PropertyType.StringArray: return labels.typeStringArray;\n case PropertyType.NumberArray: return labels.typeNumberArray;\n case PropertyType.Object: return labels.typeObject;\n case PropertyType.ObjectArray: return labels.typeObjectArray;\n default: return labels.typeString;\n }\n}\n\n/**\n * Whether values of the type carry nested properties.\n * @param type The type.\n * @returns `true` for objects and lists of objects.\n */\nexport function hasNestedProperties(type: PropertyType): boolean {\n return type === PropertyType.Object || type === PropertyType.ObjectArray;\n}\n"],"names":[],"mappings":";;AAOO,MAAM,sBAAsB,GAA4B;AAC3D,IAAA,YAAY,CAAC,MAAM;AACnB,IAAA,YAAY,CAAC,MAAM;AACnB,IAAA,YAAY,CAAC,OAAO;AACpB,IAAA,YAAY,CAAC,IAAI;AACjB,IAAA,YAAY,CAAC,IAAI;AACjB,IAAA,YAAY,CAAC,gBAAgB;;AAI1B,MAAM,sBAAsB,GAA4B;AAC3D,IAAA,YAAY,CAAC,WAAW;AACxB,IAAA,YAAY,CAAC,WAAW;AACxB,IAAA,YAAY,CAAC,MAAM;AACnB,IAAA,YAAY,CAAC,WAAW;;AAStB,SAAU,gBAAgB,CAAC,IAAkB,EAAE,MAAoC,EAAA;IACrF,QAAQ,IAAI;QACR,KAAK,YAAY,CAAC,MAAM,EAAE,OAAO,MAAM,CAAC,UAAU;QAClD,KAAK,YAAY,CAAC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wBAAgB,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAInF;AASD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAEpG;AAqBD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,CAEhI;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAE3F;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,QAAQ,EAAE,CAE7G;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,QAAQ,EAAE,CAQ/G;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAOnF"}
@@ -97,6 +97,8 @@ function primitiveSchema(property) {
97
97
  return { type: 'string', format: 'date' };
98
98
  case PropertyType.Time:
99
99
  return { type: 'string', format: 'time' };
100
+ case PropertyType.UniqueIdentifier:
101
+ return { type: 'string', format: 'uuid' };
100
102
  case PropertyType.Object:
101
103
  return { type: 'object', ...objectSchema(property.children ?? [], property[schemaRequiredOrder]) };
102
104
  case PropertyType.StringArray:
@@ -1 +1 @@
1
- {"version":3,"file":"schemaConversion.js","sources":["../../../../SchemaEditor/Tree/schemaConversion.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { JsonSchema, JsonSchemaProperty } from '../../types/JsonSchema';\nimport type { Property } from './Property';\nimport { PropertyType } from './PropertyType';\nimport { conceptPropertyName, uniquePropertyName } from './propertyNaming';\nimport { findPropertyById } from './propertyTree';\nimport { keywordsAfterTypeChange, propertyTypeFamily } from './keywordApplicability';\nimport {\n copySchemaKeywordOrder,\n itemSchemaKeywordOrder,\n schemaKeywordOrder,\n schemaOriginalShape,\n schemaRequiredOrder,\n type SchemaOrderedProperty,\n} from './SchemaOrderedProperty';\nimport { isNode, readOriginalShape, readRequiredOrder, restoreOriginalShape } from './originalShape';\nimport { schemaPropertyType } from './schemaPropertyType';\nimport { standardItemKeywords, standardPropertyKeywords } from './standardKeywords';\nimport { requiredInOriginalOrder, schemaInOriginalOrder } from './schemaInOriginalOrder';\n\n/**\n * The JSON Schema keyword carrying the concept a property is typed as. It annotates the primitive node the\n * concept wraps rather than replacing it, so anything that does not know about concepts — code generation,\n * an export, another tool — still reads a valid schema of the underlying primitive.\n */\nexport const CONCEPT_KEYWORD = 'x-concept';\n\n/**\n * The JSON Schema keyword marking the property that identifies its parent object. Written as `true` on the\n * property; at most one property of an object carries it.\n */\nexport const KEY_KEYWORD = 'x-key';\n\n/** The JSON Schema keyword marking a value generated when the command runs rather than entered. */\nexport const GENERATED_KEYWORD = 'x-generated';\n\ntype SchemaNode = Record<string, unknown>;\n\nconst isComplex = (type: PropertyType): boolean => type === PropertyType.Object || type === PropertyType.ObjectArray;\n\nconst identifier = (): string => Math.random().toString(36).slice(2, 10) + Math.random().toString(36).slice(2, 6);\n\n// ── JsonSchema → Property[] ─────────────────────────────────────────\n\nfunction vendorKeywords(node: SchemaNode, isProperty: boolean): Readonly<Record<string, unknown>> | undefined {\n const entries = Object.entries(node).filter(([name, value]) => {\n if (!name.startsWith('x-')) return false;\n if (!isProperty) return true;\n return name !== CONCEPT_KEYWORD && name !== KEY_KEYWORD && !(name === GENERATED_KEYWORD && value === true);\n });\n return entries.length > 0 ? Object.fromEntries(entries) : undefined;\n}\n\nfunction readItemKeywords(node: SchemaNode, type: PropertyType): Partial<SchemaOrderedProperty> {\n if (node.type !== 'array' || !isNode(node.items)) return {};\n const items = node.items;\n const keywords = vendorKeywords(items, false);\n const standard = standardItemKeywords(items, type);\n return {\n [itemSchemaKeywordOrder]: Object.keys(items),\n ...(keywords ? { itemVendorKeywords: keywords } : {}),\n ...(standard ? { itemSchemaKeywords: standard } : {}),\n };\n}\n\nfunction requiredOrder(node: SchemaNode, type: PropertyType): Partial<SchemaOrderedProperty> {\n const order = readRequiredOrder(node, type);\n return order ? { [schemaRequiredOrder]: order } : {};\n}\n\nfunction readFlags(node: SchemaNode, type: PropertyType, isRequired: boolean): Partial<SchemaOrderedProperty> {\n const keywords = vendorKeywords(node, true);\n const standard = standardPropertyKeywords(node, type);\n return {\n [schemaKeywordOrder]: Object.keys(node),\n [schemaOriginalShape]: readOriginalShape(node, type),\n ...requiredOrder(node, type),\n ...readItemKeywords(node, type),\n ...(keywords ? { vendorKeywords: keywords } : {}),\n ...(standard ? { schemaKeywords: standard } : {}),\n ...(node[GENERATED_KEYWORD] === true ? { isGenerated: true } : {}),\n ...(isRequired ? { isRequired: true } : {}),\n ...(node[KEY_KEYWORD] === true ? { isKey: true } : {}),\n };\n}\n\nfunction schemaPropertyToProperty(name: string, value: JsonSchemaProperty, required: ReadonlySet<string>): Property {\n const node = value as unknown as SchemaNode;\n const type = schemaPropertyType(node);\n const concept = node[CONCEPT_KEYWORD];\n const flags = readFlags(node, type, required.has(name));\n\n const container = (type === PropertyType.Object ? node : type === PropertyType.ObjectArray ? node.items : undefined) as\n | { properties?: Record<string, JsonSchemaProperty>; required?: string[] }\n | undefined;\n\n if (container?.properties) {\n const childRequired = new Set(container.required ?? []);\n return copySchemaKeywordOrder(flags, {\n id: identifier(),\n name,\n type,\n ...flags,\n children: Object.entries(container.properties).map(([childName, child]) =>\n schemaPropertyToProperty(childName, child, childRequired)),\n });\n }\n\n return copySchemaKeywordOrder(flags, {\n id: identifier(),\n name,\n type,\n ...flags,\n ...(typeof concept === 'string' && concept.length > 0 ? { concept } : {}),\n });\n}\n\n/**\n * Converts a JSON Schema object into a property tree. Generates a new id for every property.\n * @param schema The schema to read; `undefined` and schemas without properties give an empty tree.\n * @returns The root properties.\n */\nexport function jsonSchemaToProperties(schema: JsonSchema | undefined): Property[] {\n if (!schema?.properties) return [];\n const required = new Set(schema.required ?? []);\n return Object.entries(schema.properties).map(([name, value]) => schemaPropertyToProperty(name, value, required));\n}\n\n// ── Property[] → JsonSchema ─────────────────────────────────────────\n\nfunction itemSchema(property: Property, type: string, extra: SchemaNode = {}): SchemaNode {\n return { ...property.itemSchemaKeywords, type, ...extra, ...property.itemVendorKeywords };\n}\n\nfunction primitiveSchema(property: Property): SchemaNode {\n switch (property.type) {\n case PropertyType.Number:\n return { type: 'number' };\n case PropertyType.Boolean:\n return { type: 'boolean' };\n case PropertyType.Date:\n return { type: 'string', format: 'date' };\n case PropertyType.Time:\n return { type: 'string', format: 'time' };\n case PropertyType.Object:\n return { type: 'object', ...objectSchema(property.children ?? [], (property as SchemaOrderedProperty)[schemaRequiredOrder]) };\n case PropertyType.StringArray:\n return { type: 'array', items: itemSchema(property, 'string') };\n case PropertyType.NumberArray:\n return { type: 'array', items: itemSchema(property, 'number') };\n case PropertyType.ObjectArray:\n return { type: 'array', items: itemSchema(property, 'object', objectSchema(property.children ?? [], (property as SchemaOrderedProperty)[schemaRequiredOrder])) };\n default:\n return { type: 'string' };\n }\n}\n\nfunction orderedPrimitiveSchema(property: SchemaOrderedProperty): SchemaNode {\n const schema = restoreOriginalShape({ ...property.schemaKeywords, ...primitiveSchema(property) }, property);\n if (isNode(schema.items)) schema.items = schemaInOriginalOrder(schema.items as SchemaNode, property[itemSchemaKeywordOrder]);\n return schema;\n}\n\nfunction propertyAnnotations(property: Property): SchemaNode {\n return {\n ...property.vendorKeywords,\n ...(property.isGenerated === true ? { [GENERATED_KEYWORD]: true } : {}),\n ...(property.concept ? { [CONCEPT_KEYWORD]: property.concept } : {}),\n ...(property.isKey === true ? { [KEY_KEYWORD]: true } : {}),\n };\n}\n\nfunction propertySchema(property: SchemaOrderedProperty): JsonSchemaProperty {\n return schemaInOriginalOrder({ ...orderedPrimitiveSchema(property), ...propertyAnnotations(property) }, property[schemaKeywordOrder]) as unknown as JsonSchemaProperty;\n}\n\nfunction objectSchema(properties: Property[], requiredOrder?: readonly string[]): { properties: Record<string, JsonSchemaProperty>; required?: string[] } {\n const schemaProperties: Record<string, JsonSchemaProperty> = {};\n for (const property of properties) {\n schemaProperties[property.name] = propertySchema(property);\n }\n const required = requiredInOriginalOrder(properties.filter(property => property.isRequired === true).map(property => property.name), requiredOrder);\n return { properties: schemaProperties, ...(required.length > 0 ? { required } : {}) };\n}\n\n/**\n * Converts a property tree into a JSON Schema object. Empty `required` lists are omitted, and a property\n * typed as a concept or marked as the key carries the `x-concept` and `x-key` keywords. Vendor keywords and the\n * standard keywords the editor does not model are preserved on properties and array items; generated values carry `x-generated: true`.\n * @param properties The root properties.\n * @param base The incoming schema. Root keys other than type, properties and required are preserved.\n * @returns The schema.\n */\nexport function propertiesToJsonSchema(properties: Property[], base: JsonSchema = {}): JsonSchema {\n const root = Object.fromEntries(Object.entries(base).filter(([name]) => !['properties', 'required'].includes(name)));\n return schemaInOriginalOrder({ ...root, type: 'object', ...objectSchema(properties, base.required) }, Object.keys(base)) as JsonSchema;\n}\n\n// ── Pure tree edits ─────────────────────────────────────────────────\n\nfunction newProperty(siblings: Property[], type: PropertyType, existingCount: number, concept?: string): Property {\n const base = isComplex(type) ? 'nested' : 'property';\n const name = concept ? uniquePropertyName(siblings, conceptPropertyName(concept)) : `${base}${existingCount + 1}`;\n\n return {\n id: identifier(),\n name,\n type,\n ...(concept ? { concept } : {}),\n ...(isComplex(type) ? { children: [] } : {}),\n };\n}\n\n/**\n * Appends a property to the root.\n * @param properties The root properties.\n * @param type The type of the new property.\n * @param existingCount The number of properties already in the tree, used to generate the default name; see {@link totalPropertyCount}.\n * @param concept The concept the property is typed as. When given the property is named after it.\n * @returns The new tree.\n */\nexport function addProperty(properties: Property[], type: PropertyType, existingCount: number, concept?: string): Property[] {\n return [...properties, newProperty(properties, type, existingCount, concept)];\n}\n\n/**\n * Appends a property to a nested object or object list.\n * @param properties The root properties.\n * @param parentId The id of the parent property.\n * @param type The type of the new property.\n * @param existingCount The number of properties already in the tree, used to generate the default name.\n * @param concept The concept the property is typed as.\n * @returns The new tree.\n */\nexport function addChildProperty(\n properties: Property[],\n parentId: string,\n type: PropertyType,\n existingCount: number,\n concept?: string,\n): Property[] {\n const siblings = findPropertyById(properties, parentId)?.children ?? [];\n const child = newProperty(siblings, type, existingCount, concept);\n const insert = (level: Property[]): Property[] => level.map(property => {\n if (property.id === parentId) return copySchemaKeywordOrder(property, { ...property, children: [...(property.children ?? []), child] });\n return property.children ? copySchemaKeywordOrder(property, { ...property, children: insert(property.children) }) : property;\n });\n return insert(properties);\n}\n\n/**\n * Removes a property, and everything nested under it.\n * @param properties The root properties.\n * @param targetId The id of the property to remove.\n * @returns The new tree.\n */\nexport function removeProperty(properties: Property[], targetId: string): Property[] {\n return properties\n .filter(property => property.id !== targetId)\n .map(property => property.children ? copySchemaKeywordOrder(property, { ...property, children: removeProperty(property.children, targetId) }) : property);\n}\n\nfunction updateProperty(properties: Property[], targetId: string, update: (property: Property) => Property): Property[] {\n return properties.map(property => {\n if (property.id === targetId) return update(property);\n return property.children ? copySchemaKeywordOrder(property, { ...property, children: updateProperty(property.children, targetId, update) }) : property;\n });\n}\n\n/**\n * Renames a property. Its requiredness travels with it, because both are stored against the property.\n * @param properties The root properties.\n * @param targetId The id of the property to rename.\n * @param newName The new name.\n * @returns The new tree.\n */\nexport function renameProperty(properties: Property[], targetId: string, newName: string): Property[] {\n return updateProperty(properties, targetId, property => copySchemaKeywordOrder(property, { ...property, name: newName }));\n}\n\nfunction retypedProperty(property: Property, newType: PropertyType, concept?: string): Property {\n const next: SchemaOrderedProperty = copySchemaKeywordOrder(property, {\n ...property,\n type: newType,\n concept,\n children: isComplex(newType) ? (property.children ?? []) : undefined,\n });\n if (property.type !== newType) {\n const kept = keywordsAfterTypeChange(property.schemaKeywords ?? {}, propertyTypeFamily(property.type), propertyTypeFamily(newType));\n delete next.schemaKeywords;\n if (Object.keys(kept).length > 0) next.schemaKeywords = kept;\n delete next.itemVendorKeywords;\n delete next.itemSchemaKeywords;\n delete next[itemSchemaKeywordOrder];\n delete next[schemaOriginalShape];\n }\n return next;\n}\n\n/**\n * Changes the type of a property. Choosing a plain primitive drops the concept; choosing an object or\n * object list keeps the children, and any other type drops them. A different type keeps the annotations and the\n * constraints of the same keyword family, and drops value keywords, the original type and format, item metadata\n * and every other standard keyword that no longer applies. The same type keeps everything.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @param newType The new type.\n * @param concept The concept the property is now typed as, if any.\n * @returns The new tree.\n */\nexport function changePropertyType(properties: Property[], targetId: string, newType: PropertyType, concept?: string): Property[] {\n return updateProperty(properties, targetId, property => retypedProperty(property, newType, concept));\n}\n\n/**\n * Flips whether a property is required.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @returns The new tree.\n */\nexport function toggleRequiredProperty(properties: Property[], targetId: string): Property[] {\n return updateProperty(properties, targetId, property => copySchemaKeywordOrder(property, { ...property, isRequired: !property.isRequired || undefined }));\n}\n\n/**\n * Sets whether a property is required. Requiring a nested property does not require its parent.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @param isRequired Whether the property must be present.\n * @returns The new tree.\n */\nexport function setRequiredProperty(properties: Property[], targetId: string, isRequired: boolean): Property[] {\n return updateProperty(properties, targetId, property => copySchemaKeywordOrder(property, { ...property, isRequired }));\n}\n\n/**\n * Sets whether a property's value is generated. An explicit edit replaces any non-true x-generated value.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @param isGenerated Whether the value is generated.\n * @returns The new tree.\n */\nexport function setGeneratedProperty(properties: Property[], targetId: string, isGenerated: boolean): Property[] {\n return updateProperty(properties, targetId, property => {\n const keywords = Object.fromEntries(Object.entries(property.vendorKeywords ?? {}).filter(([name]) => name !== GENERATED_KEYWORD));\n const next = { ...property };\n delete next.isGenerated;\n delete next.vendorKeywords;\n return copySchemaKeywordOrder(property, { ...next, ...(isGenerated ? { isGenerated: true } : {}), ...(Object.keys(keywords).length > 0 ? { vendorKeywords: keywords } : {}) });\n });\n}\n\n/**\n * Makes a property the key of its parent object, moving the key when a sibling held it. Choosing the\n * property that already is the key clears it, so an object can also have no key.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @returns The new tree.\n */\nexport function setKeyProperty(properties: Property[], targetId: string): Property[] {\n const target = properties.find(property => property.id === targetId);\n return properties.map(property => copySchemaKeywordOrder(property, {\n ...property,\n ...(target ? { isKey: property.id === targetId && target.isKey !== true ? true : undefined } : {}),\n ...(property.children ? { children: setKeyProperty(property.children, targetId) } : {}),\n }));\n}\n"],"names":[],"mappings":";;;;;;;;;;AA2BO,MAAM,eAAe,GAAG;AAMxB,MAAM,WAAW,GAAG;AAGpB,MAAM,iBAAiB,GAAG;AAIjC,MAAM,SAAS,GAAG,CAAC,IAAkB,KAAc,IAAI,KAAK,YAAY,CAAC,MAAM,IAAI,IAAI,KAAK,YAAY,CAAC,WAAW;AAEpH,MAAM,UAAU,GAAG,MAAc,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AAIjH,SAAS,cAAc,CAAC,IAAgB,EAAE,UAAmB,EAAA;AACzD,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,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,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,CAAC;QAClG,IAAI,QAAQ,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;AAC1F,KAAA,CAAC,CAAC;AACP;;"}
1
+ {"version":3,"file":"schemaConversion.js","sources":["../../../../SchemaEditor/Tree/schemaConversion.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { JsonSchema, JsonSchemaProperty } from '../../types/JsonSchema';\nimport type { Property } from './Property';\nimport { PropertyType } from './PropertyType';\nimport { conceptPropertyName, uniquePropertyName } from './propertyNaming';\nimport { findPropertyById } from './propertyTree';\nimport { keywordsAfterTypeChange, propertyTypeFamily } from './keywordApplicability';\nimport {\n copySchemaKeywordOrder,\n itemSchemaKeywordOrder,\n schemaKeywordOrder,\n schemaOriginalShape,\n schemaRequiredOrder,\n type SchemaOrderedProperty,\n} from './SchemaOrderedProperty';\nimport { isNode, readOriginalShape, readRequiredOrder, restoreOriginalShape } from './originalShape';\nimport { schemaPropertyType } from './schemaPropertyType';\nimport { standardItemKeywords, standardPropertyKeywords } from './standardKeywords';\nimport { requiredInOriginalOrder, schemaInOriginalOrder } from './schemaInOriginalOrder';\n\n/**\n * The JSON Schema keyword carrying the concept a property is typed as. It annotates the primitive node the\n * concept wraps rather than replacing it, so anything that does not know about concepts — code generation,\n * an export, another tool — still reads a valid schema of the underlying primitive.\n */\nexport const CONCEPT_KEYWORD = 'x-concept';\n\n/**\n * The JSON Schema keyword marking the property that identifies its parent object. Written as `true` on the\n * property; at most one property of an object carries it.\n */\nexport const KEY_KEYWORD = 'x-key';\n\n/** The JSON Schema keyword marking a value generated when the command runs rather than entered. */\nexport const GENERATED_KEYWORD = 'x-generated';\n\ntype SchemaNode = Record<string, unknown>;\n\nconst isComplex = (type: PropertyType): boolean => type === PropertyType.Object || type === PropertyType.ObjectArray;\n\nconst identifier = (): string => Math.random().toString(36).slice(2, 10) + Math.random().toString(36).slice(2, 6);\n\n// ── JsonSchema → Property[] ─────────────────────────────────────────\n\nfunction vendorKeywords(node: SchemaNode, isProperty: boolean): Readonly<Record<string, unknown>> | undefined {\n const entries = Object.entries(node).filter(([name, value]) => {\n if (!name.startsWith('x-')) return false;\n if (!isProperty) return true;\n return name !== CONCEPT_KEYWORD && name !== KEY_KEYWORD && !(name === GENERATED_KEYWORD && value === true);\n });\n return entries.length > 0 ? Object.fromEntries(entries) : undefined;\n}\n\nfunction readItemKeywords(node: SchemaNode, type: PropertyType): Partial<SchemaOrderedProperty> {\n if (node.type !== 'array' || !isNode(node.items)) return {};\n const items = node.items;\n const keywords = vendorKeywords(items, false);\n const standard = standardItemKeywords(items, type);\n return {\n [itemSchemaKeywordOrder]: Object.keys(items),\n ...(keywords ? { itemVendorKeywords: keywords } : {}),\n ...(standard ? { itemSchemaKeywords: standard } : {}),\n };\n}\n\nfunction requiredOrder(node: SchemaNode, type: PropertyType): Partial<SchemaOrderedProperty> {\n const order = readRequiredOrder(node, type);\n return order ? { [schemaRequiredOrder]: order } : {};\n}\n\nfunction readFlags(node: SchemaNode, type: PropertyType, isRequired: boolean): Partial<SchemaOrderedProperty> {\n const keywords = vendorKeywords(node, true);\n const standard = standardPropertyKeywords(node, type);\n return {\n [schemaKeywordOrder]: Object.keys(node),\n [schemaOriginalShape]: readOriginalShape(node, type),\n ...requiredOrder(node, type),\n ...readItemKeywords(node, type),\n ...(keywords ? { vendorKeywords: keywords } : {}),\n ...(standard ? { schemaKeywords: standard } : {}),\n ...(node[GENERATED_KEYWORD] === true ? { isGenerated: true } : {}),\n ...(isRequired ? { isRequired: true } : {}),\n ...(node[KEY_KEYWORD] === true ? { isKey: true } : {}),\n };\n}\n\nfunction schemaPropertyToProperty(name: string, value: JsonSchemaProperty, required: ReadonlySet<string>): Property {\n const node = value as unknown as SchemaNode;\n const type = schemaPropertyType(node);\n const concept = node[CONCEPT_KEYWORD];\n const flags = readFlags(node, type, required.has(name));\n\n const container = (type === PropertyType.Object ? node : type === PropertyType.ObjectArray ? node.items : undefined) as\n | { properties?: Record<string, JsonSchemaProperty>; required?: string[] }\n | undefined;\n\n if (container?.properties) {\n const childRequired = new Set(container.required ?? []);\n return copySchemaKeywordOrder(flags, {\n id: identifier(),\n name,\n type,\n ...flags,\n children: Object.entries(container.properties).map(([childName, child]) =>\n schemaPropertyToProperty(childName, child, childRequired)),\n });\n }\n\n return copySchemaKeywordOrder(flags, {\n id: identifier(),\n name,\n type,\n ...flags,\n ...(typeof concept === 'string' && concept.length > 0 ? { concept } : {}),\n });\n}\n\n/**\n * Converts a JSON Schema object into a property tree. Generates a new id for every property.\n * @param schema The schema to read; `undefined` and schemas without properties give an empty tree.\n * @returns The root properties.\n */\nexport function jsonSchemaToProperties(schema: JsonSchema | undefined): Property[] {\n if (!schema?.properties) return [];\n const required = new Set(schema.required ?? []);\n return Object.entries(schema.properties).map(([name, value]) => schemaPropertyToProperty(name, value, required));\n}\n\n// ── Property[] → JsonSchema ─────────────────────────────────────────\n\nfunction itemSchema(property: Property, type: string, extra: SchemaNode = {}): SchemaNode {\n return { ...property.itemSchemaKeywords, type, ...extra, ...property.itemVendorKeywords };\n}\n\nfunction primitiveSchema(property: Property): SchemaNode {\n switch (property.type) {\n case PropertyType.Number:\n return { type: 'number' };\n case PropertyType.Boolean:\n return { type: 'boolean' };\n case PropertyType.Date:\n return { type: 'string', format: 'date' };\n case PropertyType.Time:\n return { type: 'string', format: 'time' };\n case PropertyType.UniqueIdentifier:\n return { type: 'string', format: 'uuid' };\n case PropertyType.Object:\n return { type: 'object', ...objectSchema(property.children ?? [], (property as SchemaOrderedProperty)[schemaRequiredOrder]) };\n case PropertyType.StringArray:\n return { type: 'array', items: itemSchema(property, 'string') };\n case PropertyType.NumberArray:\n return { type: 'array', items: itemSchema(property, 'number') };\n case PropertyType.ObjectArray:\n return { type: 'array', items: itemSchema(property, 'object', objectSchema(property.children ?? [], (property as SchemaOrderedProperty)[schemaRequiredOrder])) };\n default:\n return { type: 'string' };\n }\n}\n\nfunction orderedPrimitiveSchema(property: SchemaOrderedProperty): SchemaNode {\n const schema = restoreOriginalShape({ ...property.schemaKeywords, ...primitiveSchema(property) }, property);\n if (isNode(schema.items)) schema.items = schemaInOriginalOrder(schema.items as SchemaNode, property[itemSchemaKeywordOrder]);\n return schema;\n}\n\nfunction propertyAnnotations(property: Property): SchemaNode {\n return {\n ...property.vendorKeywords,\n ...(property.isGenerated === true ? { [GENERATED_KEYWORD]: true } : {}),\n ...(property.concept ? { [CONCEPT_KEYWORD]: property.concept } : {}),\n ...(property.isKey === true ? { [KEY_KEYWORD]: true } : {}),\n };\n}\n\nfunction propertySchema(property: SchemaOrderedProperty): JsonSchemaProperty {\n return schemaInOriginalOrder({ ...orderedPrimitiveSchema(property), ...propertyAnnotations(property) }, property[schemaKeywordOrder]) as unknown as JsonSchemaProperty;\n}\n\nfunction objectSchema(properties: Property[], requiredOrder?: readonly string[]): { properties: Record<string, JsonSchemaProperty>; required?: string[] } {\n const schemaProperties: Record<string, JsonSchemaProperty> = {};\n for (const property of properties) {\n schemaProperties[property.name] = propertySchema(property);\n }\n const required = requiredInOriginalOrder(properties.filter(property => property.isRequired === true).map(property => property.name), requiredOrder);\n return { properties: schemaProperties, ...(required.length > 0 ? { required } : {}) };\n}\n\n/**\n * Converts a property tree into a JSON Schema object. Empty `required` lists are omitted, and a property\n * typed as a concept or marked as the key carries the `x-concept` and `x-key` keywords. Vendor keywords and the\n * standard keywords the editor does not model are preserved on properties and array items; generated values carry `x-generated: true`.\n * @param properties The root properties.\n * @param base The incoming schema. Root keys other than type, properties and required are preserved.\n * @returns The schema.\n */\nexport function propertiesToJsonSchema(properties: Property[], base: JsonSchema = {}): JsonSchema {\n const root = Object.fromEntries(Object.entries(base).filter(([name]) => !['properties', 'required'].includes(name)));\n return schemaInOriginalOrder({ ...root, type: 'object', ...objectSchema(properties, base.required) }, Object.keys(base)) as JsonSchema;\n}\n\n// ── Pure tree edits ─────────────────────────────────────────────────\n\nfunction newProperty(siblings: Property[], type: PropertyType, existingCount: number, concept?: string): Property {\n const base = isComplex(type) ? 'nested' : 'property';\n const name = concept ? uniquePropertyName(siblings, conceptPropertyName(concept)) : `${base}${existingCount + 1}`;\n\n return {\n id: identifier(),\n name,\n type,\n ...(concept ? { concept } : {}),\n ...(isComplex(type) ? { children: [] } : {}),\n };\n}\n\n/**\n * Appends a property to the root.\n * @param properties The root properties.\n * @param type The type of the new property.\n * @param existingCount The number of properties already in the tree, used to generate the default name; see {@link totalPropertyCount}.\n * @param concept The concept the property is typed as. When given the property is named after it.\n * @returns The new tree.\n */\nexport function addProperty(properties: Property[], type: PropertyType, existingCount: number, concept?: string): Property[] {\n return [...properties, newProperty(properties, type, existingCount, concept)];\n}\n\n/**\n * Appends a property to a nested object or object list.\n * @param properties The root properties.\n * @param parentId The id of the parent property.\n * @param type The type of the new property.\n * @param existingCount The number of properties already in the tree, used to generate the default name.\n * @param concept The concept the property is typed as.\n * @returns The new tree.\n */\nexport function addChildProperty(\n properties: Property[],\n parentId: string,\n type: PropertyType,\n existingCount: number,\n concept?: string,\n): Property[] {\n const siblings = findPropertyById(properties, parentId)?.children ?? [];\n const child = newProperty(siblings, type, existingCount, concept);\n const insert = (level: Property[]): Property[] => level.map(property => {\n if (property.id === parentId) return copySchemaKeywordOrder(property, { ...property, children: [...(property.children ?? []), child] });\n return property.children ? copySchemaKeywordOrder(property, { ...property, children: insert(property.children) }) : property;\n });\n return insert(properties);\n}\n\n/**\n * Removes a property, and everything nested under it.\n * @param properties The root properties.\n * @param targetId The id of the property to remove.\n * @returns The new tree.\n */\nexport function removeProperty(properties: Property[], targetId: string): Property[] {\n return properties\n .filter(property => property.id !== targetId)\n .map(property => property.children ? copySchemaKeywordOrder(property, { ...property, children: removeProperty(property.children, targetId) }) : property);\n}\n\nfunction updateProperty(properties: Property[], targetId: string, update: (property: Property) => Property): Property[] {\n return properties.map(property => {\n if (property.id === targetId) return update(property);\n return property.children ? copySchemaKeywordOrder(property, { ...property, children: updateProperty(property.children, targetId, update) }) : property;\n });\n}\n\n/**\n * Renames a property. Its requiredness travels with it, because both are stored against the property.\n * @param properties The root properties.\n * @param targetId The id of the property to rename.\n * @param newName The new name.\n * @returns The new tree.\n */\nexport function renameProperty(properties: Property[], targetId: string, newName: string): Property[] {\n return updateProperty(properties, targetId, property => copySchemaKeywordOrder(property, { ...property, name: newName }));\n}\n\nfunction retypedProperty(property: Property, newType: PropertyType, concept?: string): Property {\n const next: SchemaOrderedProperty = copySchemaKeywordOrder(property, {\n ...property,\n type: newType,\n concept,\n children: isComplex(newType) ? (property.children ?? []) : undefined,\n });\n if (property.type !== newType) {\n const kept = keywordsAfterTypeChange(property.schemaKeywords ?? {}, propertyTypeFamily(property.type), propertyTypeFamily(newType));\n delete next.schemaKeywords;\n if (Object.keys(kept).length > 0) next.schemaKeywords = kept;\n delete next.itemVendorKeywords;\n delete next.itemSchemaKeywords;\n delete next[itemSchemaKeywordOrder];\n delete next[schemaOriginalShape];\n }\n return next;\n}\n\n/**\n * Changes the type of a property. Choosing a plain primitive drops the concept; choosing an object or\n * object list keeps the children, and any other type drops them. A different type keeps the annotations and the\n * constraints of the same keyword family, and drops value keywords, the original type and format, item metadata\n * and every other standard keyword that no longer applies. The same type keeps everything.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @param newType The new type.\n * @param concept The concept the property is now typed as, if any.\n * @returns The new tree.\n */\nexport function changePropertyType(properties: Property[], targetId: string, newType: PropertyType, concept?: string): Property[] {\n return updateProperty(properties, targetId, property => retypedProperty(property, newType, concept));\n}\n\n/**\n * Flips whether a property is required.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @returns The new tree.\n */\nexport function toggleRequiredProperty(properties: Property[], targetId: string): Property[] {\n return updateProperty(properties, targetId, property => copySchemaKeywordOrder(property, { ...property, isRequired: !property.isRequired || undefined }));\n}\n\n/**\n * Sets whether a property is required. Requiring a nested property does not require its parent.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @param isRequired Whether the property must be present.\n * @returns The new tree.\n */\nexport function setRequiredProperty(properties: Property[], targetId: string, isRequired: boolean): Property[] {\n return updateProperty(properties, targetId, property => copySchemaKeywordOrder(property, { ...property, isRequired }));\n}\n\n/**\n * Sets whether a property's value is generated. An explicit edit replaces any non-true x-generated value.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @param isGenerated Whether the value is generated.\n * @returns The new tree.\n */\nexport function setGeneratedProperty(properties: Property[], targetId: string, isGenerated: boolean): Property[] {\n return updateProperty(properties, targetId, property => {\n const keywords = Object.fromEntries(Object.entries(property.vendorKeywords ?? {}).filter(([name]) => name !== GENERATED_KEYWORD));\n const next = { ...property };\n delete next.isGenerated;\n delete next.vendorKeywords;\n return copySchemaKeywordOrder(property, { ...next, ...(isGenerated ? { isGenerated: true } : {}), ...(Object.keys(keywords).length > 0 ? { vendorKeywords: keywords } : {}) });\n });\n}\n\n/**\n * Makes a property the key of its parent object, moving the key when a sibling held it. Choosing the\n * property that already is the key clears it, so an object can also have no key.\n * @param properties The root properties.\n * @param targetId The id of the property.\n * @returns The new tree.\n */\nexport function setKeyProperty(properties: Property[], targetId: string): Property[] {\n const target = properties.find(property => property.id === targetId);\n return properties.map(property => copySchemaKeywordOrder(property, {\n ...property,\n ...(target ? { isKey: property.id === targetId && target.isKey !== true ? true : undefined } : {}),\n ...(property.children ? { children: setKeyProperty(property.children, targetId) } : {}),\n }));\n}\n"],"names":[],"mappings":";;;;;;;;;;AA2BO,MAAM,eAAe,GAAG;AAMxB,MAAM,WAAW,GAAG;AAGpB,MAAM,iBAAiB,GAAG;AAIjC,MAAM,SAAS,GAAG,CAAC,IAAkB,KAAc,IAAI,KAAK,YAAY,CAAC,MAAM,IAAI,IAAI,KAAK,YAAY,CAAC,WAAW;AAEpH,MAAM,UAAU,GAAG,MAAc,IAAI,CAAC,MAAM,EAA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AC,CAAC;AACN;AASM,SAAU,cAAc,CAAC,UAAsB,EAAE,QAAgB,EAAA;AACnE,IAAA,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,KAAK,QAAQ,CAAC;IACpE,OAAO,UAAU,CAAC,GAAG,CAAC,QAAQ,IAAI,sBAAsB,CAAC,QAAQ,EAAE;AAC/D,QAAA,GAAG,QAAQ;AACX,QAAA,IAAI,MAAM,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,CAAC;QAClG,IAAI,QAAQ,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;AAC1F,KAAA,CAAC,CAAC;AACP;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaPropertyType.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/schemaPropertyType.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAE9C,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY,CAsBlE"}
1
+ {"version":3,"file":"schemaPropertyType.d.ts","sourceRoot":"","sources":["../../../../SchemaEditor/Tree/schemaPropertyType.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAgB,CAAC;AAE9C,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY,CAuBlE"}
@@ -8,6 +8,8 @@ function schemaPropertyType(value) {
8
8
  return PropertyType.Date;
9
9
  if (value.format === 'time')
10
10
  return PropertyType.Time;
11
+ if (value.format === 'uuid' || value.format === 'guid')
12
+ return PropertyType.UniqueIdentifier;
11
13
  return PropertyType.String;
12
14
  case 'number':
13
15
  case 'integer':
@@ -1 +1 @@
1
- {"version":3,"file":"schemaPropertyType.js","sources":["../../../../SchemaEditor/Tree/schemaPropertyType.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PropertyType } from './PropertyType';\n\ntype SchemaNode = Record<string, unknown>;\n\n/**\n * The property type a schema node reads as. An unknown or missing `type` reads as text, and a list whose\n * items are not numbers or objects reads as a list of text.\n * @param value The property schema node.\n * @returns The property type.\n */\nexport function schemaPropertyType(value: SchemaNode): PropertyType {\n const items = value.items as { type?: string } | undefined;\n\n switch (value.type) {\n case 'string':\n if (value.format === 'date') return PropertyType.Date;\n if (value.format === 'time') return PropertyType.Time;\n return PropertyType.String;\n case 'number':\n case 'integer':\n return PropertyType.Number;\n case 'boolean':\n return PropertyType.Boolean;\n case 'object':\n return PropertyType.Object;\n case 'array':\n if (items?.type === 'number' || items?.type === 'integer') return PropertyType.NumberArray;\n if (items?.type === 'object') return PropertyType.ObjectArray;\n return PropertyType.StringArray;\n default:\n return PropertyType.String;\n }\n}\n"],"names":[],"mappings":";;AAaM,SAAU,kBAAkB,CAAC,KAAiB,EAAA;AAChD,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,KAAsC;AAE1D,IAAA,QAAQ,KAAK,CAAC,IAAI;AACd,QAAA,KAAK,QAAQ;AACT,YAAA,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM;gBAAE,OAAO,YAAY,CAAC,IAAI;AACrD,YAAA,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM;gBAAE,OAAO,YAAY,CAAC,IAAI;YACrD,OAAO,YAAY,CAAC,MAAM;AAC9B,QAAA,KAAK,QAAQ;AACb,QAAA,KAAK,SAAS;YACV,OAAO,YAAY,CAAC,MAAM;AAC9B,QAAA,KAAK,SAAS;YACV,OAAO,YAAY,CAAC,OAAO;AAC/B,QAAA,KAAK,QAAQ;YACT,OAAO,YAAY,CAAC,MAAM;AAC9B,QAAA,KAAK,OAAO;YACR,IAAI,KAAK,EAAE,IAAI,KAAK,QAAQ,IAAI,KAAK,EAAE,IAAI,KAAK,SAAS;gBAAE,OAAO,YAAY,CAAC,WAAW;AAC1F,YAAA,IAAI,KAAK,EAAE,IAAI,KAAK,QAAQ;gBAAE,OAAO,YAAY,CAAC,WAAW;YAC7D,OAAO,YAAY,CAAC,WAAW;AACnC,QAAA;YACI,OAAO,YAAY,CAAC,MAAM;;AAEtC;;"}
1
+ {"version":3,"file":"schemaPropertyType.js","sources":["../../../../SchemaEditor/Tree/schemaPropertyType.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PropertyType } from './PropertyType';\n\ntype SchemaNode = Record<string, unknown>;\n\n/**\n * The property type a schema node reads as. An unknown or missing `type` reads as text, and a list whose\n * items are not numbers or objects reads as a list of text.\n * @param value The property schema node.\n * @returns The property type.\n */\nexport function schemaPropertyType(value: SchemaNode): PropertyType {\n const items = value.items as { type?: string } | undefined;\n\n switch (value.type) {\n case 'string':\n if (value.format === 'date') return PropertyType.Date;\n if (value.format === 'time') return PropertyType.Time;\n if (value.format === 'uuid' || value.format === 'guid') return PropertyType.UniqueIdentifier;\n return PropertyType.String;\n case 'number':\n case 'integer':\n return PropertyType.Number;\n case 'boolean':\n return PropertyType.Boolean;\n case 'object':\n return PropertyType.Object;\n case 'array':\n if (items?.type === 'number' || items?.type === 'integer') return PropertyType.NumberArray;\n if (items?.type === 'object') return PropertyType.ObjectArray;\n return PropertyType.StringArray;\n default:\n return PropertyType.String;\n }\n}\n"],"names":[],"mappings":";;AAaM,SAAU,kBAAkB,CAAC,KAAiB,EA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+ {"version":3,"file":"defaultSchemaEditorLabels.d.ts","sourceRoot":"","sources":["../../../SchemaEditor/defaultSchemaEditorLabels.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAsB,CAAC;AAE/D,2FAA2F;AAC3F,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,kBAAkB,CAkDnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAA+C,CAAC"}
@@ -43,6 +43,7 @@ const completeSchemaEditorLabels = {
43
43
  typeBoolean: 'Yes or no',
44
44
  typeDate: 'Date',
45
45
  typeTime: 'Time',
46
+ typeUniqueIdentifier: 'Unique identifier',
46
47
  typeStringArray: 'List of text',
47
48
  typeNumberArray: 'List of numbers',
48
49
  typeObject: 'Object',
@@ -1 +1 @@
1
- {"version":3,"file":"defaultSchemaEditorLabels.js","sources":["../../../SchemaEditor/defaultSchemaEditorLabels.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { SchemaEditorLabels } from './SchemaEditorLabels';\n\n/** Every label with its English default, so the editor never has to guard an unset one. */\nexport const completeSchemaEditorLabels: Required<SchemaEditorLabels> = {\n edit: 'Edit',\n save: 'Save',\n cancel: 'Cancel',\n addProperty: 'Add Property',\n actions: 'Actions',\n navigateBack: 'Navigate back',\n emptyMessage: 'No properties defined',\n navigateToItemDefinition: 'Navigate to item definition',\n navigateToProperties: 'Navigate to object properties',\n propertyName: 'Property name',\n propertyType: 'Property type',\n arrayItemType: 'Array item type',\n deleteProperty: 'Delete property',\n invalidJson: 'The schema must contain valid JSON before it can be edited.',\n schema: 'Schema properties',\n addPropertyTo: (propertyName) => `Add property to ${propertyName}`,\n nestedProperties: (propertyName) => `Properties of ${propertyName}`,\n propertyNameFor: (propertyName) => `Name of ${propertyName}`,\n renameHint: 'Double-click or press F2 to rename',\n deletePropertyFor: (propertyName) => `Delete ${propertyName}`,\n changeType: (propertyName, typeName) => `Change type of ${propertyName}, currently ${typeName}`,\n propertyTypes: 'Property types',\n concepts: 'Concepts',\n noConcepts: 'No concepts defined',\n required: 'Required',\n requiredProperty: (propertyName) => `Required in schema: ${propertyName}`,\n requiredHelp: 'The property must be present in the object. An empty value still counts as present.',\n keyProperty: (propertyName) => `Use ${propertyName} as the key property`,\n setAsKey: 'Use as the key that identifies the object',\n isKey: 'This is the key that identifies the object. Select it again to clear it.',\n generatedProperty: (propertyName) => `Generated: ${propertyName}`,\n setAsGenerated: 'Mark as generated: the value is created when the command runs, not entered',\n isGenerated: 'The value is generated. Select it again to mark it as entered.',\n keyColumn: 'Key',\n requiredColumn: 'Required',\n protectedProperty: 'This property cannot be renamed or removed.',\n nameRequired: 'Enter a name.',\n nameReserved: (name) => `${name} is reserved and cannot be used as a name.`,\n nameDuplicate: (name) => `Another property is already named ${name}.`,\n typeString: 'Text',\n typeNumber: 'Number',\n typeBoolean: 'Yes or no',\n typeDate: 'Date',\n typeTime: 'Time',\n typeStringArray: 'List of text',\n typeNumberArray: 'List of numbers',\n typeObject: 'Object',\n typeObjectArray: 'List of objects',\n};\n\n/**\n * English defaults for {@link SchemaEditorLabels}. The labels added for the tree layout and the capabilities are\n * optional on the type, and are present here with their English text.\n */\nexport const defaultSchemaEditorLabels: SchemaEditorLabels = completeSchemaEditorLabels;\n"],"names":[],"mappings":"AAMO,MAAM,0BAA0B,GAAiC;AACpE,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,wBAAwB,EAAE,6BAA6B;AACvD,IAAA,oBAAoB,EAAE,+BAA+B;AACrD,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,YAAY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,YAAY,EAAE,eAAe;IAC7B,YAAY,EAAE,CAAC,IAAI,KAAK,CAAA,EAAG,IAAI,CAAA,0CAAA,CAA4C;IAC3E,aAAa,EAAE,CAAC,IAAI,KAAK,CAAA,kCAAA,EAAqC,IAAI,CAAA,CAAA,CAAG;AACrE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,WAAW,EAAE,WAAW;AACxB,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,eAAe,EAAE,cAAc;AAC/B,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,eAAe,EAAE,iBAAiB;;AAO/B,MAAM,yBAAyB,GAAuB;;"}
1
+ {"version":3,"file":"defaultSchemaEditorLabels.js","sources":["../../../SchemaEditor/defaultSchemaEditorLabels.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { SchemaEditorLabels } from './SchemaEditorLabels';\n\n/** Every label with its English default, so the editor never has to guard an unset one. */\nexport const completeSchemaEditorLabels: Required<SchemaEditorLabels> = {\n edit: 'Edit',\n save: 'Save',\n cancel: 'Cancel',\n addProperty: 'Add Property',\n actions: 'Actions',\n navigateBack: 'Navigate back',\n emptyMessage: 'No properties defined',\n navigateToItemDefinition: 'Navigate to item definition',\n navigateToProperties: 'Navigate to object properties',\n propertyName: 'Property name',\n propertyType: 'Property type',\n arrayItemType: 'Array item type',\n deleteProperty: 'Delete property',\n invalidJson: 'The schema must contain valid JSON before it can be edited.',\n schema: 'Schema properties',\n addPropertyTo: (propertyName) => `Add property to ${propertyName}`,\n nestedProperties: (propertyName) => `Properties of ${propertyName}`,\n propertyNameFor: (propertyName) => `Name of ${propertyName}`,\n renameHint: 'Double-click or press F2 to rename',\n deletePropertyFor: (propertyName) => `Delete ${propertyName}`,\n changeType: (propertyName, typeName) => `Change type of ${propertyName}, currently ${typeName}`,\n propertyTypes: 'Property types',\n concepts: 'Concepts',\n noConcepts: 'No concepts defined',\n required: 'Required',\n requiredProperty: (propertyName) => `Required in schema: ${propertyName}`,\n requiredHelp: 'The property must be present in the object. An empty value still counts as present.',\n keyProperty: (propertyName) => `Use ${propertyName} as the key property`,\n setAsKey: 'Use as the key that identifies the object',\n isKey: 'This is the key that identifies the object. Select it again to clear it.',\n generatedProperty: (propertyName) => `Generated: ${propertyName}`,\n setAsGenerated: 'Mark as generated: the value is created when the command runs, not entered',\n isGenerated: 'The value is generated. Select it again to mark it as entered.',\n keyColumn: 'Key',\n requiredColumn: 'Required',\n protectedProperty: 'This property cannot be renamed or removed.',\n nameRequired: 'Enter a name.',\n nameReserved: (name) => `${name} is reserved and cannot be used as a name.`,\n nameDuplicate: (name) => `Another property is already named ${name}.`,\n typeString: 'Text',\n typeNumber: 'Number',\n typeBoolean: 'Yes or no',\n typeDate: 'Date',\n typeTime: 'Time',\n typeUniqueIdentifier: 'Unique identifier',\n typeStringArray: 'List of text',\n typeNumberArray: 'List of numbers',\n typeObject: 'Object',\n typeObjectArray: 'List of objects',\n};\n\n/**\n * English defaults for {@link SchemaEditorLabels}. The labels added for the tree layout and the capabilities are\n * optional on the type, and are present here with their English text.\n */\nexport const defaultSchemaEditorLabels: SchemaEditorLabels = completeSchemaEditorLabels;\n"],"names":[],"mappings":"AAMO,MAAM,0BAA0B,GAAiC;AACpE,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,wBAAwB,EAAE,6BAA6B;AACvD,IAAA,oBAAoB,EAAE,+BAA+B;AACrD,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,YAAY,E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AAY,EAAE,eAAe;IAC7B,YAAY,EAAE,CAAC,IAAI,KAAK,CAAA,EAAG,IAAI,CAAA,0CAAA,CAA4C;IAC3E,aAAa,EAAE,CAAC,IAAI,KAAK,CAAA,kCAAA,EAAqC,IAAI,CAAA,CAAA,CAAG;AACrE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,WAAW,EAAE,WAAW;AACxB,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,oBAAoB,EAAE,mBAAmB;AACzC,IAAA,eAAe,EAAE,cAAc;AAC/B,IAAA,eAAe,EAAE,iBAAiB;AAClC,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,eAAe,EAAE,iBAAiB;;AAO/B,MAAM,yBAAyB,GAAuB;;"}
@@ -7,6 +7,9 @@ export { PropertyConceptsProvider, usePropertyConcepts } from './Tree/PropertyCo
7
7
  export type { PropertyConceptsProviderProps } from './Tree/PropertyConceptsContext.js';
8
8
  export type { Property } from './Tree/Property.js';
9
9
  export { PropertyType } from './Tree/PropertyType.js';
10
+ export { PropertyTypeGlyph } from './Tree/PropertyTypeGlyph.js';
11
+ export { GlyphMenu } from './Tree/GlyphMenu.js';
12
+ export type { GlyphMenuItem, GlyphMenuProps } from './Tree/GlyphMenu.js';
10
13
  export type { PropertyConcept } from './Tree/PropertyConcept.js';
11
14
  export { PropertyNameProblem, conceptPropertyName, findPropertyNameProblem, uniquePropertyName, } from './Tree/propertyNaming.js';
12
15
  export { findPropertyById, findPropertyByName, findSiblingProperties, totalPropertyCount } from './Tree/propertyTree.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../SchemaEditor/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAgB,CAAC;AAC/B,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAsB,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,0BAA0B,E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AAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,mCAAgC,CAAC;AAC/F,YAAY,EAAE,6BAA6B,EAAE,MAAM,mCAAgC,CAAC;AACpF,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAkB,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAC9D,OAAO,EACH,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,GACrB,MAAM,0BAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,wBAAqB,CAAC;AACtH,OAAO,EACH,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,GACzB,MAAM,4BAAyB,CAAC;AACjC,cAAc,wBAAqB,CAAC;AACpC,cAAc,wBAAqB,CAAC"}
@@ -1,6 +1,8 @@
1
1
  export { SchemaEditor } from './SchemaEditor.js';
2
2
  export { PropertyConceptsProvider, usePropertyConcepts } from './Tree/PropertyConceptsContext.js';
3
3
  export { PropertyType } from './Tree/PropertyType.js';
4
+ export { PropertyTypeGlyph } from './Tree/PropertyTypeGlyph.js';
5
+ export { GlyphMenu } from './Tree/GlyphMenu.js';
4
6
  export { PropertyNameProblem, conceptPropertyName, findPropertyNameProblem, uniquePropertyName } from './Tree/propertyNaming.js';
5
7
  export { findPropertyById, findPropertyByName, findSiblingProperties, totalPropertyCount } from './Tree/propertyTree.js';
6
8
  export { CONCEPT_KEYWORD, GENERATED_KEYWORD, KEY_KEYWORD, addChildProperty, addProperty, changePropertyType, jsonSchemaToProperties, propertiesToJsonSchema, removeProperty, renameProperty, setGeneratedProperty, setKeyProperty, setRequiredProperty, toggleRequiredProperty } from './Tree/schemaConversion.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -2102,6 +2102,7 @@
2102
2102
  --cratis-schema-editor-type-boolean: #15803d;
2103
2103
  --cratis-schema-editor-type-date: #c2410c;
2104
2104
  --cratis-schema-editor-type-time: #7c6d14;
2105
+ --cratis-schema-editor-type-unique-identifier: #0f766e;
2105
2106
  --cratis-schema-editor-type-object: #6d28d9;
2106
2107
  --cratis-schema-editor-type-string-array: #0f766e;
2107
2108
  --cratis-schema-editor-type-number-array: #991b1b;
@@ -2146,6 +2147,7 @@
2146
2147
  .cratis-schema-editor__badge-glyph[data-property-type="boolean"] { background: var(--cratis-schema-editor-type-boolean); }
2147
2148
  .cratis-schema-editor__badge-glyph[data-property-type="date"] { background: var(--cratis-schema-editor-type-date); }
2148
2149
  .cratis-schema-editor__badge-glyph[data-property-type="time"] { background: var(--cratis-schema-editor-type-time); }
2150
+ .cratis-schema-editor__badge-glyph[data-property-type="uniqueIdentifier"] { background: var(--cratis-schema-editor-type-unique-identifier); }
2149
2151
  .cratis-schema-editor__badge-glyph[data-property-type="object"] { background: var(--cratis-schema-editor-type-object); }
2150
2152
  .cratis-schema-editor__badge-glyph[data-property-type="stringArray"] { background: var(--cratis-schema-editor-type-string-array); }
2151
2153
  .cratis-schema-editor__badge-glyph[data-property-type="numberArray"] { background: var(--cratis-schema-editor-type-number-array); }
@@ -7708,6 +7708,7 @@
7708
7708
  --cratis-schema-editor-type-boolean: #15803d;
7709
7709
  --cratis-schema-editor-type-date: #c2410c;
7710
7710
  --cratis-schema-editor-type-time: #7c6d14;
7711
+ --cratis-schema-editor-type-unique-identifier: #0f766e;
7711
7712
  --cratis-schema-editor-type-object: #6d28d9;
7712
7713
  --cratis-schema-editor-type-string-array: #0f766e;
7713
7714
  --cratis-schema-editor-type-number-array: #991b1b;
@@ -7752,6 +7753,7 @@
7752
7753
  .cratis-schema-editor__badge-glyph[data-property-type="boolean"] { background: var(--cratis-schema-editor-type-boolean); }
7753
7754
  .cratis-schema-editor__badge-glyph[data-property-type="date"] { background: var(--cratis-schema-editor-type-date); }
7754
7755
  .cratis-schema-editor__badge-glyph[data-property-type="time"] { background: var(--cratis-schema-editor-type-time); }
7756
+ .cratis-schema-editor__badge-glyph[data-property-type="uniqueIdentifier"] { background: var(--cratis-schema-editor-type-unique-identifier); }
7755
7757
  .cratis-schema-editor__badge-glyph[data-property-type="object"] { background: var(--cratis-schema-editor-type-object); }
7756
7758
  .cratis-schema-editor__badge-glyph[data-property-type="stringArray"] { background: var(--cratis-schema-editor-type-string-array); }
7757
7759
  .cratis-schema-editor__badge-glyph[data-property-type="numberArray"] { background: var(--cratis-schema-editor-type-number-array); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/components",
3
- "version": "4.34.1",
3
+ "version": "4.35.0",
4
4
  "description": "React components for CQRS and event-sourced apps — command dialogs, typed forms, and query-backed data tables for Cratis Arc",
5
5
  "keywords": [
6
6
  "react",