survery-lib 0.0.5 → 0.0.8
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/esm2022/lib/components/question-boolean-template/question-boolean-template.component.mjs +11 -3
- package/esm2022/lib/components/question-check-box-template/question-check-box-template.component.mjs +13 -5
- package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +11 -3
- package/esm2022/lib/components/question-matrix-template/question-matrix-template.component.mjs +15 -5
- package/esm2022/lib/components/question-radio-button-template/question-radio-button-template.component.mjs +11 -3
- package/esm2022/lib/components/question-text-template/question-text-template.component.mjs +22 -3
- package/esm2022/lib/pipes/filter-question.pipe.mjs +16 -0
- package/esm2022/lib/survery-lib.component.mjs +121 -27
- package/esm2022/lib/survery-lib.module.mjs +6 -3
- package/esm2022/lib/usecases/base/use-case.mjs +2 -0
- package/esm2022/lib/usecases/check-rule-exps.usecase.mjs +154 -0
- package/esm2022/shared/dtos/rule-exp.dto.mjs +1 -1
- package/esm2022/shared/enums/Logic-Property.enum.mjs +14 -0
- package/esm2022/shared/enums/logic-action.enum.mjs +9 -0
- package/esm2022/shared/enums/operator.enum.mjs +6 -0
- package/esm2022/shared/form-interfaces/survery-lib.form-interface.mjs +1 -1
- package/fesm2022/survery-lib.mjs +391 -45
- package/fesm2022/survery-lib.mjs.map +1 -1
- package/lib/components/question-boolean-template/question-boolean-template.component.d.ts +3 -1
- package/lib/components/question-check-box-template/question-check-box-template.component.d.ts +3 -1
- package/lib/components/question-dropdown-template/question-dropdown-template.component.d.ts +3 -1
- package/lib/components/question-matrix-template/question-matrix-template.component.d.ts +3 -1
- package/lib/components/question-radio-button-template/question-radio-button-template.component.d.ts +3 -1
- package/lib/components/question-text-template/question-text-template.component.d.ts +4 -1
- package/lib/pipes/filter-question.pipe.d.ts +9 -0
- package/lib/survery-lib.component.d.ts +6 -4
- package/lib/survery-lib.module.d.ts +6 -5
- package/lib/usecases/base/use-case.d.ts +7 -0
- package/lib/usecases/check-rule-exps.usecase.d.ts +21 -0
- package/package.json +1 -1
- package/shared/dtos/rule-exp.dto.d.ts +4 -2
- package/shared/enums/Logic-Property.enum.d.ts +12 -0
- package/shared/enums/logic-action.enum.d.ts +7 -0
- package/shared/enums/operator.enum.d.ts +4 -0
- package/shared/form-interfaces/survery-lib.form-interface.d.ts +17 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { UseCase } from "./base/use-case";
|
|
3
|
+
import { QuestionChildOfSurveryLibFormInterface } from "../../shared/form-interfaces/survery-lib.form-interface";
|
|
4
|
+
import { RuleExpDto } from "../../shared/dtos/rule-exp.dto";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CheckRuleExpsUsecase implements UseCase<CheckRulesUsecaseModel, CheckRulesUsecaseResult> {
|
|
7
|
+
constructor();
|
|
8
|
+
execute(params: CheckRulesUsecaseModel): Observable<CheckRulesUsecaseResult>;
|
|
9
|
+
private checkRuleExpForAnswerId;
|
|
10
|
+
private checkRuleExpForAnswerIdArr;
|
|
11
|
+
private checkRuleExpForAnswerText;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckRuleExpsUsecase, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CheckRuleExpsUsecase>;
|
|
14
|
+
}
|
|
15
|
+
export declare class CheckRulesUsecaseModel {
|
|
16
|
+
ruleExps: RuleExpDto[];
|
|
17
|
+
questions: QuestionChildOfSurveryLibFormInterface[];
|
|
18
|
+
}
|
|
19
|
+
export declare class CheckRulesUsecaseResult {
|
|
20
|
+
exprestionResultArr: boolean[];
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { LogicPropertyEnum } from "../enums/Logic-Property.enum";
|
|
2
|
+
import { OperatorEnum } from "../enums/operator.enum";
|
|
1
3
|
import { RuleExpAnswerDto } from "./rule-exp-answer.dto";
|
|
2
4
|
export interface RuleExpDto {
|
|
3
5
|
ruleExpId: number;
|
|
4
6
|
questionId: number;
|
|
5
|
-
logicPropertyId:
|
|
7
|
+
logicPropertyId: LogicPropertyEnum;
|
|
6
8
|
questionTitle: string;
|
|
7
9
|
questionTypeId: number;
|
|
8
|
-
opporator:
|
|
10
|
+
opporator: OperatorEnum;
|
|
9
11
|
isComplete: boolean;
|
|
10
12
|
ruleExpAnswers: RuleExpAnswerDto[];
|
|
11
13
|
}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
import { QuestionTypeEnum } from "../enums/question-type.enum";
|
|
1
2
|
export interface SurveryLibFormInterface {
|
|
2
3
|
currentPageIndex: number;
|
|
3
4
|
questionArray: QuestionChildOfSurveryLibFormInterface[];
|
|
5
|
+
ruleQuestionArray: RuleQuestionChildOfSurveryLibFormInterface[];
|
|
4
6
|
}
|
|
5
7
|
export interface QuestionChildOfSurveryLibFormInterface {
|
|
6
|
-
surveyPageIndex:
|
|
8
|
+
surveyPageIndex: number;
|
|
9
|
+
questionId: any;
|
|
10
|
+
questionType: QuestionTypeEnum;
|
|
11
|
+
isMatrixGroup: boolean;
|
|
12
|
+
answerId: any;
|
|
13
|
+
answerIdArr: any;
|
|
14
|
+
answerText: any;
|
|
15
|
+
isRequired: boolean;
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
isDisabled: boolean;
|
|
18
|
+
isShow: boolean;
|
|
19
|
+
isDisabled_default: boolean;
|
|
20
|
+
isShow_default: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface RuleQuestionChildOfSurveryLibFormInterface {
|
|
7
23
|
questionId: any;
|
|
8
|
-
answer: any;
|
|
9
|
-
isRequired: any;
|
|
10
|
-
isValid: any;
|
|
11
24
|
}
|