@json-layout/core 2.7.1 → 2.8.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 (79) hide show
  1. package/package.json +1 -1
  2. package/src/state/index.js +6 -1
  3. package/src/state/state-node.js +46 -2
  4. package/types/compile/index.d.ts +0 -16
  5. package/types/compile/index.d.ts.map +0 -1
  6. package/types/compile/options.d.ts +0 -6
  7. package/types/compile/options.d.ts.map +0 -1
  8. package/types/compile/serialize.d.ts +0 -6
  9. package/types/compile/serialize.d.ts.map +0 -1
  10. package/types/compile/skeleton-node.d.ts +0 -21
  11. package/types/compile/skeleton-node.d.ts.map +0 -1
  12. package/types/compile/skeleton-tree.d.ts +0 -19
  13. package/types/compile/skeleton-tree.d.ts.map +0 -1
  14. package/types/compile/types.d.ts +0 -61
  15. package/types/compile/types.d.ts.map +0 -1
  16. package/types/compile/utils/resolve-refs.d.ts +0 -17
  17. package/types/compile/utils/resolve-refs.d.ts.map +0 -1
  18. package/types/compile/utils/x-i18n.d.ts +0 -2
  19. package/types/compile/utils/x-i18n.d.ts.map +0 -1
  20. package/types/i18n/de.d.ts +0 -24
  21. package/types/i18n/de.d.ts.map +0 -1
  22. package/types/i18n/en.d.ts +0 -24
  23. package/types/i18n/en.d.ts.map +0 -1
  24. package/types/i18n/fr.d.ts +0 -24
  25. package/types/i18n/fr.d.ts.map +0 -1
  26. package/types/i18n/index.d.ts +0 -8
  27. package/types/i18n/index.d.ts.map +0 -1
  28. package/types/i18n/nl.d.ts +0 -24
  29. package/types/i18n/nl.d.ts.map +0 -1
  30. package/types/i18n/types.d.ts +0 -23
  31. package/types/i18n/types.d.ts.map +0 -1
  32. package/types/index.d.ts +0 -5
  33. package/types/index.d.ts.map +0 -1
  34. package/types/state/index.d.ts +0 -303
  35. package/types/state/index.d.ts.map +0 -1
  36. package/types/state/options.d.ts +0 -11
  37. package/types/state/options.d.ts.map +0 -1
  38. package/types/state/state-node.d.ts +0 -40
  39. package/types/state/state-node.d.ts.map +0 -1
  40. package/types/state/state-tree.d.ts +0 -13
  41. package/types/state/state-tree.d.ts.map +0 -1
  42. package/types/state/types.d.ts +0 -198
  43. package/types/state/types.d.ts.map +0 -1
  44. package/types/state/utils/display.d.ts +0 -51
  45. package/types/state/utils/display.d.ts.map +0 -1
  46. package/types/state/utils/immutable.d.ts +0 -21
  47. package/types/state/utils/immutable.d.ts.map +0 -1
  48. package/types/state/utils/modified.d.ts +0 -17
  49. package/types/state/utils/modified.d.ts.map +0 -1
  50. package/types/state/utils/regexps.d.ts +0 -6
  51. package/types/state/utils/regexps.d.ts.map +0 -1
  52. package/types/state/utils/urls.d.ts +0 -2
  53. package/types/state/utils/urls.d.ts.map +0 -1
  54. package/types/utils/build.d.ts +0 -5
  55. package/types/utils/build.d.ts.map +0 -1
  56. package/types/utils/clone.d.ts +0 -2
  57. package/types/utils/clone.d.ts.map +0 -1
  58. package/types/utils/doc-options.d.ts +0 -14
  59. package/types/utils/doc-options.d.ts.map +0 -1
  60. package/types/webmcp/index.d.ts +0 -90
  61. package/types/webmcp/index.d.ts.map +0 -1
  62. package/types/webmcp/project.d.ts +0 -111
  63. package/types/webmcp/project.d.ts.map +0 -1
  64. package/types/webmcp/resolve.d.ts +0 -11
  65. package/types/webmcp/resolve.d.ts.map +0 -1
  66. package/types/webmcp/tools/describe-state.d.ts +0 -79
  67. package/types/webmcp/tools/describe-state.d.ts.map +0 -1
  68. package/types/webmcp/tools/edit-array.d.ts +0 -88
  69. package/types/webmcp/tools/edit-array.d.ts.map +0 -1
  70. package/types/webmcp/tools/fill-form-skill.d.ts +0 -24
  71. package/types/webmcp/tools/fill-form-skill.d.ts.map +0 -1
  72. package/types/webmcp/tools/get-data.d.ts +0 -31
  73. package/types/webmcp/tools/get-data.d.ts.map +0 -1
  74. package/types/webmcp/tools/get-field-suggestions.d.ts +0 -66
  75. package/types/webmcp/tools/get-field-suggestions.d.ts.map +0 -1
  76. package/types/webmcp/tools/set-data.d.ts +0 -60
  77. package/types/webmcp/tools/set-data.d.ts.map +0 -1
  78. package/types/webmcp/tools/set-field-value.d.ts +0 -91
  79. package/types/webmcp/tools/set-field-value.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-layout/core",
