@acorex-platform/module-data-management-client 0.0.32 → 0.0.37
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/fesm2022/acorex-platform-module-data-management-client-contracts-entities-data-source.mjs +919 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entities-data-source.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entities-meta-data-definition.mjs +288 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entities-meta-data-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entities-tag.mjs +190 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entities-tag.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-acorex-platform-module-data-management-client-contracts-entity-catalog-BIY8VQ23.mjs +88 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-acorex-platform-module-data-management-client-contracts-entity-catalog-BIY8VQ23.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-data-source.entity-CJ7ky5Gc.mjs +852 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-data-source.entity-CJ7ky5Gc.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-meta-data-definition.entity-Dj3FPJ3n.mjs +221 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-meta-data-definition.entity-Dj3FPJ3n.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-tag.entity-CFKCEoHu.mjs +123 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog-tag.entity-CFKCEoHu.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog.mjs +2 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts-entity-catalog.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-index-CMxKYDas.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-data-management-client-local-entities.mjs +31 -0
- package/fesm2022/acorex-platform-module-data-management-client-local-entities.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client.mjs +68 -57
- package/fesm2022/acorex-platform-module-data-management-client.mjs.map +1 -1
- package/package.json +21 -1
- package/types/acorex-platform-module-data-management-client-contracts-entities-data-source.d.ts +5 -0
- package/types/acorex-platform-module-data-management-client-contracts-entities-meta-data-definition.d.ts +5 -0
- package/types/acorex-platform-module-data-management-client-contracts-entities-tag.d.ts +5 -0
- package/types/acorex-platform-module-data-management-client-contracts-entity-catalog.d.ts +10 -0
- package/types/acorex-platform-module-data-management-client-local-entities.d.ts +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-contracts.mjs","sources":["../../../../libs/modules/data-management/contracts/src/column-def.widget.ts","../../../../libs/modules/data-management/contracts/src/features.keys.ts","../../../../libs/modules/data-management/contracts/src/menu.keys.ts","../../../../libs/modules/data-management/contracts/src/meta-data-builder.types.ts","../../../../libs/modules/data-management/contracts/src/permission.keys.ts","../../../../libs/modules/data-management/contracts/src/root-config.ts","../../../../libs/modules/data-management/contracts/src/entities/data-source/data-source.types.ts","../../../../libs/modules/data-management/contracts/src/entities/query/query.types.ts","../../../../libs/modules/data-management/contracts/src/entities/tag/tag.types.ts","../../../../libs/modules/data-management/contracts/src/index.ts","../../../../libs/modules/data-management/contracts/src/acorex-platform-module-data-management-client-contracts.ts"],"sourcesContent":["//#region ---- Column Definition Widget ----\n\nexport const AXM_COLUMN_DEF_WIDGET = [\n {\n type: 'grid-layout',\n mode: 'view',\n options: {\n direction: 'horizontal',\n },\n children: [\n {\n type: 'grid-item-layout',\n mode: 'view',\n options: { colSpan: 3 },\n children: [\n {\n type: 'text-editor',\n mode: 'edit',\n path: 'name',\n options: {\n placeholder: 'Column Name',\n required: true,\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n mode: 'view',\n options: { colSpan: 3 },\n children: [\n {\n type: 'text-editor',\n mode: 'edit',\n path: 'title',\n options: {\n placeholder: 'Display Title',\n required: true,\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 3 },\n mode: 'view',\n children: [\n {\n type: 'select-editor',\n mode: 'edit',\n path: 'type',\n options: {\n placeholder: 'Widget Type',\n valueField: 'name',\n textField: 'title',\n dataSource: 'PlatformManagement:ListEditorWidgets',\n direction: 'horizontal',\n multiple: false,\n required: true,\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 1 },\n mode: 'view',\n children: [\n {\n type: 'checkbox-editor',\n mode: 'edit',\n path: 'isValueField',\n options: {\n tooltip: 'Value Field (only one can be selected)',\n label: 'Value',\n },\n triggers: [\n {\n event: \"{{ events.context('columns.isValueField') }}\",\n action: `{{ context.set('columns.isValueField', context.eval('columns.isValueField')[0]); }}`,\n },\n ],\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 1 },\n mode: 'view',\n children: [\n {\n type: 'checkbox-editor',\n mode: 'edit',\n path: 'isTextField',\n options: {\n tooltip: 'Text Field (multiple allowed)',\n label: 'Text',\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 1 },\n mode: 'view',\n children: [\n {\n type: 'checkbox-editor',\n mode: 'edit',\n path: 'isRequired',\n options: {\n label: 'Required',\n tooltip: 'Required field',\n },\n },\n ],\n },\n ],\n },\n];\n\n//#endregion\n","export const AXMDataManagementFeatureKeys = {\n Queries: 'DataManagement:Feature:Queries',\n DataSources: 'DataManagement:Feature:DataSources',\n MetaDataDefinitions: 'DataManagement:Feature:MetaDataDefinitions',\n} as const;\n\n","export const AXPDataManagementMenuKeys = {\n Root: 'DataManagement:Menu',\n Queries: 'DataManagement:Menu:Queries',\n DataSources: 'DataManagement:Menu:DataSources',\n MetaDataDefinitions: 'DataManagement:Menu:MetaDataDefinitions',\n Tags: 'DataManagement:Menu:Tags',\n} as const;\n\n","import { AXPMultiLanguageString, AXPOptionsData } from '@acorex-platform/framework-shared/core';\n//#region ---- Meta-Data Builder Field / Group Types ----\n/** Localized or plain string as stored / edited in the builder */\nexport type AXMMetaDataLocalizedString = string | AXPMultiLanguageString;\n\n/** Single metadata field within a group */\nexport interface AXMMetaDataBuilderField {\n id: string;\n name: string;\n title: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n interface: string;\n configuration?: {\n isRequired?: boolean;\n placeholder?: string;\n [key: string]: unknown;\n };\n status: 'active' | 'deleted' | 'temporary';\n order: number;\n isNewlyAdded?: boolean;\n}\n\n/** Group of metadata fields */\nexport interface AXMMetaDataBuilderGroup {\n id: string;\n name: string;\n title?: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n order: number;\n fields: AXMMetaDataBuilderField[];\n isNewlyAdded?: boolean;\n}\n\n/** Designer state (internal) */\nexport interface AXMMetaDataBuilderState {\n groups: AXMMetaDataBuilderGroup[];\n mode: 'designer' | 'preview';\n selectedFieldId?: string;\n selectedGroupId?: string;\n}\n\n/** Value persisted on the entity */\nexport interface AXMMetaDataBuilderValue {\n groups: Array<{\n name: string;\n title?: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n order: number;\n fields: Array<{\n id: string;\n name: string;\n title: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n interface: string;\n configuration?: AXPOptionsData;\n order: number;\n }>;\n }>;\n}\n\n//#endregion\n\n//#region ---- Utility Functions ----\n\nexport function convertValueToState(value: unknown): AXMMetaDataBuilderState {\n if (!value) {\n return {\n groups: [createDefaultGroup()],\n mode: 'designer',\n };\n }\n\n if (Array.isArray(value)) {\n return {\n groups: [\n {\n id: 'group-default',\n name: 'default',\n title: 'Default Section',\n description: undefined,\n order: 0,\n fields: value.map((item: any, index: number) => ({\n id: item.id || `field-${index}`,\n name: item.name,\n title: item.title,\n description: item.description,\n interface: item.interface,\n configuration: item.configuration,\n status: item.status || 'active',\n order: item.order ?? index,\n isNewlyAdded: item.isNewlyAdded,\n })),\n },\n ],\n mode: 'designer',\n };\n }\n\n const v = value as { groups?: unknown[] };\n if (v.groups && Array.isArray(v.groups)) {\n const groups = v.groups.map((group: any, groupIndex: number) => ({\n id: group.id || `group-${group.name}`,\n name: group.name,\n title: group.title,\n description: group.description,\n order: group.order ?? groupIndex,\n fields: (group.fields || []).map((field: any, fieldIndex: number) => ({\n id: field.id || `field-${fieldIndex}`,\n name: field.name,\n title: field.title,\n description: field.description,\n interface: field.interface,\n configuration: field.configuration,\n status: field.status || 'active',\n order: field.order ?? fieldIndex,\n isNewlyAdded: field.isNewlyAdded,\n })),\n isNewlyAdded: group.isNewlyAdded,\n }));\n\n const finalGroups = groups.length > 0 ? groups : [createDefaultGroup()];\n\n return {\n groups: finalGroups,\n mode: 'designer',\n };\n }\n\n return {\n groups: [createDefaultGroup()],\n mode: 'designer',\n };\n}\n\nexport function convertStateToValue(state: AXMMetaDataBuilderState): AXMMetaDataBuilderValue {\n return {\n groups: state.groups.map((group) => {\n const activeFields = group.fields.filter((field) => field.status !== 'deleted');\n return {\n name: group.name,\n title: group.title,\n description: group.description,\n order: group.order,\n fields: activeFields.map((field) => ({\n id: field.id,\n name: field.name,\n title: field.title,\n description: field.description,\n interface: field.interface,\n configuration: field.configuration,\n order: field.order,\n })),\n };\n }),\n };\n}\n\nexport function createDefaultGroup(): AXMMetaDataBuilderGroup {\n return {\n id: 'group-default',\n name: 'default',\n title: 'Default Section',\n description: undefined,\n order: 0,\n fields: [],\n isNewlyAdded: true,\n };\n}\n\n//#endregion\n","/**\n * Insights & Reporting capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPInsightsReportingPermissionKeys = {\n Access: 'InsightsReporting:Permission:Access',\n MaintainReports: 'InsightsReporting:Permission:MaintainReports',\n MaintainData: 'InsightsReporting:Permission:MaintainData',\n ViewActivityInsight: 'InsightsReporting:Permission:ViewActivityInsight',\n ManageActivityInsight: 'InsightsReporting:Permission:ManageActivityInsight',\n Setup: 'InsightsReporting:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPInsightsReportingPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPermissionsKeys = {\n DataManagement: {\n Query: {\n Management: AXPInsightsReportingPermissionKeys.MaintainData,\n },\n DataSource: {\n Management: AXPInsightsReportingPermissionKeys.MaintainData,\n },\n MetaDataDefinition: {\n Management: AXPInsightsReportingPermissionKeys.Setup,\n },\n Equipment: {\n Management: AXPInsightsReportingPermissionKeys.MaintainData,\n },\n Tag: {\n Management: AXPInsightsReportingPermissionKeys.Setup,\n },\n },\n} as const;\n","const config = {\n i18n: 'data-management',\n};\nexport const RootConfig = {\n config,\n module: {\n route: 'data-management',\n name: 'DataManagement',\n title: '@data-management:module.title',\n icon: 'fa-regular fa-database',\n },\n entities: {\n query: {\n name: 'Query',\n title: '@data-management:queries.entities.query.title',\n titlePlural: '@data-management:queries.entities.query.plural',\n icon: 'fa-regular fa-nfc-magnifying-glass',\n },\n queryCategory: {\n name: 'QueryCategory',\n title: '@data-management:queries.terms.category',\n titlePlural: '@data-management:queries.terms.categories',\n icon: 'fa-regular fa-layer-group',\n },\n dataSource: {\n name: 'DataSource',\n title: '@data-management:data-sources.entities.data-source.title',\n titlePlural: '@data-management:data-sources.entities.data-source.plural',\n icon: 'fa-regular fa-database',\n },\n dataSourceCategory: {\n name: 'DataSourceCategory',\n title: '@data-management:data-sources.terms.category',\n titlePlural: '@data-management:data-sources.terms.categories',\n icon: 'fa-regular fa-layer-group',\n },\n metaDataDefinition: {\n name: 'MetaDataDefinition',\n title: '@data-management:metadata-definitions.entities.metadata-definition.title',\n titlePlural: '@data-management:metadata-definitions.entities.metadata-definition.plural',\n icon: 'fa-light fa-server',\n },\n tag: {\n name: 'Tag',\n source: 'DataManagement.Tag',\n title: '@general:terms.common.tag',\n icon: 'fa-light fa-tags',\n },\n equipmentCategory: {\n name: 'EquipmentCategory',\n title: '@data-management:equipments.entities.equipment-category.title',\n titlePlural: '@data-management:equipments.entities.equipment-category.plural',\n icon: 'fa-light fa-folder-tree',\n },\n equipment: {\n name: 'Equipment',\n source: 'DataManagement.Equipment',\n title: '@data-management:equipments.entities.equipment.title',\n titlePlural: '@data-management:equipments.entities.equipment.plural',\n icon: 'fa-light fa-plug',\n },\n },\n} as const;\n","import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Output Types ----\n\nexport enum AXMDataSourceOutputType {\n Table = 'table',\n SingleObject = 'single_object',\n Value = 'value'\n}\n\nexport interface AXMDataSourceOutputTypeOption {\n name: AXMDataSourceOutputType;\n title: string;\n}\n\n//#endregion\n\n//#region ---- Source Types ----\n\nexport enum AXMDataSourceType {\n Static = 'static',\n Query = 'query',\n // ExternalApi = 'external_api' // TODO: Will be implemented later\n}\n\nexport interface AXMDataSourceTypeOption {\n name: AXMDataSourceType;\n title: string;\n}\n\n//#endregion\n\n//#region ---- Filter Definition ----\n\nexport interface AXMDataSourceFilter {\n columnName: string;\n defaultValue: any;\n isSystemFilter: boolean; // User can enable/disable in report\n isRequired: boolean; // Must be present in report\n}\n\n//#endregion\n\n//#region ---- Main Entity Model ----\n\nexport interface AXMDataSourceEntityModel<T = string> extends AXPEntityModel<T> {\n\n name: string,\n title: string;\n categoryIds?: string[];\n sourceStatic: any[];\n sourceEntity: T;\n sourceType: AXMDataSourceTypeOption;\n outputType: AXMDataSourceOutputTypeOption;\n filters?: AXMDataSourceFilter[];\n}\n\n//#endregion\n","import { AXPCategoryListItem, AXPFilterDefinition } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport { AXMDataSourceEntityModel } from '../data-source';\n\n//#region ---- Query Builder Types ----\n\n/**\n * Query output type\n * Defines the expected structure of the query result\n */\nexport type AXPQueryOutputType = 'value' | 'table' | 'object';\n\n/**\n * Sort rule for query builder\n */\nexport interface AXPQuerySortRule {\n field: string;\n dir: 'asc' | 'desc';\n}\n\n/**\n * Aggregate operation in query\n * Represents an aggregate function applied to a field\n * Supports nested aggregates (e.g., CONCAT(MIN(field1), MAX(field2)))\n */\nexport interface AXPAggregateOperation {\n /**\n * Field name to aggregate (optional if nestedAggregates is provided)\n */\n field?: string;\n\n /**\n * Aggregate function name\n */\n function: string;\n\n /**\n * Output alias/name for the aggregated result\n */\n alias?: string;\n\n /**\n * Whether to use DISTINCT modifier\n */\n distinct?: boolean;\n\n /**\n * Nested aggregate operations (for functions like CONCAT that can contain other aggregates)\n * Example: CONCAT(MIN(price), MAX(price)) would have:\n * - function: 'concat'\n * - nestedAggregates: [\n * { function: 'min', field: 'price' },\n * { function: 'max', field: 'price' }\n * ]\n */\n nestedAggregates?: AXPAggregateOperation[];\n}\n\n/**\n * Complete query builder data model\n * Includes all query components: dataSource, columns, where, sort, groupBy, aggregates, and raw query\n */\nexport interface AXPQueryBuilderData {\n /**\n * Data source name (optional, can be set from context)\n */\n dataSource?: string;\n\n /**\n * Selected column names (array of column keys)\n */\n columns: string[];\n\n /**\n * WHERE clause (filter definition with groups and conditions)\n */\n where: AXPFilterDefinition;\n\n /**\n * Sort rules (array of field + direction)\n */\n sort: AXPQuerySortRule[];\n\n /**\n * Group by columns (array of column keys)\n */\n groupBy: string[];\n\n /**\n * Aggregate operations (array of field + function + alias)\n */\n aggregates: AXPAggregateOperation[];\n\n /**\n * Raw SQL/query string (optional, used when user wants to write raw query)\n */\n rawQuery?: string;\n\n /**\n * Query language/dialect for raw query (e.g., 'mysql', 'postgresql', 'mongodb')\n */\n queryLanguage?: string;\n\n /**\n * Expected output type for the query result\n * - 'value': Single value result (e.g., COUNT, SUM, AVG)\n * - 'table': Table result with items array and total\n * - 'object': Custom object structure\n */\n outputType?: AXPQueryOutputType;\n}\n\n//#endregion\n\n//#region ---- Query Execution Result Types ----\n\n/**\n * Query execution result\n * Can be:\n * - A single value (for aggregate queries like SUM, COUNT, etc.)\n * - A table with items and total (for regular queries)\n * - An object with custom structure\n */\nexport type AXPQueryExecutionResult =\n | {\n /**\n * Table result with items array\n */\n items: Record<string, unknown>[];\n total: number;\n metadata?: Record<string, unknown>;\n }\n | {\n /**\n * Single aggregate value result\n */\n value: unknown;\n metadata?: Record<string, unknown>;\n }\n | Record<string, unknown>\n | unknown[];\n\n//#endregion\n\n//#region ---- Entity Types ----\n\nexport interface AXMDataManagementQueryEntityModel extends AXPEntityModel<string> {\n name: string;\n title: string;\n dataSource?: AXMDataSourceEntityModel;\n query?: AXPQueryBuilderData;\n categoryIds?: string[];\n categories?: AXPCategoryListItem[];\n}\n\n// Alias for easier import in mock files\nexport type AXMQueryEntityModel = AXMDataManagementQueryEntityModel;\n\n//#endregion","//#region ---- Tag Entity Types ----\n\n/**\n * Tag entity model\n */\nexport interface AXMTag {\n id: string;\n text: string;\n color: string;\n icon?: string;\n description?: string;\n scope: 'system' | 'tenant' | 'user';\n isReadonly?: boolean;\n createdBy?: string;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\n//#endregion\n\n","//#region ---- Contracts barrel ----\n\nexport * from './column-def.widget';\nexport * from './features.keys';\nexport * from './menu.keys';\nexport * from './meta-data-builder.types';\nexport * from './permission.keys';\n\nexport * from './root-config';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEO,MAAM,qBAAqB,GAAG;AACnC,IAAA;AACE,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,OAAO,EAAE;AACP,YAAA,SAAS,EAAE,YAAY;AACxB,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,kBAAkB;AACxB,gBAAA,IAAI,EAAE,MAAM;AACZ,gBAAA,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;AACvB,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,IAAI,EAAE,aAAa;AACnB,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,OAAO,EAAE;AACP,4BAAA,WAAW,EAAE,aAAa;AAC1B,4BAAA,QAAQ,EAAE,IAAI;AACf,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACD,YAAA;AACE,gBAAA,IAAI,EAAE,kBAAkB;AACxB,gBAAA,IAAI,EAAE,MAAM;AACZ,gBAAA,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;AACvB,gBAAA,QAAQ,E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Y,iBAAiB,EAAA;AAC3B,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAEjB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;AAsC7B;;ACsGA;;AC9JA;AAkBA;;AClBA;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-contracts.mjs","sources":["../../../../libs/modules/data-management/contracts/src/column-def.widget.ts","../../../../libs/modules/data-management/contracts/src/features.keys.ts","../../../../libs/modules/data-management/contracts/src/menu.keys.ts","../../../../libs/modules/data-management/contracts/src/meta-data-builder.types.ts","../../../../libs/modules/data-management/contracts/src/permission.keys.ts","../../../../libs/modules/data-management/contracts/src/root-config.ts","../../../../libs/modules/data-management/contracts/src/entities/data-source/data-source.types.ts","../../../../libs/modules/data-management/contracts/src/entities/query/query.types.ts","../../../../libs/modules/data-management/contracts/src/entities/tag/tag.types.ts","../../../../libs/modules/data-management/contracts/src/index.ts","../../../../libs/modules/data-management/contracts/src/acorex-platform-module-data-management-client-contracts.ts"],"sourcesContent":["//#region ---- Column Definition Widget ----\n\nexport const AXM_COLUMN_DEF_WIDGET = [\n {\n type: 'grid-layout',\n mode: 'view',\n options: {\n direction: 'horizontal',\n },\n children: [\n {\n type: 'grid-item-layout',\n mode: 'view',\n options: { colSpan: 3 },\n children: [\n {\n type: 'text-editor',\n mode: 'edit',\n path: 'name',\n options: {\n placeholder: 'Column Name',\n required: true,\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n mode: 'view',\n options: { colSpan: 3 },\n children: [\n {\n type: 'text-editor',\n mode: 'edit',\n path: 'title',\n options: {\n placeholder: 'Display Title',\n required: true,\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 3 },\n mode: 'view',\n children: [\n {\n type: 'select-editor',\n mode: 'edit',\n path: 'type',\n options: {\n placeholder: 'Widget Type',\n valueField: 'name',\n textField: 'title',\n dataSource: 'PlatformManagement:ListEditorWidgets',\n direction: 'horizontal',\n multiple: false,\n required: true,\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 1 },\n mode: 'view',\n children: [\n {\n type: 'checkbox-editor',\n mode: 'edit',\n path: 'isValueField',\n options: {\n tooltip: 'Value Field (only one can be selected)',\n label: 'Value',\n },\n triggers: [\n {\n event: \"{{ events.context('columns.isValueField') }}\",\n action: `{{ context.set('columns.isValueField', context.eval('columns.isValueField')[0]); }}`,\n },\n ],\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 1 },\n mode: 'view',\n children: [\n {\n type: 'checkbox-editor',\n mode: 'edit',\n path: 'isTextField',\n options: {\n tooltip: 'Text Field (multiple allowed)',\n label: 'Text',\n },\n },\n ],\n },\n {\n type: 'grid-item-layout',\n options: { colSpan: 1 },\n mode: 'view',\n children: [\n {\n type: 'checkbox-editor',\n mode: 'edit',\n path: 'isRequired',\n options: {\n label: 'Required',\n tooltip: 'Required field',\n },\n },\n ],\n },\n ],\n },\n];\n\n//#endregion\n","export const AXMDataManagementFeatureKeys = {\n Queries: 'DataManagement:Feature:Queries',\n DataSources: 'DataManagement:Feature:DataSources',\n MetaDataDefinitions: 'DataManagement:Feature:MetaDataDefinitions',\n} as const;\n\n","export const AXPDataManagementMenuKeys = {\n Root: 'DataManagement:Menu',\n Queries: 'DataManagement:Menu:Queries',\n DataSources: 'DataManagement:Menu:DataSources',\n MetaDataDefinitions: 'DataManagement:Menu:MetaDataDefinitions',\n Tags: 'DataManagement:Menu:Tags',\n} as const;\n\n","import { AXPMultiLanguageString, AXPOptionsData } from '@acorex-platform/framework-shared/core';\n//#region ---- Meta-Data Builder Field / Group Types ----\n/** Localized or plain string as stored / edited in the builder */\nexport type AXMMetaDataLocalizedString = string | AXPMultiLanguageString;\n\n/** Single metadata field within a group */\nexport interface AXMMetaDataBuilderField {\n id: string;\n name: string;\n title: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n interface: string;\n configuration?: {\n isRequired?: boolean;\n placeholder?: string;\n [key: string]: unknown;\n };\n status: 'active' | 'deleted' | 'temporary';\n order: number;\n isNewlyAdded?: boolean;\n}\n\n/** Group of metadata fields */\nexport interface AXMMetaDataBuilderGroup {\n id: string;\n name: string;\n title?: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n order: number;\n fields: AXMMetaDataBuilderField[];\n isNewlyAdded?: boolean;\n}\n\n/** Designer state (internal) */\nexport interface AXMMetaDataBuilderState {\n groups: AXMMetaDataBuilderGroup[];\n mode: 'designer' | 'preview';\n selectedFieldId?: string;\n selectedGroupId?: string;\n}\n\n/** Value persisted on the entity */\nexport interface AXMMetaDataBuilderValue {\n groups: Array<{\n name: string;\n title?: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n order: number;\n fields: Array<{\n id: string;\n name: string;\n title: AXMMetaDataLocalizedString;\n description?: AXMMetaDataLocalizedString;\n interface: string;\n configuration?: AXPOptionsData;\n order: number;\n }>;\n }>;\n}\n\n//#endregion\n\n//#region ---- Utility Functions ----\n\nexport function convertValueToState(value: unknown): AXMMetaDataBuilderState {\n if (!value) {\n return {\n groups: [createDefaultGroup()],\n mode: 'designer',\n };\n }\n\n if (Array.isArray(value)) {\n return {\n groups: [\n {\n id: 'group-default',\n name: 'default',\n title: 'Default Section',\n description: undefined,\n order: 0,\n fields: value.map((item: any, index: number) => ({\n id: item.id || `field-${index}`,\n name: item.name,\n title: item.title,\n description: item.description,\n interface: item.interface,\n configuration: item.configuration,\n status: item.status || 'active',\n order: item.order ?? index,\n isNewlyAdded: item.isNewlyAdded,\n })),\n },\n ],\n mode: 'designer',\n };\n }\n\n const v = value as { groups?: unknown[] };\n if (v.groups && Array.isArray(v.groups)) {\n const groups = v.groups.map((group: any, groupIndex: number) => ({\n id: group.id || `group-${group.name}`,\n name: group.name,\n title: group.title,\n description: group.description,\n order: group.order ?? groupIndex,\n fields: (group.fields || []).map((field: any, fieldIndex: number) => ({\n id: field.id || `field-${fieldIndex}`,\n name: field.name,\n title: field.title,\n description: field.description,\n interface: field.interface,\n configuration: field.configuration,\n status: field.status || 'active',\n order: field.order ?? fieldIndex,\n isNewlyAdded: field.isNewlyAdded,\n })),\n isNewlyAdded: group.isNewlyAdded,\n }));\n\n const finalGroups = groups.length > 0 ? groups : [createDefaultGroup()];\n\n return {\n groups: finalGroups,\n mode: 'designer',\n };\n }\n\n return {\n groups: [createDefaultGroup()],\n mode: 'designer',\n };\n}\n\nexport function convertStateToValue(state: AXMMetaDataBuilderState): AXMMetaDataBuilderValue {\n return {\n groups: state.groups.map((group) => {\n const activeFields = group.fields.filter((field) => field.status !== 'deleted');\n return {\n name: group.name,\n title: group.title,\n description: group.description,\n order: group.order,\n fields: activeFields.map((field) => ({\n id: field.id,\n name: field.name,\n title: field.title,\n description: field.description,\n interface: field.interface,\n configuration: field.configuration,\n order: field.order,\n })),\n };\n }),\n };\n}\n\nexport function createDefaultGroup(): AXMMetaDataBuilderGroup {\n return {\n id: 'group-default',\n name: 'default',\n title: 'Default Section',\n description: undefined,\n order: 0,\n fields: [],\n isNewlyAdded: true,\n };\n}\n\n//#endregion\n","/**\n * Insights & Reporting capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPInsightsReportingPermissionKeys = {\n Access: 'InsightsReporting:Permission:Access',\n MaintainReports: 'InsightsReporting:Permission:MaintainReports',\n MaintainData: 'InsightsReporting:Permission:MaintainData',\n ViewActivityInsight: 'InsightsReporting:Permission:ViewActivityInsight',\n ManageActivityInsight: 'InsightsReporting:Permission:ManageActivityInsight',\n Setup: 'InsightsReporting:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPInsightsReportingPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPermissionsKeys = {\n DataManagement: {\n Query: {\n Management: AXPInsightsReportingPermissionKeys.MaintainData,\n },\n DataSource: {\n Management: AXPInsightsReportingPermissionKeys.MaintainData,\n },\n MetaDataDefinition: {\n Management: AXPInsightsReportingPermissionKeys.Setup,\n },\n Equipment: {\n Management: AXPInsightsReportingPermissionKeys.MaintainData,\n },\n Tag: {\n Management: AXPInsightsReportingPermissionKeys.Setup,\n },\n },\n} as const;\n","const config = {\n i18n: 'data-management',\n};\nexport const RootConfig = {\n config,\n module: {\n route: 'data-management',\n name: 'DataManagement',\n title: '@data-management:module.title',\n icon: 'fa-regular fa-database',\n },\n entities: {\n query: {\n name: 'Query',\n title: '@data-management:queries.entities.query.title',\n titlePlural: '@data-management:queries.entities.query.plural',\n icon: 'fa-regular fa-nfc-magnifying-glass',\n },\n queryCategory: {\n name: 'QueryCategory',\n title: '@data-management:queries.terms.category',\n titlePlural: '@data-management:queries.terms.categories',\n icon: 'fa-regular fa-layer-group',\n },\n dataSource: {\n name: 'DataSource',\n title: '@data-management:data-sources.entities.data-source.title',\n titlePlural: '@data-management:data-sources.entities.data-source.plural',\n icon: 'fa-regular fa-database',\n },\n dataSourceCategory: {\n name: 'DataSourceCategory',\n title: '@data-management:data-sources.terms.category',\n titlePlural: '@data-management:data-sources.terms.categories',\n icon: 'fa-regular fa-layer-group',\n },\n metaDataDefinition: {\n name: 'MetaDataDefinition',\n title: '@data-management:metadata-definitions.entities.metadata-definition.title',\n titlePlural: '@data-management:metadata-definitions.entities.metadata-definition.plural',\n icon: 'fa-light fa-server',\n },\n tag: {\n name: 'Tag',\n source: 'DataManagement.Tag',\n title: '@general:terms.common.tag',\n icon: 'fa-light fa-tags',\n },\n equipmentCategory: {\n name: 'EquipmentCategory',\n title: '@data-management:equipments.entities.equipment-category.title',\n titlePlural: '@data-management:equipments.entities.equipment-category.plural',\n icon: 'fa-light fa-folder-tree',\n },\n equipment: {\n name: 'Equipment',\n source: 'DataManagement.Equipment',\n title: '@data-management:equipments.entities.equipment.title',\n titlePlural: '@data-management:equipments.entities.equipment.plural',\n icon: 'fa-light fa-plug',\n },\n },\n} as const;\n","import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Output Types ----\n\nexport enum AXMDataSourceOutputType {\n Table = 'table',\n SingleObject = 'single_object',\n Value = 'value'\n}\n\nexport interface AXMDataSourceOutputTypeOption {\n name: AXMDataSourceOutputType;\n title: string;\n}\n\n//#endregion\n\n//#region ---- Source Types ----\n\nexport enum AXMDataSourceType {\n Static = 'static',\n Query = 'query',\n // ExternalApi = 'external_api' // TODO: Will be implemented later\n}\n\nexport interface AXMDataSourceTypeOption {\n name: AXMDataSourceType;\n title: string;\n}\n\n//#endregion\n\n//#region ---- Filter Definition ----\n\nexport interface AXMDataSourceFilter {\n columnName: string;\n defaultValue: any;\n isSystemFilter: boolean; // User can enable/disable in report\n isRequired: boolean; // Must be present in report\n}\n\n//#endregion\n\n//#region ---- Main Entity Model ----\n\nexport interface AXMDataSourceEntityModel<T = string> extends AXPEntityModel<T> {\n\n name: string,\n title: string;\n categoryIds?: string[];\n sourceStatic: any[];\n sourceEntity: T;\n sourceType: AXMDataSourceTypeOption;\n outputType: AXMDataSourceOutputTypeOption;\n filters?: AXMDataSourceFilter[];\n}\n\n//#endregion\n","import { AXPCategoryListItem, AXPFilterDefinition } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport { AXMDataSourceEntityModel } from '../data-source';\n\n//#region ---- Query Builder Types ----\n\n/**\n * Query output type\n * Defines the expected structure of the query result\n */\nexport type AXPQueryOutputType = 'value' | 'table' | 'object';\n\n/**\n * Sort rule for query builder\n */\nexport interface AXPQuerySortRule {\n field: string;\n dir: 'asc' | 'desc';\n}\n\n/**\n * Aggregate operation in query\n * Represents an aggregate function applied to a field\n * Supports nested aggregates (e.g., CONCAT(MIN(field1), MAX(field2)))\n */\nexport interface AXPAggregateOperation {\n /**\n * Field name to aggregate (optional if nestedAggregates is provided)\n */\n field?: string;\n\n /**\n * Aggregate function name\n */\n function: string;\n\n /**\n * Output alias/name for the aggregated result\n */\n alias?: string;\n\n /**\n * Whether to use DISTINCT modifier\n */\n distinct?: boolean;\n\n /**\n * Nested aggregate operations (for functions like CONCAT that can contain other aggregates)\n * Example: CONCAT(MIN(price), MAX(price)) would have:\n * - function: 'concat'\n * - nestedAggregates: [\n * { function: 'min', field: 'price' },\n * { function: 'max', field: 'price' }\n * ]\n */\n nestedAggregates?: AXPAggregateOperation[];\n}\n\n/**\n * Complete query builder data model\n * Includes all query components: dataSource, columns, where, sort, groupBy, aggregates, and raw query\n */\nexport interface AXPQueryBuilderData {\n /**\n * Data source name (optional, can be set from context)\n */\n dataSource?: string;\n\n /**\n * Selected column names (array of column keys)\n */\n columns: string[];\n\n /**\n * WHERE clause (filter definition with groups and conditions)\n */\n where: AXPFilterDefinition;\n\n /**\n * Sort rules (array of field + direction)\n */\n sort: AXPQuerySortRule[];\n\n /**\n * Group by columns (array of column keys)\n */\n groupBy: string[];\n\n /**\n * Aggregate operations (array of field + function + alias)\n */\n aggregates: AXPAggregateOperation[];\n\n /**\n * Raw SQL/query string (optional, used when user wants to write raw query)\n */\n rawQuery?: string;\n\n /**\n * Query language/dialect for raw query (e.g., 'mysql', 'postgresql', 'mongodb')\n */\n queryLanguage?: string;\n\n /**\n * Expected output type for the query result\n * - 'value': Single value result (e.g., COUNT, SUM, AVG)\n * - 'table': Table result with items array and total\n * - 'object': Custom object structure\n */\n outputType?: AXPQueryOutputType;\n}\n\n//#endregion\n\n//#region ---- Query Execution Result Types ----\n\n/**\n * Query execution result\n * Can be:\n * - A single value (for aggregate queries like SUM, COUNT, etc.)\n * - A table with items and total (for regular queries)\n * - An object with custom structure\n */\nexport type AXPQueryExecutionResult =\n | {\n /**\n * Table result with items array\n */\n items: Record<string, unknown>[];\n total: number;\n metadata?: Record<string, unknown>;\n }\n | {\n /**\n * Single aggregate value result\n */\n value: unknown;\n metadata?: Record<string, unknown>;\n }\n | Record<string, unknown>\n | unknown[];\n\n//#endregion\n\n//#region ---- Entity Types ----\n\nexport interface AXMDataManagementQueryEntityModel extends AXPEntityModel<string> {\n name: string;\n title: string;\n dataSource?: AXMDataSourceEntityModel;\n query?: AXPQueryBuilderData;\n categoryIds?: string[];\n categories?: AXPCategoryListItem[];\n}\n\n// Alias for easier import in mock files\nexport type AXMQueryEntityModel = AXMDataManagementQueryEntityModel;\n\n//#endregion","//#region ---- Tag Entity Types ----\n\n/**\n * Tag entity model\n */\nexport interface AXMTag {\n id: string;\n text: string;\n color: string;\n icon?: string;\n description?: string;\n scope: 'system' | 'tenant' | 'user';\n isReadonly?: boolean;\n createdBy?: string;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\n//#endregion\n\n","//#region ---- Contracts barrel ----\n\nexport * from './column-def.widget';\nexport * from './features.keys';\nexport * from './menu.keys';\nexport * from './meta-data-builder.types';\nexport * from './permission.keys';\n\nexport * from './root-config';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEO,MAAM,qBAAqB,GAAG;AACnC,IAAA;AACE,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,OAAO,EAAE;AACP,YAAA,SAAS,EAAE,YAAY;AACxB,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,kBAAkB;AACxB,gBAAA,IAAI,EAAE,MAAM;AACZ,gBAAA,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;AACvB,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,IAAI,EAAE,aAAa;AACnB,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,OAAO,EAAE;AACP,4BAAA,WAAW,EAAE,aAAa;AAC1B,4BAAA,QAAQ,EAAE,IAAI;AACf,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACD,Y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IAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,GAAA,EAAA,CAAA,CAAA;AAWnC;AAEA;IAEY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AAC3B,IAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAEjB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;AAsC7B;;ACsGA;;AC9JA;AAkBA;;AClBA;;ACAA;;AAEG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-index-CMxKYDas.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/meta-data/meta-data-builder/meta-data-builder-page/meta-data-builder-page.commands.ts","../../../../libs/modules/data-management/client/src/lib/features/meta-data/meta-data-builder/meta-data-builder-page/meta-data-builder-page.component.ts","../../../../libs/modules/data-management/client/src/lib/features/meta-data/meta-data-builder/meta-data-builder-page/meta-data-builder-page-component.provider.ts"],"sourcesContent":["/** Command names used by the meta-data-builder page toolbar actions. */\nexport const META_DATA_BUILDER_ADD_SECTION_COMMAND = 'MetaDataBuilder:AddSection';\nexport const META_DATA_BUILDER_PREVIEW_COMMAND = 'MetaDataBuilder:Preview';\nexport const META_DATA_BUILDER_SAVE_COMMAND = 'MetaDataBuilder:Save';\nexport const META_DATA_BUILDER_DISCARD_COMMAND = 'MetaDataBuilder:Discard';\n","\nimport { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPLayoutDetailsViewAction } from '@acorex-platform/framework-client/layout/views';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { cloneDeep, get, isEqual } from 'lodash';\nimport { AXPMetaDataBuilderGroupsComponent } from '../meta-data-builder-groups.component';\nimport { AXMMetaDataBuilderRecordService } from '../meta-data-builder-record.service';\nimport type { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-client/contracts';\nimport {\n META_DATA_BUILDER_ADD_SECTION_COMMAND,\n META_DATA_BUILDER_DISCARD_COMMAND,\n META_DATA_BUILDER_PREVIEW_COMMAND,\n META_DATA_BUILDER_SAVE_COMMAND,\n} from './meta-data-builder-page.commands';\n\n/**\n * Page component that renders the meta-data builder with hideHeaderActions,\n * and exposes Add section, Preview, Save, and Discard as page action commands.\n */\n@Component({\n selector: 'axp-meta-data-builder-page',\n standalone: true,\n imports: [AXPMetaDataBuilderGroupsComponent],\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXPMetaDataBuilderPageComponent,\n },\n ],\n template: `\n <axp-meta-data-builder-groups\n #groupsRef\n [value]=\"committedValue()\"\n [options]=\"groupsOptions()\"\n (valueChange)=\"onValueChange($event)\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.axp-page-layout-base]': 'true',\n },\n})\nexport class AXPMetaDataBuilderPageComponent extends AXPPageLayoutBaseComponent {\n /** Entity record context from details view; set asynchronously by page-component-renderer. */\n rootContext = input<Record<string, unknown>>();\n\n pageConfig = input<Record<string, unknown>>();\n\n protected groupsRef = viewChild<AXPMetaDataBuilderGroupsComponent>('groupsRef');\n\n private route = inject(ActivatedRoute);\n private entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private recordService = inject(AXMMetaDataBuilderRecordService);\n private hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n\n private entityDef = signal<AXPEntity | null>(null);\n\n private baselineValue = signal<AXMMetaDataBuilderValue | null | undefined>(null);\n protected committedValue = signal<AXMMetaDataBuilderValue | null | undefined>(null);\n\n /** True when committed meta-data differs from last saved / loaded baseline (same pattern as questionnaire questions page). */\n protected isDirty = computed(() => {\n const committed = this.committedValue();\n const baseline = this.baselineValue();\n return !isEqual(committed ?? null, baseline ?? null);\n });\n\n constructor() {\n super();\n effect((onCleanup) => {\n const moduleName = this.route.snapshot.parent?.paramMap.get('module');\n const entityName = this.route.snapshot.paramMap.get('entity');\n if (!moduleName || !entityName) {\n this.entityDef.set(null);\n return;\n }\n let cancelled = false;\n this.entityRegistry.resolve(moduleName, entityName).then((entity) => {\n if (!cancelled) this.entityDef.set(entity);\n });\n onCleanup(() => {\n cancelled = true;\n });\n });\n }\n\n protected context = computed(() => this.rootContext() ?? {});\n\n protected fieldName = computed(() => {\n const config = this.pageConfig();\n return config && typeof (config as { field?: string }).field === 'string'\n ? (config as { field: string }).field\n : 'metaDataList';\n });\n\n protected entityKey = computed(() => {\n const moduleName = this.route.snapshot.parent?.paramMap.get('module');\n const entityName = this.route.snapshot.paramMap.get('entity');\n return moduleName && entityName ? `${moduleName}.${entityName}` : '';\n });\n\n protected recordId = computed(() => {\n const ctx = this.context();\n const id = get(ctx, 'id');\n return id != null ? String(id) : '';\n });\n\n #syncFromContext = effect(() => {\n const ctx = this.rootContext();\n if (ctx == null) {\n return;\n }\n\n const field = this.fieldName();\n const value = field ? (get(ctx, field) as AXMMetaDataBuilderValue) : undefined;\n this.baselineValue.set(value ?? null);\n this.committedValue.set(value ?? null);\n untracked(() => this.recompute());\n });\n\n protected groupsOptions = computed(() => ({ hideHeaderActions: true }));\n\n protected onValueChange(value: AXMMetaDataBuilderValue): void {\n this.committedValue.set(value);\n this.updateRootContextField(this.fieldName(), value);\n this.recompute();\n }\n\n override getWizardStepContext(): Record<string, unknown> | null {\n const field = this.fieldName();\n const value = this.committedValue();\n if (!field || value == null) {\n return null;\n }\n return { [field]: cloneDeep(value) };\n }\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n override async getPrimaryMenuItems(): Promise<AXPLayoutDetailsViewAction[]> {\n const addSectionTitle =\n (await this.translateService.translateAsync('@data-management:metadata-definitions.actions.add-group.title')) ||\n 'Add section';\n const previewTitle =\n (await this.translateService.translateAsync('@data-management:metadata-definitions.actions.preview.title')) ||\n 'Preview';\n const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';\n const discardTitle = (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';\n\n return [\n {\n title: addSectionTitle,\n icon: 'fa-light fa-layer-group',\n zone: 'header',\n priority: 'primary',\n color: 'primary',\n command: { name: META_DATA_BUILDER_ADD_SECTION_COMMAND, options: {} },\n },\n {\n title: previewTitle,\n icon: 'fa-light fa-eye',\n zone: 'header',\n priority: 'primary',\n color: 'default',\n command: { name: META_DATA_BUILDER_PREVIEW_COMMAND, options: {} },\n },\n {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: this.isDirty(),\n command: { name: META_DATA_BUILDER_DISCARD_COMMAND, options: {} },\n },\n {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: this.isDirty(),\n command: { name: META_DATA_BUILDER_SAVE_COMMAND, options: {} },\n },\n ];\n }\n\n override async execute(command: { name: string; options?: unknown }): Promise<void> {\n const groups = this.groupsRef();\n if (command.name === META_DATA_BUILDER_ADD_SECTION_COMMAND) {\n await groups?.addSection();\n return;\n }\n if (command.name === META_DATA_BUILDER_PREVIEW_COMMAND) {\n await groups?.handlePreviewClick();\n return;\n }\n if (command.name === META_DATA_BUILDER_SAVE_COMMAND) {\n await this.handleSave();\n return;\n }\n if (command.name === META_DATA_BUILDER_DISCARD_COMMAND) {\n this.handleDiscard();\n return;\n }\n }\n\n private async handleSave(): Promise<void> {\n const entity = this.entityKey();\n const id = this.recordId();\n const field = this.fieldName();\n const value = this.committedValue();\n if (!entity || !id || !field) {\n this.toastService.show({\n color: 'danger',\n title: await this.translateService.translateAsync('@general:messages.error.title'),\n content: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n });\n return;\n }\n try {\n await this.recordService.updateRecord(entity, id, { [field]: value ?? { groups: [] } });\n const saved = value ?? { groups: [] };\n this.baselineValue.set(saved);\n this.committedValue.set(saved);\n this.updateRootContextField(field, saved);\n this.recompute();\n this.toastService.show({\n color: 'success',\n title: await this.translateService.translateAsync('@general:messages.generic.success.title'),\n content: await this.translateService.translateAsync('@general:messages.generic.success.description'),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n } catch {\n this.toastService.show({\n color: 'danger',\n title: await this.translateService.translateAsync('@general:messages.error.title'),\n content: await this.translateService.translateAsync('@general:messages.entity.update-failed'),\n });\n }\n }\n\n private handleDiscard(): void {\n const baseline = this.baselineValue();\n this.committedValue.set(baseline ?? null);\n this.recompute();\n }\n\n protected override recompute(): void {\n super.recompute();\n const maybeLayout = this.hostPageLayout as unknown as { recompute?: () => void };\n maybeLayout?.recompute?.();\n }\n\n /** Keeps details-view `rootContext` in sync so sidebar navigation remounts with latest data. */\n private updateRootContextField(field: string, value: unknown): void {\n const ctx = this.rootContext() as Record<string, unknown> | undefined;\n if (!ctx || typeof ctx !== 'object') {\n return;\n }\n ctx[field] = cloneDeep(value);\n }\n}\n","import {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { META_DATA_BUILDER_PAGE_COMPONENT_KEY } from '../meta-data-builder.plugin';\n\n@Injectable()\nexport class AXMMetaDataBuilderPageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: META_DATA_BUILDER_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./meta-data-builder-page.component').then((m) => m.AXPMetaDataBuilderPageComponent),\n },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;AACO,MAAM,qCAAqC,GAAG;AAC9C,MAAM,i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A+B,EAAA,UAAA,EAAA,CAAA;kBAvB3C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,iCAAiC,CAAC;AAC5C,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,+BAAiC;AAC7C,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,8BAA8B,EAAE,MAAM;AACvC,qBAAA;AACF,iBAAA;2SAOoE,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;;;;MCtDnE,uCAAuC,CAAA;AAClD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,oCAAoC;AACzC,gBAAA,MAAM,EAAE,MACN,6EAA4C,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,CAAC;AAC9F,aAAA;SACF;IACH;8GATW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAvC,uCAAuC,EAAA,CAAA,CAAA;;2FAAvC,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD;;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-index-CMxKYDas.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/meta-data/meta-data-builder/meta-data-builder-page/meta-data-builder-page.commands.ts","../../../../libs/modules/data-management/client/src/lib/features/meta-data/meta-data-builder/meta-data-builder-page/meta-data-builder-page.component.ts","../../../../libs/modules/data-management/client/src/lib/features/meta-data/meta-data-builder/meta-data-builder-page/meta-data-builder-page-component.provider.ts"],"sourcesContent":["/** Command names used by the meta-data-builder page toolbar actions. */\nexport const META_DATA_BUILDER_ADD_SECTION_COMMAND = 'MetaDataBuilder:AddSection';\nexport const META_DATA_BUILDER_PREVIEW_COMMAND = 'MetaDataBuilder:Preview';\nexport const META_DATA_BUILDER_SAVE_COMMAND = 'MetaDataBuilder:Save';\nexport const META_DATA_BUILDER_DISCARD_COMMAND = 'MetaDataBuilder:Discard';\n","\nimport { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPLayoutDetailsViewAction } from '@acorex-platform/framework-client/layout/views';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { cloneDeep, get, isEqual } from 'lodash';\nimport { AXPMetaDataBuilderGroupsComponent } from '../meta-data-builder-groups.component';\nimport { AXMMetaDataBuilderRecordService } from '../meta-data-builder-record.service';\nimport type { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-client/contracts';\nimport {\n META_DATA_BUILDER_ADD_SECTION_COMMAND,\n META_DATA_BUILDER_DISCARD_COMMAND,\n META_DATA_BUILDER_PREVIEW_COMMAND,\n META_DATA_BUILDER_SAVE_COMMAND,\n} from './meta-data-builder-page.commands';\n\n/**\n * Page component that renders the meta-data builder with hideHeaderActions,\n * and exposes Add section, Preview, Save, and Discard as page action commands.\n */\n@Component({\n selector: 'axp-meta-data-builder-page',\n standalone: true,\n imports: [AXPMetaDataBuilderGroupsComponent],\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXPMetaDataBuilderPageComponent,\n },\n ],\n template: `\n <axp-meta-data-builder-groups\n #groupsRef\n [value]=\"committedValue()\"\n [options]=\"groupsOptions()\"\n (valueChange)=\"onValueChange($event)\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.axp-page-layout-base]': 'true',\n },\n})\nexport class AXPMetaDataBuilderPageComponent extends AXPPageLayoutBaseComponent {\n /** Entity record context from details view; set asynchronously by page-component-renderer. */\n rootContext = input<Record<string, unknown>>();\n\n pageConfig = input<Record<string, unknown>>();\n\n protected groupsRef = viewChild<AXPMetaDataBuilderGroupsComponent>('groupsRef');\n\n private route = inject(ActivatedRoute);\n private entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private recordService = inject(AXMMetaDataBuilderRecordService);\n private hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n\n private entityDef = signal<AXPEntity | null>(null);\n\n private baselineValue = signal<AXMMetaDataBuilderValue | null | undefined>(null);\n protected committedValue = signal<AXMMetaDataBuilderValue | null | undefined>(null);\n\n /** True when committed meta-data differs from last saved / loaded baseline (same pattern as questionnaire questions page). */\n protected isDirty = computed(() => {\n const committed = this.committedValue();\n const baseline = this.baselineValue();\n return !isEqual(committed ?? null, baseline ?? null);\n });\n\n constructor() {\n super();\n effect((onCleanup) => {\n const moduleName = this.route.snapshot.parent?.paramMap.get('module');\n const entityName = this.route.snapshot.paramMap.get('entity');\n if (!moduleName || !entityName) {\n this.entityDef.set(null);\n return;\n }\n let cancelled = false;\n this.entityRegistry.resolve(moduleName, entityName).then((entity) => {\n if (!cancelled) this.entityDef.set(entity);\n });\n onCleanup(() => {\n cancelled = true;\n });\n });\n }\n\n protected context = computed(() => this.rootContext() ?? {});\n\n protected fieldName = computed(() => {\n const config = this.pageConfig();\n return config && typeof (config as { field?: string }).field === 'string'\n ? (config as { field: string }).field\n : 'metaDataList';\n });\n\n protected entityKey = computed(() => {\n const moduleName = this.route.snapshot.parent?.paramMap.get('module');\n const entityName = this.route.snapshot.paramMap.get('entity');\n return moduleName && entityName ? `${moduleName}.${entityName}` : '';\n });\n\n protected recordId = computed(() => {\n const ctx = this.context();\n const id = get(ctx, 'id');\n return id != null ? String(id) : '';\n });\n\n #syncFromContext = effect(() => {\n const ctx = this.rootContext();\n if (ctx == null) {\n return;\n }\n\n const field = this.fieldName();\n const value = field ? (get(ctx, field) as AXMMetaDataBuilderValue) : undefined;\n this.baselineValue.set(value ?? null);\n this.committedValue.set(value ?? null);\n untracked(() => this.recompute());\n });\n\n protected groupsOptions = computed(() => ({ hideHeaderActions: true }));\n\n protected onValueChange(value: AXMMetaDataBuilderValue): void {\n this.committedValue.set(value);\n this.updateRootContextField(this.fieldName(), value);\n this.recompute();\n }\n\n override getWizardStepContext(): Record<string, unknown> | null {\n const field = this.fieldName();\n const value = this.committedValue();\n if (!field || value == null) {\n return null;\n }\n return { [field]: cloneDeep(value) };\n }\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n override async getPrimaryMenuItems(): Promise<AXPLayoutDetailsViewAction[]> {\n const addSectionTitle =\n (await this.translateService.translateAsync('@data-management:metadata-definitions.actions.add-group.title')) ||\n 'Add section';\n const previewTitle =\n (await this.translateService.translateAsync('@data-management:metadata-definitions.actions.preview.title')) ||\n 'Preview';\n const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';\n const discardTitle = (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';\n\n return [\n {\n title: addSectionTitle,\n icon: 'fa-light fa-layer-group',\n zone: 'header',\n priority: 'primary',\n color: 'primary',\n command: { name: META_DATA_BUILDER_ADD_SECTION_COMMAND, options: {} },\n },\n {\n title: previewTitle,\n icon: 'fa-light fa-eye',\n zone: 'header',\n priority: 'primary',\n color: 'default',\n command: { name: META_DATA_BUILDER_PREVIEW_COMMAND, options: {} },\n },\n {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: this.isDirty(),\n command: { name: META_DATA_BUILDER_DISCARD_COMMAND, options: {} },\n },\n {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: this.isDirty(),\n command: { name: META_DATA_BUILDER_SAVE_COMMAND, options: {} },\n },\n ];\n }\n\n override async execute(command: { name: string; options?: unknown }): Promise<void> {\n const groups = this.groupsRef();\n if (command.name === META_DATA_BUILDER_ADD_SECTION_COMMAND) {\n await groups?.addSection();\n return;\n }\n if (command.name === META_DATA_BUILDER_PREVIEW_COMMAND) {\n await groups?.handlePreviewClick();\n return;\n }\n if (command.name === META_DATA_BUILDER_SAVE_COMMAND) {\n await this.handleSave();\n return;\n }\n if (command.name === META_DATA_BUILDER_DISCARD_COMMAND) {\n this.handleDiscard();\n return;\n }\n }\n\n private async handleSave(): Promise<void> {\n const entity = this.entityKey();\n const id = this.recordId();\n const field = this.fieldName();\n const value = this.committedValue();\n if (!entity || !id || !field) {\n this.toastService.show({\n color: 'danger',\n title: await this.translateService.translateAsync('@general:messages.error.title'),\n content: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n });\n return;\n }\n try {\n await this.recordService.updateRecord(entity, id, { [field]: value ?? { groups: [] } });\n const saved = value ?? { groups: [] };\n this.baselineValue.set(saved);\n this.committedValue.set(saved);\n this.updateRootContextField(field, saved);\n this.recompute();\n this.toastService.show({\n color: 'success',\n title: await this.translateService.translateAsync('@general:messages.generic.success.title'),\n content: await this.translateService.translateAsync('@general:messages.generic.success.description'),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n } catch {\n this.toastService.show({\n color: 'danger',\n title: await this.translateService.translateAsync('@general:messages.error.title'),\n content: await this.translateService.translateAsync('@general:messages.entity.update-failed'),\n });\n }\n }\n\n private handleDiscard(): void {\n const baseline = this.baselineValue();\n this.committedValue.set(baseline ?? null);\n this.recompute();\n }\n\n protected override recompute(): void {\n super.recompute();\n const maybeLayout = this.hostPageLayout as unknown as { recompute?: () => void };\n maybeLayout?.recompute?.();\n }\n\n /** Keeps details-view `rootContext` in sync so sidebar navigation remounts with latest data. */\n private updateRootContextField(field: string, value: unknown): void {\n const ctx = this.rootContext() as Record<string, unknown> | undefined;\n if (!ctx || typeof ctx !== 'object') {\n return;\n }\n ctx[field] = cloneDeep(value);\n }\n}\n","import {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { META_DATA_BUILDER_PAGE_COMPONENT_KEY } from '../meta-data-builder.plugin';\n\n@Injectable()\nexport class AXMMetaDataBuilderPageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: META_DATA_BUILDER_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./meta-data-builder-page.component').then((m) => m.AXPMetaDataBuilderPageComponent),\n },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;AACO,MAAM,qCAAqC,GAAG;AAC9C,MAAM,iCAAiC,GAAG;AAC1C,MAAM,8BAA8B,GAAG;AACvC,MAAM,iCAAiC,GAAG;;ACyBjD;;;AAGG;AAwBG,MAAO,+BAAgC,SAAQ,0BAA0B,CAAA;AAyB7E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AAxBT,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAA2B;AAE9C,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;QAEnC,IAAA,CAAA,SAAS,GAAG,SAAS,CAAoC,WAAW;sFAAC;AAEvE,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC3D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,+BAA+B,CAAC;AACvD,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,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,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,oCAAoC;AACzC,gBAAA,MAAM,EAAE,MACN,6EAA4C,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,CAAC;AAC9F,aAAA;SACF;IACH;8GATW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAvC,uCAAuC,EAAA,CAAA,CAAA;;2FAAvC,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-agreement-scale-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAgreementScaleOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAgreementScaleOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `agreement-scale-options` registry data source. */\nconst AGREEMENT_SCALE_OPTIONS: AXMListAgreementScaleOptionsQueryItem[] = [\n {\n value: 'strongly-disagree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.strongly-disagree',\n },\n {\n value: 'disagree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.disagree',\n },\n {\n value: 'neutral',\n title: '@questionnaire:datasources.agreement-scale-options.samples.neutral',\n },\n {\n value: 'agree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.agree',\n },\n {\n value: 'strongly-agree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.strongly-agree',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static agreement Likert catalog — replaces the `agreement-scale-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAgreementScaleOptionsQuery\n implements\n AXPCollectionQuery<AXMListAgreementScaleOptionsQueryInput, AXMListAgreementScaleOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAgreementScaleOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAgreementScaleOptionsQueryItem> {\n try {\n let items = [...AGREEMENT_SCALE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,uBAAuB,GAA4C;AACvE,IAAA;AACE,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,KAAK,EAAE,8EAA8E;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,oEAAoE;AAC5E,KAAA;AACD,IAAA;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KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iCAAiC,cADpB,MAAM,EAAA,CAAA,CAAA;;2FACnB,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAD7C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-agreement-scale-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAgreementScaleOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAgreementScaleOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `agreement-scale-options` registry data source. */\nconst AGREEMENT_SCALE_OPTIONS: AXMListAgreementScaleOptionsQueryItem[] = [\n {\n value: 'strongly-disagree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.strongly-disagree',\n },\n {\n value: 'disagree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.disagree',\n },\n {\n value: 'neutral',\n title: '@questionnaire:datasources.agreement-scale-options.samples.neutral',\n },\n {\n value: 'agree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.agree',\n },\n {\n value: 'strongly-agree',\n title: '@questionnaire:datasources.agreement-scale-options.samples.strongly-agree',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static agreement Likert catalog — replaces the `agreement-scale-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAgreementScaleOptionsQuery\n implements\n AXPCollectionQuery<AXMListAgreementScaleOptionsQueryInput, AXMListAgreementScaleOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAgreementScaleOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAgreementScaleOptionsQueryItem> {\n try {\n let items = [...AGREEMENT_SCALE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,uBAAuB,GAA4C;AACvE,IAAA;AACE,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,KAAK,EAAE,8EAA8E;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;AACD,IAAA;AACE,QA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AK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iCAAiC,cADpB,MAAM,EAAA,CAAA,CAAA;;2FACnB,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAD7C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-availability-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAvailabilityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAvailabilityOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `availability-options` registry data source. */\nconst AVAILABILITY_OPTIONS: AXMListAvailabilityOptionsQueryItem[] = [\n { value: '24-7', title: '@data-management:datasources.availability-options.samples.24-7' },\n {\n value: 'business-hours',\n title: '@data-management:datasources.availability-options.samples.business-hours',\n },\n {\n value: 'weekdays',\n title: '@data-management:datasources.availability-options.samples.weekdays',\n },\n {\n value: 'weekends',\n title: '@data-management:datasources.availability-options.samples.weekends',\n },\n {\n value: 'limited-hours',\n title: '@data-management:datasources.availability-options.samples.limited-hours',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static availability catalog — replaces the `availability-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAvailabilityOptionsQuery\n implements AXPCollectionQuery<AXMListAvailabilityOptionsQueryInput, AXMListAvailabilityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAvailabilityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAvailabilityOptionsQueryItem> {\n try {\n let items = [...AVAILABILITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAA0C;AAClE,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,gEAAgE,EAAE;AAC1F,IAAA;AACE,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,KAAK,EAAE,0EAA0E;AAClF,KAAA;AACD,IAAA;AACE,QAAA,KAAK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,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-availability-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAvailabilityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAvailabilityOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `availability-options` registry data source. */\nconst AVAILABILITY_OPTIONS: AXMListAvailabilityOptionsQueryItem[] = [\n { value: '24-7', title: '@data-management:datasources.availability-options.samples.24-7' },\n {\n value: 'business-hours',\n title: '@data-management:datasources.availability-options.samples.business-hours',\n },\n {\n value: 'weekdays',\n title: '@data-management:datasources.availability-options.samples.weekdays',\n },\n {\n value: 'weekends',\n title: '@data-management:datasources.availability-options.samples.weekends',\n },\n {\n value: 'limited-hours',\n title: '@data-management:datasources.availability-options.samples.limited-hours',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static availability catalog — replaces the `availability-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAvailabilityOptionsQuery\n implements AXPCollectionQuery<AXMListAvailabilityOptionsQueryInput, AXMListAvailabilityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAvailabilityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAvailabilityOptionsQueryItem> {\n try {\n let items = [...AVAILABILITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAA0C;AAClE,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,gEAAgE,EAAE;AAC1F,IAAA;AACE,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,KAAK,EAAE,0EAA0E;AAClF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE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E;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-frequency-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListFrequencyOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListFrequencyOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `frequency-options` registry data source. */\nconst FREQUENCY_OPTIONS: AXMListFrequencyOptionsQueryItem[] = [\n { value: 'never', title: '@questionnaire:datasources.frequency-options.samples.never' },\n { value: 'rarely', title: '@questionnaire:datasources.frequency-options.samples.rarely' },\n { value: 'sometimes', title: '@questionnaire:datasources.frequency-options.samples.sometimes' },\n { value: 'often', title: '@questionnaire:datasources.frequency-options.samples.often' },\n { value: 'always', title: '@questionnaire:datasources.frequency-options.samples.always' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static frequency catalog — replaces the `frequency-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListFrequencyOptionsQuery\n implements AXPCollectionQuery<AXMListFrequencyOptionsQueryInput, AXMListFrequencyOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListFrequencyOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListFrequencyOptionsQueryItem> {\n try {\n let items = [...FREQUENCY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,iBAAiB,GAAuC;AAC5D,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,4DAA4D,EAAE;AACvF,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,6DAA6D,EAAE;AACzF,IAAA,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,gEAAgE,EAAE;AAC/F,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,4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GA9BW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADf,MAAM,EAAA,CAAA,CAAA;;2FACnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-frequency-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListFrequencyOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListFrequencyOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `frequency-options` registry data source. */\nconst FREQUENCY_OPTIONS: AXMListFrequencyOptionsQueryItem[] = [\n { value: 'never', title: '@questionnaire:datasources.frequency-options.samples.never' },\n { value: 'rarely', title: '@questionnaire:datasources.frequency-options.samples.rarely' },\n { value: 'sometimes', title: '@questionnaire:datasources.frequency-options.samples.sometimes' },\n { value: 'often', title: '@questionnaire:datasources.frequency-options.samples.often' },\n { value: 'always', title: '@questionnaire:datasources.frequency-options.samples.always' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static frequency catalog — replaces the `frequency-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListFrequencyOptionsQuery\n implements AXPCollectionQuery<AXMListFrequencyOptionsQueryInput, AXMListFrequencyOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListFrequencyOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListFrequencyOptionsQueryItem> {\n try {\n let items = [...FREQUENCY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,iBAAiB,GAAuC;AAC5D,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,4DAA4D,EAAE;AACvF,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,6DAA6D,EAAE;AACzF,IAAA,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,gEAAgE,EAAE;AAC/F,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,4DAA4D,EAAE;AACvF,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,6DAA6D,EAAE;CAC1F;AAED;AAEA;AAEA;;AAEG;MAEU,4BAA4B,CAAA;;I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KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADf,MAAM,EAAA,CAAA,CAAA;;2FACnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-gender-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListGenderOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListGenderOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `gender-options` registry data source. */\nconst GENDER_OPTIONS: AXMListGenderOptionsQueryItem[] = [\n { value: 'female', title: '@questionnaire:datasources.gender-options.samples.female' },\n { value: 'male', title: '@questionnaire:datasources.gender-options.samples.male' },\n { value: 'non-binary', title: '@questionnaire:datasources.gender-options.samples.non-binary' },\n {\n value: 'prefer-not-to-say',\n title: '@questionnaire:datasources.gender-options.samples.prefer-not-to-say',\n },\n { value: 'other', title: '@questionnaire:datasources.gender-options.samples.other' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static gender catalog — replaces the `gender-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListGenderOptionsQuery\n implements AXPCollectionQuery<AXMListGenderOptionsQueryInput, AXMListGenderOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListGenderOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListGenderOptionsQueryItem> {\n try {\n let items = [...GENDER_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,cAAc,GAAoC;AACtD,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,0DAA0D,EAAE;AACtF,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,wDAAwD,EAAE;AAClF,IAAA,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,8DAA8D,EAAE;AAC9F,IAAA;AACE,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;AACD,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,yDAAyD,EAAE;CACrF;AAED;AAEA;AAEA;;AAEG;MAEU,yBAAyB,CAAA;;IAKpC,MAAM,KAAK,CACT,KAA6C,EAAA;AAE7C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,cAAc,CAAC;AAE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A,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-gender-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListGenderOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListGenderOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `gender-options` registry data source. */\nconst GENDER_OPTIONS: AXMListGenderOptionsQueryItem[] = [\n { value: 'female', title: '@questionnaire:datasources.gender-options.samples.female' },\n { value: 'male', title: '@questionnaire:datasources.gender-options.samples.male' },\n { value: 'non-binary', title: '@questionnaire:datasources.gender-options.samples.non-binary' },\n {\n value: 'prefer-not-to-say',\n title: '@questionnaire:datasources.gender-options.samples.prefer-not-to-say',\n },\n { value: 'other', title: '@questionnaire:datasources.gender-options.samples.other' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static gender catalog — replaces the `gender-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListGenderOptionsQuery\n implements AXPCollectionQuery<AXMListGenderOptionsQueryInput, AXMListGenderOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListGenderOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListGenderOptionsQueryItem> {\n try {\n let items = [...GENDER_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,cAAc,GAAoC;AACtD,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,0DAA0D,EAAE;AACtF,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,wDAAwD,EAAE;AAClF,IAAA,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,8DAA8D,EAAE;AAC9F,IAAA;AACE,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;AACD,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,yDAAyD,EAAE;CACrF;AAED;AAEA;AAEA;;AAEG;MAEU,yBAAyB,CAAA;;IAKpC,MAAM,KAAK,CACT,KAA6C,EAAA;AAE7C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,cAAc,CAAC;AAE/B,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,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AAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-nps-scale-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListNpsScaleOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListNpsScaleOptionsQueryItem {\n /** Stored numeric NPS score: 0–10. */\n value: number;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `nps-scale-options` registry data source. */\nconst NPS_SCALE_OPTIONS: AXMListNpsScaleOptionsQueryItem[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(\n (n) => ({\n value: n,\n title: `@questionnaire:datasources.nps-scale-options.samples.${n}`,\n }),\n);\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static NPS 0–10 catalog — replaces the `nps-scale-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListNpsScaleOptionsQuery\n implements AXPCollectionQuery<AXMListNpsScaleOptionsQueryInput, AXMListNpsScaleOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListNpsScaleOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListNpsScaleOptionsQueryItem> {\n try {\n let items = [...NPS_SCALE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,iBAAiB,GAAsC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CACjG,CAAC,CAAC,MAAM;AACN,IAAA,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAA,qDAAA,EAAwD,CAAC,CAAA,CAAE;AACnE,CAAA,CAAC,CACH;AAED;AAEA;AAEA;;AAEG;MAEU,2BAA2B,CAAA;;IAKtC,MAAM,KAAK,CACT,KAA+C,EAAA;AAE/C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,iBAAiB,CAAC;AAElC,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-nps-scale-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListNpsScaleOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListNpsScaleOptionsQueryItem {\n /** Stored numeric NPS score: 0–10. */\n value: number;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `nps-scale-options` registry data source. */\nconst NPS_SCALE_OPTIONS: AXMListNpsScaleOptionsQueryItem[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(\n (n) => ({\n value: n,\n title: `@questionnaire:datasources.nps-scale-options.samples.${n}`,\n }),\n);\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static NPS 0–10 catalog — replaces the `nps-scale-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListNpsScaleOptionsQuery\n implements AXPCollectionQuery<AXMListNpsScaleOptionsQueryInput, AXMListNpsScaleOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListNpsScaleOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListNpsScaleOptionsQueryItem> {\n try {\n let items = [...NPS_SCALE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\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AAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-priority-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListPriorityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListPriorityOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `priority-options` registry data source. */\nconst PRIORITY_OPTIONS: AXMListPriorityOptionsQueryItem[] = [\n { value: 'low', title: '@questionnaire:datasources.priority-options.samples.low' },\n { value: 'medium', title: '@questionnaire:datasources.priority-options.samples.medium' },\n { value: 'high', title: '@questionnaire:datasources.priority-options.samples.high' },\n { value: 'critical', title: '@questionnaire:datasources.priority-options.samples.critical' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static priority catalog — replaces the `priority-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListPriorityOptionsQuery\n implements AXPCollectionQuery<AXMListPriorityOptionsQueryInput, AXMListPriorityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListPriorityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListPriorityOptionsQueryItem> {\n try {\n let items = [...PRIORITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,gBAAgB,GAAsC;AAC1D,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,yDAAyD,EAAE;AAClF,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,4DAA4D,EAAE;AACxF,IAAA,EAAE,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OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-priority-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListPriorityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListPriorityOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `priority-options` registry data source. */\nconst PRIORITY_OPTIONS: AXMListPriorityOptionsQueryItem[] = [\n { value: 'low', title: '@questionnaire:datasources.priority-options.samples.low' },\n { value: 'medium', title: '@questionnaire:datasources.priority-options.samples.medium' },\n { value: 'high', title: '@questionnaire:datasources.priority-options.samples.high' },\n { value: 'critical', title: '@questionnaire:datasources.priority-options.samples.critical' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static priority catalog — replaces the `priority-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListPriorityOptionsQuery\n implements AXPCollectionQuery<AXMListPriorityOptionsQueryInput, AXMListPriorityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListPriorityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListPriorityOptionsQueryItem> {\n try {\n let items = [...PRIORITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,gBAAgB,GAAsC;AAC1D,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,yDAAyD,EAAE;AAClF,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,4DAA4D,EAAE;AACxF,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,0DAA0D,EAAE;AACpF,IAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,8DAA8D,EAAE;CAC7F;AAED;AAEA;AAEA;;AAEG;MAEU,2BAA2B,CAAA;;IAKtC,MAAM,KAAK,CACT,KAA+C,EAAA;AAE/C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,gBAAgB,C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AAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-rating-1-10-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListRating1To10OptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListRating1To10OptionsQueryItem {\n /** Stored numeric rating: 1–10. */\n value: number;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `rating-1-10-options` registry data source. */\nconst RATING_1_TO_10_OPTIONS: AXMListRating1To10OptionsQueryItem[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(\n (n) => ({\n value: n,\n title: `@questionnaire:datasources.rating-1-10-options.samples.${n}`,\n }),\n);\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static 1–10 rating catalog — replaces the `rating-1-10-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRating1To10OptionsQuery\n implements AXPCollectionQuery<AXMListRating1To10OptionsQueryInput, AXMListRating1To10OptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListRating1To10OptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListRating1To10OptionsQueryItem> {\n try {\n let items = [...RATING_1_TO_10_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,sBAAsB,GAAyC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CACtG,CAAC,CAAC,MAAM;AACN,IAAA,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAA,uDAAA,EAA0D,CAAC,CAAA,CAAE;AACrE,CAAA,CAAC,CACH;AAED;AAEA;AAEA;;AAEG;MAEU,8BAA8B,CAAA;;IAKzC,MAAM,KAAK,CACT,KAAkD,EAAA;AAElD,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,sBAAsB,CAAC;AAEvC,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cADjB,MAAM,EAAA,CAAA,CAAA;;2FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-rating-1-10-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListRating1To10OptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListRating1To10OptionsQueryItem {\n /** Stored numeric rating: 1–10. */\n value: number;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `rating-1-10-options` registry data source. */\nconst RATING_1_TO_10_OPTIONS: AXMListRating1To10OptionsQueryItem[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(\n (n) => ({\n value: n,\n title: `@questionnaire:datasources.rating-1-10-options.samples.${n}`,\n }),\n);\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static 1–10 rating catalog — replaces the `rating-1-10-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRating1To10OptionsQuery\n implements AXPCollectionQuery<AXMListRating1To10OptionsQueryInput, AXMListRating1To10OptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListRating1To10OptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListRating1To10OptionsQueryItem> {\n try {\n let items = [...RATING_1_TO_10_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,sBAAsB,GAAyC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CACtG,CAAC,CAAC,MAAM;AACN,IAAA,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAA,uDAAA,EAA0D,CAAC,CAAA,CAAE;AACrE,CAAA,CAAC,CACH;AAED;AAEA;AAEA;;AAEG;MAEU,8BAA8B,CAAA;;IAKzC,MAAM,KAAK,CACT,KAAkD,EAAA;AAElD,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,sBAAsB,CAAC;AAEvC,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cADjB,MAAM,EAAA,CAAA,CAAA;;2FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-rating-scale-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListRatingScaleOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListRatingScaleOptionsQueryItem {\n /** Stored numeric rating: 1–5. */\n value: number;\n /** Display title (i18n key). */\n title: string;\n /** Longer scale-point description (i18n key). */\n description: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `rating-scale-options` registry data source. */\nconst RATING_SCALE_OPTIONS: AXMListRatingScaleOptionsQueryItem[] = [\n {\n value: 1,\n title: '@questionnaire:datasources.rating-scale-options.samples.1',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.1',\n },\n {\n value: 2,\n title: '@questionnaire:datasources.rating-scale-options.samples.2',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.2',\n },\n {\n value: 3,\n title: '@questionnaire:datasources.rating-scale-options.samples.3',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.3',\n },\n {\n value: 4,\n title: '@questionnaire:datasources.rating-scale-options.samples.4',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.4',\n },\n {\n value: 5,\n title: '@questionnaire:datasources.rating-scale-options.samples.5',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.5',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static 1–5 Likert rating catalog — replaces the `rating-scale-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRatingScaleOptionsQuery\n implements AXPCollectionQuery<AXMListRatingScaleOptionsQueryInput, AXMListRatingScaleOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListRatingScaleOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListRatingScaleOptionsQueryItem> {\n try {\n let items = [...RATING_SCALE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA4BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAAyC;AACjE,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,8BAA8B,CAAA;;IAKzC,MAAM,KAAK,CACT,KAAkD,EAAA;AAElD,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,oBAAoB,CAAC;AAErC,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAA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":3,"file":"acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-rating-scale-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListRatingScaleOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListRatingScaleOptionsQueryItem {\n /** Stored numeric rating: 1–5. */\n value: number;\n /** Display title (i18n key). */\n title: string;\n /** Longer scale-point description (i18n key). */\n description: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `rating-scale-options` registry data source. */\nconst RATING_SCALE_OPTIONS: AXMListRatingScaleOptionsQueryItem[] = [\n {\n value: 1,\n title: '@questionnaire:datasources.rating-scale-options.samples.1',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.1',\n },\n {\n value: 2,\n title: '@questionnaire:datasources.rating-scale-options.samples.2',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.2',\n },\n {\n value: 3,\n title: '@questionnaire:datasources.rating-scale-options.samples.3',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.3',\n },\n {\n value: 4,\n title: '@questionnaire:datasources.rating-scale-options.samples.4',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.4',\n },\n {\n value: 5,\n title: '@questionnaire:datasources.rating-scale-options.samples.5',\n description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.5',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static 1–5 Likert rating catalog — replaces the `rating-scale-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRatingScaleOptionsQuery\n implements AXPCollectionQuery<AXMListRatingScaleOptionsQueryInput, AXMListRatingScaleOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListRatingScaleOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListRatingScaleOptionsQueryItem> {\n try {\n let items = [...RATING_SCALE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA4BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAAyC;AACjE,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,WAAW,EAAE,wEAAwE;AACtF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,CAAC;AACR,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EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cADjB,MAAM,EAAA,CAAA,CAAA;;2FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-satisfaction-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListSatisfactionOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListSatisfactionOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `satisfaction-options` registry data source. */\nconst SATISFACTION_OPTIONS: AXMListSatisfactionOptionsQueryItem[] = [\n {\n value: 'very-dissatisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.very-dissatisfied',\n },\n {\n value: 'dissatisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.dissatisfied',\n },\n {\n value: 'neutral',\n title: '@questionnaire:datasources.satisfaction-options.samples.neutral',\n },\n {\n value: 'satisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.satisfied',\n },\n {\n value: 'very-satisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.very-satisfied',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static satisfaction catalog — replaces the `satisfaction-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListSatisfactionOptionsQuery\n implements AXPCollectionQuery<AXMListSatisfactionOptionsQueryInput, AXMListSatisfactionOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListSatisfactionOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListSatisfactionOptionsQueryItem> {\n try {\n let items = [...SATISFACTION_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAA0C;AAClE,IAAA;AACE,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,KAAK,EAAE,2EAA2E;AACnF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,cAAc;AACrB,QAAA,KAAK,EAAE,sEAAsE;AAC9E,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,iEAAiE;AACzE,KAAA;AACD,IAAA;AACE,QA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,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-satisfaction-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListSatisfactionOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListSatisfactionOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `satisfaction-options` registry data source. */\nconst SATISFACTION_OPTIONS: AXMListSatisfactionOptionsQueryItem[] = [\n {\n value: 'very-dissatisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.very-dissatisfied',\n },\n {\n value: 'dissatisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.dissatisfied',\n },\n {\n value: 'neutral',\n title: '@questionnaire:datasources.satisfaction-options.samples.neutral',\n },\n {\n value: 'satisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.satisfied',\n },\n {\n value: 'very-satisfied',\n title: '@questionnaire:datasources.satisfaction-options.samples.very-satisfied',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static satisfaction catalog — replaces the `satisfaction-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListSatisfactionOptionsQuery\n implements AXPCollectionQuery<AXMListSatisfactionOptionsQueryInput, AXMListSatisfactionOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListSatisfactionOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListSatisfactionOptionsQueryItem> {\n try {\n let items = [...SATISFACTION_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAA0C;AAClE,IAAA;AACE,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,KAAK,EAAE,2EAA2E;AACnF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,cAAc;AACrB,QAAA,KAAK,EAAE,sEAAsE;AAC9E,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,SAAS;AAChB,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E,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-yes-no-maybe-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListYesNoMaybeOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListYesNoMaybeOptionsQueryItem {\n /** Stored choice code: `yes` | `no` | `maybe`. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `yes-no-maybe-options` registry data source. */\nconst YES_NO_MAYBE_OPTIONS: AXMListYesNoMaybeOptionsQueryItem[] = [\n { value: 'yes', title: '@questionnaire:datasources.yes-no-maybe-options.samples.yes' },\n { value: 'no', title: '@questionnaire:datasources.yes-no-maybe-options.samples.no' },\n { value: 'maybe', title: '@questionnaire:datasources.yes-no-maybe-options.samples.maybe' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static Yes / No / Maybe choice catalog — replaces the `yes-no-maybe-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListYesNoMaybeOptionsQuery\n implements AXPCollectionQuery<AXMListYesNoMaybeOptionsQueryInput, AXMListYesNoMaybeOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListYesNoMaybeOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListYesNoMaybeOptionsQueryItem> {\n try {\n let items = [...YES_NO_MAYBE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAAwC;AAChE,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,6DAA6D,EAAE;AACtF,IAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,4DAA4D,EAAE;AACpF,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,+DAA+D,EAAE;CAC3F;AAED;AAEA;AA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A;AAA7B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,cADhB,MAAM,EAAA,CAAA,CAAA;;2FACnB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBADzC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-yes-no-maybe-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListYesNoMaybeOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListYesNoMaybeOptionsQueryItem {\n /** Stored choice code: `yes` | `no` | `maybe`. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `yes-no-maybe-options` registry data source. */\nconst YES_NO_MAYBE_OPTIONS: AXMListYesNoMaybeOptionsQueryItem[] = [\n { value: 'yes', title: '@questionnaire:datasources.yes-no-maybe-options.samples.yes' },\n { value: 'no', title: '@questionnaire:datasources.yes-no-maybe-options.samples.no' },\n { value: 'maybe', title: '@questionnaire:datasources.yes-no-maybe-options.samples.maybe' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static Yes / No / Maybe choice catalog — replaces the `yes-no-maybe-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListYesNoMaybeOptionsQuery\n implements AXPCollectionQuery<AXMListYesNoMaybeOptionsQueryInput, AXMListYesNoMaybeOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListYesNoMaybeOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListYesNoMaybeOptionsQueryItem> {\n try {\n let items = [...YES_NO_MAYBE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,oBAAoB,GAAwC;AAChE,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,6DAA6D,EAAE;AACtF,IAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,4DAA4D,EAAE;AACpF,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,+DAA+D,EAAE;CAC3F;AAED;AAEA;AAEA;;AAEG;MAEU,6BAA6B,CAAA;;IAKxC,MAAM,KAAK,CACT,KAAiD,EAAA;AAEjD,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,oBAAoB,CAAC;AAErC,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,C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AC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-yes-no-na-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListYesNoNaOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListYesNoNaOptionsQueryItem {\n /** Stored choice code: `yes` | `no` | `not-applicable`. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `yes-no-na-options` registry data source. */\nconst YES_NO_NA_OPTIONS: AXMListYesNoNaOptionsQueryItem[] = [\n { value: 'yes', title: '@questionnaire:datasources.yes-no-na-options.samples.yes' },\n { value: 'no', title: '@questionnaire:datasources.yes-no-na-options.samples.no' },\n {\n value: 'not-applicable',\n title: '@questionnaire:datasources.yes-no-na-options.samples.not-applicable',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static Yes / No / N/A choice catalog — replaces the `yes-no-na-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListYesNoNaOptionsQuery\n implements AXPCollectionQuery<AXMListYesNoNaOptionsQueryInput, AXMListYesNoNaOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListYesNoNaOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListYesNoNaOptionsQueryItem> {\n try {\n let items = [...YES_NO_NA_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,iBAAiB,GAAqC;AAC1D,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0DAA0D,EAAE;AACnF,IAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,yDAAyD,EAAE;AACjF,IAAA;AACE,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,0BAA0B,CAAA;;IAKrC,MAAM,KAAK,CACT,KAA8C,EAAA;AAE9C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,iBAAiB,CAAC;AAElC,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-yes-no-na-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListYesNoNaOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListYesNoNaOptionsQueryItem {\n /** Stored choice code: `yes` | `no` | `not-applicable`. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `yes-no-na-options` registry data source. */\nconst YES_NO_NA_OPTIONS: AXMListYesNoNaOptionsQueryItem[] = [\n { value: 'yes', title: '@questionnaire:datasources.yes-no-na-options.samples.yes' },\n { value: 'no', title: '@questionnaire:datasources.yes-no-na-options.samples.no' },\n {\n value: 'not-applicable',\n title: '@questionnaire:datasources.yes-no-na-options.samples.not-applicable',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static Yes / No / N/A choice catalog — replaces the `yes-no-na-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListYesNoNaOptionsQuery\n implements AXPCollectionQuery<AXMListYesNoNaOptionsQueryInput, AXMListYesNoNaOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListYesNoNaOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListYesNoNaOptionsQueryItem> {\n try {\n let items = [...YES_NO_NA_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,iBAAiB,GAAqC;AAC1D,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0DAA0D,EAAE;AACnF,IAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,yDAAyD,EAAE;AACjF,IAAA;AACE,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,0BAA0B,CAAA;;IAKrC,MAAM,KAAK,CACT,KAA8C,EAAA;AAE9C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,iBAAiB,CAAC;AAElC,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-yes-no-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListYesNoOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListYesNoOptionsQueryItem {\n /** Stored choice code: `yes` | `no`. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `yes-no-options` registry data source. */\nconst YES_NO_OPTIONS: AXMListYesNoOptionsQueryItem[] = [\n { value: 'yes', title: '@questionnaire:datasources.yes-no-options.samples.yes' },\n { value: 'no', title: '@questionnaire:datasources.yes-no-options.samples.no' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static Yes / No choice catalog — replaces the `yes-no-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListYesNoOptionsQuery\n implements AXPCollectionQuery<AXMListYesNoOptionsQueryInput, AXMListYesNoOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListYesNoOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListYesNoOptionsQueryItem> {\n try {\n let items = [...YES_NO_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,cAAc,GAAmC;AACrD,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,uDAAuD,EAAE;AAChF,IAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,sDAAsD,EAAE;CAC/E;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A,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cADX,MAAM,EAAA,CAAA,CAAA;;2FACnB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs","sources":["../../../../libs/modules/data-management/client/src/lib/features/queries/list-yes-no-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListYesNoOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListYesNoOptionsQueryItem {\n /** Stored choice code: `yes` | `no`. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `yes-no-options` registry data source. */\nconst YES_NO_OPTIONS: AXMListYesNoOptionsQueryItem[] = [\n { value: 'yes', title: '@questionnaire:datasources.yes-no-options.samples.yes' },\n { value: 'no', title: '@questionnaire:datasources.yes-no-options.samples.no' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static Yes / No choice catalog — replaces the `yes-no-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListYesNoOptionsQuery\n implements AXPCollectionQuery<AXMListYesNoOptionsQueryInput, AXMListYesNoOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListYesNoOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListYesNoOptionsQueryItem> {\n try {\n let items = [...YES_NO_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,cAAc,GAAmC;AACrD,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,uDAAuD,EAAE;AAChF,IAAA,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,sDAAsD,EAAE;CAC/E;AAED;AAEA;AAEA;;AAEG;MAEU,wBAAwB,CAAA;;IAKnC,MAAM,KAAK,CACT,KAA4C,EAAA;AAE5C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,cAAc,CAAC;AAE/B,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO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