@open-pioneer/feature-editing 1.3.0-dev.20260512095810 → 1.3.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 (41) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/api/editor/context.d.ts +16 -18
  3. package/api/editor/context.js +3 -3
  4. package/api/editor/context.js.map +1 -1
  5. package/api/fields/standardFieldConfigs.d.ts +2 -1
  6. package/api/model/FeatureTemplate.d.ts +2 -2
  7. package/i18n/de.yaml +13 -0
  8. package/i18n/en.yaml +15 -2
  9. package/implementation/FeatureEditor.js +6 -6
  10. package/implementation/FeatureEditor.js.map +1 -1
  11. package/implementation/components/action-selector/SelectButton.js +1 -1
  12. package/implementation/components/action-selector/SelectButton.js.map +1 -1
  13. package/implementation/components/controls/NumberFieldControl.js +1 -0
  14. package/implementation/components/controls/NumberFieldControl.js.map +1 -1
  15. package/implementation/components/property-editor/CancelConfirmationDialog.d.ts +8 -0
  16. package/implementation/components/property-editor/CancelConfirmationDialog.js +51 -0
  17. package/implementation/components/property-editor/CancelConfirmationDialog.js.map +1 -0
  18. package/implementation/components/property-editor/PropertyEditor.d.ts +10 -5
  19. package/implementation/components/property-editor/PropertyEditor.js +99 -21
  20. package/implementation/components/property-editor/PropertyEditor.js.map +1 -1
  21. package/implementation/components/property-editor/PropertyField.js +30 -4
  22. package/implementation/components/property-editor/PropertyField.js.map +1 -1
  23. package/implementation/components/property-editor/PropertyForm.d.ts +4 -7
  24. package/implementation/components/property-editor/PropertyForm.js +49 -67
  25. package/implementation/components/property-editor/PropertyForm.js.map +1 -1
  26. package/implementation/context/PropertyFormContext.d.ts +26 -10
  27. package/implementation/context/PropertyFormContext.js +96 -21
  28. package/implementation/context/PropertyFormContext.js.map +1 -1
  29. package/implementation/context/usePropertyFormContext.d.ts +17 -2
  30. package/implementation/context/usePropertyFormContext.js +17 -3
  31. package/implementation/context/usePropertyFormContext.js.map +1 -1
  32. package/implementation/geometry-editing/controller/EditingController.js +3 -0
  33. package/implementation/geometry-editing/controller/EditingController.js.map +1 -1
  34. package/implementation/geometry-editing/interactions/BaseInteraction.js +2 -0
  35. package/implementation/geometry-editing/interactions/BaseInteraction.js.map +1 -1
  36. package/index.d.ts +1 -1
  37. package/index.js +1 -1
  38. package/package.json +13 -13
  39. package/implementation/context/PropertyFormContextProvider.d.ts +0 -9
  40. package/implementation/context/PropertyFormContextProvider.js +0 -18
  41. package/implementation/context/PropertyFormContextProvider.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"EditingController.js","sources":["EditingController.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { LayerFactory, MapModel } from \"@open-pioneer/map\";\nimport type { Vector as VectorSource } from \"ol/source\";\nimport type { InteractionOptions } from \"../../../api/model/InteractionOptions\";\nimport { BaseInteraction } from \"../interactions/BaseInteraction\";\nimport { DoubleClickInteraction } from \"../interactions/DoubleClickInteraction\";\nimport { DrawingInteraction, type DrawingParameters } from \"../interactions/DrawingInteraction\";\nimport { HighlightingInteraction } from \"../interactions/HighlightingInteraction\";\nimport { KeyboardInteraction } from \"../interactions/KeyboardInteraction\";\nimport {\n ModificationInteraction,\n type ModificationParameters\n} from \"../interactions/ModificationInteraction\";\nimport {\n SelectionInteraction,\n type SelectionParameters\n} from \"../interactions/SelectionInteraction\";\nimport { SnappingInteraction } from \"../interactions/SnappingInteraction\";\nimport { DrawingSession } from \"./DrawingSession\";\nimport type { Type as GeometryType } from \"ol/geom/Geometry\";\nimport { ReactNode } from \"react\";\n\ntype StartDrawingFeatureOptions = Required<\n Omit<DrawingParameters, \"tracker\" | \"layerFactory\" | \"tooltipMessages\">\n>;\ntype StartSelectingFeatureOptions = Pick<SelectionParameters, \"layers\" | \"completionHandler\">;\ntype StartModifyingFeatureOptions = Pick<ModificationParameters, \"feature\" | \"drawLayer\">;\n\nexport interface TooltipMessages {\n getSelectionMessage(): ReactNode;\n getDrawingMessages(): Map<GeometryType, ReactNode>;\n getModificationMessages(): Map<string, ReactNode>;\n}\n\nexport class EditingController {\n private currentInteractions: BaseInteraction<unknown, unknown>[] = [];\n private snappingSources: VectorSource[] = [];\n private interactionOptions: InteractionOptions = {};\n\n readonly drawingSession = new DrawingSession();\n\n constructor(\n private readonly mapModel: MapModel,\n private readonly layerFactory: LayerFactory,\n private readonly tooltipMessages: TooltipMessages\n ) {}\n\n startDrawingFeature({\n geometryType,\n drawingOptions,\n completionHandler\n }: StartDrawingFeatureOptions): void {\n this.replaceInteractions(\n new DrawingInteraction(this.mapModel, {\n geometryType,\n tracker: this.drawingSession,\n drawingOptions: { ...this.interactionOptions.drawingOptions, ...drawingOptions },\n completionHandler,\n layerFactory: this.layerFactory,\n tooltipMessages: this.tooltipMessages\n }),\n new KeyboardInteraction(this.mapModel, {\n actions: this.drawingSession\n }),\n new SnappingInteraction(this.mapModel, {\n snappingSources: this.snappingSources,\n snappingOptions: this.interactionOptions.snappingOptions\n }),\n new DoubleClickInteraction(this.mapModel)\n );\n }\n\n startSelectingFeature({ layers, completionHandler }: StartSelectingFeatureOptions): void {\n this.replaceInteractions(\n new SelectionInteraction(this.mapModel, {\n layers,\n selectionOptions: this.interactionOptions.selectionOptions,\n completionHandler,\n tooltipMessages: this.tooltipMessages\n })\n );\n }\n\n startModifyingFeature({ feature, drawLayer }: StartModifyingFeatureOptions): void {\n this.replaceInteractions(\n new ModificationInteraction(this.mapModel, {\n feature,\n drawLayer,\n modificationOptions: this.interactionOptions.modificationOptions,\n tooltipMessages: this.tooltipMessages\n }),\n new HighlightingInteraction(this.mapModel, {\n feature,\n highlightOptions: this.interactionOptions.highlightingOptions\n }),\n new SnappingInteraction(this.mapModel, {\n snappingSources: this.snappingSources,\n snappingOptions: this.interactionOptions.snappingOptions\n })\n );\n }\n\n setSnappingSources(sources: VectorSource[] | undefined): void {\n this.snappingSources = sources ?? [];\n }\n\n setInteractionOptions(options: InteractionOptions): void {\n this.interactionOptions = options;\n }\n\n stopCurrentInteractions(): void {\n this.currentInteractions.forEach((interaction) => {\n interaction.stop();\n });\n this.currentInteractions = [];\n }\n\n private replaceInteractions(...interactions: BaseInteraction<unknown, unknown>[]): void {\n this.stopCurrentInteractions();\n this.currentInteractions = interactions;\n this.currentInteractions.forEach((interaction) => {\n interaction.start();\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAmCO,MAAM,iBAAA,CAAkB;AAAA,EAO3B,WAAA,CACqB,QAAA,EACA,YAAA,EACA,eAAA,EACnB;AAHmB,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA;AACA,IAAA,IAAA,CAAA,YAAA,GAAA,YAAA;AACA,IAAA,IAAA,CAAA,eAAA,GAAA,eAAA;AAAA,EAClB;AAAA,EAVK,sBAA2D,EAAC;AAAA,EAC5D,kBAAkC,EAAC;AAAA,EACnC,qBAAyC,EAAC;AAAA,EAEzC,cAAA,GAAiB,IAAI,cAAA,EAAe;AAAA,EAQ7C,mBAAA,CAAoB;AAAA,IAChB,YAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACJ,EAAqC;AACjC,IAAA,IAAA,CAAK,mBAAA;AAAA,MACD,IAAI,kBAAA,CAAmB,IAAA,CAAK,QAAA,EAAU;AAAA,QAClC,YAAA;AAAA,QACA,SAAS,IAAA,CAAK,cAAA;AAAA,QACd,gBAAgB,EAAE,GAAG,KAAK,kBAAA,CAAmB,cAAA,EAAgB,GAAG,cAAA,EAAe;AAAA,QAC/E,iBAAA;AAAA,QACA,cAAc,IAAA,CAAK,YAAA;AAAA,QACnB,iBAAiB,IAAA,CAAK;AAAA,OACzB,CAAA;AAAA,MACD,IAAI,mBAAA,CAAoB,IAAA,CAAK,QAAA,EAAU;AAAA,QACnC,SAAS,IAAA,CAAK;AAAA,OACjB,CAAA;AAAA,MACD,IAAI,mBAAA,CAAoB,IAAA,CAAK,QAAA,EAAU;AAAA,QACnC,iBAAiB,IAAA,CAAK,eAAA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;AAAA,EAC9B;AAAA,EAEA,uBAAA,GAAgC;AAC5B,IAAA,IAAA,CAAK,mBAAA,CAAoB,OAAA,CAAQ,CAAC,WAAA,KAAgB;AAC9C,MAAA,WAAA,CAAY,IAAA,EAAK;AAAA,IACrB,CAAC,CAAA;AACD,IAAA,IAAA,CAAK,sBAAsB,EAAC;AAAA,EAChC;AAAA,EAEQ,uBAAuB,YAAA,EAAyD;AACpF,IAAA,IAAA,CAAK,uBAAA,EAAwB;AAC7B,IAAA,IAAA,CAAK,mBAAA,GAAsB,YAAA;AAC3B,IAAA,IAAA,CAAK,mBAAA,CAAoB,OAAA,CAAQ,CAAC,WAAA,KAAgB;AAC9C,MAAA,WAAA,CAAY,KAAA,EAAM;AAAA,IACtB,CAAC,CAAA;AAAA,EACL;AACJ;;;;"}