3
- "version": "2.7.1",
3
+ "version": "2.8.0",
4
4
  "description": "Compilation and state management utilities for JSON Layout.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -331,7 +331,12 @@ export class StatefulLayout {
331
331
  logGetItems(node.fullKey, 'automatic get items, fetched results', items)
332
332
  const rawData = /** @type {any[]} */(node.data ?? [])
333
333
  const existingItems = rawData.map(item => this.prepareSelectItem(node, item))
334
- const data = produceListData(rawData, existingItems, items)
334
+ const isList = node.layout.comp === 'list'
335
+ const listActions = isList ? /** @type {any} */(node.layout).listActions : null
336
+ const listEditMode = isList ? /** @type {any} */(node.layout).listEditMode : null
337
+ const preserveOrder = isList && Array.isArray(listActions) && listActions.includes('sort')
338
+ const replaceData = isList && Array.isArray(listActions) && !listActions.includes('edit') && listEditMode !== 'inline'
339
+ const data = produceListData(rawData, existingItems, items, preserveOrder, replaceData)
335
340
  logGetItems(node.fullKey, 'automatic get items, input produced data', data)
336
341
  this.input(node, data)
337
342
  }, err => console.error('error fetching items', node.fullKey, err))
@@ -1010,8 +1010,52 @@ export const producePatchedData = produce((draft, node, data) => {
1010
1010
  }
1011
1011
  })
1012
1012
 
