@acorex-platform/module-data-management-client 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/fesm2022/acorex-platform-module-data-management-client-contracts.mjs +366 -0
  2. package/fesm2022/acorex-platform-module-data-management-client-contracts.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-data-management-client-index-CMxKYDas.mjs +298 -0
  4. package/fesm2022/acorex-platform-module-data-management-client-index-CMxKYDas.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs +67 -0
  6. package/fesm2022/acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs +64 -0
  8. package/fesm2022/acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs +52 -0
  10. package/fesm2022/acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs +55 -0
  12. package/fesm2022/acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs +49 -0
  14. package/fesm2022/acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs +51 -0
  16. package/fesm2022/acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs +49 -0
  18. package/fesm2022/acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs +72 -0
  20. package/fesm2022/acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs +67 -0
  22. package/fesm2022/acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs +50 -0
  24. package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs +53 -0
  26. package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs +49 -0
  28. package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-data-management-client.mjs +8397 -0
  30. package/fesm2022/acorex-platform-module-data-management-client.mjs.map +1 -0
  31. package/package.json +28 -0
  32. package/types/acorex-platform-module-data-management-client-contracts.d.ts +429 -0
  33. package/types/acorex-platform-module-data-management-client.d.ts +1798 -0
@@ -0,0 +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 :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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,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzB,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,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -0,0 +1,49 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `nps-scale-options` registry data source. */
10
+ const NPS_SCALE_OPTIONS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((n) => ({
11
+ value: n,
12
+ title: `@questionnaire:datasources.nps-scale-options.samples.${n}`,
13
+ }));
14
+ //#endregion
15
+ //#region ---- Query ----
16
+ /**
17
+ * Static NPS 0–10 catalog — replaces the `nps-scale-options` DI data source.
18
+ */
19
+ class AXMListNpsScaleOptionsQuery {
20
+ //#region ---- Query Execution ----
21
+ async fetch(input) {
22
+ try {
23
+ let items = [...NPS_SCALE_OPTIONS];
24
+ if (input?.filter) {
25
+ items = applyFilterArray(items, [input.filter]);
26
+ }
27
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
28
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
29
+ items = applySortArray(items, sortOpt);
30
+ const skip = resolveCollectionSkip(input?.skip);
31
+ const take = resolveCollectionTake(input?.take);
32
+ const total = items.length;
33
+ const page = items.slice(skip, skip + take);
34
+ return runtimeQuerySuccessCollection({ items: page, total });
35
+ }
36
+ catch (error) {
37
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
38
+ }
39
+ }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListNpsScaleOptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
41
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListNpsScaleOptionsQuery, providedIn: 'root' }); }
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListNpsScaleOptionsQuery, decorators: [{
44
+ type: Injectable,
45
+ args: [{ providedIn: 'root' }]
46
+ }] });
47
+
48
+ export { AXMListNpsScaleOptionsQuery };
49
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs.map
@@ -0,0 +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;;;;;"}
@@ -0,0 +1,51 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `priority-options` registry data source. */
10
+ const PRIORITY_OPTIONS = [
11
+ { value: 'low', title: '@questionnaire:datasources.priority-options.samples.low' },
12
+ { value: 'medium', title: '@questionnaire:datasources.priority-options.samples.medium' },
13
+ { value: 'high', title: '@questionnaire:datasources.priority-options.samples.high' },
14
+ { value: 'critical', title: '@questionnaire:datasources.priority-options.samples.critical' },
15
+ ];
16
+ //#endregion
17
+ //#region ---- Query ----
18
+ /**
19
+ * Static priority catalog — replaces the `priority-options` DI data source.
20
+ */
21
+ class AXMListPriorityOptionsQuery {
22
+ //#region ---- Query Execution ----
23
+ async fetch(input) {
24
+ try {
25
+ let items = [...PRIORITY_OPTIONS];
26
+ if (input?.filter) {
27
+ items = applyFilterArray(items, [input.filter]);
28
+ }
29
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
30
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
31
+ items = applySortArray(items, sortOpt);
32
+ const skip = resolveCollectionSkip(input?.skip);
33
+ const take = resolveCollectionTake(input?.take);
34
+ const total = items.length;
35
+ const page = items.slice(skip, skip + take);
36
+ return runtimeQuerySuccessCollection({ items: page, total });
37
+ }
38
+ catch (error) {
39
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
40
+ }
41
+ }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListPriorityOptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
43
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListPriorityOptionsQuery, providedIn: 'root' }); }
44
+ }
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListPriorityOptionsQuery, decorators: [{
46
+ type: Injectable,
47
+ args: [{ providedIn: 'root' }]
48
+ }] });
49
+
50
+ export { AXMListPriorityOptionsQuery };
51
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs.map
@@ -0,0 +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,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,CAAC;AAEjC,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;;;;;"}
@@ -0,0 +1,49 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `rating-1-10-options` registry data source. */
10
+ const RATING_1_TO_10_OPTIONS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((n) => ({
11
+ value: n,
12
+ title: `@questionnaire:datasources.rating-1-10-options.samples.${n}`,
13
+ }));
14
+ //#endregion
15
+ //#region ---- Query ----
16
+ /**
17
+ * Static 1–10 rating catalog — replaces the `rating-1-10-options` DI data source.
18
+ */
19
+ class AXMListRating1To10OptionsQuery {
20
+ //#region ---- Query Execution ----
21
+ async fetch(input) {
22
+ try {
23
+ let items = [...RATING_1_TO_10_OPTIONS];
24
+ if (input?.filter) {
25
+ items = applyFilterArray(items, [input.filter]);
26
+ }
27
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
28
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
29
+ items = applySortArray(items, sortOpt);
30
+ const skip = resolveCollectionSkip(input?.skip);
31
+ const take = resolveCollectionTake(input?.take);
32
+ const total = items.length;
33
+ const page = items.slice(skip, skip + take);
34
+ return runtimeQuerySuccessCollection({ items: page, total });
35
+ }
36
+ catch (error) {
37
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
38
+ }
39
+ }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRating1To10OptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
41
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRating1To10OptionsQuery, providedIn: 'root' }); }
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRating1To10OptionsQuery, decorators: [{
44
+ type: Injectable,
45
+ args: [{ providedIn: 'root' }]
46
+ }] });
47
+
48
+ export { AXMListRating1To10OptionsQuery };
49
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs.map
@@ -0,0 +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;;;;;"}
@@ -0,0 +1,72 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `rating-scale-options` registry data source. */
10
+ const RATING_SCALE_OPTIONS = [
11
+ {
12
+ value: 1,
13
+ title: '@questionnaire:datasources.rating-scale-options.samples.1',
14
+ description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.1',
15
+ },
16
+ {
17
+ value: 2,
18
+ title: '@questionnaire:datasources.rating-scale-options.samples.2',
19
+ description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.2',
20
+ },
21
+ {
22
+ value: 3,
23
+ title: '@questionnaire:datasources.rating-scale-options.samples.3',
24
+ description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.3',
25
+ },
26
+ {
27
+ value: 4,
28
+ title: '@questionnaire:datasources.rating-scale-options.samples.4',
29
+ description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.4',
30
+ },
31
+ {
32
+ value: 5,
33
+ title: '@questionnaire:datasources.rating-scale-options.samples.5',
34
+ description: '@questionnaire:datasources.rating-scale-options.samples.descriptions.5',
35
+ },
36
+ ];
37
+ //#endregion
38
+ //#region ---- Query ----
39
+ /**
40
+ * Static 1–5 Likert rating catalog — replaces the `rating-scale-options` DI data source.
41
+ */
42
+ class AXMListRatingScaleOptionsQuery {
43
+ //#region ---- Query Execution ----
44
+ async fetch(input) {
45
+ try {
46
+ let items = [...RATING_SCALE_OPTIONS];
47
+ if (input?.filter) {
48
+ items = applyFilterArray(items, [input.filter]);
49
+ }
50
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
51
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
52
+ items = applySortArray(items, sortOpt);
53
+ const skip = resolveCollectionSkip(input?.skip);
54
+ const take = resolveCollectionTake(input?.take);
55
+ const total = items.length;
56
+ const page = items.slice(skip, skip + take);
57
+ return runtimeQuerySuccessCollection({ items: page, total });
58
+ }
59
+ catch (error) {
60
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
61
+ }
62
+ }
63
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRatingScaleOptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
64
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRatingScaleOptionsQuery, providedIn: 'root' }); }
65
+ }
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRatingScaleOptionsQuery, decorators: [{
67
+ type: Injectable,
68
+ args: [{ providedIn: 'root' }]
69
+ }] });
70
+
71
+ export { AXMListRatingScaleOptionsQuery };
72
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs.map
@@ -0,0 +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;AAE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AAK,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;;;;;"}
@@ -0,0 +1,67 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `satisfaction-options` registry data source. */
10
+ const SATISFACTION_OPTIONS = [
11
+ {
12
+ value: 'very-dissatisfied',
13
+ title: '@questionnaire:datasources.satisfaction-options.samples.very-dissatisfied',
14
+ },
15
+ {
16
+ value: 'dissatisfied',
17
+ title: '@questionnaire:datasources.satisfaction-options.samples.dissatisfied',
18
+ },
19
+ {
20
+ value: 'neutral',
21
+ title: '@questionnaire:datasources.satisfaction-options.samples.neutral',
22
+ },
23
+ {
24
+ value: 'satisfied',
25
+ title: '@questionnaire:datasources.satisfaction-options.samples.satisfied',
26
+ },
27
+ {
28
+ value: 'very-satisfied',
29
+ title: '@questionnaire:datasources.satisfaction-options.samples.very-satisfied',
30
+ },
31
+ ];
32
+ //#endregion
33
+ //#region ---- Query ----
34
+ /**
35
+ * Static satisfaction catalog — replaces the `satisfaction-options` DI data source.
36
+ */
37
+ class AXMListSatisfactionOptionsQuery {
38
+ //#region ---- Query Execution ----
39
+ async fetch(input) {
40
+ try {
41
+ let items = [...SATISFACTION_OPTIONS];
42
+ if (input?.filter) {
43
+ items = applyFilterArray(items, [input.filter]);
44
+ }
45
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
46
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
47
+ items = applySortArray(items, sortOpt);
48
+ const skip = resolveCollectionSkip(input?.skip);
49
+ const take = resolveCollectionTake(input?.take);
50
+ const total = items.length;
51
+ const page = items.slice(skip, skip + take);
52
+ return runtimeQuerySuccessCollection({ items: page, total });
53
+ }
54
+ catch (error) {
55
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
56
+ }
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListSatisfactionOptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListSatisfactionOptionsQuery, providedIn: 'root' }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListSatisfactionOptionsQuery, decorators: [{
62
+ type: Injectable,
63
+ args: [{ providedIn: 'root' }]
64
+ }] });
65
+
66
+ export { AXMListSatisfactionOptionsQuery };
67
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs.map
@@ -0,0 +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,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,KAAK,EAAE,mEAAmE;AAC3E,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,g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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;;;;;"}
@@ -0,0 +1,50 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `yes-no-maybe-options` registry data source. */
10
+ const YES_NO_MAYBE_OPTIONS = [
11
+ { value: 'yes', title: '@questionnaire:datasources.yes-no-maybe-options.samples.yes' },
12
+ { value: 'no', title: '@questionnaire:datasources.yes-no-maybe-options.samples.no' },
13
+ { value: 'maybe', title: '@questionnaire:datasources.yes-no-maybe-options.samples.maybe' },
14
+ ];
15
+ //#endregion
16
+ //#region ---- Query ----
17
+ /**
18
+ * Static Yes / No / Maybe choice catalog — replaces the `yes-no-maybe-options` DI data source.
19
+ */
20
+ class AXMListYesNoMaybeOptionsQuery {
21
+ //#region ---- Query Execution ----
22
+ async fetch(input) {
23
+ try {
24
+ let items = [...YES_NO_MAYBE_OPTIONS];
25
+ if (input?.filter) {
26
+ items = applyFilterArray(items, [input.filter]);
27
+ }
28
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
29
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
30
+ items = applySortArray(items, sortOpt);
31
+ const skip = resolveCollectionSkip(input?.skip);
32
+ const take = resolveCollectionTake(input?.take);
33
+ const total = items.length;
34
+ const page = items.slice(skip, skip + take);
35
+ return runtimeQuerySuccessCollection({ items: page, total });
36
+ }
37
+ catch (error) {
38
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
39
+ }
40
+ }
41
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoMaybeOptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
42
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoMaybeOptionsQuery, providedIn: 'root' }); }
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoMaybeOptionsQuery, decorators: [{
45
+ type: Injectable,
46
+ args: [{ providedIn: 'root' }]
47
+ }] });
48
+
49
+ export { AXMListYesNoMaybeOptionsQuery };
50
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs.map
@@ -0,0 +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,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E,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;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;;;;;"}
@@ -0,0 +1,53 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `yes-no-na-options` registry data source. */
10
+ const YES_NO_NA_OPTIONS = [
11
+ { value: 'yes', title: '@questionnaire:datasources.yes-no-na-options.samples.yes' },
12
+ { value: 'no', title: '@questionnaire:datasources.yes-no-na-options.samples.no' },
13
+ {
14
+ value: 'not-applicable',
15
+ title: '@questionnaire:datasources.yes-no-na-options.samples.not-applicable',
16
+ },
17
+ ];
18
+ //#endregion
19
+ //#region ---- Query ----
20
+ /**
21
+ * Static Yes / No / N/A choice catalog — replaces the `yes-no-na-options` DI data source.
22
+ */
23
+ class AXMListYesNoNaOptionsQuery {
24
+ //#region ---- Query Execution ----
25
+ async fetch(input) {
26
+ try {
27
+ let items = [...YES_NO_NA_OPTIONS];
28
+ if (input?.filter) {
29
+ items = applyFilterArray(items, [input.filter]);
30
+ }
31
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
32
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
33
+ items = applySortArray(items, sortOpt);
34
+ const skip = resolveCollectionSkip(input?.skip);
35
+ const take = resolveCollectionTake(input?.take);
36
+ const total = items.length;
37
+ const page = items.slice(skip, skip + take);
38
+ return runtimeQuerySuccessCollection({ items: page, total });
39
+ }
40
+ catch (error) {
41
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
42
+ }
43
+ }
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoNaOptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
45
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoNaOptionsQuery, providedIn: 'root' }); }
46
+ }
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoNaOptionsQuery, decorators: [{
48
+ type: Injectable,
49
+ args: [{ providedIn: 'root' }]
50
+ }] });
51
+
52
+ export { AXMListYesNoNaOptionsQuery };
53
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs.map
@@ -0,0 +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;;;;;"}
@@ -0,0 +1,49 @@
1
+ import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
2
+ import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
3
+ import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+
7
+ //#endregion
8
+ //#region ---- Constants ----
9
+ /** Same rows as the former `yes-no-options` registry data source. */
10
+ const YES_NO_OPTIONS = [
11
+ { value: 'yes', title: '@questionnaire:datasources.yes-no-options.samples.yes' },
12
+ { value: 'no', title: '@questionnaire:datasources.yes-no-options.samples.no' },
13
+ ];
14
+ //#endregion
15
+ //#region ---- Query ----
16
+ /**
17
+ * Static Yes / No choice catalog — replaces the `yes-no-options` DI data source.
18
+ */
19
+ class AXMListYesNoOptionsQuery {
20
+ //#region ---- Query Execution ----
21
+ async fetch(input) {
22
+ try {
23
+ let items = [...YES_NO_OPTIONS];
24
+ if (input?.filter) {
25
+ items = applyFilterArray(items, [input.filter]);
26
+ }
27
+ const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
28
+ const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value', dir: 'asc' }];
29
+ items = applySortArray(items, sortOpt);
30
+ const skip = resolveCollectionSkip(input?.skip);
31
+ const take = resolveCollectionTake(input?.take);
32
+ const total = items.length;
33
+ const page = items.slice(skip, skip + take);
34
+ return runtimeQuerySuccessCollection({ items: page, total });
35
+ }
36
+ catch (error) {
37
+ return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
38
+ }
39
+ }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoOptionsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
41
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoOptionsQuery, providedIn: 'root' }); }
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListYesNoOptionsQuery, decorators: [{
44
+ type: Injectable,
45
+ args: [{ providedIn: 'root' }]
46
+ }] });
47
+
48
+ export { AXMListYesNoOptionsQuery };
49
+ //# sourceMappingURL=acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs.map
@@ -0,0 +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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