1
+ {"version":3,"file":"EditingController.js","sources":["EditingController.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { LayerFactory, MapModel } from \"@open-pioneer/map\";\nimport type { Vector as VectorSource } from \"ol/source\";\nimport type { InteractionOptions } from \"../../../api/model/InteractionOptions\";\nimport { BaseInteraction } from \"../interactions/BaseInteraction\";\nimport { DoubleClickInteraction } from \"../interactions/DoubleClickInteraction\";\nimport { DrawingInteraction, type DrawingParameters } from \"../interactions/DrawingInteraction\";\nimport { HighlightingInteraction } from \"../interactions/HighlightingInteraction\";\nimport { KeyboardInteraction } from \"../interactions/KeyboardInteraction\";\nimport {\n ModificationInteraction,\n type ModificationParameters\n} from \"../interactions/ModificationInteraction\";\nimport {\n SelectionInteraction,\n type SelectionParameters\n} from \"../interactions/SelectionInteraction\";\nimport { SnappingInteraction } from \"../interactions/SnappingInteraction\";\nimport { DrawingSession } from \"./DrawingSession\";\nimport type { Type as GeometryType } from \"ol/geom/Geometry\";\nimport { ReactNode } from \"react\";\n\ntype StartDrawingFeatureOptions = Required<\n Omit<DrawingParameters, \"tracker\" | \"layerFactory\" | \"tooltipMessages\">\n>;\ntype StartSelectingFeatureOptions = Pick<SelectionParameters, \"layers\" | \"completionHandler\">;\ntype StartModifyingFeatureOptions = Pick<ModificationParameters, \"feature\" | \"drawLayer\">;\n\nexport interface TooltipMessages {\n getSelectionMessage(): ReactNode;\n getDrawingMessages(): Map<GeometryType, ReactNode>;\n getModificationMessages(): Map<string, ReactNode>;\n}\n\nexport class EditingController {\n private currentInteractions: BaseInteraction<unknown, unknown>[] = [];\n private snappingSources: VectorSource[] = [];\n private interactionOptions: InteractionOptions = {};\n\n readonly drawingSession = new DrawingSession();\n\n constructor(\n private readonly mapModel: MapModel,\n private readonly layerFactory: LayerFactory,\n private readonly tooltipMessages: TooltipMessages\n ) {}\n\n startDrawingFeature({\n geometryType,\n drawingOptions,\n completionHandler\n }: StartDrawingFeatureOptions): void {\n this.replaceInteractions(\n new DrawingInteraction(this.mapModel, {\n geometryType,\n tracker: this.drawingSession,\n drawingOptions: { ...this.interactionOptions.drawingOptions, ...drawingOptions },\n completionHandler,\n layerFactory: this.layerFactory,\n tooltipMessages: this.tooltipMessages\n }),\n new KeyboardInteraction(this.mapModel, {\n actions: this.drawingSession\n }),\n new SnappingInteraction(this.mapModel, {\n snappingSources: this.snappingSources,\n snappingOptions: this.interactionOptions.snappingOptions\n }),\n new DoubleClickInteraction(this.mapModel)\n );\n }\n\n startSelectingFeature({ layers, completionHandler }: StartSelectingFeatureOptions): void {\n this.replaceInteractions(\n new SelectionInteraction(this.mapModel, {\n layers,\n selectionOptions: this.interactionOptions.selectionOptions,\n completionHandler,\n tooltipMessages: this.tooltipMessages\n })\n );\n }\n\n startModifyingFeature({ feature, drawLayer }: StartModifyingFeatureOptions): void {\n this.replaceInteractions(\n new ModificationInteraction(this.mapModel, {\n feature,\n drawLayer,\n modificationOptions: this.interactionOptions.modificationOptions,\n tooltipMessages: this.tooltipMessages\n }),\n new HighlightingInteraction(this.mapModel, {\n feature,\n highlightOptions: this.interactionOptions.highlightingOptions\n }),\n new SnappingInteraction(this.mapModel, {\n snappingSources: this.snappingSources,\n snappingOptions: this.interactionOptions.snappingOptions\n })\n );\n }\n\n setSnappingSources(sources: VectorSource[] | undefined): void {\n this.snappingSources = sources ?? [];\n }\n\n setInteractionOptions(options: InteractionOptions): void {\n this.interactionOptions = options;\n }\n\n stopCurrentInteractions(): void {\n this.currentInteractions.forEach((interaction) => {\n interaction.stop();\n });\n this.currentInteractions = [];\n }\n\n private replaceInteractions(...interactions: BaseInteraction<unknown, unknown>[]): void {\n this.stopCurrentInteractions();\n this.currentInteractions = interactions;\n this.currentInteractions.forEach((interaction) => {\n interaction.start();\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAmCO,MAAM,iBAAA,CAAkB;AAAA,EAO3B,WAAA,CACqB,QAAA,EACA,YAAA,EACA,eAAA,EACnB;AAHmB,IAAA,IAAA,CAAA,QAAA,GAAA,QAAA;AACA,IAAA,IAAA,CAAA,YAAA,GAAA,YAAA;AACA,IAAA,IAAA,CAAA,eAAA,GAAA,eAAA;AAAA,EAClB;AAAA,EAHkB,QAAA;AAAA,EACA,YAAA;AAAA,EACA,eAAA;AAAA,EATb,sBAA2D,EAAC;AAAA,EAC5D,kBAAkC,EAAC;AAAA,EACnC,qBAAyC,EAAC;AAAA,EAEzC,cAAA,GAAiB,IAAI,cAAA,EAAe;AAAA,EAQ7C,mBAAA,CAAoB;AAAA,IAChB,YAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACJ,EAAqC;AACjC,IAAA,IAAA,CAAK,mBAAA;AAAA,MACD,IAAI,kBAAA,CAAmB,IAAA,CAAK,QAAA,EAAU;AAAA,QAClC,YAAA;AAAA,QACA,SAAS,IAAA,CAAK,cAAA;AAAA,QACd,gBAAgB,EAAE,GAAG,KAAK,kBAAA,CAAmB,cAAA,EAAgB,GAAG,cAAA,EAAe;AAAA,QAC/E,iBAAA;AAAA,QACA,cAAc,IAAA,CAAK,YAAA;AAAA,QACnB,iBAAiB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AK,kBAAA,CAAmB;AAAA,OAC5C;AAAA,KACL;AAAA,EACJ;AAAA,EAEA,mBAAmB,OAAA,EAA2C;AAC1D,IAAA,IAAA,CAAK,eAAA,GAAkB,WAAW,EAAC;AAAA,EACvC;AAAA,EAEA,sBAAsB,OAAA,EAAmC;AACrD,IAAA,IAAA,CAAK,kBAAA,GAAqB,OAAA;AAAA,EAC9B;AAAA,EAEA,uBAAA,GAAgC;AAC5B,IAAA,IAAA,CAAK,mBAAA,CAAoB,OAAA,CAAQ,CAAC,WAAA,KAAgB;AAC9C,MAAA,WAAA,CAAY,IAAA,EAAK;AAAA,IACrB,CAAC,CAAA;AACD,IAAA,IAAA,CAAK,sBAAsB,EAAC;AAAA,EAChC;AAAA,EAEQ,uBAAuB,YAAA,EAAyD;AACpF,IAAA,IAAA,CAAK,uBAAA,EAAwB;AAC7B,IAAA,IAAA,CAAK,mBAAA,GAAsB,YAAA;AAC3B,IAAA,IAAA,CAAK,mBAAA,CAAoB,OAAA,CAAQ,CAAC,WAAA,KAAgB;AAC9C,MAAA,WAAA,CAAY,KAAA,EAAM;AAAA,IACtB,CAAC,CAAA;AAAA,EACL;AACJ;;;;"}
@@ -3,6 +3,8 @@ class BaseInteraction {
3
3
  this.mapModelInstance = mapModelInstance;
4
4
  this.parameters = parameters;
5
5
  }
6
+ mapModelInstance;
7
+ parameters;
6
8
  state = { type: "idle" };
7
9
  start() {
8
10
  if (this.state.type === "idle") {
@@ -1 +1 @@
1
- {"version":3,"file":"BaseInteraction.js","sources":["BaseInteraction.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport type { MapModel } from \"@open-pioneer/map\";\nimport type { Map } from \"ol\";\n\ntype EditingWorkflowState<T> = IdleState | ActiveState<T>;\n\ninterface IdleState {\n readonly type: \"idle\";\n}\n\ninterface ActiveState<T> {\n readonly type: \"active\";\n readonly data: T;\n}\n\nexport abstract class BaseInteraction<Params, Data> {\n private state: EditingWorkflowState<Data> = { type: \"idle\" };\n\n constructor(\n private readonly mapModelInstance: MapModel,\n private readonly parameters: Params\n ) {}\n\n start(): void {\n if (this.state.type === \"idle\") {\n const data = this.startInteraction(this.parameters);\n this.state = { type: \"active\", data };\n }\n }\n\n stop(): void {\n if (this.state.type === \"active\") {\n this.stopInteraction(this.state.data);\n this.state = { type: \"idle\" };\n }\n }\n\n protected get map(): Map {\n return this.mapModel.olMap;\n }\n\n protected get mapModel(): MapModel {\n return this.mapModelInstance;\n }\n\n protected abstract startInteraction(parameters: Params): Data;\n protected abstract stopInteraction(interactionData: Data): void;\n}\n"],"names":[],"mappings":"AAgBO,MAAe,eAAA,CAA8B;AAAA,EAGhD,WAAA,CACqB,kBACA,UAAA,EACnB;AAFmB,IAAA,IAAA,CAAA,gBAAA,GAAA,gBAAA;AACA,IAAA,IAAA,CAAA,UAAA,GAAA,UAAA;AAAA,EAClB;AAAA,EALK,KAAA,GAAoC,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,EAO3D,KAAA,GAAc;AACV,IAAA,IAAI,IAAA,CAAK,KAAA,CAAM,IAAA,KAAS,MAAA,EAAQ;AAC5B,MAAA,MAAM,IAAA,GAAO,IAAA,CAAK,gBAAA,CAAiB,IAAA,CAAK,UAAU,CAAA;AAClD,MAAA,IAAA,CAAK,KAAA,GAAQ,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAK;AAAA,IACxC;AAAA,EACJ;AAAA,EAEA,IAAA,GAAa;AACT,IAAA,IAAI,IAAA,CAAK,KAAA,CAAM,IAAA,KAAS,QAAA,EAAU;AAC9B,MAAA,IAAA,CAAK,eAAA,CAAgB,IAAA,CAAK,KAAA,CAAM,IAAI,CAAA;AACpC,MAAA,IAAA,CAAK,KAAA,GAAQ,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,IAChC;AAAA,EACJ;AAAA,EAEA,IAAc,GAAA,GAAW;AACrB,IAAA,OAAO,KAAK,QAAA,CAAS,KAAA;AAAA,EACzB;AAAA,EAEA,IAAc,QAAA,GAAqB;AAC/B,IAAA,OAAO,IAAA,CAAK,gBAAA;AAAA,EAChB;AAIJ;;;;"}
1
+ {"version":3,"file":"BaseInteraction.js","sources":["BaseInteraction.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport type { MapModel } from \"@open-pioneer/map\";\nimport type { Map } from \"ol\";\n\ntype EditingWorkflowState<T> = IdleState | ActiveState<T>;\n\ninterface IdleState {\n readonly type: \"idle\";\n}\n\ninterface ActiveState<T> {\n readonly type: \"active\";\n readonly data: T;\n}\n\nexport abstract class BaseInteraction<Params, Data> {\n private state: EditingWorkflowState<Data> = { type: \"idle\" };\n\n constructor(\n private readonly mapModelInstance: MapModel,\n private readonly parameters: Params\n ) {}\n\n start(): void {\n if (this.state.type === \"idle\") {\n const data = this.startInteraction(this.parameters);\n this.state = { type: \"active\", data };\n }\n }\n\n stop(): void {\n if (this.state.type === \"active\") {\n this.stopInteraction(this.state.data);\n this.state = { type: \"idle\" };\n }\n }\n\n protected get map(): Map {\n return this.mapModel.olMap;\n }\n\n protected get mapModel(): MapModel {\n return this.mapModelInstance;\n }\n\n protected abstract startInteraction(parameters: Params): Data;\n protected abstract stopInteraction(interactionData: Data): void;\n}\n"],"names":[],"mappings":"AAgBO,MAAe,eAAA,CAA8B;AAAA,EAGhD,WAAA,CACqB,kBACA,UAAA,EACnB;AAFmB,IAAA,IAAA,CAAA,gBAAA,GAAA,gBAAA;AACA,IAAA,IAAA,CAAA,UAAA,GAAA,UAAA;AAAA,EAClB;AAAA,EAFkB,gBAAA;AAAA,EACA,UAAA;AAAA,EAJb,KAAA,GAAoC,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,EAO3D,KAAA,GAAc;AACV,IAAA,IAAI,IAAA,CAAK,KAAA,CAAM,IAAA,KAAS,MAAA,EAAQ;AAC5B,MAAA,MAAM,IAAA,GAAO,IAAA,CAAK,gBAAA,CAAiB,IAAA,CAAK,UAAU,CAAA;AAClD,MAAA,IAAA,CAAK,KAAA,GAAQ,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAK;AAAA,IACxC;AAAA,EACJ;AAAA,EAEA,IAAA,GAAa;AACT,IAAA,IAAI,IAAA,CAAK,KAAA,CAAM,IAAA,KAAS,QAAA,EAAU;AAC9B,MAAA,IAAA,CAAK,eAAA,CAAgB,IAAA,CAAK,KAAA,CAAM,IAAI,CAAA;AACpC,MAAA,IAAA,CAAK,KAAA,GAAQ,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,IAChC;AAAA,EACJ;AAAA,EAEA,IAAc,GAAA,GAAW;AACrB,IAAA,OAAO,KAAK,QAAA,CAAS,KAAA;AAAA,EACzB;AAAA,EAEA,IAAc,QAAA,GAAqB;AAC/B,IAAA,OAAO,IAAA,CAAK,gBAAA;AAAA,EAChB;AAIJ;;;;"}
package/index.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * Configuration for input fields that can be used in the {@link DeclarativeFormTemplate}.
15
15
  */
16
16
  export { FeatureEditor, type FeatureEditorProps, type FormTemplateContext } from "./api/editor/editor";
17
- export { usePropertyFormContext, type Mode, type PropertyFormContext } from "./api/editor/context";
17
+ export { useCustomFormContext, type Mode, type CustomFormContext } from "./api/editor/context";
18
18
  export type { FeatureWriter, AddFeatureOptions, DeleteFeatureOptions, UpdateFeatureOptions, StorageError, StorageResult } from "./api/model/FeatureWriter";
19
19
  export type { CreationStep, DrawingStep, EditingStep, InitialStep, ModificationStep, SelectionStep, UpdateStep } from "./api/model/EditingStep";
20
20
  export type { BaseFeatureTemplate, DeclarativeFormTemplate, DynamicFormTemplate, FeatureTemplate, FormTemplate } from "./api/model/FeatureTemplate";
package/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { FeatureEditor } from './api/editor/editor.js';
2
- export { usePropertyFormContext } from './api/editor/context.js';
2
+ export { useCustomFormContext } from './api/editor/context.js';
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/feature-editing",
4
- "version": "1.3.0-dev.20260512095810",
4
+ "version": "1.3.0",
5
5
  "description": "Provides a component to create and edit feature geometries and properties.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -14,19 +14,19 @@
14
14
  "directory": "src/packages/packages/feature-editing"
15
15
  },
16
16
  "dependencies": {
17
- "@chakra-ui/react": "^3.34.0",
18
- "@conterra/reactivity-core": "^0.8.2",
19
- "@open-pioneer/chakra-snippets": "4.6.0-dev.20260420101935",
20
- "@open-pioneer/core": "4.6.0-dev.20260420101935",
21
- "@open-pioneer/notifier": "4.6.0-dev.20260420101935",
22
- "@open-pioneer/react-utils": "4.6.0-dev.20260420101935",
23
- "@open-pioneer/reactivity": "4.6.0-dev.20260420101935",
24
- "@open-pioneer/runtime": "4.6.0-dev.20260420101935",
25
- "classnames": "^2.5.1",
26
- "react": "^19.2.5",
17
+ "@chakra-ui/react": "^3.35.0",
18
+ "@conterra/reactivity-core": "^0.8.5",
19
+ "@formatjs/intl": "^4.1.11",
20
+ "@open-pioneer/chakra-snippets": "^4.6.0",
21
+ "@open-pioneer/core": "^4.6.0",
22
+ "@open-pioneer/notifier": "^4.6.0",
23
+ "@open-pioneer/react-utils": "^4.6.0",
24
+ "@open-pioneer/reactivity": "^4.6.0",
25
+ "@open-pioneer/runtime": "^4.6.0",
26
+ "react": "^19.2.6",
27
27
  "ol": "^10.9.0",
28
28
  "react-icons": "^5.6.0",
29
- "@open-pioneer/map": "1.3.0-dev.20260512095810"
29
+ "@open-pioneer/map": "1.3.0"
30
30
  },
31
31
  "exports": {
32
32
  "./package.json": "./package.json",
@@ -58,6 +58,6 @@
58
58
  ]
59
59
  },
60
60
  "properties": [],
61
- "packageFormatVersion": "1.0.0"
61
+ "packageFormatVersion": "1.0.1"
62
62
  }
