@acorex-platform/framework-shared 0.0.1
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/acorex-platform-framework-shared-0.0.1.tgz +0 -0
- package/core/src/index.d.ts +2 -0
- package/core/src/index.d.ts.map +1 -0
- package/core/src/index.js +5 -0
- package/core/src/index.js.map +1 -0
- package/core/src/lib/core/actions.types.d.ts +724 -0
- package/core/src/lib/core/actions.types.d.ts.map +1 -0
- package/core/src/lib/core/actions.types.js +851 -0
- package/core/src/lib/core/actions.types.js.map +1 -0
- package/core/src/lib/core/context.types.d.ts +23 -0
- package/core/src/lib/core/context.types.d.ts.map +1 -0
- package/core/src/lib/core/context.types.js +9 -0
- package/core/src/lib/core/context.types.js.map +1 -0
- package/core/src/lib/core/core.types.d.ts +193 -0
- package/core/src/lib/core/core.types.d.ts.map +1 -0
- package/core/src/lib/core/core.types.js +90 -0
- package/core/src/lib/core/core.types.js.map +1 -0
- package/core/src/lib/core/index.d.ts +8 -0
- package/core/src/lib/core/index.d.ts.map +1 -0
- package/core/src/lib/core/index.js +13 -0
- package/core/src/lib/core/index.js.map +1 -0
- package/core/src/lib/core/logo.types.d.ts +13 -0
- package/core/src/lib/core/logo.types.d.ts.map +1 -0
- package/core/src/lib/core/logo.types.js +5 -0
- package/core/src/lib/core/logo.types.js.map +1 -0
- package/core/src/lib/core/response.types.d.ts +10 -0
- package/core/src/lib/core/response.types.d.ts.map +1 -0
- package/core/src/lib/core/response.types.js +5 -0
- package/core/src/lib/core/response.types.js.map +1 -0
- package/core/src/lib/core/scope.types.d.ts +9 -0
- package/core/src/lib/core/scope.types.d.ts.map +1 -0
- package/core/src/lib/core/scope.types.js +32 -0
- package/core/src/lib/core/scope.types.js.map +1 -0
- package/core/src/lib/core/shims.types.d.ts +20 -0
- package/core/src/lib/core/shims.types.d.ts.map +1 -0
- package/core/src/lib/core/shims.types.js +5 -0
- package/core/src/lib/core/shims.types.js.map +1 -0
- package/core/src/lib/data/column.types.d.ts +6 -0
- package/core/src/lib/data/column.types.d.ts.map +1 -0
- package/core/src/lib/data/column.types.js +5 -0
- package/core/src/lib/data/column.types.js.map +1 -0
- package/core/src/lib/data/data.types.d.ts +40 -0
- package/core/src/lib/data/data.types.d.ts.map +1 -0
- package/core/src/lib/data/data.types.js +5 -0
- package/core/src/lib/data/data.types.js.map +1 -0
- package/core/src/lib/data/export.types.d.ts +64 -0
- package/core/src/lib/data/export.types.d.ts.map +1 -0
- package/core/src/lib/data/export.types.js +14 -0
- package/core/src/lib/data/export.types.js.map +1 -0
- package/core/src/lib/data/filter.types.d.ts +42 -0
- package/core/src/lib/data/filter.types.d.ts.map +1 -0
- package/core/src/lib/data/filter.types.js +5 -0
- package/core/src/lib/data/filter.types.js.map +1 -0
- package/core/src/lib/data/index.d.ts +7 -0
- package/core/src/lib/data/index.d.ts.map +1 -0
- package/core/src/lib/data/index.js +12 -0
- package/core/src/lib/data/index.js.map +1 -0
- package/core/src/lib/data/multi-source.types.d.ts +8 -0
- package/core/src/lib/data/multi-source.types.d.ts.map +1 -0
- package/core/src/lib/data/multi-source.types.js +5 -0
- package/core/src/lib/data/multi-source.types.js.map +1 -0
- package/core/src/lib/data/sort.types.d.ts +8 -0
- package/core/src/lib/data/sort.types.d.ts.map +1 -0
- package/core/src/lib/data/sort.types.js +5 -0
- package/core/src/lib/data/sort.types.js.map +1 -0
- package/core/src/lib/domain/address.types.d.ts +38 -0
- package/core/src/lib/domain/address.types.d.ts.map +1 -0
- package/core/src/lib/domain/address.types.js +5 -0
- package/core/src/lib/domain/address.types.js.map +1 -0
- package/core/src/lib/domain/ai-output.types.d.ts +5 -0
- package/core/src/lib/domain/ai-output.types.d.ts.map +1 -0
- package/core/src/lib/domain/ai-output.types.js +5 -0
- package/core/src/lib/domain/ai-output.types.js.map +1 -0
- package/core/src/lib/domain/file-storage.types.d.ts +203 -0
- package/core/src/lib/domain/file-storage.types.d.ts.map +1 -0
- package/core/src/lib/domain/file-storage.types.js +12 -0
- package/core/src/lib/domain/file-storage.types.js.map +1 -0
- package/core/src/lib/domain/index.d.ts +6 -0
- package/core/src/lib/domain/index.d.ts.map +1 -0
- package/core/src/lib/domain/index.js +11 -0
- package/core/src/lib/domain/index.js.map +1 -0
- package/core/src/lib/domain/metadata.types.d.ts +25 -0
- package/core/src/lib/domain/metadata.types.d.ts.map +1 -0
- package/core/src/lib/domain/metadata.types.js +3 -0
- package/core/src/lib/domain/metadata.types.js.map +1 -0
- package/core/src/lib/domain/spreadsheet.types.d.ts +4 -0
- package/core/src/lib/domain/spreadsheet.types.d.ts.map +1 -0
- package/core/src/lib/domain/spreadsheet.types.js +5 -0
- package/core/src/lib/domain/spreadsheet.types.js.map +1 -0
- package/core/src/lib/index.d.ts +14 -0
- package/core/src/lib/index.d.ts.map +1 -0
- package/core/src/lib/index.js +19 -0
- package/core/src/lib/index.js.map +1 -0
- package/core/src/lib/integration/index.d.ts +4 -0
- package/core/src/lib/integration/index.d.ts.map +1 -0
- package/core/src/lib/integration/index.js +9 -0
- package/core/src/lib/integration/index.js.map +1 -0
- package/core/src/lib/integration/integration-connection.safe-types.d.ts +54 -0
- package/core/src/lib/integration/integration-connection.safe-types.d.ts.map +1 -0
- package/core/src/lib/integration/integration-connection.safe-types.js +4 -0
- package/core/src/lib/integration/integration-connection.safe-types.js.map +1 -0
- package/core/src/lib/integration/integration-status.constants.d.ts +49 -0
- package/core/src/lib/integration/integration-status.constants.d.ts.map +1 -0
- package/core/src/lib/integration/integration-status.constants.js +57 -0
- package/core/src/lib/integration/integration-status.constants.js.map +1 -0
- package/core/src/lib/integration/integration.types.d.ts +120 -0
- package/core/src/lib/integration/integration.types.d.ts.map +1 -0
- package/core/src/lib/integration/integration.types.js +33 -0
- package/core/src/lib/integration/integration.types.js.map +1 -0
- package/core/src/lib/interaction/index.d.ts +4 -0
- package/core/src/lib/interaction/index.d.ts.map +1 -0
- package/core/src/lib/interaction/index.js +9 -0
- package/core/src/lib/interaction/index.js.map +1 -0
- package/core/src/lib/interaction/interactive.types.d.ts +65 -0
- package/core/src/lib/interaction/interactive.types.d.ts.map +1 -0
- package/core/src/lib/interaction/interactive.types.js +5 -0
- package/core/src/lib/interaction/interactive.types.js.map +1 -0
- package/core/src/lib/interaction/view-query.types.d.ts +11 -0
- package/core/src/lib/interaction/view-query.types.d.ts.map +1 -0
- package/core/src/lib/interaction/view-query.types.js +5 -0
- package/core/src/lib/interaction/view-query.types.js.map +1 -0
- package/core/src/lib/interaction/view.types.d.ts +34 -0
- package/core/src/lib/interaction/view.types.d.ts.map +1 -0
- package/core/src/lib/interaction/view.types.js +5 -0
- package/core/src/lib/interaction/view.types.js.map +1 -0
- package/core/src/lib/keys/index.d.ts +4 -0
- package/core/src/lib/keys/index.d.ts.map +1 -0
- package/core/src/lib/keys/index.js +9 -0
- package/core/src/lib/keys/index.js.map +1 -0
- package/core/src/lib/keys/platform-core-datasource.keys.d.ts +6 -0
- package/core/src/lib/keys/platform-core-datasource.keys.d.ts.map +1 -0
- package/core/src/lib/keys/platform-core-datasource.keys.js +11 -0
- package/core/src/lib/keys/platform-core-datasource.keys.js.map +1 -0
- package/core/src/lib/keys/preview-widget-field.command.key.d.ts +3 -0
- package/core/src/lib/keys/preview-widget-field.command.key.d.ts.map +1 -0
- package/core/src/lib/keys/preview-widget-field.command.key.js +6 -0
- package/core/src/lib/keys/preview-widget-field.command.key.js.map +1 -0
- package/core/src/lib/keys/regional-settings.keys.d.ts +31 -0
- package/core/src/lib/keys/regional-settings.keys.d.ts.map +1 -0
- package/core/src/lib/keys/regional-settings.keys.js +37 -0
- package/core/src/lib/keys/regional-settings.keys.js.map +1 -0
- package/core/src/lib/mock/index.d.ts +2 -0
- package/core/src/lib/mock/index.d.ts.map +1 -0
- package/core/src/lib/mock/index.js +7 -0
- package/core/src/lib/mock/index.js.map +1 -0
- package/core/src/lib/mock/mock-data.shims.d.ts +39 -0
- package/core/src/lib/mock/mock-data.shims.d.ts.map +1 -0
- package/core/src/lib/mock/mock-data.shims.js +191 -0
- package/core/src/lib/mock/mock-data.shims.js.map +1 -0
- package/core/src/lib/multi-language-string/compare-axp-multi-language-string.d.ts +16 -0
- package/core/src/lib/multi-language-string/compare-axp-multi-language-string.d.ts.map +1 -0
- package/core/src/lib/multi-language-string/compare-axp-multi-language-string.js +39 -0
- package/core/src/lib/multi-language-string/compare-axp-multi-language-string.js.map +1 -0
- package/core/src/lib/multi-language-string/index.d.ts +4 -0
- package/core/src/lib/multi-language-string/index.d.ts.map +1 -0
- package/core/src/lib/multi-language-string/index.js +9 -0
- package/core/src/lib/multi-language-string/index.js.map +1 -0
- package/core/src/lib/multi-language-string/locale-map-value.util.d.ts +10 -0
- package/core/src/lib/multi-language-string/locale-map-value.util.d.ts.map +1 -0
- package/core/src/lib/multi-language-string/locale-map-value.util.js +41 -0
- package/core/src/lib/multi-language-string/locale-map-value.util.js.map +1 -0
- package/core/src/lib/multi-language-string/resolve-multi-language-string.util.d.ts +6 -0
- package/core/src/lib/multi-language-string/resolve-multi-language-string.util.d.ts.map +1 -0
- package/core/src/lib/multi-language-string/resolve-multi-language-string.util.js +33 -0
- package/core/src/lib/multi-language-string/resolve-multi-language-string.util.js.map +1 -0
- package/core/src/lib/property/element.types.d.ts +2 -0
- package/core/src/lib/property/element.types.d.ts.map +1 -0
- package/core/src/lib/property/element.types.js +5 -0
- package/core/src/lib/property/element.types.js.map +1 -0
- package/core/src/lib/property/file.types.d.ts +2 -0
- package/core/src/lib/property/file.types.d.ts.map +1 -0
- package/core/src/lib/property/file.types.js +5 -0
- package/core/src/lib/property/file.types.js.map +1 -0
- package/core/src/lib/property/index.d.ts +5 -0
- package/core/src/lib/property/index.d.ts.map +1 -0
- package/core/src/lib/property/index.js +10 -0
- package/core/src/lib/property/index.js.map +1 -0
- package/core/src/lib/property/property.types.d.ts +24 -0
- package/core/src/lib/property/property.types.d.ts.map +1 -0
- package/core/src/lib/property/property.types.js +5 -0
- package/core/src/lib/property/property.types.js.map +1 -0
- package/core/src/lib/property/validation.types.d.ts +31 -0
- package/core/src/lib/property/validation.types.d.ts.map +1 -0
- package/core/src/lib/property/validation.types.js +5 -0
- package/core/src/lib/property/validation.types.js.map +1 -0
- package/core/src/lib/status/index.d.ts +4 -0
- package/core/src/lib/status/index.d.ts.map +1 -0
- package/core/src/lib/status/index.js +9 -0
- package/core/src/lib/status/index.js.map +1 -0
- package/core/src/lib/status/status-definition.types.d.ts +110 -0
- package/core/src/lib/status/status-definition.types.d.ts.map +1 -0
- package/core/src/lib/status/status-definition.types.js +16 -0
- package/core/src/lib/status/status-definition.types.js.map +1 -0
- package/core/src/lib/status/status.types.d.ts +28 -0
- package/core/src/lib/status/status.types.d.ts.map +1 -0
- package/core/src/lib/status/status.types.js +34 -0
- package/core/src/lib/status/status.types.js.map +1 -0
- package/core/src/lib/status/statuses.types.d.ts +279 -0
- package/core/src/lib/status/statuses.types.d.ts.map +1 -0
- package/core/src/lib/status/statuses.types.js +320 -0
- package/core/src/lib/status/statuses.types.js.map +1 -0
- package/core/src/lib/utils/index.d.ts +4 -0
- package/core/src/lib/utils/index.d.ts.map +1 -0
- package/core/src/lib/utils/index.js +9 -0
- package/core/src/lib/utils/index.js.map +1 -0
- package/core/src/lib/utils/object-util.d.ts +57 -0
- package/core/src/lib/utils/object-util.d.ts.map +1 -0
- package/core/src/lib/utils/object-util.js +679 -0
- package/core/src/lib/utils/object-util.js.map +1 -0
- package/core/src/lib/utils/scalar-coercion.d.ts +17 -0
- package/core/src/lib/utils/scalar-coercion.d.ts.map +1 -0
- package/core/src/lib/utils/scalar-coercion.js +95 -0
- package/core/src/lib/utils/scalar-coercion.js.map +1 -0
- package/core/src/lib/utils/string.util.d.ts +11 -0
- package/core/src/lib/utils/string.util.d.ts.map +1 -0
- package/core/src/lib/utils/string.util.js +37 -0
- package/core/src/lib/utils/string.util.js.map +1 -0
- package/core/src/lib/widgets/index.d.ts +4 -0
- package/core/src/lib/widgets/index.d.ts.map +1 -0
- package/core/src/lib/widgets/index.js +9 -0
- package/core/src/lib/widgets/index.js.map +1 -0
- package/core/src/lib/widgets/widget-node.types.d.ts +16 -0
- package/core/src/lib/widgets/widget-node.types.d.ts.map +1 -0
- package/core/src/lib/widgets/widget-node.types.js +5 -0
- package/core/src/lib/widgets/widget-node.types.js.map +1 -0
- package/core/src/lib/widgets/widgets-catalog.d.ts +100 -0
- package/core/src/lib/widgets/widgets-catalog.d.ts.map +1 -0
- package/core/src/lib/widgets/widgets-catalog.js +105 -0
- package/core/src/lib/widgets/widgets-catalog.js.map +1 -0
- package/core/src/lib/widgets/widgets-list.d.ts +116 -0
- package/core/src/lib/widgets/widgets-list.d.ts.map +1 -0
- package/core/src/lib/widgets/widgets-list.js +154 -0
- package/core/src/lib/widgets/widgets-list.js.map +1 -0
- package/core/src/lib/workflow/activity.types.d.ts +133 -0
- package/core/src/lib/workflow/activity.types.d.ts.map +1 -0
- package/core/src/lib/workflow/activity.types.js +8 -0
- package/core/src/lib/workflow/activity.types.js.map +1 -0
- package/core/src/lib/workflow/index.d.ts +4 -0
- package/core/src/lib/workflow/index.d.ts.map +1 -0
- package/core/src/lib/workflow/index.js +9 -0
- package/core/src/lib/workflow/index.js.map +1 -0
- package/core/src/lib/workflow/workflow-definition.types.d.ts +182 -0
- package/core/src/lib/workflow/workflow-definition.types.d.ts.map +1 -0
- package/core/src/lib/workflow/workflow-definition.types.js +4 -0
- package/core/src/lib/workflow/workflow-definition.types.js.map +1 -0
- package/core/src/lib/workflow/workflow-instance.types.d.ts +375 -0
- package/core/src/lib/workflow/workflow-instance.types.d.ts.map +1 -0
- package/core/src/lib/workflow/workflow-instance.types.js +8 -0
- package/core/src/lib/workflow/workflow-instance.types.js.map +1 -0
- package/domain/src/index.d.ts +2 -0
- package/domain/src/index.d.ts.map +1 -0
- package/domain/src/index.js +5 -0
- package/domain/src/index.js.map +1 -0
- package/domain/src/lib/definitions/aggregate-definition.types.d.ts +18 -0
- package/domain/src/lib/definitions/aggregate-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/aggregate-definition.types.js +4 -0
- package/domain/src/lib/definitions/aggregate-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/base.types.d.ts +36 -0
- package/domain/src/lib/definitions/base.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/base.types.js +17 -0
- package/domain/src/lib/definitions/base.types.js.map +1 -0
- package/domain/src/lib/definitions/command-registry.types.d.ts +34 -0
- package/domain/src/lib/definitions/command-registry.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/command-registry.types.js +4 -0
- package/domain/src/lib/definitions/command-registry.types.js.map +1 -0
- package/domain/src/lib/definitions/entity-definition.types.d.ts +50 -0
- package/domain/src/lib/definitions/entity-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/entity-definition.types.js +10 -0
- package/domain/src/lib/definitions/entity-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/interface-definition.types.d.ts +31 -0
- package/domain/src/lib/definitions/interface-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/interface-definition.types.js +3 -0
- package/domain/src/lib/definitions/interface-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/menu-definition.types.d.ts +57 -0
- package/domain/src/lib/definitions/menu-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/menu-definition.types.js +5 -0
- package/domain/src/lib/definitions/menu-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/module-definition.types.d.ts +7 -0
- package/domain/src/lib/definitions/module-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/module-definition.types.js +3 -0
- package/domain/src/lib/definitions/module-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/permission-definition.types.d.ts +41 -0
- package/domain/src/lib/definitions/permission-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/permission-definition.types.js +5 -0
- package/domain/src/lib/definitions/permission-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/plugin-definition.types.d.ts +23 -0
- package/domain/src/lib/definitions/plugin-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/plugin-definition.types.js +3 -0
- package/domain/src/lib/definitions/plugin-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/property-definition.types.d.ts +33 -0
- package/domain/src/lib/definitions/property-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/property-definition.types.js +3 -0
- package/domain/src/lib/definitions/property-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/query-registry.types.d.ts +32 -0
- package/domain/src/lib/definitions/query-registry.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/query-registry.types.js +4 -0
- package/domain/src/lib/definitions/query-registry.types.js.map +1 -0
- package/domain/src/lib/definitions/relation-definition.types.d.ts +31 -0
- package/domain/src/lib/definitions/relation-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/relation-definition.types.js +16 -0
- package/domain/src/lib/definitions/relation-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/validation-definition.types.d.ts +29 -0
- package/domain/src/lib/definitions/validation-definition.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/validation-definition.types.js +3 -0
- package/domain/src/lib/definitions/validation-definition.types.js.map +1 -0
- package/domain/src/lib/definitions/widget-catalog.types.d.ts +14 -0
- package/domain/src/lib/definitions/widget-catalog.types.d.ts.map +1 -0
- package/domain/src/lib/definitions/widget-catalog.types.js +5 -0
- package/domain/src/lib/definitions/widget-catalog.types.js.map +1 -0
- package/domain/src/lib/index.d.ts +15 -0
- package/domain/src/lib/index.d.ts.map +1 -0
- package/domain/src/lib/index.js +20 -0
- package/domain/src/lib/index.js.map +1 -0
- package/entity/src/index.d.ts +2 -0
- package/entity/src/index.d.ts.map +1 -0
- package/entity/src/index.js +5 -0
- package/entity/src/index.js.map +1 -0
- package/entity/src/lib/constants/entity-datasource.keys.d.ts +5 -0
- package/entity/src/lib/constants/entity-datasource.keys.d.ts.map +1 -0
- package/entity/src/lib/constants/entity-datasource.keys.js +10 -0
- package/entity/src/lib/constants/entity-datasource.keys.js.map +1 -0
- package/entity/src/lib/constants/entity-display.constants.d.ts +7 -0
- package/entity/src/lib/constants/entity-display.constants.d.ts.map +1 -0
- package/entity/src/lib/constants/entity-display.constants.js +12 -0
- package/entity/src/lib/constants/entity-display.constants.js.map +1 -0
- package/entity/src/lib/constants/entity-events.keys.d.ts +5 -0
- package/entity/src/lib/constants/entity-events.keys.d.ts.map +1 -0
- package/entity/src/lib/constants/entity-events.keys.js +10 -0
- package/entity/src/lib/constants/entity-events.keys.js.map +1 -0
- package/entity/src/lib/constants/index.d.ts +4 -0
- package/entity/src/lib/constants/index.d.ts.map +1 -0
- package/entity/src/lib/constants/index.js +9 -0
- package/entity/src/lib/constants/index.js.map +1 -0
- package/entity/src/lib/helpers/entity-action.helpers.d.ts +31 -0
- package/entity/src/lib/helpers/entity-action.helpers.d.ts.map +1 -0
- package/entity/src/lib/helpers/entity-action.helpers.js +270 -0
- package/entity/src/lib/helpers/entity-action.helpers.js.map +1 -0
- package/entity/src/lib/helpers/index.d.ts +2 -0
- package/entity/src/lib/helpers/index.d.ts.map +1 -0
- package/entity/src/lib/helpers/index.js +7 -0
- package/entity/src/lib/helpers/index.js.map +1 -0
- package/entity/src/lib/index.d.ts +5 -0
- package/entity/src/lib/index.d.ts.map +1 -0
- package/entity/src/lib/index.js +10 -0
- package/entity/src/lib/index.js.map +1 -0
- package/entity/src/lib/types/entity-action.types.d.ts +69 -0
- package/entity/src/lib/types/entity-action.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-action.types.js +18 -0
- package/entity/src/lib/types/entity-action.types.js.map +1 -0
- package/entity/src/lib/types/entity-card-field.types.d.ts +38 -0
- package/entity/src/lib/types/entity-card-field.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-card-field.types.js +25 -0
- package/entity/src/lib/types/entity-card-field.types.js.map +1 -0
- package/entity/src/lib/types/entity-definition.types.d.ts +182 -0
- package/entity/src/lib/types/entity-definition.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-definition.types.js +44 -0
- package/entity/src/lib/types/entity-definition.types.js.map +1 -0
- package/entity/src/lib/types/entity-detail-list.types.d.ts +9 -0
- package/entity/src/lib/types/entity-detail-list.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-detail-list.types.js +5 -0
- package/entity/src/lib/types/entity-detail-list.types.js.map +1 -0
- package/entity/src/lib/types/entity-display-field.types.d.ts +35 -0
- package/entity/src/lib/types/entity-display-field.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-display-field.types.js +5 -0
- package/entity/src/lib/types/entity-display-field.types.js.map +1 -0
- package/entity/src/lib/types/entity-formats.types.d.ts +12 -0
- package/entity/src/lib/types/entity-formats.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-formats.types.js +5 -0
- package/entity/src/lib/types/entity-formats.types.js.map +1 -0
- package/entity/src/lib/types/entity-layout-view.types.d.ts +34 -0
- package/entity/src/lib/types/entity-layout-view.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-layout-view.types.js +5 -0
- package/entity/src/lib/types/entity-layout-view.types.js.map +1 -0
- package/entity/src/lib/types/entity-list-filter.types.d.ts +27 -0
- package/entity/src/lib/types/entity-list-filter.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-list-filter.types.js +39 -0
- package/entity/src/lib/types/entity-list-filter.types.js.map +1 -0
- package/entity/src/lib/types/entity-master-list.types.d.ts +44 -0
- package/entity/src/lib/types/entity-master-list.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-master-list.types.js +26 -0
- package/entity/src/lib/types/entity-master-list.types.js.map +1 -0
- package/entity/src/lib/types/entity-model.types.d.ts +52 -0
- package/entity/src/lib/types/entity-model.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-model.types.js +5 -0
- package/entity/src/lib/types/entity-model.types.js.map +1 -0
- package/entity/src/lib/types/entity-property-list.types.d.ts +21 -0
- package/entity/src/lib/types/entity-property-list.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-property-list.types.js +5 -0
- package/entity/src/lib/types/entity-property-list.types.js.map +1 -0
- package/entity/src/lib/types/entity-property.types.d.ts +67 -0
- package/entity/src/lib/types/entity-property.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-property.types.js +5 -0
- package/entity/src/lib/types/entity-property.types.js.map +1 -0
- package/entity/src/lib/types/entity-query-view.types.d.ts +32 -0
- package/entity/src/lib/types/entity-query-view.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-query-view.types.js +36 -0
- package/entity/src/lib/types/entity-query-view.types.js.map +1 -0
- package/entity/src/lib/types/entity-related-layout.types.d.ts +65 -0
- package/entity/src/lib/types/entity-related-layout.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-related-layout.types.js +5 -0
- package/entity/src/lib/types/entity-related-layout.types.js.map +1 -0
- package/entity/src/lib/types/entity-storage.types.d.ts +43 -0
- package/entity/src/lib/types/entity-storage.types.d.ts.map +1 -0
- package/entity/src/lib/types/entity-storage.types.js +4 -0
- package/entity/src/lib/types/entity-storage.types.js.map +1 -0
- package/entity/src/lib/types/index.d.ts +17 -0
- package/entity/src/lib/types/index.d.ts.map +1 -0
- package/entity/src/lib/types/index.js +22 -0
- package/entity/src/lib/types/index.js.map +1 -0
- package/entity/src/lib/types/lookup-widget.types.d.ts +79 -0
- package/entity/src/lib/types/lookup-widget.types.d.ts.map +1 -0
- package/entity/src/lib/types/lookup-widget.types.js +4 -0
- package/entity/src/lib/types/lookup-widget.types.js.map +1 -0
- package/entity/src/lib/utils/entity-display-template.util.d.ts +17 -0
- package/entity/src/lib/utils/entity-display-template.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-display-template.util.js +57 -0
- package/entity/src/lib/utils/entity-display-template.util.js.map +1 -0
- package/entity/src/lib/utils/entity-list-filter-definitions.util.d.ts +17 -0
- package/entity/src/lib/utils/entity-list-filter-definitions.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-list-filter-definitions.util.js +144 -0
- package/entity/src/lib/utils/entity-list-filter-definitions.util.js.map +1 -0
- package/entity/src/lib/utils/entity-list-sortable-fields.util.d.ts +14 -0
- package/entity/src/lib/utils/entity-list-sortable-fields.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-list-sortable-fields.util.js +95 -0
- package/entity/src/lib/utils/entity-list-sortable-fields.util.js.map +1 -0
- package/entity/src/lib/utils/entity-merge-detail-list-properties.util.d.ts +16 -0
- package/entity/src/lib/utils/entity-merge-detail-list-properties.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-merge-detail-list-properties.util.js +75 -0
- package/entity/src/lib/utils/entity-merge-detail-list-properties.util.js.map +1 -0
- package/entity/src/lib/utils/entity-property-display-path.util.d.ts +36 -0
- package/entity/src/lib/utils/entity-property-display-path.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-property-display-path.util.js +97 -0
- package/entity/src/lib/utils/entity-property-display-path.util.js.map +1 -0
- package/entity/src/lib/utils/entity-quick-search-paths.util.d.ts +19 -0
- package/entity/src/lib/utils/entity-quick-search-paths.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-quick-search-paths.util.js +149 -0
- package/entity/src/lib/utils/entity-quick-search-paths.util.js.map +1 -0
- package/entity/src/lib/utils/entity-search-title-context.util.d.ts +21 -0
- package/entity/src/lib/utils/entity-search-title-context.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-search-title-context.util.js +127 -0
- package/entity/src/lib/utils/entity-search-title-context.util.js.map +1 -0
- package/entity/src/lib/utils/entity-workflow-record.util.d.ts +23 -0
- package/entity/src/lib/utils/entity-workflow-record.util.d.ts.map +1 -0
- package/entity/src/lib/utils/entity-workflow-record.util.js +38 -0
- package/entity/src/lib/utils/entity-workflow-record.util.js.map +1 -0
- package/entity/src/lib/utils/index.d.ts +10 -0
- package/entity/src/lib/utils/index.d.ts.map +1 -0
- package/entity/src/lib/utils/index.js +15 -0
- package/entity/src/lib/utils/index.js.map +1 -0
- package/entity/src/lib/utils/lookup-create-options.util.d.ts +10 -0
- package/entity/src/lib/utils/lookup-create-options.util.d.ts.map +1 -0
- package/entity/src/lib/utils/lookup-create-options.util.js +27 -0
- package/entity/src/lib/utils/lookup-create-options.util.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +4 -0
- package/index.js.map +1 -0
- package/package.json +21 -0
|
@@ -0,0 +1,679 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractNestedFieldsWildcard = extractNestedFieldsWildcard;
|
|
4
|
+
exports.setSmart = setSmart;
|
|
5
|
+
exports.getSmart = getSmart;
|
|
6
|
+
exports.extractValue = extractValue;
|
|
7
|
+
exports.cleanDeep = cleanDeep;
|
|
8
|
+
exports.getChangedPaths = getChangedPaths;
|
|
9
|
+
exports.getDetailedChanges = getDetailedChanges;
|
|
10
|
+
exports.getEnumValues = getEnumValues;
|
|
11
|
+
exports.shouldRestoreSavedMultiLanguageShape = shouldRestoreSavedMultiLanguageShape;
|
|
12
|
+
exports.isSelectionValueEqual = isSelectionValueEqual;
|
|
13
|
+
exports.isFormValueEqual = isFormValueEqual;
|
|
14
|
+
exports.isFormContextDirty = isFormContextDirty;
|
|
15
|
+
exports.summarizeFormContextDirtyDiff = summarizeFormContextDirtyDiff;
|
|
16
|
+
exports.captureFormContextBaseline = captureFormContextBaseline;
|
|
17
|
+
const lodash_es_1 = require("lodash-es");
|
|
18
|
+
const locale_map_value_util_1 = require("../multi-language-string/locale-map-value.util");
|
|
19
|
+
function extractNestedFieldsWildcard(obj, basePath, fields) {
|
|
20
|
+
const result = {};
|
|
21
|
+
if (fields.length === 1 && fields[0] === '*') {
|
|
22
|
+
const fullObj = (0, lodash_es_1.get)(obj, basePath);
|
|
23
|
+
return (0, lodash_es_1.isPlainObject)(fullObj) ? fullObj : {};
|
|
24
|
+
}
|
|
25
|
+
for (const field of fields) {
|
|
26
|
+
const fullPath = basePath ? `${basePath}.${field}` : field;
|
|
27
|
+
const value = (0, lodash_es_1.get)(obj, fullPath);
|
|
28
|
+
(0, lodash_es_1.set)(result, field, value);
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
function setSmart(obj, smartPath, value) {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
const pathParts = smartPath.split('.');
|
|
35
|
+
const lastPart = pathParts[pathParts.length - 1];
|
|
36
|
+
const fieldMatch = lastPart.match(/^\{(.+)\}$/);
|
|
37
|
+
if (!fieldMatch) {
|
|
38
|
+
// Fix: If value is undefined and we're setting a nested property,
|
|
39
|
+
// check if the parent object exists and if setting this would result in
|
|
40
|
+
// all properties being undefined. If so, set the parent to null instead.
|
|
41
|
+
if ((0, lodash_es_1.isNil)(value) && pathParts.length > 1) {
|
|
42
|
+
const parentPath = pathParts.slice(0, -1).join('.');
|
|
43
|
+
const parentObj = (0, lodash_es_1.get)(obj, parentPath);
|
|
44
|
+
// If parent is already null/undefined, don't recreate the object structure
|
|
45
|
+
if ((0, lodash_es_1.isNil)(parentObj)) {
|
|
46
|
+
return obj;
|
|
47
|
+
}
|
|
48
|
+
// Check if parent is a plain object (not array, not null)
|
|
49
|
+
if ((0, lodash_es_1.isPlainObject)(parentObj)) {
|
|
50
|
+
const existingKeys = Object.keys(parentObj);
|
|
51
|
+
// Check if all existing properties are null/undefined using lodash
|
|
52
|
+
const allNil = (0, lodash_es_1.isEmpty)(existingKeys) || existingKeys.every((key) => (0, lodash_es_1.isNil)(parentObj[key]));
|
|
53
|
+
if (allNil) {
|
|
54
|
+
// Set parent to null instead of creating/keeping an object with all undefined properties
|
|
55
|
+
(0, lodash_es_1.set)(obj, parentPath, null);
|
|
56
|
+
return obj;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
(0, lodash_es_1.set)(obj, smartPath, value);
|
|
61
|
+
// After setting, check again if parent should be null using lodash
|
|
62
|
+
if ((0, lodash_es_1.isNil)(value) && pathParts.length > 1) {
|
|
63
|
+
const parentPath = pathParts.slice(0, -1).join('.');
|
|
64
|
+
const parentObj = (0, lodash_es_1.get)(obj, parentPath);
|
|
65
|
+
if ((0, lodash_es_1.isPlainObject)(parentObj)) {
|
|
66
|
+
// Use lodash to check if all properties are null/undefined
|
|
67
|
+
const allNil = Object.keys(parentObj).every((key) => (0, lodash_es_1.isNil)(parentObj[key]));
|
|
68
|
+
if (allNil) {
|
|
69
|
+
(0, lodash_es_1.set)(obj, parentPath, null);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
const fields = fieldMatch[1].split(',').map((f) => f.trim());
|
|
76
|
+
const basePath = pathParts.slice(0, -1).join('.');
|
|
77
|
+
const [arrayKey, ...restPath] = basePath.split('.');
|
|
78
|
+
// Make sure the array exists
|
|
79
|
+
if (!obj[arrayKey])
|
|
80
|
+
obj[arrayKey] = [];
|
|
81
|
+
// 🟡 Case A: value is array (normal set)
|
|
82
|
+
if ((0, lodash_es_1.isArray)(value)) {
|
|
83
|
+
for (let i = 0; i < value.length; i++) {
|
|
84
|
+
const item = value[i];
|
|
85
|
+
const targetItem = (_a = obj[arrayKey][i]) !== null && _a !== void 0 ? _a : {};
|
|
86
|
+
const nested = {};
|
|
87
|
+
if (restPath.length > 0) {
|
|
88
|
+
const picked = extractNestedFieldsWildcard(item, restPath.join('.'), fields);
|
|
89
|
+
(0, lodash_es_1.set)(nested, restPath.join('.'), picked);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const picked = extractNestedFieldsWildcard(item, '', fields);
|
|
93
|
+
Object.assign(nested, picked);
|
|
94
|
+
}
|
|
95
|
+
obj[arrayKey][i] = (0, lodash_es_1.merge)({}, targetItem, nested);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// 🟢 Case B: value is a single value → broadcast
|
|
99
|
+
else {
|
|
100
|
+
for (let i = 0; i < obj[arrayKey].length; i++) {
|
|
101
|
+
const targetItem = (_b = obj[arrayKey][i]) !== null && _b !== void 0 ? _b : {};
|
|
102
|
+
const nested = {};
|
|
103
|
+
if (restPath.length > 0) {
|
|
104
|
+
for (const field of fields) {
|
|
105
|
+
(0, lodash_es_1.set)(nested, `${restPath.join('.')}.${field}`, value);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
for (const field of fields) {
|
|
110
|
+
(0, lodash_es_1.set)(nested, field, value);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
obj[arrayKey][i] = (0, lodash_es_1.merge)({}, targetItem, nested);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return obj;
|
|
117
|
+
}
|
|
118
|
+
function extractFieldsFromPath(obj, basePath, fields) {
|
|
119
|
+
if (fields.length === 1 && fields[0] === '*') {
|
|
120
|
+
const fullObj = basePath ? (0, lodash_es_1.get)(obj, basePath) : obj;
|
|
121
|
+
return (0, lodash_es_1.isPlainObject)(fullObj) ? fullObj : {};
|
|
122
|
+
}
|
|
123
|
+
const result = {};
|
|
124
|
+
for (const field of fields) {
|
|
125
|
+
const fullPath = basePath ? `${basePath}.${field}` : field;
|
|
126
|
+
const val = (0, lodash_es_1.get)(obj, fullPath);
|
|
127
|
+
if (val !== undefined) {
|
|
128
|
+
result[field] = val;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
133
|
+
function getSmart(obj, smartPath) {
|
|
134
|
+
const pathParts = smartPath.split('.');
|
|
135
|
+
const lastPart = pathParts[pathParts.length - 1];
|
|
136
|
+
const fieldMatch = lastPart.match(/^\{(.+)\}$/);
|
|
137
|
+
// Simple get (no fields)
|
|
138
|
+
if (!fieldMatch) {
|
|
139
|
+
return (0, lodash_es_1.get)(obj, smartPath);
|
|
140
|
+
}
|
|
141
|
+
const fields = fieldMatch[1].split(',').map((f) => f.trim());
|
|
142
|
+
const basePath = pathParts.slice(0, -1).join('.');
|
|
143
|
+
const items = (0, lodash_es_1.get)(obj, basePath);
|
|
144
|
+
if (!(0, lodash_es_1.isArray)(items))
|
|
145
|
+
return [];
|
|
146
|
+
const nestedPath = basePath.includes('.') ? basePath.split('.').slice(1).join('.') : '';
|
|
147
|
+
return items.map((item) => {
|
|
148
|
+
return extractFieldsFromPath(item, nestedPath, fields);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function extractValue(value, key = 'id') {
|
|
152
|
+
if ((0, lodash_es_1.isNil)(value)) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
return (0, lodash_es_1.isObjectLike)(value) ? (0, lodash_es_1.get)(value, key) : value;
|
|
156
|
+
}
|
|
157
|
+
function cleanDeep(obj) {
|
|
158
|
+
return (0, lodash_es_1.transform)(obj, (result, value, key) => {
|
|
159
|
+
if ((0, lodash_es_1.isObjectLike)(value)) {
|
|
160
|
+
const cleaned = cleanDeep(value);
|
|
161
|
+
if (!(0, lodash_es_1.isEmpty)(cleaned)) {
|
|
162
|
+
result[key] = cleaned;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else if (!(0, lodash_es_1.isNil)(value) && // not null or undefined
|
|
166
|
+
!(typeof value === 'string' && value.trim() === '') && // not empty string
|
|
167
|
+
!(Array.isArray(value) && value.length === 0) // not empty array
|
|
168
|
+
) {
|
|
169
|
+
result[key] = value;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function getDeepChanges(obj1, obj2) {
|
|
174
|
+
const changes = [];
|
|
175
|
+
function walk(o1, o2, currentPath = []) {
|
|
176
|
+
// If both values are deeply equal, skip
|
|
177
|
+
if ((0, lodash_es_1.isEqual)(o1, o2))
|
|
178
|
+
return;
|
|
179
|
+
const isObj1Nil = o1 === null || o1 === undefined;
|
|
180
|
+
const isObj2Nil = o2 === null || o2 === undefined;
|
|
181
|
+
// If obj1 is null/undefined and obj2 is not, treat entire obj2 as added
|
|
182
|
+
if (isObj1Nil && !isObj2Nil) {
|
|
183
|
+
if ((0, lodash_es_1.isPlainObject)(o2)) {
|
|
184
|
+
for (const key of Object.keys(o2)) {
|
|
185
|
+
walk(undefined, o2[key], [...currentPath, key]);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else if (Array.isArray(o2)) {
|
|
189
|
+
changes.push({
|
|
190
|
+
path: currentPath.join('.'),
|
|
191
|
+
oldValue: undefined,
|
|
192
|
+
newValue: o2,
|
|
193
|
+
arrayDiff: {
|
|
194
|
+
added: o2,
|
|
195
|
+
removed: [],
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
changes.push({
|
|
201
|
+
path: currentPath.join('.'),
|
|
202
|
+
oldValue: undefined,
|
|
203
|
+
newValue: o2,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
// If obj2 is null/undefined and obj1 is not, treat entire obj1 as removed
|
|
209
|
+
if (!isObj1Nil && isObj2Nil) {
|
|
210
|
+
if ((0, lodash_es_1.isPlainObject)(o1)) {
|
|
211
|
+
for (const key of Object.keys(o1)) {
|
|
212
|
+
walk(o1[key], undefined, [...currentPath, key]);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
else if (Array.isArray(o1)) {
|
|
216
|
+
changes.push({
|
|
217
|
+
path: currentPath.join('.'),
|
|
218
|
+
oldValue: o1,
|
|
219
|
+
newValue: undefined,
|
|
220
|
+
arrayDiff: {
|
|
221
|
+
added: [],
|
|
222
|
+
removed: o1,
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
changes.push({
|
|
228
|
+
path: currentPath.join('.'),
|
|
229
|
+
oldValue: o1,
|
|
230
|
+
newValue: undefined,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
// If both are arrays, compare items
|
|
236
|
+
if (Array.isArray(o1) && Array.isArray(o2)) {
|
|
237
|
+
if (!(0, lodash_es_1.isEqual)(o1, o2)) {
|
|
238
|
+
const added = (0, lodash_es_1.differenceWith)(o2, o1, lodash_es_1.isEqual);
|
|
239
|
+
const removed = (0, lodash_es_1.differenceWith)(o1, o2, lodash_es_1.isEqual);
|
|
240
|
+
changes.push({
|
|
241
|
+
path: currentPath.join('.'),
|
|
242
|
+
oldValue: o1,
|
|
243
|
+
newValue: o2,
|
|
244
|
+
arrayDiff: {
|
|
245
|
+
added,
|
|
246
|
+
removed,
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
// If both are plain objects, walk each key
|
|
253
|
+
if ((0, lodash_es_1.isPlainObject)(o1) && (0, lodash_es_1.isPlainObject)(o2)) {
|
|
254
|
+
const allKeys = (0, lodash_es_1.union)(Object.keys(o1), Object.keys(o2));
|
|
255
|
+
for (const key of allKeys) {
|
|
256
|
+
walk(o1[key], o2[key], [...currentPath, key]);
|
|
257
|
+
}
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
// Primitive values or mismatched types
|
|
261
|
+
changes.push({
|
|
262
|
+
path: currentPath.join('.'),
|
|
263
|
+
oldValue: o1,
|
|
264
|
+
newValue: o2,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
walk(obj1, obj2);
|
|
268
|
+
return changes;
|
|
269
|
+
}
|
|
270
|
+
// Method 1: Returns only changed paths
|
|
271
|
+
function getChangedPaths(obj1, obj2) {
|
|
272
|
+
return getDeepChanges(obj1, obj2).map((change) => change.path);
|
|
273
|
+
}
|
|
274
|
+
// Method 2: Returns full change entries
|
|
275
|
+
function getDetailedChanges(obj1, obj2) {
|
|
276
|
+
return getDeepChanges(obj1, obj2);
|
|
277
|
+
}
|
|
278
|
+
function getEnumValues(enumType) {
|
|
279
|
+
return Object.entries(enumType).map(([key, value]) => ({ id: value, title: key }));
|
|
280
|
+
}
|
|
281
|
+
//#region ---- Form value equality (dirty / baseline) ----
|
|
282
|
+
/** Whether a value uses the multi-language text widget shape (string or locale map). */
|
|
283
|
+
function isMultiLanguageFormShape(value) {
|
|
284
|
+
if (value === null || value === undefined) {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
if (typeof value === 'string') {
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
return (0, locale_map_value_util_1.isLocaleStringMap)(value);
|
|
291
|
+
}
|
|
292
|
+
/** Drops empty/whitespace locale entries from a multi-language map. */
|
|
293
|
+
function normalizeLocaleStringMap(value) {
|
|
294
|
+
const normalized = {};
|
|
295
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
296
|
+
if (typeof entry !== 'string') {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
const trimmed = entry.trim();
|
|
300
|
+
if (trimmed !== '') {
|
|
301
|
+
normalized[key] = trimmed;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return Object.keys(normalized).length === 0 ? null : normalized;
|
|
305
|
+
}
|
|
306
|
+
function compareMultiLanguageLocaleStrings(a, b) {
|
|
307
|
+
const htmlEqual = compareHtmlFormValues(a, b);
|
|
308
|
+
if (htmlEqual !== null) {
|
|
309
|
+
return htmlEqual;
|
|
310
|
+
}
|
|
311
|
+
return a === b;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Compares multi-language field values (plain string vs locale map) for dirty/baseline checks.
|
|
315
|
+
* Returns `null` when either side is not a multi-language shape (caller uses generic normalization).
|
|
316
|
+
*/
|
|
317
|
+
function compareMultiLanguageFormValues(a, b) {
|
|
318
|
+
if (!isMultiLanguageFormShape(a) || !isMultiLanguageFormShape(b)) {
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
const normalizeScalar = (value) => {
|
|
322
|
+
if (value === null || value === undefined) {
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
if (typeof value === 'string') {
|
|
326
|
+
const trimmed = value.trim();
|
|
327
|
+
return trimmed === '' ? null : trimmed;
|
|
328
|
+
}
|
|
329
|
+
if ((0, locale_map_value_util_1.isLocaleStringMap)(value)) {
|
|
330
|
+
return normalizeLocaleStringMap(value);
|
|
331
|
+
}
|
|
332
|
+
return null;
|
|
333
|
+
};
|
|
334
|
+
const left = normalizeScalar(a);
|
|
335
|
+
const right = normalizeScalar(b);
|
|
336
|
+
if (left === null && right === null) {
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
if (left === null || right === null) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
if (typeof left === 'string' && typeof right === 'string') {
|
|
343
|
+
return compareMultiLanguageLocaleStrings(left, right);
|
|
344
|
+
}
|
|
345
|
+
if (typeof left === 'string' && typeof right === 'object') {
|
|
346
|
+
return Object.values(right).some((text) => typeof text === 'string' && compareMultiLanguageLocaleStrings(left, text));
|
|
347
|
+
}
|
|
348
|
+
if (typeof right === 'string' && typeof left === 'object') {
|
|
349
|
+
return Object.values(left).some((text) => typeof text === 'string' && compareMultiLanguageLocaleStrings(right, text));
|
|
350
|
+
}
|
|
351
|
+
if (typeof left !== 'object' || typeof right !== 'object') {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
const leftMap = left;
|
|
355
|
+
const rightMap = right;
|
|
356
|
+
const leftKeys = Object.keys(leftMap).sort();
|
|
357
|
+
const rightKeys = Object.keys(rightMap).sort();
|
|
358
|
+
if (leftKeys.length !== rightKeys.length) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
return leftKeys.every((key) => compareMultiLanguageLocaleStrings(leftMap[key], rightMap[key]));
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Lookup/select expose may write a resolved MLS string while the baseline keeps the locale map.
|
|
365
|
+
* Restore baseline shape when the string matches any locale entry.
|
|
366
|
+
*/
|
|
367
|
+
function shouldRestoreSavedMultiLanguageShape(value, savedAtPath) {
|
|
368
|
+
if (typeof value !== 'string' || !(0, locale_map_value_util_1.isLocaleStringMap)(savedAtPath)) {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
const trimmed = value.trim();
|
|
372
|
+
if (trimmed === '') {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
return Object.values(savedAtPath).some((entry) => typeof entry === 'string' && entry.trim() === trimmed);
|
|
376
|
+
}
|
|
377
|
+
/** Decode common HTML entities for rich-text baseline compare. */
|
|
378
|
+
function decodeHtmlEntities(value) {
|
|
379
|
+
return value
|
|
380
|
+
.replace(/&#x([0-9a-f]+);/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)))
|
|
381
|
+
.replace(/&#(\d+);/g, (_, dec) => String.fromCharCode(parseInt(dec, 10)))
|
|
382
|
+
.replace(/&/g, '&')
|
|
383
|
+
.replace(/</g, '<')
|
|
384
|
+
.replace(/>/g, '>')
|
|
385
|
+
.replace(/"/g, '"');
|
|
386
|
+
}
|
|
387
|
+
function looksLikeHtmlFormValue(value) {
|
|
388
|
+
return /<[a-z][\s\S]*>/i.test(value.trim());
|
|
389
|
+
}
|
|
390
|
+
/** Normalizes rich-text HTML for semantic dirty/baseline compare (e.g. Quill `p`/`br` drift). */
|
|
391
|
+
function normalizeRichTextHtmlForCompare(value) {
|
|
392
|
+
var _a;
|
|
393
|
+
const html = decodeHtmlEntities(value.trim());
|
|
394
|
+
if (typeof document === 'undefined') {
|
|
395
|
+
return html.replace(/\s+/g, ' ').trim();
|
|
396
|
+
}
|
|
397
|
+
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
398
|
+
return ((_a = doc.body.textContent) !== null && _a !== void 0 ? _a : '').replace(/\s+/g, ' ').trim();
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Compares rich-text HTML strings by visible text (ignores `p` vs `br` structure drift).
|
|
402
|
+
* Returns `null` when either side is not HTML markup.
|
|
403
|
+
*/
|
|
404
|
+
function compareHtmlFormValues(a, b) {
|
|
405
|
+
if (typeof a !== 'string' || typeof b !== 'string') {
|
|
406
|
+
return null;
|
|
407
|
+
}
|
|
408
|
+
if (!looksLikeHtmlFormValue(a) || !looksLikeHtmlFormValue(b)) {
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
return normalizeRichTextHtmlForCompare(a) === normalizeRichTextHtmlForCompare(b);
|
|
412
|
+
}
|
|
413
|
+
/** Lookup/select filter-mode payload: `{ value, displayText?, operation }`. */
|
|
414
|
+
function isFilterFormShape(value) {
|
|
415
|
+
if (!(0, lodash_es_1.isPlainObject)(value)) {
|
|
416
|
+
return false;
|
|
417
|
+
}
|
|
418
|
+
const record = value;
|
|
419
|
+
return 'value' in record && 'operation' in record;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Compares filter-mode widget values by selection identity; ignores derived `displayText`.
|
|
423
|
+
*/
|
|
424
|
+
function compareFilterFormValues(a, b) {
|
|
425
|
+
if (!isFilterFormShape(a) || !isFilterFormShape(b)) {
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
428
|
+
const left = a;
|
|
429
|
+
const right = b;
|
|
430
|
+
if (!isFormValueEqual(left['value'], right['value'])) {
|
|
431
|
+
return false;
|
|
432
|
+
}
|
|
433
|
+
const opLeft = (0, lodash_es_1.get)(left, 'operation.type');
|
|
434
|
+
const opRight = (0, lodash_es_1.get)(right, 'operation.type');
|
|
435
|
+
if (opLeft !== undefined || opRight !== undefined) {
|
|
436
|
+
return opLeft === opRight;
|
|
437
|
+
}
|
|
438
|
+
return true;
|
|
439
|
+
}
|
|
440
|
+
function isReferenceScalar(value) {
|
|
441
|
+
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
|
|
442
|
+
}
|
|
443
|
+
/** Scalar id or `{ id }` identity used by lookup/select widgets. */
|
|
444
|
+
function getReferenceId(value) {
|
|
445
|
+
if ((0, lodash_es_1.isNil)(value)) {
|
|
446
|
+
return undefined;
|
|
447
|
+
}
|
|
448
|
+
if (isReferenceScalar(value)) {
|
|
449
|
+
return value;
|
|
450
|
+
}
|
|
451
|
+
if ((0, lodash_es_1.isPlainObject)(value)) {
|
|
452
|
+
const id = (0, lodash_es_1.get)(value, 'id');
|
|
453
|
+
if (!(0, lodash_es_1.isNil)(id)) {
|
|
454
|
+
return id;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return undefined;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Compares scalar selection ids to full lookup/select items (`5` vs `{ id: 5, ... }`).
|
|
461
|
+
* Does not apply when both sides are objects — those use structural compare so field edits stay dirty.
|
|
462
|
+
*/
|
|
463
|
+
function compareReferenceFormValues(a, b) {
|
|
464
|
+
const refA = getReferenceId(a);
|
|
465
|
+
const refB = getReferenceId(b);
|
|
466
|
+
if (refA === undefined || refB === undefined) {
|
|
467
|
+
return null;
|
|
468
|
+
}
|
|
469
|
+
const aIsScalar = isReferenceScalar(a);
|
|
470
|
+
const bIsScalar = isReferenceScalar(b);
|
|
471
|
+
if (!aIsScalar && !bIsScalar) {
|
|
472
|
+
return null;
|
|
473
|
+
}
|
|
474
|
+
return (0, lodash_es_1.isEqual)(normalizeFormValue(refA), normalizeFormValue(refB));
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Semantic equality for lookup/select values when restoring saved baseline shape.
|
|
478
|
+
* Compares by selection identity (id), including two full items with the same id.
|
|
479
|
+
*/
|
|
480
|
+
function isSelectionValueEqual(a, b) {
|
|
481
|
+
const filterEqual = compareFilterFormValues(a, b);
|
|
482
|
+
if (filterEqual !== null) {
|
|
483
|
+
return filterEqual;
|
|
484
|
+
}
|
|
485
|
+
const refA = getReferenceId(a);
|
|
486
|
+
const refB = getReferenceId(b);
|
|
487
|
+
if (refA !== undefined && refB !== undefined) {
|
|
488
|
+
return (0, lodash_es_1.isEqual)(normalizeFormValue(refA), normalizeFormValue(refB));
|
|
489
|
+
}
|
|
490
|
+
return isFormValueEqual(a, b);
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Stable sort key for order-insensitive array comparison (after normalization).
|
|
494
|
+
*/
|
|
495
|
+
function formValueSortKey(value) {
|
|
496
|
+
if (value === null) {
|
|
497
|
+
return '\0';
|
|
498
|
+
}
|
|
499
|
+
if (typeof value === 'number') {
|
|
500
|
+
return `n:${value}`;
|
|
501
|
+
}
|
|
502
|
+
if (typeof value === 'boolean') {
|
|
503
|
+
return `b:${value}`;
|
|
504
|
+
}
|
|
505
|
+
if (typeof value === 'string') {
|
|
506
|
+
return `s:${value}`;
|
|
507
|
+
}
|
|
508
|
+
try {
|
|
509
|
+
return `j:${JSON.stringify(value)}`;
|
|
510
|
+
}
|
|
511
|
+
catch (_a) {
|
|
512
|
+
return `u:${String(value)}`;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Sorts normalized array items so order does not affect dirty checks.
|
|
517
|
+
*/
|
|
518
|
+
function sortNormalizedArrayItems(items) {
|
|
519
|
+
return [...items].sort((a, b) => formValueSortKey(a).localeCompare(formValueSortKey(b)));
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Normalizes a form/context value for semantic baseline comparison.
|
|
523
|
+
*
|
|
524
|
+
* Rules:
|
|
525
|
+
* - `null`, `undefined`, whitespace-only strings, and empty arrays → `null` (empty)
|
|
526
|
+
* - Numeric strings → numbers (`"5"` and `5` match)
|
|
527
|
+
* - Arrays → elements normalized; empty/all-empty → `null`; otherwise sorted (order ignored)
|
|
528
|
+
* - Plain objects → keys sorted; `null`/empty nested values omitted
|
|
529
|
+
* - `Date` → epoch milliseconds
|
|
530
|
+
*/
|
|
531
|
+
function normalizeFormValue(value) {
|
|
532
|
+
if (value === undefined || value === null) {
|
|
533
|
+
return null;
|
|
534
|
+
}
|
|
535
|
+
if (typeof value === 'string') {
|
|
536
|
+
const trimmed = value.trim();
|
|
537
|
+
if (trimmed === '') {
|
|
538
|
+
return null;
|
|
539
|
+
}
|
|
540
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
541
|
+
const num = Number(trimmed);
|
|
542
|
+
if (!Number.isNaN(num)) {
|
|
543
|
+
return num;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return trimmed;
|
|
547
|
+
}
|
|
548
|
+
if (typeof value === 'number') {
|
|
549
|
+
return Number.isNaN(value) ? null : value;
|
|
550
|
+
}
|
|
551
|
+
if (typeof value === 'boolean') {
|
|
552
|
+
return value;
|
|
553
|
+
}
|
|
554
|
+
if (value instanceof Date) {
|
|
555
|
+
return value.getTime();
|
|
556
|
+
}
|
|
557
|
+
if ((0, lodash_es_1.isArray)(value)) {
|
|
558
|
+
const normalizedItems = value
|
|
559
|
+
.map((item) => normalizeFormValue(item))
|
|
560
|
+
.filter((item) => item !== null);
|
|
561
|
+
if (normalizedItems.length === 0) {
|
|
562
|
+
return null;
|
|
563
|
+
}
|
|
564
|
+
return sortNormalizedArrayItems(normalizedItems);
|
|
565
|
+
}
|
|
566
|
+
if ((0, lodash_es_1.isPlainObject)(value)) {
|
|
567
|
+
const record = value;
|
|
568
|
+
if ((0, locale_map_value_util_1.isLocaleStringMap)(record)) {
|
|
569
|
+
return normalizeLocaleStringMap(record);
|
|
570
|
+
}
|
|
571
|
+
const normalized = {};
|
|
572
|
+
for (const key of Object.keys(record).sort()) {
|
|
573
|
+
const next = normalizeFormValue(record[key]);
|
|
574
|
+
if (next !== null) {
|
|
575
|
+
normalized[key] = next;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
return normalized;
|
|
579
|
+
}
|
|
580
|
+
return value;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Semantic equality for dirty-state and baseline checks.
|
|
584
|
+
* Prefer over lodash `isEqual` when comparing user-edited form/context data to a saved baseline.
|
|
585
|
+
*
|
|
586
|
+
* Arrays: `[]`, `null`, and all-empty lists are equivalent; non-empty arrays compare as multisets (order ignored).
|
|
587
|
+
*/
|
|
588
|
+
function isFormValueEqual(a, b) {
|
|
589
|
+
const multiLanguageEqual = compareMultiLanguageFormValues(a, b);
|
|
590
|
+
if (multiLanguageEqual !== null) {
|
|
591
|
+
return multiLanguageEqual;
|
|
592
|
+
}
|
|
593
|
+
const filterEqual = compareFilterFormValues(a, b);
|
|
594
|
+
if (filterEqual !== null) {
|
|
595
|
+
return filterEqual;
|
|
596
|
+
}
|
|
597
|
+
const referenceEqual = compareReferenceFormValues(a, b);
|
|
598
|
+
if (referenceEqual !== null) {
|
|
599
|
+
return referenceEqual;
|
|
600
|
+
}
|
|
601
|
+
if ((0, lodash_es_1.isArray)(a) && (0, lodash_es_1.isArray)(b)) {
|
|
602
|
+
// Empty repeater rows normalize away; raw length must differ before multiset compare.
|
|
603
|
+
if (a.length !== b.length) {
|
|
604
|
+
return false;
|
|
605
|
+
}
|
|
606
|
+
return (0, lodash_es_1.isEqual)(normalizeFormValue(a), normalizeFormValue(b));
|
|
607
|
+
}
|
|
608
|
+
if ((0, lodash_es_1.isPlainObject)(a) && (0, lodash_es_1.isPlainObject)(b)) {
|
|
609
|
+
const left = a;
|
|
610
|
+
const right = b;
|
|
611
|
+
const keys = new Set([...Object.keys(left), ...Object.keys(right)]);
|
|
612
|
+
for (const key of keys) {
|
|
613
|
+
if (!isFormValueEqual(left[key], right[key])) {
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
return true;
|
|
618
|
+
}
|
|
619
|
+
if (typeof a === 'string' && typeof b === 'string') {
|
|
620
|
+
const htmlEqual = compareHtmlFormValues(a, b);
|
|
621
|
+
if (htmlEqual !== null) {
|
|
622
|
+
return htmlEqual;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
return (0, lodash_es_1.isEqual)(normalizeFormValue(a), normalizeFormValue(b));
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Returns whether `current` differs from the saved/clean `baseline` snapshot.
|
|
629
|
+
*/
|
|
630
|
+
function isFormContextDirty(current, baseline) {
|
|
631
|
+
return !isFormValueEqual(current, baseline);
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Lists paths where live context differs from baseline (for dirty-state trace logs).
|
|
635
|
+
*/
|
|
636
|
+
function summarizeFormContextDirtyDiff(current, baseline, maxEntries = 12) {
|
|
637
|
+
const diffs = [];
|
|
638
|
+
const walk = (path, currentValue, baselineValue) => {
|
|
639
|
+
if (diffs.length >= maxEntries) {
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
if (isFormValueEqual(currentValue, baselineValue)) {
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
const bothPlainObjects = (0, lodash_es_1.isPlainObject)(currentValue) &&
|
|
646
|
+
(0, lodash_es_1.isPlainObject)(baselineValue) &&
|
|
647
|
+
!(0, lodash_es_1.isArray)(currentValue) &&
|
|
648
|
+
!(0, lodash_es_1.isArray)(baselineValue);
|
|
649
|
+
if (bothPlainObjects) {
|
|
650
|
+
const left = currentValue;
|
|
651
|
+
const right = baselineValue;
|
|
652
|
+
const keys = new Set([...Object.keys(left), ...Object.keys(right)]);
|
|
653
|
+
for (const key of keys) {
|
|
654
|
+
if (diffs.length >= maxEntries) {
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
const nextPath = path ? `${path}.${key}` : key;
|
|
658
|
+
walk(nextPath, left[key], right[key]);
|
|
659
|
+
}
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
diffs.push({
|
|
663
|
+
path: path || '(root)',
|
|
664
|
+
current: currentValue,
|
|
665
|
+
baseline: baselineValue,
|
|
666
|
+
selectionEqual: isSelectionValueEqual(currentValue, baselineValue),
|
|
667
|
+
});
|
|
668
|
+
};
|
|
669
|
+
walk('', current, baseline);
|
|
670
|
+
return diffs;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Clones a context object for use as a dirty-tracking baseline.
|
|
674
|
+
*/
|
|
675
|
+
function captureFormContextBaseline(context) {
|
|
676
|
+
return (0, lodash_es_1.cloneDeep)(context);
|
|
677
|
+
}
|
|
678
|
+
//#endregion
|
|
679
|
+
//# sourceMappingURL=object-util.js.map
|