@streamline-pulse/formkrafter-core 0.22.0 → 0.24.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.
@@ -1,5 +1,5 @@
1
- import type { BrickSpec } from "../utils/brick-spec";
2
- import type { SpecUpdate } from "./ops";
1
+ import type { BrickSpec } from "../utils/brick-spec.js";
2
+ import type { SpecUpdate } from "./ops.js";
3
3
  export declare class SpecHistory {
4
4
  private past;
5
5
  private future;
package/dist/ops/ops.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { type Operation } from "../utils/fast-json-patch";
2
- import type { BrickSpec } from "../utils/brick-spec";
3
- import type { BrickBaseConfigs } from "../utils/common-brick-props";
4
- import type { BrickStyles } from "../utils/brick-styles";
5
- import type { Validation } from "../validators/validation";
6
- import type { Rule } from "../rules/rule";
1
+ import { type Operation } from "../utils/fast-json-patch.js";
2
+ import type { BrickSpec } from "../utils/brick-spec.js";
3
+ import type { BrickBaseConfigs } from "../utils/common-brick-props.js";
4
+ import type { BrickStyles } from "../utils/brick-styles.js";
5
+ import type { Validation } from "../validators/validation.js";
6
+ import type { Rule } from "../rules/rule.js";
7
7
  export type SpecUpdate = {
8
8
  spec: BrickSpec;
9
9
  patches: Operation[];
@@ -1,3 +1,3 @@
1
- import type { BrickSpec } from "../utils/brick-spec";
1
+ import type { BrickSpec } from "../utils/brick-spec.js";
2
2
  export declare function pointerFromPath(path: string): string;
3
3
  export declare function getBrickAt(spec: BrickSpec, path: string): BrickSpec | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { Operation } from "fast-json-patch";
2
- import type { BrickSpec } from "../utils/brick-spec";
2
+ import type { BrickSpec } from "../utils/brick-spec.js";
3
3
  export declare function ensureBrickUids(spec: BrickSpec): BrickSpec;
4
4
  export declare function stripBrickUids(spec: BrickSpec): BrickSpec;
5
5
  export declare function stripUidsFromPatches(patches: Operation[]): Operation[];
@@ -1,5 +1,5 @@
1
1
  import type { RulesLogic } from "json-logic-js";
2
- import type { Effect } from "./effect";
2
+ import type { Effect } from "./effect.js";
3
3
  export type Rule = {
4
4
  name: string;
5
5
  type: "jsonLogic" | "javaScript";
@@ -1,8 +1,8 @@
1
- import { type JsRunnerService } from "./js_runner_service";
2
- import { type DataSourceService } from "./data_source_service";
3
- import { type FileUploadService } from "./file_upload_service";
4
- import { type SpecSourceService } from "./spec_source_service";
5
- import { type OptionSourceService } from "./option_source_service";
1
+ import { type JsRunnerService } from "./js_runner_service.js";
2
+ import { type DataSourceService } from "./data_source_service.js";
3
+ import { type FileUploadService } from "./file_upload_service.js";
4
+ import { type SpecSourceService } from "./spec_source_service.js";
5
+ import { type OptionSourceService } from "./option_source_service.js";
6
6
  export interface Services {
7
7
  jsRunnerService: JsRunnerService;
8
8
  dataSourceService: DataSourceService;
@@ -1,4 +1,4 @@
1
- import type { BrickSpec } from "../utils/brick-spec";
1
+ import type { BrickSpec } from "../utils/brick-spec.js";
2
2
  export interface SpecSourceService {
3
3
  fetchSpec(ref: string): Promise<BrickSpec>;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import { type Options } from "acorn";
2
- import type { JsRunnerService, JsValidationResult } from "./js_runner_service";
2
+ import type { JsRunnerService, JsValidationResult } from "./js_runner_service.js";
3
3
  export declare class UnsafeEvalJsRunnerService implements JsRunnerService {
4
4
  validateJs(js: string, options?: Options): JsValidationResult;
5
5
  eval(js: string, scope?: Record<string, unknown>): unknown;
@@ -1,3 +1,3 @@
1
- import type { BrickSpec } from './brick-spec';
1
+ import type { BrickSpec } from './brick-spec.js';
2
2
  export declare function getBrickData(brickSpec: BrickSpec, data?: Record<string, unknown>): unknown;
3
3
  export declare function wrapBrickData(brickSpec: BrickSpec, value: unknown): Record<string, unknown> | undefined;
@@ -1,5 +1,5 @@
1
- import type { BrickSpec } from './brick-spec';
2
- import type { BrickType } from './brick-type';
1
+ import type { BrickSpec } from './brick-spec.js';
2
+ import type { BrickType } from './brick-type.js';
3
3
  export interface BrickMold {
4
4
  type: BrickType;
5
5
  id: string;
@@ -1,10 +1,10 @@
1
- import type { JSONSchemaType } from "../validators/json-schema-type";
2
- import type { Validator } from "../validators/validator";
3
- import type { Validation } from "../validators/validation";
4
- import type { Rule } from "../rules/rule";
5
- import type { BrickType } from "./brick-type";
6
- import type { BrickBaseConfigs } from "./common-brick-props";
7
- import type { BrickStyles } from "../utils/brick-styles";
1
+ import type { JSONSchemaType } from "../validators/json-schema-type.js";
2
+ import type { Validator } from "../validators/validator.js";
3
+ import type { Validation } from "../validators/validation.js";
4
+ import type { Rule } from "../rules/rule.js";
5
+ import type { BrickType } from "./brick-type.js";
6
+ import type { BrickBaseConfigs } from "./common-brick-props.js";
7
+ import type { BrickStyles } from "../utils/brick-styles.js";
8
8
  export interface BrickSpec {
9
9
  type: BrickType;
10
10
  dataType?: JSONSchemaType;
@@ -1,4 +1,4 @@
1
- import type { BrickSpec } from "./brick-spec";
1
+ import type { BrickSpec } from "./brick-spec.js";
2
2
  export interface BrickBaseConfigs {
3
3
  uid?: string;
4
4
  key?: string;
@@ -1,4 +1,4 @@
1
- import type { BrickMold } from './brick-mold';
1
+ import type { BrickMold } from './brick-mold.js';
2
2
  export type BrickMoldDropType = {
3
3
  type: 'BrickMold';
4
4
  brickMold: BrickMold;
@@ -1,5 +1,5 @@
1
- import type { BrickSpec } from "./brick-spec";
2
- import type { SpecSourceService } from "../services/spec_source_service";
1
+ import type { BrickSpec } from "./brick-spec.js";
2
+ import type { SpecSourceService } from "../services/spec_source_service.js";
3
3
  export interface ExpandSpecOptions {
4
4
  specSourceService?: SpecSourceService;
5
5
  maxDepth?: number;
@@ -1,6 +1,6 @@
1
- import type { SelectOption } from "./options";
2
- import type { BrickSpec } from "./brick-spec";
3
- import type { JSONSchemaType } from "../validators/json-schema-type";
1
+ import type { SelectOption } from "./options.js";
2
+ import type { BrickSpec } from "./brick-spec.js";
3
+ import type { JSONSchemaType } from "../validators/json-schema-type.js";
4
4
  /** One data-bearing brick of a spec, described independently of any renderer. */
5
5
  export interface FieldDescriptor {
6
6
  /** Data key (`configs.key`). */
@@ -1,4 +1,4 @@
1
- import type { BrickSpec } from "./brick-spec";
1
+ import type { BrickSpec } from "./brick-spec.js";
2
2
  export type SpecIssueCode = "validations-without-data-type" | "input-without-key" | "duplicate-key" | "collection-without-children";
3
3
  export interface SpecIssue {
4
4
  code: SpecIssueCode;
@@ -1,4 +1,4 @@
1
- import type { BrickSpec } from "./brick-spec";
1
+ import type { BrickSpec } from "./brick-spec.js";
2
2
  export type RecapItem = {
3
3
  kind: "field";
4
4
  label: string;
@@ -1,5 +1,5 @@
1
- import type { Validator } from "./validator";
2
- import type { LocalizedText } from "../utils/localized-text";
1
+ import type { Validator } from "./validator.js";
2
+ import type { LocalizedText } from "../utils/localized-text.js";
3
3
  export type Validation = {
4
4
  validator: Validator;
5
5
  message?: LocalizedText;
@@ -1,4 +1,4 @@
1
- import type { BrickSpec } from "../utils/brick-spec";
1
+ import type { BrickSpec } from "../utils/brick-spec.js";
2
2
  export type Validator = "required" | "minLength" | "maxLength" | "min" | "max" | "pattern" | "minItems" | "maxItems" | "email" | "url" | "custom";
3
3
  export type ValidationResult = {
4
4
  valid: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamline-pulse/formkrafter-core",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "description": "Framework-agnostic core for FormKrafter: form specs, RFC 6902 ops with undo/redo, Ajv validation, sandboxed rules engine and injectable services",
5
5
  "license": "MIT",
6
6
  "type": "module",