@fgv/ts-json 1.9.6 → 2.0.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ts-json.d.ts +1826 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +42 -0
- package/lib/index.js.map +1 -0
- package/lib/packlets/context/compositeJsonMap.d.ts +60 -0
- package/lib/packlets/context/compositeJsonMap.d.ts.map +1 -0
- package/lib/packlets/context/compositeJsonMap.js +105 -0
- package/lib/packlets/context/compositeJsonMap.js.map +1 -0
- package/lib/packlets/context/contextHelpers.d.ts +116 -0
- package/lib/packlets/context/contextHelpers.d.ts.map +1 -0
- package/lib/packlets/context/contextHelpers.js +191 -0
- package/lib/packlets/context/contextHelpers.js.map +1 -0
- package/lib/packlets/context/index.d.ts +4 -0
- package/lib/packlets/context/index.d.ts.map +1 -0
- package/lib/packlets/context/index.js +31 -0
- package/lib/packlets/context/index.js.map +1 -0
- package/lib/packlets/context/jsonContext.d.ts +84 -0
- package/lib/packlets/context/jsonContext.d.ts.map +1 -0
- package/lib/packlets/context/jsonContext.js +41 -0
- package/lib/packlets/context/jsonContext.js.map +1 -0
- package/lib/packlets/converters/converters.d.ts +54 -0
- package/lib/packlets/converters/converters.d.ts.map +1 -0
- package/lib/packlets/converters/converters.js +105 -0
- package/lib/packlets/converters/converters.js.map +1 -0
- package/lib/packlets/converters/file.d.ts +83 -0
- package/lib/packlets/converters/file.d.ts.map +1 -0
- package/lib/packlets/converters/file.js +162 -0
- package/lib/packlets/converters/file.js.map +1 -0
- package/lib/packlets/converters/index.d.ts +5 -0
- package/lib/packlets/converters/index.d.ts.map +1 -0
- package/lib/packlets/converters/index.js +56 -0
- package/lib/packlets/converters/index.js.map +1 -0
- package/lib/packlets/converters/jsonConverter.d.ts +276 -0
- package/lib/packlets/converters/jsonConverter.d.ts.map +1 -0
- package/lib/packlets/converters/jsonConverter.js +310 -0
- package/lib/packlets/converters/jsonConverter.js.map +1 -0
- package/lib/packlets/editor/common.d.ts +67 -0
- package/lib/packlets/editor/common.d.ts.map +1 -0
- package/lib/packlets/editor/common.js +3 -0
- package/lib/packlets/editor/common.js.map +1 -0
- package/lib/packlets/editor/index.d.ts +8 -0
- package/lib/packlets/editor/index.d.ts.map +1 -0
- package/{jsonEditor → lib/packlets/editor}/index.js +15 -9
- package/lib/packlets/editor/index.js.map +1 -0
- package/lib/packlets/editor/jsonEditor.d.ts +155 -0
- package/lib/packlets/editor/jsonEditor.d.ts.map +1 -0
- package/lib/packlets/editor/jsonEditor.js +332 -0
- package/lib/packlets/editor/jsonEditor.js.map +1 -0
- package/lib/packlets/editor/jsonEditorRule.d.ts +64 -0
- package/lib/packlets/editor/jsonEditorRule.d.ts.map +1 -0
- package/lib/packlets/editor/jsonEditorRule.js +54 -0
- package/lib/packlets/editor/jsonEditorRule.js.map +1 -0
- package/lib/packlets/editor/jsonEditorState.d.ts +125 -0
- package/lib/packlets/editor/jsonEditorState.d.ts.map +1 -0
- package/lib/packlets/editor/jsonEditorState.js +177 -0
- package/lib/packlets/editor/jsonEditorState.js.map +1 -0
- package/lib/packlets/editor/jsonReferenceMap.d.ts +303 -0
- package/lib/packlets/editor/jsonReferenceMap.d.ts.map +1 -0
- package/lib/packlets/editor/jsonReferenceMap.js +324 -0
- package/lib/packlets/editor/jsonReferenceMap.js.map +1 -0
- package/lib/packlets/editor/rules/conditional.d.ts +107 -0
- package/lib/packlets/editor/rules/conditional.d.ts.map +1 -0
- package/lib/packlets/editor/rules/conditional.js +167 -0
- package/lib/packlets/editor/rules/conditional.js.map +1 -0
- package/{jsonEditor → lib/packlets/editor}/rules/index.d.ts +1 -0
- package/lib/packlets/editor/rules/index.d.ts.map +1 -0
- package/lib/packlets/editor/rules/index.js +42 -0
- package/lib/packlets/editor/rules/index.js.map +1 -0
- package/lib/packlets/editor/rules/multivalue.d.ts +94 -0
- package/lib/packlets/editor/rules/multivalue.d.ts.map +1 -0
- package/lib/packlets/editor/rules/multivalue.js +141 -0
- package/lib/packlets/editor/rules/multivalue.js.map +1 -0
- package/lib/packlets/editor/rules/references.d.ts +69 -0
- package/lib/packlets/editor/rules/references.d.ts.map +1 -0
- package/lib/packlets/editor/rules/references.js +159 -0
- package/lib/packlets/editor/rules/references.js.map +1 -0
- package/lib/packlets/editor/rules/templates.d.ts +74 -0
- package/lib/packlets/editor/rules/templates.d.ts.map +1 -0
- package/lib/packlets/editor/rules/templates.js +127 -0
- package/lib/packlets/editor/rules/templates.js.map +1 -0
- package/lib/packlets/json/common.d.ts +85 -0
- package/lib/packlets/json/common.d.ts.map +1 -0
- package/lib/packlets/json/common.js +123 -0
- package/lib/packlets/json/common.js.map +1 -0
- package/lib/packlets/json/index.d.ts +2 -0
- package/lib/packlets/json/index.d.ts.map +1 -0
- package/lib/packlets/json/index.js +39 -0
- package/lib/packlets/json/index.js.map +1 -0
- package/package.json +58 -49
- package/common.d.ts +0 -58
- package/common.js +0 -116
- package/compositeJsonMap.d.ts +0 -47
- package/compositeJsonMap.js +0 -97
- package/contextHelpers.d.ts +0 -21
- package/contextHelpers.js +0 -101
- package/converters.d.ts +0 -37
- package/converters.js +0 -92
- package/file.d.ts +0 -60
- package/file.js +0 -140
- package/index.d.ts +0 -10
- package/index.js +0 -62
- package/jsonContext.d.ts +0 -74
- package/jsonContext.js +0 -40
- package/jsonConverter.d.ts +0 -229
- package/jsonConverter.js +0 -292
- package/jsonEditor/common.d.ts +0 -36
- package/jsonEditor/common.js +0 -3
- package/jsonEditor/index.d.ts +0 -5
- package/jsonEditor/jsonEditor.d.ts +0 -74
- package/jsonEditor/jsonEditor.js +0 -259
- package/jsonEditor/jsonEditorRule.d.ts +0 -47
- package/jsonEditor/jsonEditorRule.js +0 -44
- package/jsonEditor/jsonEditorState.d.ts +0 -24
- package/jsonEditor/jsonEditorState.js +0 -86
- package/jsonEditor/rules/conditional.d.ts +0 -84
- package/jsonEditor/rules/conditional.js +0 -146
- package/jsonEditor/rules/index.js +0 -21
- package/jsonEditor/rules/multivalue.d.ts +0 -78
- package/jsonEditor/rules/multivalue.js +0 -129
- package/jsonEditor/rules/references.d.ts +0 -62
- package/jsonEditor/rules/references.js +0 -158
- package/jsonEditor/rules/templates.d.ts +0 -56
- package/jsonEditor/rules/templates.js +0 -115
- package/jsonReferenceMap.d.ts +0 -138
- package/jsonReferenceMap.js +0 -202
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonConverter.js","sourceRoot":"","sources":["../../../src/packlets/converters/jsonConverter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAA4F;AAC5F,wCAMoB;AACpB,kCAAyE;AAEzE,sCAAyF;AA8GzF;;;;;;;;GAQG;AACH,SAAgB,gCAAgC,CAC9C,OAAwC;;IAExC,MAAM,QAAQ,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,SAAS,CAAC;IAC7C,MAAM,QAAQ,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,SAAS,CAAC;IAC7C,MAAM,QAAQ,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,CAAC,YAAY,CAAC,EAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,2BAAiB,CAAC;IAChG,MAAM,YAAY,GAAG,QAAQ,KAAK,SAAS,CAAC;IAC5C,MAAM,YAAY,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,QAAQ,CAAC;IAC3D,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,mBAAmB,mCAAI,YAAY,CAAC;IAEvE,MAAM,OAAO,GAA0B;QACrC,iBAAiB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,i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D,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7D,CAAC;;AA9BH,8CA+BC;AA9BC;;;GAGG;AACoB,6BAAW,mCAC7B,wBAAwB,CAAC,kBAAkB,KAC9C,aAAa,EAAE,IAAI,IACnB","sourcesContent":["/*\n * Copyright (c) 2020 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Conversion, Converter, Result, captureResult, fail, succeed } from '@fgv/ts-utils';\nimport {\n IJsonContext,\n IJsonReferenceMap,\n TemplateVars,\n TemplateVarsExtendFunction,\n defaultExtendVars\n} from '../context';\nimport { JsonArray, JsonObject, JsonValue, isJsonObject } from '../json';\n\nimport { EditorRules, IJsonEditorOptions, IJsonEditorRule, JsonEditor } from '../editor';\n\n/**\n * Conversion options for {@link JsonConverter | JsonConverter}.\n * @public\n */\nexport interface IJsonConverterOptions {\n /**\n * If `true` and if template variables are available,\n * then string property values will be rendered using\n * mustache and those variable values. Otherwise string\n * properties are copied without modification.\n *\n * Defaults to `true` if vars are supplied with options,\n * `false` otherwise.\n */\n useValueTemplates: boolean;\n\n /**\n * If `true` and if template variables are available,\n * then property names will be rendered using\n * mustache and those variable values. Otherwise\n * property names are copied without modification.\n *\n * Defaults to `true` if vars are supplied with options,\n * `false` otherwise.\n */\n useNameTemplates: boolean;\n\n /**\n * If `true` and if template variables are available,\n * then string property names will be considered for\n * conditionals.\n *\n * Default is to match {@link IJsonConverterOptions.useNameTemplates | useNameTemplates}.\n */\n useConditionalNames: boolean;\n\n /**\n * If `true` (default) then properties with unconditional names\n * (which start with !) are flattened.\n */\n flattenUnconditionalValues: boolean;\n\n /**\n * If `true` and if both template variables and a\n * context derivation function is available, then properties\n * which match the multi-value name pattern will be expanded.\n * Default matches {@link IJsonConverterOptions.useNameTemplates | useNameTemplates}.\n *\n * Default is `true` unless {@link IJsonConverterOptions.extendVars | extendVars} is\n * explicitly set to `undefined`.\n */\n useMultiValueTemplateNames: boolean;\n\n /**\n * The variables (mustache view) used to render templated string names\n * and properties. See the mustache documentation for details of mustache\n * syntax and the template view.\n */\n vars?: TemplateVars;\n\n /**\n * Method used to extend variables for children of an array node during\n * expansion. Default is to use a built-in extension function unless\n * {@link IJsonConverterOptions.extendVars | extendVars} is explicitly set to undefined.\n */\n extendVars?: TemplateVarsExtendFunction;\n\n /**\n * If `true` and if a {@link IJsonReferenceMap | references map} is supplied\n * in {@link IJsonConverterOptions.refs | refs}, then references in the source\n * object will be replaced with the corresponding value from the reference map.\n *\n * Default is `true` if {@link IJsonConverterOptions.refs | refs} are present in options,\n * `false` otherwise.\n */\n useReferences: boolean;\n\n /**\n * An optional {@link IJsonReferenceMap | reference map} used to insert any references\n * in the converted JSON.\n */\n refs?: IJsonReferenceMap;\n\n /**\n * If {@link IJsonConverterOptions.onInvalidPropertyName | onInvalidPropertyName} is `'error'`\n * (default) then any property name that is invalid after template rendering causes an error\n * and stops conversion. If {@link IJsonConverterOptions.onInvalidPropertyName | onInvalidPropertyName}\n * is `'ignore'`, then names which are invalid after template rendering are passed through unchanged.\n */\n onInvalidPropertyName: 'error' | 'ignore';\n\n /**\n * If {@link IJsonConverterOptions.onInvalidPropertyValue | onInvalidPropertyValue} is `'error'`\n * (default) then any illegal property value causes an error and stops conversion. If\n * {@link IJsonConverterOptions.onInvalidPropertyValue | onInvalidPropertyValue} is `'ignore'` then\n * any invalid property values are silently ignored.\n */\n onInvalidPropertyValue: 'error' | 'ignore';\n\n /**\n * If {@link IJsonConverterOptions.onUndefinedPropertyValue | onUndefinedPropertyValue} is `'error'`,\n * then any property with value `undefined` will cause an error and stop conversion. If\n * {@link IJsonConverterOptions.onUndefinedPropertyValue | onUndefinedPropertyValue} is `'ignore'` (default)\n * then any property with value `undefined` is silently ignored.\n */\n onUndefinedPropertyValue: 'error' | 'ignore';\n}\n\n/**\n * Merges an optionally supplied partial set of {@link IJsonConverterOptions | options} with\n * the default converter options and taking all dynamic rules into account (e.g. template usage enabled\n * if variables are supplied and disabled if not), producing a fully-resolved set of\n * {@link IJsonConverterOptions | IJsonConverterOptions}.\n * @param partial - An optional partial {@link IJsonConverterOptions | IJsonConverterOptions}\n * to be merged.\n * @public\n */\nexport function mergeDefaultJsonConverterOptions(\n partial?: Partial<IJsonConverterOptions>\n): IJsonConverterOptions {\n const haveVars = partial?.vars !== undefined;\n const haveRefs = partial?.refs !== undefined;\n const extender = partial?.hasOwnProperty('extendVars') ? partial.extendVars : defaultExtendVars;\n const haveExtender = extender !== undefined;\n const namesDefault = partial?.useNameTemplates ?? haveVars;\n const conditionsDefault = partial?.useConditionalNames ?? namesDefault;\n\n const options: IJsonConverterOptions = {\n useValueTemplates: partial?.useValueTemplates ?? haveVars,\n useNameTemplates: namesDefault,\n useConditionalNames: conditionsDefault,\n flattenUnconditionalValues: partial?.flattenUnconditionalValues ?? conditionsDefault,\n useMultiValueTemplateNames: partial?.useMultiValueTemplateNames ?? (haveExtender && namesDefault),\n useReferences: partial?.useReferences ?? haveRefs,\n onInvalidPropertyName: partial?.onInvalidPropertyName ?? 'error',\n onInvalidPropertyValue: partial?.onInvalidPropertyValue ?? 'error',\n onUndefinedPropertyValue: partial?.onUndefinedPropertyValue ?? 'ignore',\n extendVars: extender\n };\n if (partial?.vars) {\n options.vars = partial.vars;\n }\n if (partial?.refs) {\n options.refs = partial.refs;\n }\n return options;\n}\n\n/**\n * Creates a new {@link IJsonContext | JSON context} using values supplied in an optional partial\n * {@link IJsonConverterOptions | converter options}.\n * @param partial - Optional partial {@link IJsonConverterOptions | IJsonConverterOptions} used to\n * populate the context.\n * @public\n */\nexport function contextFromConverterOptions(\n partial?: Partial<IJsonConverterOptions>\n): IJsonContext | undefined {\n const context: IJsonContext = {};\n if (partial?.vars) {\n context.vars = partial.vars;\n }\n if (partial?.refs) {\n context.refs = partial.refs;\n }\n if (partial?.hasOwnProperty('extendVars')) {\n context.extendVars = partial.extendVars;\n }\n return context.vars || context.refs || context.extendVars ? context : undefined;\n}\n\n/**\n * Creates a new {@link Editor.JsonEditor | JsonEditor} from an optionally supplied partial\n * {@link IJsonConverterOptions | JSON converter options}.\n * Expands supplied options with default values and constructs an editor with\n * matching configuration and defined rules.\n * @param partial - Optional partial {@link IJsonConverterOptions | IJsonConverterOptions}\n * used to create the editor.\n * @public\n */\nexport function converterOptionsToEditor(partial?: Partial<IJsonConverterOptions>): Result<JsonEditor> {\n const converterOptions = mergeDefaultJsonConverterOptions(partial);\n const context = contextFromConverterOptions(partial);\n const validation = {\n onInvalidPropertyName: converterOptions.onInvalidPropertyName,\n onInvalidPropertyValue: converterOptions.onInvalidPropertyValue,\n onUndefinedPropertyValue: converterOptions.onUndefinedPropertyValue\n };\n const editorOptions: IJsonEditorOptions = { context, validation };\n\n const rules: IJsonEditorRule[] = [];\n if (converterOptions.useNameTemplates || converterOptions.useValueTemplates) {\n const templateOptions = {\n ...editorOptions,\n useNameTemplates: converterOptions.useNameTemplates,\n useValueTemplates: converterOptions.useValueTemplates\n };\n rules.push(new EditorRules.TemplatedJsonEditorRule(templateOptions));\n }\n if (converterOptions.useConditionalNames || converterOptions.flattenUnconditionalValues) {\n const conditionalOptions = {\n ...editorOptions,\n flattenUnconditionalValues: converterOptions.flattenUnconditionalValues\n };\n rules.push(new EditorRules.ConditionalJsonEditorRule(conditionalOptions));\n }\n if (converterOptions.useMultiValueTemplateNames) {\n rules.push(new EditorRules.MultiValueJsonEditorRule(editorOptions));\n }\n if (converterOptions.useReferences) {\n rules.push(new EditorRules.ReferenceJsonEditorRule(editorOptions));\n }\n\n return JsonEditor.create(editorOptions, rules);\n}\n\n/**\n * A thin wrapper to allow an arbitrary {@link Editor.JsonEditor | JsonEditor} to be used via the\n * \\@fgv/ts-utils `Converter` pattern.\n * @public\n */\nexport class JsonEditorConverter extends Conversion.BaseConverter<JsonValue, IJsonContext> {\n public readonly editor: JsonEditor;\n\n /**\n * Constructs a new {@link Editor.JsonEditor | JsonEditor}Converter which uses the supplied editor\n * @param editor -\n */\n public constructor(editor: JsonEditor) {\n super((from, __self, context) => this._convert(from, context), editor.options.context);\n this.editor = editor;\n }\n\n /**\n * Constructs a new {@link Editor.JsonEditor | JsonEditor}Converter which uses the supplied editor\n * @param editor -\n */\n public static createWithEditor(editor: JsonEditor): Result<JsonEditorConverter> {\n return captureResult(() => new JsonEditorConverter(editor));\n }\n\n /**\n * Gets a derived converter which fails if the resulting converted\n * {@link JsonValue | JsonValue} is not a {@link JsonObject | JsonObject}.\n */\n public object(): Converter<JsonObject, IJsonContext> {\n return this.map((jv) => {\n if (!isJsonObject(jv)) {\n return fail(`Cannot convert \"${JSON.stringify(jv)}\" to JSON object.`);\n }\n return succeed(jv);\n });\n }\n\n /**\n * Gets a derived converter which fails if the resulting converted\n * {@link JsonValue | JsonValue} is not a {@link JsonArray | JsonArray}.\n */\n public array(): Converter<JsonArray, IJsonContext> {\n return this.map((jv) => {\n if (!Array.isArray(jv) || typeof jv !== 'object') {\n return fail(`Cannot convert \"${JSON.stringify(jv)}\" to JSON array.`);\n }\n return succeed(jv);\n });\n }\n\n protected _convert(from: unknown, context?: IJsonContext): Result<JsonValue> {\n return this.editor.clone(from as JsonValue, context);\n }\n}\n\n/**\n * An \\@fgv/ts-utils `Converter` from `unknown` to type-safe JSON, optionally\n * rendering any string property names or values using mustache with a supplied view.\n * @public\n */\nexport class JsonConverter extends JsonEditorConverter {\n /**\n * Constructs a new {@link JsonConverter | JsonConverter} with\n * supplied or default options.\n * @param options - Optional partial {@link IJsonConverterOptions | options}\n * to configure the converter.\n */\n public constructor(options?: Partial<IJsonConverterOptions>) {\n const editor = converterOptionsToEditor(options).orThrow();\n super(editor);\n }\n\n /**\n * Creates a new {@link JsonConverter | JsonConverter}.\n * @param options - Optional partial {@link IJsonConverterOptions | options}\n * to configure the converter.\n * @returns `Success` with a new {@link JsonConverter | JsonConverter}, or `Failure`\n * with an informative message if an error occurs.\n */\n public static create(options?: Partial<IJsonConverterOptions>): Result<JsonConverter> {\n return captureResult(() => new JsonConverter(options));\n }\n}\n\n/**\n * Initialization options for a {@link TemplatedJsonConverter | TemplatedJsonConverter}.\n * @public\n */\nexport type TemplatedJsonConverterOptions = Omit<\n IJsonConverterOptions,\n 'useNameTemplates' | 'useValueTemplates' | 'useMultiValueTemplateNames'\n>;\n\n/**\n * An \\@fgv/ts-utils `Converter` from `unknown` to type-safe JSON\n * with mustache template rendering and multi-value property name rules enabled\n * regardless of initial context.\n * @public\n */\nexport class TemplatedJsonConverter extends JsonEditorConverter {\n /**\n * Default {@link IJsonConverterOptions | JSON converter options}\n * to enable templated conversion.\n */\n public static readonly templateOptions: Partial<IJsonConverterOptions> = {\n useNameTemplates: true,\n useValueTemplates: true,\n useMultiValueTemplateNames: true,\n useConditionalNames: false,\n flattenUnconditionalValues: false\n };\n\n /**\n * Constructs a new {@link TemplatedJsonConverter | TemplatedJsonConverter} with\n * supplied or default options.\n * @param options - Optional partial {@link TemplatedJsonConverterOptions | options}\n * to configure the converter.\n */\n public constructor(options?: Partial<TemplatedJsonConverterOptions>) {\n options = { ...options, ...TemplatedJsonConverter.templateOptions };\n const editor = converterOptionsToEditor(options).orThrow();\n super(editor);\n }\n\n /**\n * Constructs a new {@link TemplatedJsonConverter | TemplatedJsonConverter} with\n * supplied or default options.\n * @param options - Optional partial {@link TemplatedJsonConverterOptions | options}\n * to configure the converter.\n */\n public static create(options?: Partial<TemplatedJsonConverterOptions>): Result<JsonConverter> {\n return captureResult(() => new TemplatedJsonConverter(options));\n }\n}\n\n/**\n * Options for a {@link ConditionalJsonConverter | ConditionalJsonConverter}.\n * @public\n */\nexport type ConditionalJsonConverterOptions = Omit<TemplatedJsonConverterOptions, 'useConditionalNames'>;\n\n/**\n * An \\@fgv/ts-utils `Converter` from `unknown` to type-safe JSON with mustache\n * template rendering, multi-value property name and conditional property\n * name rules enabled regardless of initial context.\n * @public\n */\nexport class ConditionalJsonConverter extends JsonEditorConverter {\n /**\n * Default {@link IJsonConverterOptions | JSON converter options}\n * to enable conditional conversion.\n */\n public static readonly conditionalOptions: Partial<IJsonConverterOptions> = {\n ...TemplatedJsonConverter.templateOptions,\n useConditionalNames: true,\n flattenUnconditionalValues: true\n };\n\n /**\n * Constructs a new {@link ConditionalJsonConverter | ConditionalJsonConverter} with supplied or\n * default options.\n * @param options - Optional partial {@link ConditionalJsonConverterOptions | configuration or context}\n * for the converter.\n */\n public constructor(options?: Partial<ConditionalJsonConverterOptions>) {\n options = { ...options, ...ConditionalJsonConverter.conditionalOptions };\n const editor = converterOptionsToEditor(options).orThrow();\n super(editor);\n }\n\n /**\n * Constructs a new {@link ConditionalJsonConverter | ConditionalJsonConverter} with supplied or\n * default options.\n * @param options - Optional partial {@link ConditionalJsonConverterOptions | configuration or context}\n * for the converter.\n */\n public static create(options?: Partial<ConditionalJsonConverterOptions>): Result<JsonConverter> {\n return captureResult(() => new ConditionalJsonConverter(options));\n }\n}\n\n/**\n * Initialization options for a {@link RichJsonConverter | RichJsonConverter}.\n * @public\n */\nexport type RichJsonConverterOptions = Omit<ConditionalJsonConverterOptions, 'useReferences'>;\n\n/**\n * A \\@fgv/ts-utils `Converter` from `unknown` to type-safe JSON with mustache\n * template rendering, multi-value property name, conditional property\n * name, and external reference rules enabled regardless of initial context.\n * @public\n */\nexport class RichJsonConverter extends JsonEditorConverter {\n /**\n * Default {@link IJsonConverterOptions | JSON converter options}\n * to enable rich conversion.\n */\n public static readonly richOptions: Partial<IJsonConverterOptions> = {\n ...ConditionalJsonConverter.conditionalOptions,\n useReferences: true\n };\n\n /**\n * Constructs a new {@link RichJsonConverter | RichJsonConverter} with supplied or\n * default options.\n * @param options - Optional partial {@link RichJsonConverterOptions | configuration or context}\n * for the converter.\n */\n public constructor(options?: Partial<RichJsonConverterOptions>) {\n options = { ...options, ...RichJsonConverter.richOptions };\n const editor = converterOptionsToEditor(options).orThrow();\n super(editor);\n }\n\n /**\n * Constructs a new {@link RichJsonConverter | RichJsonConverter} with supplied or\n * default options\n * @param options - Optional partial {@link RichJsonConverterOptions | configuration or context}\n * for the converter.\n */\n public static create(options?: Partial<RichJsonConverterOptions>): Result<JsonConverter> {\n return captureResult(() => new RichJsonConverter(options));\n }\n}\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { DetailedResult } from '@fgv/ts-utils';
|
|
2
|
+
import { IJsonContext } from '../context';
|
|
3
|
+
import { JsonValue } from '../json';
|
|
4
|
+
/**
|
|
5
|
+
* Possible `DetailedResult` details for various editor operations.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type JsonEditFailureReason = 'ignore' | 'inapplicable' | 'edited' | 'error';
|
|
9
|
+
/**
|
|
10
|
+
* Possible `DetailedResult` details for property edit operations.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type JsonPropertyEditFailureReason = JsonEditFailureReason | 'deferred';
|
|
14
|
+
/**
|
|
15
|
+
* Possible validation rules for a {@link Editor.JsonEditor | JsonEditor}.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type JsonEditorValidationRules = 'invalidPropertyName' | 'invalidPropertyValue' | 'undefinedPropertyValue';
|
|
19
|
+
/**
|
|
20
|
+
* Validation options for a {@link Editor.JsonEditor | JsonEditor}.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface IJsonEditorValidationOptions {
|
|
24
|
+
/**
|
|
25
|
+
* If `onInvalidPropertyName` is `'error'` (default) then any property name
|
|
26
|
+
* that is invalid after template rendering causes an error and stops
|
|
27
|
+
* conversion. If `onInvalidPropertyName` is `'ignore'`, then names which
|
|
28
|
+
* are invalid after template rendering are passed through unchanged.
|
|
29
|
+
*/
|
|
30
|
+
onInvalidPropertyName: 'error' | 'ignore';
|
|
31
|
+
/**
|
|
32
|
+
* If `onInvalidPropertyValue` is `'error'` (default) then any illegal
|
|
33
|
+
* property value other than `undefined` causes an error and stops
|
|
34
|
+
* conversion. If `onInvalidPropertyValue` is `'ignore'` then any
|
|
35
|
+
* invalid property values are silently ignored.
|
|
36
|
+
*/
|
|
37
|
+
onInvalidPropertyValue: 'error' | 'ignore';
|
|
38
|
+
/**
|
|
39
|
+
* If `onUndefinedPropertyValue` is `'error'`, then any property with
|
|
40
|
+
* value `undefined` will cause an error and stop conversion. If
|
|
41
|
+
* `onUndefinedPropertyValue` is `'ignore'` (default) then any
|
|
42
|
+
* property with value `undefined` is silently ignored.
|
|
43
|
+
*/
|
|
44
|
+
onUndefinedPropertyValue: 'error' | 'ignore';
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Initialization options for a {@link Editor.JsonEditor | JsonEditor}.
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export interface IJsonEditorOptions {
|
|
51
|
+
context?: IJsonContext;
|
|
52
|
+
validation: IJsonEditorValidationOptions;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A specialized JSON editor which does a deep clone of a supplied {@link JsonValue | JsonValue}.
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export interface IJsonCloneEditor {
|
|
59
|
+
/**
|
|
60
|
+
* Returns a deep clone of a supplied {@link JsonValue | JsonValue}.
|
|
61
|
+
* @param src - The {@link JsonValue | JsonValue} to be cloned.
|
|
62
|
+
* @param context - An optional {@link IJsonContext | JSON context} used for clone
|
|
63
|
+
* conversion operations.
|
|
64
|
+
*/
|
|
65
|
+
clone(src: JsonValue, context?: IJsonContext): DetailedResult<JsonValue, JsonEditFailureReason>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/packlets/editor/common.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,GAAG,UAAU,CAAC;AAE/E;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GACjC,qBAAqB,GACrB,sBAAsB,GACtB,wBAAwB,CAAC;AAE7B;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;;OAKG;IACH,qBAAqB,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE1C;;;;;OAKG;IACH,sBAAsB,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE3C;;;;;OAKG;IACH,wBAAwB,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,UAAU,EAAE,4BAA4B,CAAC;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;CACjG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/packlets/editor/common.ts"],"names":[],"mappings":"","sourcesContent":["/*\n * Copyright (c) 2020 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { DetailedResult } from '@fgv/ts-utils';\nimport { IJsonContext } from '../context';\nimport { JsonValue } from '../json';\n\n/**\n * Possible `DetailedResult` details for various editor operations.\n * @public\n */\nexport type JsonEditFailureReason = 'ignore' | 'inapplicable' | 'edited' | 'error';\n\n/**\n * Possible `DetailedResult` details for property edit operations.\n * @public\n */\nexport type JsonPropertyEditFailureReason = JsonEditFailureReason | 'deferred';\n\n/**\n * Possible validation rules for a {@link Editor.JsonEditor | JsonEditor}.\n * @public\n */\nexport type JsonEditorValidationRules =\n | 'invalidPropertyName'\n | 'invalidPropertyValue'\n | 'undefinedPropertyValue';\n\n/**\n * Validation options for a {@link Editor.JsonEditor | JsonEditor}.\n * @public\n */\nexport interface IJsonEditorValidationOptions {\n /**\n * If `onInvalidPropertyName` is `'error'` (default) then any property name\n * that is invalid after template rendering causes an error and stops\n * conversion. If `onInvalidPropertyName` is `'ignore'`, then names which\n * are invalid after template rendering are passed through unchanged.\n */\n onInvalidPropertyName: 'error' | 'ignore';\n\n /**\n * If `onInvalidPropertyValue` is `'error'` (default) then any illegal\n * property value other than `undefined` causes an error and stops\n * conversion. If `onInvalidPropertyValue` is `'ignore'` then any\n * invalid property values are silently ignored.\n */\n onInvalidPropertyValue: 'error' | 'ignore';\n\n /**\n * If `onUndefinedPropertyValue` is `'error'`, then any property with\n * value `undefined` will cause an error and stop conversion. If\n * `onUndefinedPropertyValue` is `'ignore'` (default) then any\n * property with value `undefined` is silently ignored.\n */\n onUndefinedPropertyValue: 'error' | 'ignore';\n}\n\n/**\n * Initialization options for a {@link Editor.JsonEditor | JsonEditor}.\n * @public\n */\nexport interface IJsonEditorOptions {\n context?: IJsonContext;\n validation: IJsonEditorValidationOptions;\n}\n\n/**\n * A specialized JSON editor which does a deep clone of a supplied {@link JsonValue | JsonValue}.\n * @public\n */\nexport interface IJsonCloneEditor {\n /**\n * Returns a deep clone of a supplied {@link JsonValue | JsonValue}.\n * @param src - The {@link JsonValue | JsonValue} to be cloned.\n * @param context - An optional {@link IJsonContext | JSON context} used for clone\n * conversion operations.\n */\n clone(src: JsonValue, context?: IJsonContext): DetailedResult<JsonValue, JsonEditFailureReason>;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as EditorRules from './rules';
|
|
2
|
+
export * from './common';
|
|
3
|
+
export { JsonEditor } from './jsonEditor';
|
|
4
|
+
export { IJsonEditorRule } from './jsonEditorRule';
|
|
5
|
+
export { JsonEditorState } from './jsonEditorState';
|
|
6
|
+
export { IReferenceMapKeyPolicyValidateOptions, PrefixedJsonMap, ReferenceMapKeyPolicy, SimpleJsonMap } from './jsonReferenceMap';
|
|
7
|
+
export { EditorRules };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packlets/editor/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,WAAW,MAAM,SAAS,CAAC;AAEvC,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,qCAAqC,EACrC,eAAe,EACf,qBAAqB,EACrB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -36,9 +36,6 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
40
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
41
|
-
};
|
|
42
39
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
43
40
|
if (mod && mod.__esModule) return mod;
|
|
44
41
|
var result = {};
|
|
@@ -46,11 +43,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
46
43
|
__setModuleDefault(result, mod);
|
|
47
44
|
return result;
|
|
48
45
|
};
|
|
46
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
47
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
48
|
+
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.
|
|
50
|
+
exports.EditorRules = exports.SimpleJsonMap = exports.ReferenceMapKeyPolicy = exports.PrefixedJsonMap = exports.JsonEditorState = exports.JsonEditor = void 0;
|
|
51
|
+
const EditorRules = __importStar(require("./rules"));
|
|
52
|
+
exports.EditorRules = EditorRules;
|
|
51
53
|
__exportStar(require("./common"), exports);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
exports
|
|
56
|
-
|
|
54
|
+
var jsonEditor_1 = require("./jsonEditor");
|
|
55
|
+
Object.defineProperty(exports, "JsonEditor", { enumerable: true, get: function () { return jsonEditor_1.JsonEditor; } });
|
|
56
|
+
var jsonEditorState_1 = require("./jsonEditorState");
|
|
57
|
+
Object.defineProperty(exports, "JsonEditorState", { enumerable: true, get: function () { return jsonEditorState_1.JsonEditorState; } });
|
|
58
|
+
var jsonReferenceMap_1 = require("./jsonReferenceMap");
|
|
59
|
+
Object.defineProperty(exports, "PrefixedJsonMap", { enumerable: true, get: function () { return jsonReferenceMap_1.PrefixedJsonMap; } });
|
|
60
|
+
Object.defineProperty(exports, "ReferenceMapKeyPolicy", { enumerable: true, get: function () { return jsonReferenceMap_1.ReferenceMapKeyPolicy; } });
|
|
61
|
+
Object.defineProperty(exports, "SimpleJsonMap", { enumerable: true, get: function () { return jsonReferenceMap_1.SimpleJsonMap; } });
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/packlets/editor/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qDAAuC;AAY9B,kCAAW;AAVpB,2CAAyB;AACzB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AAEnB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,uDAK4B;AAH1B,mHAAA,eAAe,OAAA;AACf,yHAAA,qBAAqB,OAAA;AACrB,iHAAA,aAAa,OAAA","sourcesContent":["/*\n * Copyright (c) 2023 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as EditorRules from './rules';\n\nexport * from './common';\nexport { JsonEditor } from './jsonEditor';\nexport { IJsonEditorRule } from './jsonEditorRule';\nexport { JsonEditorState } from './jsonEditorState';\nexport {\n IReferenceMapKeyPolicyValidateOptions,\n PrefixedJsonMap,\n ReferenceMapKeyPolicy,\n SimpleJsonMap\n} from './jsonReferenceMap';\nexport { EditorRules };\n"]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { DetailedResult, Result } from '@fgv/ts-utils';
|
|
2
|
+
import { IJsonContext } from '../context';
|
|
3
|
+
import { JsonArray, JsonObject, JsonValue } from '../json';
|
|
4
|
+
import { IJsonCloneEditor, IJsonEditorOptions, JsonEditFailureReason, JsonPropertyEditFailureReason } from './common';
|
|
5
|
+
import { IJsonEditorRule } from './jsonEditorRule';
|
|
6
|
+
import { JsonEditorState } from './jsonEditorState';
|
|
7
|
+
/**
|
|
8
|
+
* A {@link JsonEditor | JsonEditor} can be used to edit JSON objects in place or to
|
|
9
|
+
* clone any JSON value, applying a default context and optional set of editor rules that
|
|
10
|
+
* were supplied at initialization.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare class JsonEditor implements IJsonCloneEditor {
|
|
14
|
+
/**
|
|
15
|
+
* Default singleton {@link Editor.JsonEditor | JsonEditor}.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
protected static _default?: JsonEditor;
|
|
19
|
+
/**
|
|
20
|
+
* Full set of {@link Editor.IJsonEditorOptions | editor options} in effect for this editor.
|
|
21
|
+
*/
|
|
22
|
+
options: IJsonEditorOptions;
|
|
23
|
+
/**
|
|
24
|
+
* The set of {@link Editor.IJsonEditorRule | editor rules} applied by this editor.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
protected _rules: IJsonEditorRule[];
|
|
28
|
+
/**
|
|
29
|
+
* Protected constructor for {@link Editor.JsonEditor | JsonEditor} and derived classes.
|
|
30
|
+
* External consumers should instantiate via the {@link Editor.JsonEditor.create | create static method}.
|
|
31
|
+
* @param options - Optional partial {@link Editor.IJsonEditorOptions | editor options} for the
|
|
32
|
+
* constructed editor.
|
|
33
|
+
* @param rules - Any {@link Editor.IJsonEditorRule | editor rules} to be applied by the editor.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
protected constructor(options?: Partial<IJsonEditorOptions>, rules?: IJsonEditorRule[]);
|
|
37
|
+
/**
|
|
38
|
+
* Default singleton {@link Editor.JsonEditor | JsonEditor} for simple use. Applies all rules
|
|
39
|
+
* but with no default context.
|
|
40
|
+
*/
|
|
41
|
+
static get default(): JsonEditor;
|
|
42
|
+
/**
|
|
43
|
+
* Constructs a new {@link Editor.JsonEditor | JsonEditor}.
|
|
44
|
+
* @param options - Optional partial {@link Editor.IJsonEditorOptions | editor options} for the
|
|
45
|
+
* constructed editor.
|
|
46
|
+
* @param rules - Optional set of {@link Editor.IJsonEditorRule | editor rules} to be applied by the editor.
|
|
47
|
+
* @readonly A new {@link Editor.JsonEditor | JsonEditor}.
|
|
48
|
+
*/
|
|
49
|
+
static create(options?: Partial<IJsonEditorOptions>, rules?: IJsonEditorRule[]): Result<JsonEditor>;
|
|
50
|
+
/**
|
|
51
|
+
* Gets the default set of rules to be applied for a given set of options.
|
|
52
|
+
* By default, all available rules (templates, conditionals, multi-value and references)
|
|
53
|
+
* are applied.
|
|
54
|
+
* @param options - Optional partial {@link Editor.IJsonEditorOptions | editor options} for
|
|
55
|
+
* all rules.
|
|
56
|
+
* @returns Default {@link Editor.IJsonEditorRule | editor rules} with any supplied options
|
|
57
|
+
* applied.
|
|
58
|
+
*/
|
|
59
|
+
static getDefaultRules(options?: IJsonEditorOptions): Result<IJsonEditorRule[]>;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
protected static _getDefaultOptions(options?: Partial<IJsonEditorOptions>): Result<IJsonEditorOptions>;
|
|
64
|
+
/**
|
|
65
|
+
* Merges a supplied source object into a supplied target, updating the target object.
|
|
66
|
+
* @param target - The target {@link JsonObject | object} to be updated
|
|
67
|
+
* @param src - The source {@link JsonObject | object} to be merged
|
|
68
|
+
* @param runtimeContext - An optional {@link IJsonContext | IJsonContext} supplying variables
|
|
69
|
+
* and references.
|
|
70
|
+
* @returns `Success` with the original source {@link JsonObject | object} if merge was successful.
|
|
71
|
+
* Returns `Failure` with details if an error occurs.
|
|
72
|
+
*/
|
|
73
|
+
mergeObjectInPlace(target: JsonObject, src: JsonObject, runtimeContext?: IJsonContext): Result<JsonObject>;
|
|
74
|
+
/**
|
|
75
|
+
* Merges multiple supplied source objects into a supplied target, updating the target
|
|
76
|
+
* object and using the default context supplied at creation time.
|
|
77
|
+
* @param target - The target {@link JsonObject | object} to be updated
|
|
78
|
+
* @param srcObjects - {@link JsonObject | Objects} to be merged into the target object, in the order
|
|
79
|
+
* supplied.
|
|
80
|
+
* @returns `Success` with the original source {@link JsonObject | object} if merge was successful.
|
|
81
|
+
* Returns `Failure` with details if an error occurs.
|
|
82
|
+
*/
|
|
83
|
+
mergeObjectsInPlace(target: JsonObject, srcObjects: JsonObject[]): Result<JsonObject>;
|
|
84
|
+
/**
|
|
85
|
+
* Merges multiple supplied source objects into a supplied target, updating the target
|
|
86
|
+
* object and using an optional {@link IJsonContext | context} supplied in the call.
|
|
87
|
+
* @param context - An optional {@link IJsonContext | IJsonContext} supplying variables and
|
|
88
|
+
* references.
|
|
89
|
+
* @param base - The base {@link JsonObject | object} to be updated
|
|
90
|
+
* @param srcObjects - Objects to be merged into the target object, in the order supplied.
|
|
91
|
+
* @returns `Success` with the original source {@link JsonObject | object} if merge was successful.
|
|
92
|
+
* Returns `Failure` with details if an error occurs.
|
|
93
|
+
*/
|
|
94
|
+
mergeObjectsInPlaceWithContext(context: IJsonContext | undefined, base: JsonObject, srcObjects: JsonObject[]): Result<JsonObject>;
|
|
95
|
+
/**
|
|
96
|
+
* Deep clones a supplied {@link JsonValue | JSON value}, applying all editor rules and a default
|
|
97
|
+
* or optionally supplied context
|
|
98
|
+
* @param src - The {@link JsonValue | JsonValue} to be cloned.
|
|
99
|
+
* @param context - An optional {@link IJsonContext | JSON context} supplying variables and references.
|
|
100
|
+
*/
|
|
101
|
+
clone(src: JsonValue, context?: IJsonContext): DetailedResult<JsonValue, JsonEditFailureReason>;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @param target -
|
|
105
|
+
* @param src -
|
|
106
|
+
* @param state -
|
|
107
|
+
* @returns
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
protected _mergeObjectInPlace(target: JsonObject, src: JsonObject, state: JsonEditorState): Result<JsonObject>;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @param src -
|
|
114
|
+
* @param context -
|
|
115
|
+
* @returns
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
protected _cloneArray(src: JsonArray, context?: IJsonContext): DetailedResult<JsonArray, JsonEditFailureReason>;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @param target -
|
|
122
|
+
* @param key -
|
|
123
|
+
* @param newValue -
|
|
124
|
+
* @param state -
|
|
125
|
+
* @returns
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
protected _mergeClonedProperty(target: JsonObject, key: string, newValue: JsonValue, state: JsonEditorState): DetailedResult<JsonValue, JsonEditFailureReason>;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @param key -
|
|
132
|
+
* @param value -
|
|
133
|
+
* @param state -
|
|
134
|
+
* @returns
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
protected _editProperty(key: string, value: JsonValue, state: JsonEditorState): DetailedResult<JsonObject, JsonPropertyEditFailureReason>;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @param value -
|
|
141
|
+
* @param state -
|
|
142
|
+
* @returns
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
protected _editValue(value: JsonValue, state: JsonEditorState): DetailedResult<JsonValue, JsonEditFailureReason>;
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @param target -
|
|
149
|
+
* @param state -
|
|
150
|
+
* @returns
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
protected _finalizeAndMerge(target: JsonObject, state: JsonEditorState): DetailedResult<JsonObject, JsonEditFailureReason>;
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=jsonEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonEditor.d.ts","sourceRoot":"","sources":["../../../src/packlets/editor/jsonEditor.ts"],"names":[],"mappings":"AAsBA,OAAO,EACL,cAAc,EACd,MAAM,EAQP,MAAM,eAAe,CAAC;A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