63
63
  }
@@ -1,9 +0,0 @@
1
- import { type ReactElement, type ReactNode } from "react";
2
- import type { ModificationStep } from "../../api/model/EditingStep";
3
- import { EditingCallbacks } from "../editor/useEditingCallbacks";
4
- export interface PropertyFormContextProviderProps {
5
- children: ReactNode;
6
- editingStep: ModificationStep;
7
- callbacks: EditingCallbacks;
8
- }
9
- export declare function PropertyFormContextProvider({ children, editingStep, callbacks }: PropertyFormContextProviderProps): ReactElement;
@@ -1,18 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
3
- import { PropertyFormContextClass, PropertyFormContextObject } from './PropertyFormContext.js';
4
-
5
- function PropertyFormContextProvider({
6
- children,
7
- editingStep,
8
- callbacks
9
- }) {
10
- const context = useMemo(
11
- () => new PropertyFormContextClass(editingStep, callbacks),
12
- [editingStep, callbacks]
13
- );
14
- return /* @__PURE__ */ jsx(PropertyFormContextObject.Provider, { value: context, children });
15
- }
16
-
17
- export { PropertyFormContextProvider };
18
- //# sourceMappingURL=PropertyFormContextProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PropertyFormContextProvider.js","sources":["PropertyFormContextProvider.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { useMemo, type ReactElement, type ReactNode } from \"react\";\nimport { PropertyFormContextClass, PropertyFormContextObject } from \"./PropertyFormContext\";\nimport type { ModificationStep } from \"../../api/model/EditingStep\";\nimport { EditingCallbacks } from \"../editor/useEditingCallbacks\";\n\nexport interface PropertyFormContextProviderProps {\n children: ReactNode;\n editingStep: ModificationStep;\n callbacks: EditingCallbacks;\n}\n\nexport function PropertyFormContextProvider({\n children,\n editingStep,\n callbacks\n}: PropertyFormContextProviderProps): ReactElement {\n const context = useMemo(\n () => new PropertyFormContextClass(editingStep, callbacks),\n [editingStep, callbacks]\n );\n\n return (\n <PropertyFormContextObject.Provider value={context}>\n {children}\n </PropertyFormContextObject.Provider>\n );\n}\n"],"names":[],"mappings":";;;;AAaO,SAAS,2BAAA,CAA4B;AAAA,EACxC,QAAA;AAAA,EACA,WAAA;AAAA,EACA;AACJ,CAAA,EAAmD;AAC/C,EAAA,MAAM,OAAA,GAAU,OAAA;AAAA,IACZ,MAAM,IAAI,wBAAA,CAAyB,WAAA,EAAa,SAAS,CAAA;AAAA,IACzD,CAAC,aAAa,SAAS;AAAA,GAC3B;AAEA,EAAA,2BACK,yBAAA,CAA0B,QAAA,EAA1B,EAAmC,KAAA,EAAO,SACtC,QAAA,EACL,CAAA;AAER;;;;"}