1013
- /** @type {(existingData: any[], existingItems: import('@json-layout/vocabulary').SelectItems, newItems: import('@json-layout/vocabulary').SelectItems) => any} */
1014
- export const produceListData = (existingData, existingItems, newItems) => {
1013
+ /**
1014
+ * Merge a fresh getItems result into the list's current data.
1015
+ *
1016
+ * For every item in newItems, matched by key against existingItems:
1017
+ * - matching key: the existing data entry is preserved (local edits win,
1018
+ * the new item.value is discarded);
1019
+ * - new key: the new item.value is used;
1020
+ * - existing keys absent from newItems: dropped.
1021
+ *
1022
+ * When preserveOrder is true (used when listActions includes 'sort'):
1023
+ * - the user's current order is kept for items that are still present;
1024
+ * - items new in newItems are appended at the end, in newItems order;
1025
+ * - items dropped from newItems are still removed.
1026
+ *
1027
+ * When preserveOrder is false (default), the order from newItems is used.
1028
+ *
1029
+ * When replaceData is true (used when items are not editable locally — i.e.
1030
+ * listActions does not include 'edit' and listEditMode is not 'inline'):
1031
+ * - on a matching key, the new item.value replaces the existing data
1032
+ * entry (server is the source of truth for non-editable items).
1033
+ *
1034
+ * When replaceData is false (default), local data is preserved on match.
1035
+ * @type {(existingData: any[], existingItems: import('@json-layout/vocabulary').SelectItems, newItems: import('@json-layout/vocabulary').SelectItems, preserveOrder?: boolean, replaceData?: boolean) => any}
1036
+ */
1037
+ export const produceListData = (existingData, existingItems, newItems, preserveOrder = false, replaceData = false) => {
1038
+ if (preserveOrder) {
1039
+ const newKeys = new Set(newItems.map(i => i.key))
1040
+ const existingKeys = new Set(existingItems.map(i => i.key))
1041
+ const data = []
1042
+ for (let i = 0; i < existingItems.length; i++) {
1043
+ if (newKeys.has(existingItems[i].key)) {
1044
+ if (replaceData) {
1045
+ data.push(newItems.find(n => n.key === existingItems[i].key)?.value)
1046
+ } else {
1047
+ data.push(existingData[i])
1048
+ }
1049
+ }
1050
+ }
1051
+ for (const item of newItems) {
1052
+ if (!existingKeys.has(item.key)) data.push(item.value)
1053
+ }
1054
+ return shallowProduceArray(existingData, data)
1055
+ }
1056
+ if (replaceData) {
1057
+ return shallowProduceArray(existingData, newItems.map(i => i.value))
1058
+ }
1015
1059
  const data = []
1016
1060
  for (const item of newItems) {
1017
1061
  const existingItem = existingItems.find(i => i.key === item.key)
@@ -1,16 +0,0 @@
1
- /**
2
- * @param {object} _schema
3
- * @param {PartialCompileOptions} [partialOptions]
4
- * @returns {CompiledLayout}
5
- */
6
- export function compile(_schema: object, partialOptions?: PartialCompileOptions): CompiledLayout;
7
- export { resolveLocaleRefs } from "./utils/resolve-refs.js";
8
- export { resolveXI18n } from "./utils/x-i18n.js";
9
- export { produceCompileOptions } from "./options.js";
10
- export type SkeletonTree = import("./types.js").SkeletonTree;
11
- export type SkeletonNode = import("./types.js").SkeletonNode;
12
- export type CompiledLayout = import("./types.js").CompiledLayout;
13
- export type CompileOptions = import("./types.js").CompileOptions;
14
- export type PartialCompileOptions = import("./types.js").PartialCompileOptions;
15
- export type CompiledExpression = import("./types.js").CompiledExpression;
16
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,iCAJW,MAAM,mBACN,qBAAqB,GACnB,cAAc,CAuH1B;;;;2BAvIY,OAAO,YAAY,EAAE,YAAY;2BACjC,OAAO,YAAY,EAAE,YAAY;6BACjC,OAAO,YAAY,EAAE,cAAc;6BACnC,OAAO,YAAY,EAAE,cAAc;oCACnC,OAAO,YAAY,EAAE,qBAAqB;iCAC1C,OAAO,YAAY,EAAE,kBAAkB"}
@@ -1,6 +0,0 @@
1
- export function fillOptions(partialOptions: PartialCompileOptions): CompileOptions;
2
- /** @type {(draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions} */
3
- export const produceCompileOptions: (draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions;
4
- export type CompileOptions = import("./types.js").CompileOptions;
5
- export type PartialCompileOptions = import("./types.js").PartialCompileOptions;
6
- //# sourceMappingURL=options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/compile/options.js"],"names":[],"mappings":"AAqBO,4CAHI,qBAAqB,GACnB,cAAc,CAwD1B;AAGD,yGAAyG;AACzG,oCADW,CAAC,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,qBAAqB,KAAK,qBAAqB,CAiBnG;6BArFW,OAAO,YAAY,EAAE,cAAc;oCACnC,OAAO,YAAY,EAAE,qBAAqB"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @param {import('./index.js').CompiledLayout} compiledLayout
3
- * @returns {Promise<string>}
4
- */
5
- export function serialize(compiledLayout: import("./index.js").CompiledLayout): Promise<string>;
6
- //# sourceMappingURL=serialize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/compile/serialize.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH,0CAHW,OAAO,YAAY,EAAE,cAAc,GACjC,OAAO,CAAC,MAAM,CAAC,CAyG3B"}
@@ -1,21 +0,0 @@
1
- /**
2
- * @param {any} rawSchema
3
- * @param {string} sourceSchemaId
4
- * @param {import('./index.js').CompileOptions} options
5
- * @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
6
- * @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
7
- * @param {Record<string, import('./types.js').SkeletonNode>} skeletonNodes
8
- * @param {string[]} validatePointers
9
- * @param {Record<string, string[]>} validationErrors
10
- * @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
11
- * @param {import('@json-layout/vocabulary').Expression[]} expressions
12
- * @param {string | number} key
13
- * @param {string} pointer
14
- * @param {boolean} required
15
- * @param {string} [condition]
16
- * @param {boolean} [dependent]
17
- * @param {string} [knownType]
18
- * @returns {import('./types.js').SkeletonNode}
19
- */
20
- export function makeSkeletonNode(rawSchema: any, sourceSchemaId: string, options: import("./index.js").CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import("./types.js").SkeletonTree>, skeletonNodes: Record<string, import("./types.js").SkeletonNode>, validatePointers: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import("@json-layout/vocabulary").NormalizedLayout>, expressions: import("@json-layout/vocabulary").Expression[], key: string | number, pointer: string, required: boolean, condition?: string, dependent?: boolean, knownType?: string): import("./types.js").SkeletonNode;
21
- //# sourceMappingURL=skeleton-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skeleton-node.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-node.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAlBW,GAAG,kBACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,cACnC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,oBACjD,MAAM,EAAE,oBACR,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,MAAM,CAAC,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,OAC9C,MAAM,GAAG,MAAM,WACf,MAAM,YACN,OAAO,cACP,MAAM,cACN,OAAO,cACP,MAAM,GACJ,OAAO,YAAY,EAAE,YAAY,CA4jB7C"}
@@ -1,19 +0,0 @@
1
- /**
2
- * @param {any} schema
3
- * @param {string} schemaId
4
- * @param {import('./index.js').CompileOptions} options
5
- * @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
6
- * @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
7
- * @param {Record<string, import('./types.js').SkeletonNode>} skeletonNodes
8
- * @param {string[]} validatePointers
9
- * @param {Record<string, string[]>} validationErrors
10
- * @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
11
- * @param {import('@json-layout/vocabulary').Expression[]} expressions
12
- * @param {string} pointer
13
- * @param {string} [defaultTitle]
14
- * @param {boolean} [deleteRootNodeTitle]
15
- * @param {string} [discriminator]
16
- * @returns {import('./types.js').SkeletonTree}
17
- */
18
- export function makeSkeletonTree(schema: any, schemaId: string, options: import("./index.js").CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import("./types.js").SkeletonTree>, skeletonNodes: Record<string, import("./types.js").SkeletonNode>, validatePointers: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import("@json-layout/vocabulary").NormalizedLayout>, expressions: import("@json-layout/vocabulary").Expression[], pointer: string, defaultTitle?: string, deleteRootNodeTitle?: boolean, discriminator?: string): import("./types.js").SkeletonTree;
19
- //# sourceMappingURL=skeleton-tree.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skeleton-tree.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-tree.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,yCAhBW,GAAG,YACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,cACnC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,oBACjD,MAAM,EAAE,oBACR,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,MAAM,CAAC,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,WAC9C,MAAM,iBACN,MAAM,wBACN,OAAO,kBACP,MAAM,GACJ,OAAO,YAAY,EAAE,YAAY,CAqD7C"}
@@ -1,61 +0,0 @@
1
- import type ajvModule from 'ajv/dist/2019.js';
2
- import type { MarkedOptions } from 'marked';
3
- import { type ComponentInfo, type BaseCompObject, type NormalizedLayout, type StateNodeOptionsBase, type Expression, type NormalizeOptions } from '@json-layout/vocabulary';
4
- import { type ValidateFunction, type SchemaObject } from 'ajv/dist/2019.js';
5
- import { type Display } from '../state/utils/display.js';
6
- import { type LocaleMessages } from '../i18n/types.js';
7
- export interface ParentContextExpression {
8
- data: unknown;
9
- parent: ParentContextExpression | undefined | null;
10
- }
11
- export type CompiledExpression = (data: any, dataAlias: any, options: StateNodeOptionsBase, context: object, display: Display, layout: BaseCompObject, readOnly: boolean, summary: boolean, validates: Record<string, ValidateFunction>, rootData?: unknown, parent?: ParentContextExpression | null) => any;
12
- export type CompileOptions = NormalizeOptions & {
13
- ajv: ajvModule.default;
14
- ajvOptions?: ajvModule.Options;
15
- markedOptions?: MarkedOptions;
16
- locale: string;
17
- defaultLocale: string;
18
- messages: LocaleMessages;
19
- xI18n: boolean;
20
- };
21
- export type PartialCompileOptions = Partial<Omit<CompileOptions, 'messages'>> & {
22
- messages?: Partial<LocaleMessages>;
23
- components?: Record<string, Omit<ComponentInfo, 'name'>>;
24
- };
25
- export interface CompiledLayout {
26
- options?: CompileOptions;
27
- schema?: SchemaObject;
28
- mainTree: string;
29
- skeletonTrees: Record<string, SkeletonTree>;
30
- skeletonNodes: Record<string, SkeletonNode>;
31
- validates: Record<string, ValidateFunction>;
32
- validationErrors: Record<string, string[]>;
33
- normalizedLayouts: Record<string, NormalizedLayout>;
34
- expressions: CompiledExpression[];
35
- locale: string;
36
- messages: LocaleMessages;
37
- components: Record<string, Omit<ComponentInfo, 'schema'>>;
38
- localizeErrors: (errors: ajvModule.ErrorObject[]) => void;
39
- }
40
- export interface SkeletonTree {
41
- title: string;
42
- root: string;
43
- refPointer: string;
44
- discriminatorValue?: string;
45
- }
46
- export interface SkeletonNode {
47
- title?: string;
48
- key: string | number;
49
- pointer: string;
50
- refPointer: string;
51
- pure: boolean;
52
- propertyKeys: string[];
53
- roPropertyKeys: string[];
54
- condition?: Expression;
55
- children?: string[];
56
- childrenTrees?: string[];
57
- discriminator?: string;
58
- required?: boolean;
59
- nullable?: boolean;
60
- }
61
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/compile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAA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IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
@@ -1,17 +0,0 @@
1
- /**
2
- * mutates a schema by replacing ~$locale~ in all refs
3
- * @param {import('ajv').SchemaObject} schema
4
- * @param {import('ajv/dist/2019.js').default} ajv
5
- * @param {string} [locale]
6
- * @param {string} [defaultLocale]
7
- * @returns {(schemaId: string, ref: string) => [any, string, string]}
8
- */
9
- export function resolveLocaleRefs(schema: import("ajv").SchemaObject, ajv: import("ajv/dist/2019.js").default, locale?: string, defaultLocale?: string): (schemaId: string, ref: string) => [any, string, string];
10
- /**
11
- * partially resolve a schema but not recursively, used for layout normalization
12
- * @param {import('ajv').SchemaObject} schema
13
- * @param {string} schemaId
14
- * @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
15
- */
16
- export function partialResolveRefs(schema: import("ajv").SchemaObject, schemaId: string, getJSONRef: (schemaId: string, ref: string) => [any, string, string]): any;
17
- //# sourceMappingURL=resolve-refs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-refs.d.ts","sourceRoot":"","sources":["../../../src/compile/utils/resolve-refs.js"],"names":[],"mappings":"AAyBA;;;;;;;GAOG;AACH,0CANW,OAAO,KAAK,EAAE,YAAY,OAC1B,OAAO,kBAAkB,EAAE,OAAO,WAClC,MAAM,kBACN,MAAM,GACJ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CASpE;AAuCD;;;;;GAKG;AACH,2CAJW,OAAO,KAAK,EAAE,YAAY,YAC1B,MAAM,cACN,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,OA+ClE"}
@@ -1,2 +0,0 @@
1
- export function resolveXI18n(schema: Record<string, any>, locale: string, defaultLocale?: string): void;
2
- //# sourceMappingURL=x-i18n.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-i18n.d.ts","sourceRoot":"","sources":["../../../src/compile/utils/x-i18n.js"],"names":[],"mappings":"AAOO,qCAJI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UACnB,MAAM,kBACN,MAAM,QAkBhB"}
@@ -1,24 +0,0 @@
1
- declare const _default: {
2
- errorOneOf: string;
3
- errorRequired: string;
4
- addItem: string;
5
- delete: string;
6
- edit: string;
7
- confirm: string;
8
- close: string;
9
- duplicate: string;
10
- copy: string;
11
- paste: string;
12
- sort: string;
13
- up: string;
14
- down: string;
15
- showHelp: string;
16
- default: string;
17
- name: string;
18
- examples: string;
19
- deprecated: string;
20
- keyboardDate: string;
21
- keyboardDateTime: string;
22
- };
23
- export default _default;
24
- //# sourceMappingURL=de.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/i18n/de.js"],"names":[],"mappings":""}
@@ -1,24 +0,0 @@
1
- declare const _default: {
2
- errorOneOf: string;
3
- errorRequired: string;
4
- addItem: string;
5
- delete: string;
6
- edit: string;
7
- confirm: string;
8
- close: string;
9
- duplicate: string;
10
- copy: string;
11
- paste: string;
12
- sort: string;
13
- up: string;
14
- down: string;
15
- showHelp: string;
16
- default: string;
17
- name: string;
18
- examples: string;
19
- deprecated: string;
20
- keyboardDate: string;
21
- keyboardDateTime: string;
22
- };
23
- export default _default;
24
- //# sourceMappingURL=en.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.js"],"names":[],"mappings":""}
@@ -1,24 +0,0 @@
1
- declare const _default: {
2
- errorOneOf: string;
3
- errorRequired: string;
4
- addItem: string;
5
- delete: string;
6
- edit: string;
7
- confirm: string;
8
- close: string;
9
- duplicate: string;
10
- copy: string;
11
- paste: string;
12
- sort: string;
13
- up: string;
14
- down: string;
15
- showHelp: string;
16
- default: string;
17
- name: string;
18
- examples: string;
19
- deprecated: string;
20
- keyboardDate: string;
21
- keyboardDateTime: string;
22
- };
23
- export default _default;
24
- //# sourceMappingURL=fr.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.js"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- declare const _default: {
2
- en: import("./types.js").LocaleMessages;
3
- fr: import("./types.js").LocaleMessages;
4
- nl: import("./types.js").LocaleMessages;
5
- de: import("./types.js").LocaleMessages;
6
- };
7
- export default _default;
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.js"],"names":[],"mappings":""}
@@ -1,24 +0,0 @@
1
- declare const _default: {
2
- errorOneOf: string;
3
- errorRequired: string;
4
- addItem: string;
5
- delete: string;
6
- confirm: string;
7
- edit: string;
8
- close: string;
9
- duplicate: string;
10
- copy: string;
11
- paste: string;
12
- sort: string;
13
- up: string;
14
- down: string;
15
- showHelp: string;
16
- default: string;
17
- name: string;
18
- examples: string;
19
- deprecated: string;
20
- keyboardDate: string;
21
- keyboardDateTime: string;
22
- };
23
- export default _default;
24
- //# sourceMappingURL=nl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../src/i18n/nl.js"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- import { type NormalizeMessages } from '@json-layout/vocabulary';
2
- export interface CompileOptionsMessages {
3
- errorOneOf: string;
4
- errorRequired: string;
5
- }
6
- export interface StateOptionsMessages {
7
- addItem: string;
8
- delete: string;
9
- confirm: string;
10
- edit: string;
11
- close: string;
12
- duplicate: string;
13
- copy: string;
14
- paste: string;
15
- sort: string;
16
- up: string;
17
- down: string;
18
- showHelp: string;
19
- keyboardDate: string;
20
- keyboardDateTime: string;
21
- }
22
- export type LocaleMessages = NormalizeMessages & CompileOptionsMessages & StateOptionsMessages;
23
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,sBAAsB,GAAG,oBAAoB,CAAA"}
package/types/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from "./compile/index.js";
2
- export * from "./state/index.js";
3
- export { default as i18n } from "./i18n/index.js";
4
- export { clone } from "@json-layout/vocabulary";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":""}