@mj-biz-apps/forms-ng 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/builder/builder-models.d.ts +27 -0
- package/dist/lib/builder/builder-models.d.ts.map +1 -0
- package/dist/lib/builder/builder-models.js +15 -0
- package/dist/lib/builder/builder-models.js.map +1 -0
- package/dist/lib/builder/builder-state.service.d.ts +48 -0
- package/dist/lib/builder/builder-state.service.d.ts.map +1 -0
- package/dist/lib/builder/builder-state.service.js +231 -0
- package/dist/lib/builder/builder-state.service.js.map +1 -0
- package/dist/lib/builder/builder-styles.d.ts +12 -0
- package/dist/lib/builder/builder-styles.d.ts.map +1 -0
- package/dist/lib/builder/builder-styles.js +74 -0
- package/dist/lib/builder/builder-styles.js.map +1 -0
- package/dist/lib/builder/conditional-rule-editor.component.d.ts +53 -0
- package/dist/lib/builder/conditional-rule-editor.component.d.ts.map +1 -0
- package/dist/lib/builder/conditional-rule-editor.component.js +282 -0
- package/dist/lib/builder/conditional-rule-editor.component.js.map +1 -0
- package/dist/lib/builder/design-panel.component.d.ts +71 -0
- package/dist/lib/builder/design-panel.component.d.ts.map +1 -0
- package/dist/lib/builder/design-panel.component.js +530 -0
- package/dist/lib/builder/design-panel.component.js.map +1 -0
- package/dist/lib/builder/design-panel.styles.d.ts +10 -0
- package/dist/lib/builder/design-panel.styles.d.ts.map +1 -0
- package/dist/lib/builder/design-panel.styles.js +78 -0
- package/dist/lib/builder/design-panel.styles.js.map +1 -0
- package/dist/lib/builder/design-state.service.d.ts +51 -0
- package/dist/lib/builder/design-state.service.d.ts.map +1 -0
- package/dist/lib/builder/design-state.service.js +108 -0
- package/dist/lib/builder/design-state.service.js.map +1 -0
- package/dist/lib/builder/distribution-links.d.ts +29 -0
- package/dist/lib/builder/distribution-links.d.ts.map +1 -0
- package/dist/lib/builder/distribution-links.js +53 -0
- package/dist/lib/builder/distribution-links.js.map +1 -0
- package/dist/lib/builder/distribution-manager.component.d.ts +53 -0
- package/dist/lib/builder/distribution-manager.component.d.ts.map +1 -0
- package/dist/lib/builder/distribution-manager.component.js +330 -0
- package/dist/lib/builder/distribution-manager.component.js.map +1 -0
- package/dist/lib/builder/distribution.service.d.ts +62 -0
- package/dist/lib/builder/distribution.service.d.ts.map +1 -0
- package/dist/lib/builder/distribution.service.js +140 -0
- package/dist/lib/builder/distribution.service.js.map +1 -0
- package/dist/lib/builder/entity-names.d.ts +20 -0
- package/dist/lib/builder/entity-names.d.ts.map +1 -0
- package/dist/lib/builder/entity-names.js +20 -0
- package/dist/lib/builder/entity-names.js.map +1 -0
- package/dist/lib/builder/form-builder.component.d.ts +92 -0
- package/dist/lib/builder/form-builder.component.d.ts.map +1 -0
- package/dist/lib/builder/form-builder.component.js +627 -0
- package/dist/lib/builder/form-builder.component.js.map +1 -0
- package/dist/lib/builder/form-builder.styles.d.ts +3 -0
- package/dist/lib/builder/form-builder.styles.d.ts.map +1 -0
- package/dist/lib/builder/form-builder.styles.js +94 -0
- package/dist/lib/builder/form-builder.styles.js.map +1 -0
- package/dist/lib/builder/form-preview-modal.component.d.ts +25 -0
- package/dist/lib/builder/form-preview-modal.component.d.ts.map +1 -0
- package/dist/lib/builder/form-preview-modal.component.js +90 -0
- package/dist/lib/builder/form-preview-modal.component.js.map +1 -0
- package/dist/lib/builder/index.d.ts +31 -0
- package/dist/lib/builder/index.d.ts.map +1 -0
- package/dist/lib/builder/index.js +32 -0
- package/dist/lib/builder/index.js.map +1 -0
- package/dist/lib/builder/json-fields.d.ts +14 -0
- package/dist/lib/builder/json-fields.d.ts.map +1 -0
- package/dist/lib/builder/json-fields.js +100 -0
- package/dist/lib/builder/json-fields.js.map +1 -0
- package/dist/lib/builder/publish.service.d.ts +34 -0
- package/dist/lib/builder/publish.service.d.ts.map +1 -0
- package/dist/lib/builder/publish.service.js +110 -0
- package/dist/lib/builder/publish.service.js.map +1 -0
- package/dist/lib/builder/qr-code.d.ts +26 -0
- package/dist/lib/builder/qr-code.d.ts.map +1 -0
- package/dist/lib/builder/qr-code.js +361 -0
- package/dist/lib/builder/qr-code.js.map +1 -0
- package/dist/lib/builder/question-editor.component.d.ts +41 -0
- package/dist/lib/builder/question-editor.component.d.ts.map +1 -0
- package/dist/lib/builder/question-editor.component.js +228 -0
- package/dist/lib/builder/question-editor.component.js.map +1 -0
- package/dist/lib/builder/question-type-catalog.d.ts +29 -0
- package/dist/lib/builder/question-type-catalog.d.ts.map +1 -0
- package/dist/lib/builder/question-type-catalog.js +43 -0
- package/dist/lib/builder/question-type-catalog.js.map +1 -0
- package/dist/lib/builder/reorder.d.ts +10 -0
- package/dist/lib/builder/reorder.d.ts.map +1 -0
- package/dist/lib/builder/reorder.js +18 -0
- package/dist/lib/builder/reorder.js.map +1 -0
- package/dist/lib/builder/snapshot-builder.d.ts +16 -0
- package/dist/lib/builder/snapshot-builder.d.ts.map +1 -0
- package/dist/lib/builder/snapshot-builder.js +93 -0
- package/dist/lib/builder/snapshot-builder.js.map +1 -0
- package/dist/lib/builder/style-tokens.d.ts +54 -0
- package/dist/lib/builder/style-tokens.d.ts.map +1 -0
- package/dist/lib/builder/style-tokens.js +71 -0
- package/dist/lib/builder/style-tokens.js.map +1 -0
- package/dist/lib/builder/validation-rule-editor.component.d.ts +27 -0
- package/dist/lib/builder/validation-rule-editor.component.d.ts.map +1 -0
- package/dist/lib/builder/validation-rule-editor.component.js +179 -0
- package/dist/lib/builder/validation-rule-editor.component.js.map +1 -0
- package/dist/lib/dashboard/components/distribution-chart.component.d.ts +14 -0
- package/dist/lib/dashboard/components/distribution-chart.component.d.ts.map +1 -0
- package/dist/lib/dashboard/components/distribution-chart.component.js +85 -0
- package/dist/lib/dashboard/components/distribution-chart.component.js.map +1 -0
- package/dist/lib/dashboard/components/funnel-chart.component.d.ts +14 -0
- package/dist/lib/dashboard/components/funnel-chart.component.d.ts.map +1 -0
- package/dist/lib/dashboard/components/funnel-chart.component.js +101 -0
- package/dist/lib/dashboard/components/funnel-chart.component.js.map +1 -0
- package/dist/lib/dashboard/components/question-breakdown.component.d.ts +16 -0
- package/dist/lib/dashboard/components/question-breakdown.component.d.ts.map +1 -0
- package/dist/lib/dashboard/components/question-breakdown.component.js +213 -0
- package/dist/lib/dashboard/components/question-breakdown.component.js.map +1 -0
- package/dist/lib/dashboard/components/response-detail.component.d.ts +11 -0
- package/dist/lib/dashboard/components/response-detail.component.d.ts.map +1 -0
- package/dist/lib/dashboard/components/response-detail.component.js +113 -0
- package/dist/lib/dashboard/components/response-detail.component.js.map +1 -0
- package/dist/lib/dashboard/components/response-list.component.d.ts +27 -0
- package/dist/lib/dashboard/components/response-list.component.d.ts.map +1 -0
- package/dist/lib/dashboard/components/response-list.component.js +196 -0
- package/dist/lib/dashboard/components/response-list.component.js.map +1 -0
- package/dist/lib/dashboard/components/summary-stats.component.d.ts +12 -0
- package/dist/lib/dashboard/components/summary-stats.component.d.ts.map +1 -0
- package/dist/lib/dashboard/components/summary-stats.component.js +112 -0
- package/dist/lib/dashboard/components/summary-stats.component.js.map +1 -0
- package/dist/lib/dashboard/forms-reporting-dashboard.component.d.ts +64 -0
- package/dist/lib/dashboard/forms-reporting-dashboard.component.d.ts.map +1 -0
- package/dist/lib/dashboard/forms-reporting-dashboard.component.js +397 -0
- package/dist/lib/dashboard/forms-reporting-dashboard.component.js.map +1 -0
- package/dist/lib/dashboard/index.d.ts +19 -0
- package/dist/lib/dashboard/index.d.ts.map +1 -0
- package/dist/lib/dashboard/index.js +19 -0
- package/dist/lib/dashboard/index.js.map +1 -0
- package/dist/lib/dashboard/models/reporting.model.d.ts +125 -0
- package/dist/lib/dashboard/models/reporting.model.d.ts.map +1 -0
- package/dist/lib/dashboard/models/reporting.model.js +2 -0
- package/dist/lib/dashboard/models/reporting.model.js.map +1 -0
- package/dist/lib/dashboard/services/forms-reporting-export.service.d.ts +21 -0
- package/dist/lib/dashboard/services/forms-reporting-export.service.d.ts.map +1 -0
- package/dist/lib/dashboard/services/forms-reporting-export.service.js +83 -0
- package/dist/lib/dashboard/services/forms-reporting-export.service.js.map +1 -0
- package/dist/lib/dashboard/services/forms-reporting-mock.d.ts +18 -0
- package/dist/lib/dashboard/services/forms-reporting-mock.d.ts.map +1 -0
- package/dist/lib/dashboard/services/forms-reporting-mock.js +147 -0
- package/dist/lib/dashboard/services/forms-reporting-mock.js.map +1 -0
- package/dist/lib/dashboard/services/forms-reporting.service.d.ts +45 -0
- package/dist/lib/dashboard/services/forms-reporting.service.d.ts.map +1 -0
- package/dist/lib/dashboard/services/forms-reporting.service.js +230 -0
- package/dist/lib/dashboard/services/forms-reporting.service.js.map +1 -0
- package/dist/lib/dashboard/services/reporting-aggregations.d.ts +40 -0
- package/dist/lib/dashboard/services/reporting-aggregations.d.ts.map +1 -0
- package/dist/lib/dashboard/services/reporting-aggregations.js +379 -0
- package/dist/lib/dashboard/services/reporting-aggregations.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.js +104 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.js +83 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.js +96 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.js +83 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.js +96 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js +172 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.js +90 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js +274 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js +91 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.js +100 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsForm/mjbizappsformsform.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsForm/mjbizappsformsform.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsForm/mjbizappsformsform.form.component.js +174 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsForm/mjbizappsformsform.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormCategory/mjbizappsformsformcategory.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormCategory/mjbizappsformsformcategory.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormCategory/mjbizappsformsformcategory.form.component.js +118 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormCategory/mjbizappsformsformcategory.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormDistribution/mjbizappsformsformdistribution.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormDistribution/mjbizappsformsformdistribution.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormDistribution/mjbizappsformsformdistribution.form.component.js +93 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormDistribution/mjbizappsformsformdistribution.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormPage/mjbizappsformsformpage.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormPage/mjbizappsformsformpage.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormPage/mjbizappsformsformpage.form.component.js +96 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormPage/mjbizappsformsformpage.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestion/mjbizappsformsformquestion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestion/mjbizappsformsformquestion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestion/mjbizappsformsformquestion.form.component.js +132 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestion/mjbizappsformsformquestion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestionOption/mjbizappsformsformquestionoption.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestionOption/mjbizappsformsformquestionoption.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestionOption/mjbizappsformsformquestionoption.form.component.js +77 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormQuestionOption/mjbizappsformsformquestionoption.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponse/mjbizappsformsformresponse.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponse/mjbizappsformsformresponse.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponse/mjbizappsformsformresponse.form.component.js +108 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponse/mjbizappsformsformresponse.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponseAnswer/mjbizappsformsformresponseanswer.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponseAnswer/mjbizappsformsformresponseanswer.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponseAnswer/mjbizappsformsformresponseanswer.form.component.js +99 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormResponseAnswer/mjbizappsformsformresponseanswer.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormStyle/mjbizappsformsformstyle.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormStyle/mjbizappsformsformstyle.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormStyle/mjbizappsformsformstyle.form.component.js +100 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormStyle/mjbizappsformsformstyle.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormVersion/mjbizappsformsformversion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormVersion/mjbizappsformsformversion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormVersion/mjbizappsformsformversion.form.component.js +96 -0
- package/dist/lib/generated/Entities/mjBizAppsFormsFormVersion/mjbizappsformsformversion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTask/mjbizappstaskstask.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTask/mjbizappstaskstask.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTask/mjbizappstaskstask.form.component.js +274 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTask/mjbizappstaskstask.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskActivity/mjbizappstaskstaskactivity.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskActivity/mjbizappstaskstaskactivity.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskActivity/mjbizappstaskstaskactivity.form.component.js +67 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskActivity/mjbizappstaskstaskactivity.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskAssignment/mjbizappstaskstaskassignment.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskAssignment/mjbizappstaskstaskassignment.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskAssignment/mjbizappstaskstaskassignment.form.component.js +90 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskAssignment/mjbizappstaskstaskassignment.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskCategory/mjbizappstaskstaskcategory.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskCategory/mjbizappstaskstaskcategory.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskCategory/mjbizappstaskstaskcategory.form.component.js +124 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskCategory/mjbizappstaskstaskcategory.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskComment/mjbizappstaskstaskcomment.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskComment/mjbizappstaskstaskcomment.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskComment/mjbizappstaskstaskcomment.form.component.js +86 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskComment/mjbizappstaskstaskcomment.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecision/mjbizappstaskstaskdecision.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecision/mjbizappstaskstaskdecision.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecision/mjbizappstaskstaskdecision.form.component.js +67 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecision/mjbizappstaskstaskdecision.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecisionOutcome/mjbizappstaskstaskdecisionoutcome.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecisionOutcome/mjbizappstaskstaskdecisionoutcome.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecisionOutcome/mjbizappstaskstaskdecisionoutcome.form.component.js +86 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDecisionOutcome/mjbizappstaskstaskdecisionoutcome.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDependency/mjbizappstaskstaskdependency.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDependency/mjbizappstaskstaskdependency.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDependency/mjbizappstaskstaskdependency.form.component.js +61 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskDependency/mjbizappstaskstaskdependency.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskLink/mjbizappstaskstasklink.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskLink/mjbizappstaskstasklink.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskLink/mjbizappstaskstasklink.form.component.js +63 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskLink/mjbizappstaskstasklink.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationConfig/mjbizappstaskstasknotificationconfig.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationConfig/mjbizappstaskstasknotificationconfig.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationConfig/mjbizappstaskstasknotificationconfig.form.component.js +69 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationConfig/mjbizappstaskstasknotificationconfig.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationLog/mjbizappstaskstasknotificationlog.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationLog/mjbizappstaskstasknotificationlog.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationLog/mjbizappstaskstasknotificationlog.form.component.js +63 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskNotificationLog/mjbizappstaskstasknotificationlog.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskRole/mjbizappstaskstaskrole.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskRole/mjbizappstaskstaskrole.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskRole/mjbizappstaskstaskrole.form.component.js +98 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskRole/mjbizappstaskstaskrole.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTag/mjbizappstaskstasktag.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTag/mjbizappstaskstasktag.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTag/mjbizappstaskstasktag.form.component.js +80 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTag/mjbizappstaskstasktag.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTagLink/mjbizappstaskstasktaglink.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTagLink/mjbizappstaskstasktaglink.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTagLink/mjbizappstaskstasktaglink.form.component.js +59 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTagLink/mjbizappstaskstasktaglink.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplate/mjbizappstaskstasktemplate.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplate/mjbizappstaskstasktemplate.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplate/mjbizappstaskstasktemplate.form.component.js +84 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplate/mjbizappstaskstasktemplate.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItem/mjbizappstaskstasktemplateitem.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItem/mjbizappstaskstasktemplateitem.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItem/mjbizappstaskstasktemplateitem.form.component.js +146 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItem/mjbizappstaskstasktemplateitem.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemDependency/mjbizappstaskstasktemplateitemdependency.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemDependency/mjbizappstaskstasktemplateitemdependency.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemDependency/mjbizappstaskstasktemplateitemdependency.form.component.js +61 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemDependency/mjbizappstaskstasktemplateitemdependency.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemRole/mjbizappstaskstasktemplateitemrole.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemRole/mjbizappstaskstasktemplateitemrole.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemRole/mjbizappstaskstasktemplateitemrole.form.component.js +59 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskTemplateItemRole/mjbizappstaskstasktemplateitemrole.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskType/mjbizappstaskstasktype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskType/mjbizappstaskstasktype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskType/mjbizappstaskstasktype.form.component.js +132 -0
- package/dist/lib/generated/Entities/mjBizAppsTasksTaskType/mjbizappstaskstasktype.form.component.js.map +1 -0
- package/dist/lib/generated/class-registrations-manifest.d.ts +6 -0
- package/dist/lib/generated/class-registrations-manifest.d.ts.map +1 -0
- package/dist/lib/generated/class-registrations-manifest.js +6 -0
- package/dist/lib/generated/class-registrations-manifest.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +61 -0
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -0
- package/dist/lib/generated/generated-forms.module.js +207 -0
- package/dist/lib/generated/generated-forms.module.js.map +1 -0
- package/dist/lib/home/forms-home-dashboard.component.d.ts +61 -0
- package/dist/lib/home/forms-home-dashboard.component.d.ts.map +1 -0
- package/dist/lib/home/forms-home-dashboard.component.js +379 -0
- package/dist/lib/home/forms-home-dashboard.component.js.map +1 -0
- package/dist/lib/home/forms-home.service.d.ts +24 -0
- package/dist/lib/home/forms-home.service.d.ts.map +1 -0
- package/dist/lib/home/forms-home.service.js +92 -0
- package/dist/lib/home/forms-home.service.js.map +1 -0
- package/dist/lib/home/home-aggregations.d.ts +23 -0
- package/dist/lib/home/home-aggregations.d.ts.map +1 -0
- package/dist/lib/home/home-aggregations.js +64 -0
- package/dist/lib/home/home-aggregations.js.map +1 -0
- package/dist/lib/home/home-models.d.ts +60 -0
- package/dist/lib/home/home-models.d.ts.map +1 -0
- package/dist/lib/home/home-models.js +34 -0
- package/dist/lib/home/home-models.js.map +1 -0
- package/dist/lib/home/index.d.ts +13 -0
- package/dist/lib/home/index.d.ts.map +1 -0
- package/dist/lib/home/index.js +13 -0
- package/dist/lib/home/index.js.map +1 -0
- package/dist/lib/widget/api/form-upload.service.d.ts +41 -0
- package/dist/lib/widget/api/form-upload.service.d.ts.map +1 -0
- package/dist/lib/widget/api/form-upload.service.js +124 -0
- package/dist/lib/widget/api/form-upload.service.js.map +1 -0
- package/dist/lib/widget/api/forms-api.config.d.ts +55 -0
- package/dist/lib/widget/api/forms-api.config.d.ts.map +1 -0
- package/dist/lib/widget/api/forms-api.config.js +40 -0
- package/dist/lib/widget/api/forms-api.config.js.map +1 -0
- package/dist/lib/widget/api/forms-api.graphql.service.d.ts +20 -0
- package/dist/lib/widget/api/forms-api.graphql.service.d.ts.map +1 -0
- package/dist/lib/widget/api/forms-api.graphql.service.js +96 -0
- package/dist/lib/widget/api/forms-api.graphql.service.js.map +1 -0
- package/dist/lib/widget/api/forms-api.interface.d.ts +45 -0
- package/dist/lib/widget/api/forms-api.interface.d.ts.map +1 -0
- package/dist/lib/widget/api/forms-api.interface.js +8 -0
- package/dist/lib/widget/api/forms-api.interface.js.map +1 -0
- package/dist/lib/widget/api/forms-api.mock.service.d.ts +12 -0
- package/dist/lib/widget/api/forms-api.mock.service.d.ts.map +1 -0
- package/dist/lib/widget/api/forms-api.mock.service.js +41 -0
- package/dist/lib/widget/api/forms-api.mock.service.js.map +1 -0
- package/dist/lib/widget/api/mock-form.data.d.ts +8 -0
- package/dist/lib/widget/api/mock-form.data.d.ts.map +1 -0
- package/dist/lib/widget/api/mock-form.data.js +192 -0
- package/dist/lib/widget/api/mock-form.data.js.map +1 -0
- package/dist/lib/widget/api/submission-mapping.d.ts +60 -0
- package/dist/lib/widget/api/submission-mapping.d.ts.map +1 -0
- package/dist/lib/widget/api/submission-mapping.js +47 -0
- package/dist/lib/widget/api/submission-mapping.js.map +1 -0
- package/dist/lib/widget/components/form-one-question.component.d.ts +43 -0
- package/dist/lib/widget/components/form-one-question.component.d.ts.map +1 -0
- package/dist/lib/widget/components/form-one-question.component.js +194 -0
- package/dist/lib/widget/components/form-one-question.component.js.map +1 -0
- package/dist/lib/widget/components/form-progress.component.d.ts +9 -0
- package/dist/lib/widget/components/form-progress.component.d.ts.map +1 -0
- package/dist/lib/widget/components/form-progress.component.js +47 -0
- package/dist/lib/widget/components/form-progress.component.js.map +1 -0
- package/dist/lib/widget/components/form-scroll.component.d.ts +23 -0
- package/dist/lib/widget/components/form-scroll.component.d.ts.map +1 -0
- package/dist/lib/widget/components/form-scroll.component.js +132 -0
- package/dist/lib/widget/components/form-scroll.component.js.map +1 -0
- package/dist/lib/widget/components/questions/form-question.component.d.ts +68 -0
- package/dist/lib/widget/components/questions/form-question.component.d.ts.map +1 -0
- package/dist/lib/widget/components/questions/form-question.component.js +541 -0
- package/dist/lib/widget/components/questions/form-question.component.js.map +1 -0
- package/dist/lib/widget/components/questions/input-mode.d.ts +13 -0
- package/dist/lib/widget/components/questions/input-mode.d.ts.map +1 -0
- package/dist/lib/widget/components/questions/input-mode.js +42 -0
- package/dist/lib/widget/components/questions/input-mode.js.map +1 -0
- package/dist/lib/widget/components/turnstile-challenge.component.d.ts +52 -0
- package/dist/lib/widget/components/turnstile-challenge.component.d.ts.map +1 -0
- package/dist/lib/widget/components/turnstile-challenge.component.js +123 -0
- package/dist/lib/widget/components/turnstile-challenge.component.js.map +1 -0
- package/dist/lib/widget/core/answer-value.d.ts +17 -0
- package/dist/lib/widget/core/answer-value.d.ts.map +1 -0
- package/dist/lib/widget/core/answer-value.js +41 -0
- package/dist/lib/widget/core/answer-value.js.map +1 -0
- package/dist/lib/widget/core/autosave-controller.d.ts +65 -0
- package/dist/lib/widget/core/autosave-controller.d.ts.map +1 -0
- package/dist/lib/widget/core/autosave-controller.js +134 -0
- package/dist/lib/widget/core/autosave-controller.js.map +1 -0
- package/dist/lib/widget/core/client-id.d.ts +17 -0
- package/dist/lib/widget/core/client-id.d.ts.map +1 -0
- package/dist/lib/widget/core/client-id.js +52 -0
- package/dist/lib/widget/core/client-id.js.map +1 -0
- package/dist/lib/widget/core/form-runtime.d.ts +34 -0
- package/dist/lib/widget/core/form-runtime.d.ts.map +1 -0
- package/dist/lib/widget/core/form-runtime.js +123 -0
- package/dist/lib/widget/core/form-runtime.js.map +1 -0
- package/dist/lib/widget/core/one-question-stepper.d.ts +20 -0
- package/dist/lib/widget/core/one-question-stepper.d.ts.map +1 -0
- package/dist/lib/widget/core/one-question-stepper.js +23 -0
- package/dist/lib/widget/core/one-question-stepper.js.map +1 -0
- package/dist/lib/widget/core/submit-phase.d.ts +31 -0
- package/dist/lib/widget/core/submit-phase.d.ts.map +1 -0
- package/dist/lib/widget/core/submit-phase.js +21 -0
- package/dist/lib/widget/core/submit-phase.js.map +1 -0
- package/dist/lib/widget/core/theming.d.ts +17 -0
- package/dist/lib/widget/core/theming.d.ts.map +1 -0
- package/dist/lib/widget/core/theming.js +36 -0
- package/dist/lib/widget/core/theming.js.map +1 -0
- package/dist/lib/widget/core/turnstile-gate.d.ts +42 -0
- package/dist/lib/widget/core/turnstile-gate.d.ts.map +1 -0
- package/dist/lib/widget/core/turnstile-gate.js +61 -0
- package/dist/lib/widget/core/turnstile-gate.js.map +1 -0
- package/dist/lib/widget/core/turnstile-loader.d.ts +34 -0
- package/dist/lib/widget/core/turnstile-loader.d.ts.map +1 -0
- package/dist/lib/widget/core/turnstile-loader.js +68 -0
- package/dist/lib/widget/core/turnstile-loader.js.map +1 -0
- package/dist/lib/widget/core/validation.d.ts +19 -0
- package/dist/lib/widget/core/validation.d.ts.map +1 -0
- package/dist/lib/widget/core/validation.js +105 -0
- package/dist/lib/widget/core/validation.js.map +1 -0
- package/dist/lib/widget/index.d.ts +27 -0
- package/dist/lib/widget/index.d.ts.map +1 -0
- package/dist/lib/widget/index.js +30 -0
- package/dist/lib/widget/index.js.map +1 -0
- package/dist/lib/widget/mj-form.component.d.ts +114 -0
- package/dist/lib/widget/mj-form.component.d.ts.map +1 -0
- package/dist/lib/widget/mj-form.component.js +428 -0
- package/dist/lib/widget/mj-form.component.js.map +1 -0
- package/dist/lib/widget/register-element.d.ts +8 -0
- package/dist/lib/widget/register-element.d.ts.map +1 -0
- package/dist/lib/widget/register-element.js +98 -0
- package/dist/lib/widget/register-element.js.map +1 -0
- package/dist/public-api.d.ts +23 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +33 -0
- package/dist/public-api.js.map +1 -0
- package/dist/widget-entry.d.ts +2 -0
- package/dist/widget-entry.d.ts.map +1 -0
- package/dist/widget-entry.js +20 -0
- package/dist/widget-entry.js.map +1 -0
- package/package.json +53 -5
- package/README.md +0 -3
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Component, inject } from '@angular/core';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { FormsModule } from '@angular/forms';
|
|
10
|
+
import { CdkDropList, CdkDrag, CdkDragHandle, CdkDragPreview, moveItemInArray, } from '@angular/cdk/drag-drop';
|
|
11
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
12
|
+
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
|
|
13
|
+
import { FORMS_ENTITY } from './entity-names';
|
|
14
|
+
import { BuilderStateService } from './builder-state.service';
|
|
15
|
+
import { DesignStateService } from './design-state.service';
|
|
16
|
+
import { PublishService } from './publish.service';
|
|
17
|
+
import { QuestionEditorComponent } from './question-editor.component';
|
|
18
|
+
import { DistributionManagerComponent } from './distribution-manager.component';
|
|
19
|
+
import { DesignPanelComponent } from './design-panel.component';
|
|
20
|
+
import { FormPreviewModalComponent } from './form-preview-modal.component';
|
|
21
|
+
import { buildPublishedDefinition } from './snapshot-builder';
|
|
22
|
+
import { QUESTION_PALETTE_GROUPS, questionTypeMeta, questionTypesInGroup, } from './question-type-catalog';
|
|
23
|
+
import { FORM_BUILDER_STYLES } from './form-builder.styles';
|
|
24
|
+
import { isValidReorder } from './reorder';
|
|
25
|
+
import * as i0 from "@angular/core";
|
|
26
|
+
const _forTrack0 = ($index, $item) => $item.entity.ID;
|
|
27
|
+
const _forTrack1 = ($index, $item) => $item.type;
|
|
28
|
+
function FormBuilderComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
30
|
+
i0.ɵɵtext(1);
|
|
31
|
+
i0.ɵɵelementEnd();
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
34
|
+
i0.ɵɵadvance();
|
|
35
|
+
i0.ɵɵtextInterpolate(ctx_r2.statusMessage);
|
|
36
|
+
} }
|
|
37
|
+
function FormBuilderComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
39
|
+
i0.ɵɵelement(1, "i", 19);
|
|
40
|
+
i0.ɵɵtext(2, " Unpublished changes ");
|
|
41
|
+
i0.ɵɵelementEnd();
|
|
42
|
+
} }
|
|
43
|
+
function FormBuilderComponent_Conditional_25_For_3_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
44
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
45
|
+
i0.ɵɵelementStart(0, "button", 30);
|
|
46
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Conditional_25_For_3_For_5_Template_button_click_0_listener() { const meta_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.addQuestion(meta_r6.type)); });
|
|
47
|
+
i0.ɵɵelement(1, "i", 31);
|
|
48
|
+
i0.ɵɵtext(2);
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
} if (rf & 2) {
|
|
51
|
+
const meta_r6 = ctx.$implicit;
|
|
52
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
53
|
+
i0.ɵɵproperty("disabled", ctx_r2.busy);
|
|
54
|
+
i0.ɵɵadvance();
|
|
55
|
+
i0.ɵɵclassMap(meta_r6.icon);
|
|
56
|
+
i0.ɵɵadvance();
|
|
57
|
+
i0.ɵɵtextInterpolate1(" ", meta_r6.label, " ");
|
|
58
|
+
} }
|
|
59
|
+
function FormBuilderComponent_Conditional_25_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
60
|
+
i0.ɵɵelementStart(0, "div", 21)(1, "p", 27);
|
|
61
|
+
i0.ɵɵtext(2);
|
|
62
|
+
i0.ɵɵelementEnd();
|
|
63
|
+
i0.ɵɵelementStart(3, "div", 28);
|
|
64
|
+
i0.ɵɵrepeaterCreate(4, FormBuilderComponent_Conditional_25_For_3_For_5_Template, 3, 4, "button", 29, _forTrack1);
|
|
65
|
+
i0.ɵɵelementEnd()();
|
|
66
|
+
} if (rf & 2) {
|
|
67
|
+
const group_r7 = ctx.$implicit;
|
|
68
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
69
|
+
i0.ɵɵadvance(2);
|
|
70
|
+
i0.ɵɵtextInterpolate(group_r7);
|
|
71
|
+
i0.ɵɵadvance(2);
|
|
72
|
+
i0.ɵɵrepeater(ctx_r2.typesInGroup(group_r7));
|
|
73
|
+
} }
|
|
74
|
+
function FormBuilderComponent_Conditional_25_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
75
|
+
i0.ɵɵelementStart(0, "p");
|
|
76
|
+
i0.ɵɵtext(1);
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
} if (rf & 2) {
|
|
79
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
80
|
+
i0.ɵɵadvance();
|
|
81
|
+
i0.ɵɵtextInterpolate(ctx_r2.record.Description);
|
|
82
|
+
} }
|
|
83
|
+
function FormBuilderComponent_Conditional_25_For_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
84
|
+
i0.ɵɵelementStart(0, "p", 32);
|
|
85
|
+
i0.ɵɵtext(1, "Add a question from the palette to get started.");
|
|
86
|
+
i0.ɵɵelementEnd();
|
|
87
|
+
} }
|
|
88
|
+
function FormBuilderComponent_Conditional_25_For_11_For_3_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
89
|
+
i0.ɵɵelementStart(0, "div", 52)(1, "span", 41);
|
|
90
|
+
i0.ɵɵtext(2);
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
i0.ɵɵelementStart(3, "span", 43);
|
|
93
|
+
i0.ɵɵtext(4);
|
|
94
|
+
i0.ɵɵelementEnd()();
|
|
95
|
+
} if (rf & 2) {
|
|
96
|
+
const node_r11 = i0.ɵɵnextContext().$implicit;
|
|
97
|
+
const page_r9 = i0.ɵɵnextContext().$implicit;
|
|
98
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
99
|
+
i0.ɵɵadvance(2);
|
|
100
|
+
i0.ɵɵtextInterpolate(ctx_r2.displayIndex(page_r9, node_r11));
|
|
101
|
+
i0.ɵɵadvance(2);
|
|
102
|
+
i0.ɵɵtextInterpolate(node_r11.entity.Prompt);
|
|
103
|
+
} }
|
|
104
|
+
function FormBuilderComponent_Conditional_25_For_11_For_3_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
105
|
+
i0.ɵɵelementStart(0, "span", 42);
|
|
106
|
+
i0.ɵɵtext(1, "Required");
|
|
107
|
+
i0.ɵɵelementEnd();
|
|
108
|
+
} }
|
|
109
|
+
function FormBuilderComponent_Conditional_25_For_11_For_3_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
110
|
+
i0.ɵɵelementStart(0, "div", 44);
|
|
111
|
+
i0.ɵɵtext(1);
|
|
112
|
+
i0.ɵɵelementEnd();
|
|
113
|
+
} if (rf & 2) {
|
|
114
|
+
const node_r11 = i0.ɵɵnextContext().$implicit;
|
|
115
|
+
i0.ɵɵadvance();
|
|
116
|
+
i0.ɵɵtextInterpolate(node_r11.entity.HelpText);
|
|
117
|
+
} }
|
|
118
|
+
function FormBuilderComponent_Conditional_25_For_11_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
119
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
120
|
+
i0.ɵɵelementStart(0, "article", 35);
|
|
121
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Conditional_25_For_11_For_3_Template_article_click_0_listener() { const node_r11 = i0.ɵɵrestoreView(_r10).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.selectQuestion(node_r11)); })("keydown.enter", function FormBuilderComponent_Conditional_25_For_11_For_3_Template_article_keydown_enter_0_listener() { const node_r11 = i0.ɵɵrestoreView(_r10).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.selectQuestion(node_r11)); });
|
|
122
|
+
i0.ɵɵtemplate(1, FormBuilderComponent_Conditional_25_For_11_For_3_div_1_Template, 5, 2, "div", 36);
|
|
123
|
+
i0.ɵɵelementStart(2, "button", 37);
|
|
124
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Conditional_25_For_11_For_3_Template_button_click_2_listener($event) { i0.ɵɵrestoreView(_r10); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
125
|
+
i0.ɵɵelement(3, "i", 38);
|
|
126
|
+
i0.ɵɵelementEnd();
|
|
127
|
+
i0.ɵɵelementStart(4, "div", 39)(5, "div", 40)(6, "span", 41);
|
|
128
|
+
i0.ɵɵtext(7);
|
|
129
|
+
i0.ɵɵelementEnd();
|
|
130
|
+
i0.ɵɵelementStart(8, "span", 42);
|
|
131
|
+
i0.ɵɵelement(9, "i", 31);
|
|
132
|
+
i0.ɵɵtext(10);
|
|
133
|
+
i0.ɵɵelementEnd();
|
|
134
|
+
i0.ɵɵconditionalCreate(11, FormBuilderComponent_Conditional_25_For_11_For_3_Conditional_11_Template, 2, 0, "span", 42);
|
|
135
|
+
i0.ɵɵelementEnd();
|
|
136
|
+
i0.ɵɵelementStart(12, "div", 43);
|
|
137
|
+
i0.ɵɵtext(13);
|
|
138
|
+
i0.ɵɵelementEnd();
|
|
139
|
+
i0.ɵɵconditionalCreate(14, FormBuilderComponent_Conditional_25_For_11_For_3_Conditional_14_Template, 2, 1, "div", 44);
|
|
140
|
+
i0.ɵɵelementEnd();
|
|
141
|
+
i0.ɵɵelementStart(15, "div", 45)(16, "button", 46);
|
|
142
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Conditional_25_For_11_For_3_Template_button_click_16_listener($event) { const node_r11 = i0.ɵɵrestoreView(_r10).$implicit; const page_r9 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.moveQuestion(page_r9, node_r11, -1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
143
|
+
i0.ɵɵelement(17, "i", 47);
|
|
144
|
+
i0.ɵɵelementEnd();
|
|
145
|
+
i0.ɵɵelementStart(18, "button", 48);
|
|
146
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Conditional_25_For_11_For_3_Template_button_click_18_listener($event) { const node_r11 = i0.ɵɵrestoreView(_r10).$implicit; const page_r9 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.moveQuestion(page_r9, node_r11, 1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
147
|
+
i0.ɵɵelement(19, "i", 49);
|
|
148
|
+
i0.ɵɵelementEnd();
|
|
149
|
+
i0.ɵɵelementStart(20, "button", 50);
|
|
150
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Conditional_25_For_11_For_3_Template_button_click_20_listener($event) { const node_r11 = i0.ɵɵrestoreView(_r10).$implicit; const page_r9 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.deleteQuestion(page_r9, node_r11); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
151
|
+
i0.ɵɵelement(21, "i", 51);
|
|
152
|
+
i0.ɵɵelementEnd()()();
|
|
153
|
+
} if (rf & 2) {
|
|
154
|
+
const node_r11 = ctx.$implicit;
|
|
155
|
+
const page_r9 = i0.ɵɵnextContext().$implicit;
|
|
156
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
157
|
+
i0.ɵɵclassProp("is-selected", node_r11.entity.ID === ctx_r2.selectedQuestionId);
|
|
158
|
+
i0.ɵɵproperty("cdkDragData", node_r11);
|
|
159
|
+
i0.ɵɵattribute("aria-label", "Edit question " + node_r11.entity.Prompt);
|
|
160
|
+
i0.ɵɵadvance(2);
|
|
161
|
+
i0.ɵɵproperty("disabled", ctx_r2.busy);
|
|
162
|
+
i0.ɵɵattribute("aria-label", "Drag to reorder question " + node_r11.entity.Prompt);
|
|
163
|
+
i0.ɵɵadvance(5);
|
|
164
|
+
i0.ɵɵtextInterpolate(ctx_r2.displayIndex(page_r9, node_r11));
|
|
165
|
+
i0.ɵɵadvance(2);
|
|
166
|
+
i0.ɵɵclassMap(ctx_r2.metaFor(node_r11).icon);
|
|
167
|
+
i0.ɵɵadvance();
|
|
168
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.metaFor(node_r11).label);
|
|
169
|
+
i0.ɵɵadvance();
|
|
170
|
+
i0.ɵɵconditional(node_r11.entity.IsRequired ? 11 : -1);
|
|
171
|
+
i0.ɵɵadvance(2);
|
|
172
|
+
i0.ɵɵtextInterpolate(node_r11.entity.Prompt);
|
|
173
|
+
i0.ɵɵadvance();
|
|
174
|
+
i0.ɵɵconditional(node_r11.entity.HelpText ? 14 : -1);
|
|
175
|
+
i0.ɵɵadvance(2);
|
|
176
|
+
i0.ɵɵproperty("disabled", ctx_r2.busy);
|
|
177
|
+
i0.ɵɵadvance(2);
|
|
178
|
+
i0.ɵɵproperty("disabled", ctx_r2.busy);
|
|
179
|
+
i0.ɵɵadvance(2);
|
|
180
|
+
i0.ɵɵproperty("disabled", ctx_r2.busy);
|
|
181
|
+
} }
|
|
182
|
+
function FormBuilderComponent_Conditional_25_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
184
|
+
i0.ɵɵconditionalCreate(0, FormBuilderComponent_Conditional_25_For_11_Conditional_0_Template, 2, 0, "p", 32);
|
|
185
|
+
i0.ɵɵelementStart(1, "div", 33);
|
|
186
|
+
i0.ɵɵlistener("cdkDropListDropped", function FormBuilderComponent_Conditional_25_For_11_Template_div_cdkDropListDropped_1_listener($event) { const page_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.dropQuestion(page_r9, $event)); });
|
|
187
|
+
i0.ɵɵrepeaterCreate(2, FormBuilderComponent_Conditional_25_For_11_For_3_Template, 22, 16, "article", 34, _forTrack0);
|
|
188
|
+
i0.ɵɵelementEnd();
|
|
189
|
+
} if (rf & 2) {
|
|
190
|
+
const page_r9 = ctx.$implicit;
|
|
191
|
+
i0.ɵɵconditional(page_r9.questions.length === 0 ? 0 : -1);
|
|
192
|
+
i0.ɵɵadvance();
|
|
193
|
+
i0.ɵɵproperty("cdkDropListData", page_r9.questions);
|
|
194
|
+
i0.ɵɵadvance();
|
|
195
|
+
i0.ɵɵrepeater(page_r9.questions);
|
|
196
|
+
} }
|
|
197
|
+
function FormBuilderComponent_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
198
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
199
|
+
i0.ɵɵelementStart(0, "div", 15)(1, "nav", 20);
|
|
200
|
+
i0.ɵɵrepeaterCreate(2, FormBuilderComponent_Conditional_25_For_3_Template, 6, 1, "div", 21, i0.ɵɵrepeaterTrackByIdentity);
|
|
201
|
+
i0.ɵɵelementEnd();
|
|
202
|
+
i0.ɵɵelementStart(4, "section", 22)(5, "div", 23)(6, "div", 24)(7, "h2");
|
|
203
|
+
i0.ɵɵtext(8);
|
|
204
|
+
i0.ɵɵelementEnd();
|
|
205
|
+
i0.ɵɵconditionalCreate(9, FormBuilderComponent_Conditional_25_Conditional_9_Template, 2, 1, "p");
|
|
206
|
+
i0.ɵɵelementEnd();
|
|
207
|
+
i0.ɵɵrepeaterCreate(10, FormBuilderComponent_Conditional_25_For_11_Template, 4, 2, null, null, _forTrack0);
|
|
208
|
+
i0.ɵɵelementEnd()();
|
|
209
|
+
i0.ɵɵelementStart(12, "aside", 25)(13, "mjf-question-editor", 26);
|
|
210
|
+
i0.ɵɵlistener("questionChanged", function FormBuilderComponent_Conditional_25_Template_mjf_question_editor_questionChanged_13_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onQuestionChanged($event)); })("addOptionRequested", function FormBuilderComponent_Conditional_25_Template_mjf_question_editor_addOptionRequested_13_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onAddOption($event)); })("removeOptionRequested", function FormBuilderComponent_Conditional_25_Template_mjf_question_editor_removeOptionRequested_13_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onRemoveOption($event)); });
|
|
211
|
+
i0.ɵɵelementEnd()()();
|
|
212
|
+
} if (rf & 2) {
|
|
213
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
214
|
+
i0.ɵɵadvance(2);
|
|
215
|
+
i0.ɵɵrepeater(ctx_r2.paletteGroups);
|
|
216
|
+
i0.ɵɵadvance(6);
|
|
217
|
+
i0.ɵɵtextInterpolate(ctx_r2.record.Name);
|
|
218
|
+
i0.ɵɵadvance();
|
|
219
|
+
i0.ɵɵconditional(ctx_r2.record.Description ? 9 : -1);
|
|
220
|
+
i0.ɵɵadvance();
|
|
221
|
+
i0.ɵɵrepeater(ctx_r2.pages);
|
|
222
|
+
i0.ɵɵadvance(3);
|
|
223
|
+
i0.ɵɵproperty("node", ctx_r2.selectedNode)("conditionalSources", ctx_r2.conditionalSources);
|
|
224
|
+
} }
|
|
225
|
+
function FormBuilderComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
226
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
227
|
+
i0.ɵɵelementStart(0, "div", 16)(1, "mjf-design-panel", 53);
|
|
228
|
+
i0.ɵɵlistener("styleApplied", function FormBuilderComponent_Conditional_26_Template_mjf_design_panel_styleApplied_1_listener() { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onStyleApplied()); })("previewRequested", function FormBuilderComponent_Conditional_26_Template_mjf_design_panel_previewRequested_1_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.previewWithTokens($event)); });
|
|
229
|
+
i0.ɵɵelementEnd()();
|
|
230
|
+
} if (rf & 2) {
|
|
231
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
232
|
+
i0.ɵɵadvance();
|
|
233
|
+
i0.ɵɵproperty("form", ctx_r2.record);
|
|
234
|
+
} }
|
|
235
|
+
function FormBuilderComponent_Conditional_27_Template(rf, ctx) { if (rf & 1) {
|
|
236
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
237
|
+
i0.ɵɵelement(1, "mjf-distribution-manager", 54);
|
|
238
|
+
i0.ɵɵelementEnd();
|
|
239
|
+
} if (rf & 2) {
|
|
240
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
241
|
+
i0.ɵɵadvance();
|
|
242
|
+
i0.ɵɵproperty("formId", ctx_r2.record.ID);
|
|
243
|
+
} }
|
|
244
|
+
function FormBuilderComponent_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
245
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
246
|
+
i0.ɵɵelementStart(0, "mjf-form-preview-modal", 55);
|
|
247
|
+
i0.ɵɵlistener("closed", function FormBuilderComponent_Conditional_28_Template_mjf_form_preview_modal_closed_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closePreview()); });
|
|
248
|
+
i0.ɵɵelementEnd();
|
|
249
|
+
} if (rf & 2) {
|
|
250
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
251
|
+
i0.ɵɵproperty("definition", ctx_r2.previewDef);
|
|
252
|
+
} }
|
|
253
|
+
/**
|
|
254
|
+
* The visual form builder — registered as the override for the
|
|
255
|
+
* `MJ_BizApps_Forms: Forms` entity form so that opening a Form record in Explorer
|
|
256
|
+
* renders the builder instead of the generated property grid (FORMS_BUILD_PLAN §9).
|
|
257
|
+
*
|
|
258
|
+
* Layout (desktop): a left palette of question types, a center canvas listing the
|
|
259
|
+
* questions, and a right properties panel for the selected question. A second tab
|
|
260
|
+
* manages distributions. Publishing snapshots the definition into a new FormVersion
|
|
261
|
+
* via {@link PublishService}.
|
|
262
|
+
*
|
|
263
|
+
* The component extends {@link BaseFormComponent} so the Explorer host wires `record`
|
|
264
|
+
* (the loaded Form entity) and the save/navigation plumbing. We render our own UI
|
|
265
|
+
* rather than the generated template.
|
|
266
|
+
*/
|
|
267
|
+
let FormBuilderComponent = class FormBuilderComponent extends BaseFormComponent {
|
|
268
|
+
record;
|
|
269
|
+
state = inject(BuilderStateService);
|
|
270
|
+
design = inject(DesignStateService);
|
|
271
|
+
publisher = inject(PublishService);
|
|
272
|
+
paletteGroups = QUESTION_PALETTE_GROUPS;
|
|
273
|
+
tree = null;
|
|
274
|
+
selectedQuestionId = null;
|
|
275
|
+
activeTab = 'build';
|
|
276
|
+
busy = false;
|
|
277
|
+
statusMessage = '';
|
|
278
|
+
/**
|
|
279
|
+
* True when the draft has edits not yet in the published snapshot. The public link serves
|
|
280
|
+
* the last published `FormVersion`, so theme/content changes only go live on Publish — this
|
|
281
|
+
* drives the "unpublished changes" hint so that isn't surprising.
|
|
282
|
+
*/
|
|
283
|
+
dirty = false;
|
|
284
|
+
/** Non-null while the full-screen WYSIWYG Preview is open (holds the draft definition). */
|
|
285
|
+
previewDef = null;
|
|
286
|
+
/** Mark the draft as having changes not yet published, and refresh the view. */
|
|
287
|
+
markDirty() {
|
|
288
|
+
this.dirty = true;
|
|
289
|
+
this.cdr.markForCheck();
|
|
290
|
+
}
|
|
291
|
+
async ngOnInit() {
|
|
292
|
+
await super.ngOnInit();
|
|
293
|
+
await this.loadBuilder();
|
|
294
|
+
}
|
|
295
|
+
async loadBuilder() {
|
|
296
|
+
this.busy = true;
|
|
297
|
+
// A Form opened via the "new record" flow isn't persisted yet, so its child
|
|
298
|
+
// Pages/Questions would violate FK_FormPage_Form / FK_FormQuestion_Form. Persist
|
|
299
|
+
// the Form shell first (the builder is immediate-persist by design).
|
|
300
|
+
if (!(await this.ensureFormSaved())) {
|
|
301
|
+
this.busy = false;
|
|
302
|
+
this.cdr.markForCheck();
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
this.tree = await this.state.loadTree(this.record);
|
|
306
|
+
if (this.tree.pages.length === 0) {
|
|
307
|
+
const page = await this.state.addPage(this.tree, 'Page 1');
|
|
308
|
+
if (page) {
|
|
309
|
+
this.tree.pages.push(page);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
this.busy = false;
|
|
313
|
+
this.cdr.markForCheck();
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Guarantee the Form record exists in the DB before any child insert. New records
|
|
317
|
+
* (Explorer "create") arrive unsaved with a client-generated ID; `Name` is the only
|
|
318
|
+
* required column without a DB default, so we seed a placeholder the author renames.
|
|
319
|
+
*/
|
|
320
|
+
async ensureFormSaved() {
|
|
321
|
+
if (this.record.IsSaved) {
|
|
322
|
+
return true;
|
|
323
|
+
}
|
|
324
|
+
if (!this.record.Name) {
|
|
325
|
+
this.record.Name = 'Untitled form';
|
|
326
|
+
}
|
|
327
|
+
return this.state.save(this.record);
|
|
328
|
+
}
|
|
329
|
+
// -- palette --------------------------------------------------------------
|
|
330
|
+
typesInGroup(group) {
|
|
331
|
+
return questionTypesInGroup(group);
|
|
332
|
+
}
|
|
333
|
+
async addQuestion(type) {
|
|
334
|
+
if (!this.tree || this.busy) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const page = this.targetPageForNewQuestion();
|
|
338
|
+
if (!page) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
this.busy = true;
|
|
342
|
+
const node = await this.state.addQuestion(this.tree, page, type, this.defaultPrompt(type));
|
|
343
|
+
if (node) {
|
|
344
|
+
page.questions.push(node);
|
|
345
|
+
this.selectedQuestionId = node.entity.ID;
|
|
346
|
+
this.markDirty();
|
|
347
|
+
}
|
|
348
|
+
this.busy = false;
|
|
349
|
+
this.cdr.markForCheck();
|
|
350
|
+
}
|
|
351
|
+
/** Add to the page holding the selected question, else the last page. */
|
|
352
|
+
targetPageForNewQuestion() {
|
|
353
|
+
if (!this.tree || this.tree.pages.length === 0) {
|
|
354
|
+
return undefined;
|
|
355
|
+
}
|
|
356
|
+
if (this.selectedQuestionId) {
|
|
357
|
+
const owner = this.tree.pages.find((p) => p.questions.some((q) => q.entity.ID === this.selectedQuestionId));
|
|
358
|
+
if (owner) {
|
|
359
|
+
return owner;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return this.tree.pages[this.tree.pages.length - 1];
|
|
363
|
+
}
|
|
364
|
+
defaultPrompt(type) {
|
|
365
|
+
return type === 'Statement' ? 'Add your statement text here' : `Untitled ${questionTypeMeta(type).label} question`;
|
|
366
|
+
}
|
|
367
|
+
// -- canvas / selection ---------------------------------------------------
|
|
368
|
+
get pages() {
|
|
369
|
+
return this.tree?.pages ?? [];
|
|
370
|
+
}
|
|
371
|
+
selectQuestion(node) {
|
|
372
|
+
this.selectedQuestionId = node.entity.ID;
|
|
373
|
+
this.cdr.markForCheck();
|
|
374
|
+
}
|
|
375
|
+
get selectedNode() {
|
|
376
|
+
if (!this.tree || !this.selectedQuestionId) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
for (const page of this.tree.pages) {
|
|
380
|
+
const found = page.questions.find((q) => q.entity.ID === this.selectedQuestionId);
|
|
381
|
+
if (found) {
|
|
382
|
+
return found;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
/** Questions preceding the selected one (valid conditional-rule sources). */
|
|
388
|
+
get conditionalSources() {
|
|
389
|
+
if (!this.tree || !this.selectedQuestionId) {
|
|
390
|
+
return [];
|
|
391
|
+
}
|
|
392
|
+
const sources = [];
|
|
393
|
+
for (const page of this.tree.pages) {
|
|
394
|
+
for (const q of page.questions) {
|
|
395
|
+
if (q.entity.ID === this.selectedQuestionId) {
|
|
396
|
+
return sources;
|
|
397
|
+
}
|
|
398
|
+
sources.push({ id: q.entity.ID, prompt: q.entity.Prompt });
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return sources;
|
|
402
|
+
}
|
|
403
|
+
metaFor(node) {
|
|
404
|
+
return questionTypeMeta(node.entity.QuestionType);
|
|
405
|
+
}
|
|
406
|
+
displayIndex(page, node) {
|
|
407
|
+
const idx = page.questions.indexOf(node) + 1;
|
|
408
|
+
return idx.toString().padStart(2, '0');
|
|
409
|
+
}
|
|
410
|
+
// -- editing handlers (persist on change) ---------------------------------
|
|
411
|
+
async onQuestionChanged(node) {
|
|
412
|
+
await this.state.save(node.entity);
|
|
413
|
+
this.markDirty();
|
|
414
|
+
}
|
|
415
|
+
async onAddOption(node) {
|
|
416
|
+
const option = await this.state.addOption(node, `Option ${node.options.length + 1}`);
|
|
417
|
+
if (option) {
|
|
418
|
+
node.options.push(option);
|
|
419
|
+
this.markDirty();
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
async onRemoveOption(event) {
|
|
423
|
+
const { node, optionIndex } = event;
|
|
424
|
+
const option = node.options[optionIndex];
|
|
425
|
+
if (option && (await this.state.deleteOption(option))) {
|
|
426
|
+
node.options.splice(optionIndex, 1);
|
|
427
|
+
await this.state.persistOptionOrder(node);
|
|
428
|
+
this.markDirty();
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
async deleteQuestion(page, node) {
|
|
432
|
+
if (this.busy || !(await this.state.deleteQuestion(node))) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
page.questions = page.questions.filter((q) => q !== node);
|
|
436
|
+
await this.state.persistQuestionOrder(page);
|
|
437
|
+
if (this.selectedQuestionId === node.entity.ID) {
|
|
438
|
+
this.selectedQuestionId = null;
|
|
439
|
+
}
|
|
440
|
+
this.markDirty();
|
|
441
|
+
}
|
|
442
|
+
async moveQuestion(page, node, delta) {
|
|
443
|
+
const index = page.questions.indexOf(node);
|
|
444
|
+
await this.reorderQuestion(page, index, index + delta);
|
|
445
|
+
}
|
|
446
|
+
/** Pointer/touch drag-drop reorder within a page (mirrors {@link moveQuestion}). */
|
|
447
|
+
async dropQuestion(page, event) {
|
|
448
|
+
await this.reorderQuestion(page, event.previousIndex, event.currentIndex);
|
|
449
|
+
}
|
|
450
|
+
/** Shared reorder: move a question to a new index in its page, then persist. */
|
|
451
|
+
async reorderQuestion(page, from, to) {
|
|
452
|
+
if (this.busy || !isValidReorder(from, to, page.questions.length)) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
moveItemInArray(page.questions, from, to);
|
|
456
|
+
await this.state.persistQuestionOrder(page);
|
|
457
|
+
this.markDirty();
|
|
458
|
+
}
|
|
459
|
+
// -- form-level settings --------------------------------------------------
|
|
460
|
+
async setRenderMode(mode) {
|
|
461
|
+
if (!this.tree || this.record.RenderMode === mode) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
this.record.RenderMode = mode;
|
|
465
|
+
await this.state.save(this.record);
|
|
466
|
+
this.markDirty();
|
|
467
|
+
}
|
|
468
|
+
async setName(name) {
|
|
469
|
+
this.record.Name = name;
|
|
470
|
+
await this.state.save(this.record);
|
|
471
|
+
this.markDirty();
|
|
472
|
+
}
|
|
473
|
+
// -- publish --------------------------------------------------------------
|
|
474
|
+
async publish() {
|
|
475
|
+
if (!this.tree || this.busy) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
this.busy = true;
|
|
479
|
+
this.statusMessage = '';
|
|
480
|
+
const result = await this.publisher.publish(this.tree);
|
|
481
|
+
this.busy = false;
|
|
482
|
+
if (result.success) {
|
|
483
|
+
this.statusMessage = `Published version ${result.versionNumber}.`;
|
|
484
|
+
this.dirty = false;
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
this.statusMessage = result.error ?? 'Publish failed.';
|
|
488
|
+
}
|
|
489
|
+
this.cdr.markForCheck();
|
|
490
|
+
}
|
|
491
|
+
setTab(tab) {
|
|
492
|
+
this.activeTab = tab;
|
|
493
|
+
this.cdr.markForCheck();
|
|
494
|
+
}
|
|
495
|
+
/** The Design panel persisted `Form.StyleID`; the theme reaches the live link only on Publish. */
|
|
496
|
+
onStyleApplied() {
|
|
497
|
+
this.markDirty();
|
|
498
|
+
}
|
|
499
|
+
// -- WYSIWYG preview ------------------------------------------------------
|
|
500
|
+
/** Toolbar "Preview": render the draft with the form's currently-assigned style. */
|
|
501
|
+
async openPreview() {
|
|
502
|
+
if (!this.tree || this.busy) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
const style = this.record.StyleID
|
|
506
|
+
? (await this.design.loadStyleById(this.record.StyleID)) ?? undefined
|
|
507
|
+
: undefined;
|
|
508
|
+
this.previewDef = buildPublishedDefinition(this.tree, style, 'draft-preview');
|
|
509
|
+
this.cdr.markForCheck();
|
|
510
|
+
}
|
|
511
|
+
/** Design-tab "Preview form": render the draft with the current (possibly unsaved) theme. */
|
|
512
|
+
previewWithTokens(tokens) {
|
|
513
|
+
if (!this.tree) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
this.previewDef = buildPublishedDefinition(this.tree, undefined, 'draft-preview', tokens);
|
|
517
|
+
this.cdr.markForCheck();
|
|
518
|
+
}
|
|
519
|
+
closePreview() {
|
|
520
|
+
this.previewDef = null;
|
|
521
|
+
this.cdr.markForCheck();
|
|
522
|
+
}
|
|
523
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵFormBuilderComponent_BaseFactory; return function FormBuilderComponent_Factory(__ngFactoryType__) { return (ɵFormBuilderComponent_BaseFactory || (ɵFormBuilderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(FormBuilderComponent)))(__ngFactoryType__ || FormBuilderComponent); }; })();
|
|
524
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormBuilderComponent, selectors: [["mjf-form-builder"]], features: [i0.ɵɵProvidersFeature([BuilderStateService, DesignStateService, PublishService]), i0.ɵɵInheritDefinitionFeature], decls: 29, vars: 24, consts: [["nameInput", ""], [1, "fb"], [1, "fb-top"], ["aria-label", "Form name", 1, "fb-name", 3, "change", "value"], ["role", "group", "aria-label", "Render mode", 1, "fb-seg"], ["type", "button", 3, "click"], [1, "fb-spacer"], ["role", "status", 1, "fb-status"], ["role", "status", "title", "Your changes go live on the public link only after you Publish.", 1, "fb-dirty"], ["type", "button", 1, "mjf-btn", "mjf-btn--ghost", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-eye"], ["type", "button", 1, "mjf-btn", "mjf-btn--primary", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-rocket"], ["role", "tablist", "aria-label", "Builder workspace", 1, "fb-tabs"], ["type", "button", "role", "tab", 1, "fb-tab", 3, "click"], [1, "fb-body"], [1, "fb-design"], [1, "fb-distribute"], [3, "definition"], ["aria-hidden", "true", 1, "fa-solid", "fa-circle"], ["aria-label", "Add question palette", 1, "fb-pane", "fb-pane--left"], [1, "fb-palette-group"], ["aria-label", "Form canvas", 1, "fb-pane", "fb-pane--center"], [1, "fb-canvas"], [1, "fb-canvas-head"], ["aria-label", "Question properties", 1, "fb-pane", "fb-pane--right"], [3, "questionChanged", "addOptionRequested", "removeOptionRequested", "node", "conditionalSources"], [1, "fb-palette-title"], ["role", "list", 1, "fb-palette"], ["type", "button", "role", "listitem", 1, "fb-palette-item", 3, "disabled"], ["type", "button", "role", "listitem", 1, "fb-palette-item", 3, "click", "disabled"], ["aria-hidden", "true"], [1, "fb-canvas-empty"], ["cdkDropList", "", 1, "fb-q-list", 3, "cdkDropListDropped", "cdkDropListData"], ["cdkDrag", "", "tabindex", "0", 1, "fb-q", 3, "cdkDragData", "is-selected"], ["cdkDrag", "", "tabindex", "0", 1, "fb-q", 3, "click", "keydown.enter", "cdkDragData"], ["class", "fb-q-drag-preview", 4, "cdkDragPreview"], ["type", "button", "cdkDragHandle", "", 1, "fb-q-handle", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-grip-vertical"], [1, "fb-q-main"], [1, "fb-q-top"], [1, "fb-q-num"], [1, "mjf-pill"], [1, "fb-q-label"], [1, "fb-q-help"], [1, "fb-q-side"], ["type", "button", "aria-label", "Move up", 1, "fb-q-btn", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-chevron-up"], ["type", "button", "aria-label", "Move down", 1, "fb-q-btn", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-chevron-down"], ["type", "button", "aria-label", "Delete question", 1, "fb-q-btn", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash"], [1, "fb-q-drag-preview"], [3, "styleApplied", "previewRequested", "form"], [3, "formId"], [3, "closed", "definition"]], template: function FormBuilderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
525
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
526
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "header", 2)(2, "input", 3, 0);
|
|
527
|
+
i0.ɵɵlistener("change", function FormBuilderComponent_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r1); const nameInput_r2 = i0.ɵɵreference(3); return i0.ɵɵresetView(ctx.setName(nameInput_r2.value)); });
|
|
528
|
+
i0.ɵɵelementEnd();
|
|
529
|
+
i0.ɵɵelementStart(4, "div", 4)(5, "button", 5);
|
|
530
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setRenderMode("Scroll")); });
|
|
531
|
+
i0.ɵɵtext(6, "Scroll");
|
|
532
|
+
i0.ɵɵelementEnd();
|
|
533
|
+
i0.ɵɵelementStart(7, "button", 5);
|
|
534
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setRenderMode("OneQuestion")); });
|
|
535
|
+
i0.ɵɵtext(8, "One question");
|
|
536
|
+
i0.ɵɵelementEnd()();
|
|
537
|
+
i0.ɵɵelement(9, "div", 6);
|
|
538
|
+
i0.ɵɵconditionalCreate(10, FormBuilderComponent_Conditional_10_Template, 2, 1, "span", 7);
|
|
539
|
+
i0.ɵɵconditionalCreate(11, FormBuilderComponent_Conditional_11_Template, 3, 0, "span", 8);
|
|
540
|
+
i0.ɵɵelementStart(12, "button", 9);
|
|
541
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openPreview()); });
|
|
542
|
+
i0.ɵɵelement(13, "i", 10);
|
|
543
|
+
i0.ɵɵtext(14, " Preview ");
|
|
544
|
+
i0.ɵɵelementEnd();
|
|
545
|
+
i0.ɵɵelementStart(15, "button", 11);
|
|
546
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.publish()); });
|
|
547
|
+
i0.ɵɵelement(16, "i", 12);
|
|
548
|
+
i0.ɵɵtext(17, " Publish ");
|
|
549
|
+
i0.ɵɵelementEnd()();
|
|
550
|
+
i0.ɵɵelementStart(18, "nav", 13)(19, "button", 14);
|
|
551
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Template_button_click_19_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setTab("build")); });
|
|
552
|
+
i0.ɵɵtext(20, "Build");
|
|
553
|
+
i0.ɵɵelementEnd();
|
|
554
|
+
i0.ɵɵelementStart(21, "button", 14);
|
|
555
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Template_button_click_21_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setTab("design")); });
|
|
556
|
+
i0.ɵɵtext(22, "Design");
|
|
557
|
+
i0.ɵɵelementEnd();
|
|
558
|
+
i0.ɵɵelementStart(23, "button", 14);
|
|
559
|
+
i0.ɵɵlistener("click", function FormBuilderComponent_Template_button_click_23_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setTab("distribute")); });
|
|
560
|
+
i0.ɵɵtext(24, "Distribute");
|
|
561
|
+
i0.ɵɵelementEnd()();
|
|
562
|
+
i0.ɵɵconditionalCreate(25, FormBuilderComponent_Conditional_25_Template, 14, 4, "div", 15)(26, FormBuilderComponent_Conditional_26_Template, 2, 1, "div", 16)(27, FormBuilderComponent_Conditional_27_Template, 2, 1, "div", 17);
|
|
563
|
+
i0.ɵɵconditionalCreate(28, FormBuilderComponent_Conditional_28_Template, 1, 1, "mjf-form-preview-modal", 18);
|
|
564
|
+
i0.ɵɵelementEnd();
|
|
565
|
+
} if (rf & 2) {
|
|
566
|
+
i0.ɵɵadvance(2);
|
|
567
|
+
i0.ɵɵproperty("value", ctx.record.Name);
|
|
568
|
+
i0.ɵɵadvance(3);
|
|
569
|
+
i0.ɵɵclassProp("is-on", ctx.record.RenderMode === "Scroll");
|
|
570
|
+
i0.ɵɵattribute("aria-pressed", ctx.record.RenderMode === "Scroll");
|
|
571
|
+
i0.ɵɵadvance(2);
|
|
572
|
+
i0.ɵɵclassProp("is-on", ctx.record.RenderMode === "OneQuestion");
|
|
573
|
+
i0.ɵɵattribute("aria-pressed", ctx.record.RenderMode === "OneQuestion");
|
|
574
|
+
i0.ɵɵadvance(3);
|
|
575
|
+
i0.ɵɵconditional(ctx.statusMessage ? 10 : -1);
|
|
576
|
+
i0.ɵɵadvance();
|
|
577
|
+
i0.ɵɵconditional(ctx.dirty ? 11 : -1);
|
|
578
|
+
i0.ɵɵadvance();
|
|
579
|
+
i0.ɵɵproperty("disabled", ctx.busy || !ctx.tree);
|
|
580
|
+
i0.ɵɵadvance(3);
|
|
581
|
+
i0.ɵɵclassProp("is-attention", ctx.dirty);
|
|
582
|
+
i0.ɵɵproperty("disabled", ctx.busy);
|
|
583
|
+
i0.ɵɵadvance(4);
|
|
584
|
+
i0.ɵɵclassProp("is-on", ctx.activeTab === "build");
|
|
585
|
+
i0.ɵɵattribute("aria-selected", ctx.activeTab === "build");
|
|
586
|
+
i0.ɵɵadvance(2);
|
|
587
|
+
i0.ɵɵclassProp("is-on", ctx.activeTab === "design");
|
|
588
|
+
i0.ɵɵattribute("aria-selected", ctx.activeTab === "design");
|
|
589
|
+
i0.ɵɵadvance(2);
|
|
590
|
+
i0.ɵɵclassProp("is-on", ctx.activeTab === "distribute");
|
|
591
|
+
i0.ɵɵattribute("aria-selected", ctx.activeTab === "distribute");
|
|
592
|
+
i0.ɵɵadvance(2);
|
|
593
|
+
i0.ɵɵconditional(ctx.activeTab === "build" ? 25 : ctx.activeTab === "design" ? 26 : 27);
|
|
594
|
+
i0.ɵɵadvance(3);
|
|
595
|
+
i0.ɵɵconditional(ctx.previewDef ? 28 : -1);
|
|
596
|
+
} }, dependencies: [CommonModule,
|
|
597
|
+
FormsModule,
|
|
598
|
+
CdkDropList,
|
|
599
|
+
CdkDrag,
|
|
600
|
+
CdkDragHandle,
|
|
601
|
+
CdkDragPreview,
|
|
602
|
+
QuestionEditorComponent,
|
|
603
|
+
DistributionManagerComponent,
|
|
604
|
+
DesignPanelComponent,
|
|
605
|
+
FormPreviewModalComponent], styles: ["[_nghost-%COMP%] {\n --mjf-builder-gap: 16px;\n --mjf-builder-radius: var(--mj-radius-md, 8px);\n}\n.mjf-input[_ngcontent-%COMP%] {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 10px;\n font: inherit;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mjf-builder-radius);\n transition: border-color var(--mj-transition-base, 0.15s ease);\n}\n.mjf-input[_ngcontent-%COMP%]:focus {\n outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary));\n outline-offset: 1px;\n border-color: var(--mj-brand-primary);\n}\ntextarea.mjf-input[_ngcontent-%COMP%] { min-height: 64px; resize: vertical; }\n.mjf-field[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--mjf-builder-gap); }\n.mjf-field-label[_ngcontent-%COMP%] { font-size: 0.8125rem; font-weight: 600; color: var(--mj-text-secondary); }\n.mjf-field-hint[_ngcontent-%COMP%] { font-size: 0.75rem; color: var(--mj-text-muted); }\n.mjf-row[_ngcontent-%COMP%] { display: flex; gap: 8px; align-items: center; }\n.mjf-btn[_ngcontent-%COMP%] {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;\n border-radius: var(--mjf-btn-radius, var(--mjf-builder-radius));\n border: 1px solid transparent;\n transition: background var(--mj-transition-base, 0.15s ease), border-color var(--mj-transition-base, 0.15s ease);\n}\n.mjf-btn[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); outline-offset: 2px; }\n.mjf-btn[_ngcontent-%COMP%]:disabled { opacity: 0.5; cursor: not-allowed; }\n.mjf-btn--primary[_ngcontent-%COMP%] { color: var(--mj-brand-on-primary, var(--mj-text-inverse)); background: var(--mj-brand-primary); }\n.mjf-btn--primary[_ngcontent-%COMP%]:hover:not(:disabled) { background: var(--mj-brand-primary-hover, var(--mj-brand-primary)); }\n.mjf-btn--ghost[_ngcontent-%COMP%] { color: var(--mj-text-secondary); background: transparent; border-color: var(--mj-border-default); }\n.mjf-btn--ghost[_ngcontent-%COMP%]:hover:not(:disabled) { background: var(--mj-bg-surface-hover); }\n.mjf-btn--danger[_ngcontent-%COMP%] { color: var(--mj-status-error, var(--mj-color-error-600)); background: transparent; border-color: var(--mj-border-default); }\n.mjf-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled) { background: var(--mj-bg-surface-hover); }\n.mjf-pill[_ngcontent-%COMP%] {\n display: inline-flex; align-items: center; gap: 5px;\n padding: 3px 9px; font-size: 0.75rem; font-weight: 600;\n border-radius: var(--mjf-pill-radius, var(--mj-radius-full, 999px));\n color: var(--mj-text-secondary); background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n}\n.mjf-switch[_ngcontent-%COMP%] {\n position: relative; display: inline-block; width: 38px; height: 22px; flex: none; cursor: pointer;\n border-radius: var(--mj-radius-full, 999px); background: var(--mj-border-strong);\n transition: background var(--mj-transition-base, 0.15s ease);\n border: none; padding: 0;\n}\n.mjf-switch[_ngcontent-%COMP%]::after {\n content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;\n border-radius: 50%; background: var(--mj-bg-surface);\n transition: transform var(--mj-transition-base, 0.15s ease);\n}\n.mjf-switch.is-on[_ngcontent-%COMP%] { background: var(--mj-brand-primary); }\n.mjf-switch.is-on[_ngcontent-%COMP%]::after { transform: translateX(16px); }\n.mjf-switch[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); outline-offset: 2px; }\n\n\n[_nghost-%COMP%] { display: block; height: 100%; color: var(--mj-text-primary); font-family: var(--mj-font-family, inherit); }\n.fb[_ngcontent-%COMP%] { display: flex; flex-direction: column; height: 100%; min-height: 480px; background: var(--mj-bg-page); }\n\n\n\n.fb-top[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); flex-wrap: wrap; }\n.fb-name[_ngcontent-%COMP%] { font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--mj-text-primary); background: transparent; border: 1px solid transparent; border-radius: var(--mj-radius-md, 8px); padding: 6px 8px; min-width: 200px; flex: 1 1 200px; }\n.fb-name[_ngcontent-%COMP%]:hover { border-color: var(--mj-border-subtle); }\n.fb-name[_ngcontent-%COMP%]:focus { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); border-color: var(--mj-brand-primary); }\n.fb-spacer[_ngcontent-%COMP%] { flex: 1; }\n.fb-status[_ngcontent-%COMP%] { font-size: 0.8125rem; color: var(--mj-text-secondary); }\n.fb-dirty[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n font-size: 0.8125rem;\n color: var(--mj-status-warning, var(--mj-text-secondary));\n}\n.fb-dirty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 0.5rem; }\n.mjf-btn.is-attention[_ngcontent-%COMP%] { box-shadow: 0 0 0 3px var(--mj-brand-primary-subtle, transparent); }\n\n\n\n.fb-seg[_ngcontent-%COMP%] { display: inline-flex; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-full, 999px); overflow: hidden; }\n.fb-seg[_ngcontent-%COMP%] button[_ngcontent-%COMP%] { font: inherit; font-size: 0.8125rem; font-weight: 600; padding: 6px 14px; cursor: pointer; border: none; background: var(--mj-bg-surface); color: var(--mj-text-secondary); }\n.fb-seg[_ngcontent-%COMP%] button.is-on[_ngcontent-%COMP%] { background: var(--mj-brand-primary); color: var(--mj-brand-on-primary, var(--mj-text-inverse)); }\n\n\n\n.fb-tabs[_ngcontent-%COMP%] { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); }\n.fb-tab[_ngcontent-%COMP%] { font: inherit; font-weight: 600; font-size: 0.875rem; padding: 10px 14px; cursor: pointer; border: none; background: transparent; color: var(--mj-text-secondary); border-bottom: 2px solid transparent; }\n.fb-tab.is-on[_ngcontent-%COMP%] { color: var(--mj-brand-primary); border-bottom-color: var(--mj-brand-primary); }\n\n\n\n.fb-body[_ngcontent-%COMP%] { flex: 1; display: grid; grid-template-columns: 220px 1fr 320px; min-height: 0; overflow: hidden; }\n.fb-pane[_ngcontent-%COMP%] { overflow-y: auto; padding: 16px; }\n.fb-pane--left[_ngcontent-%COMP%] { border-right: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); }\n.fb-pane--center[_ngcontent-%COMP%] { background: var(--mj-bg-page); }\n.fb-pane--right[_ngcontent-%COMP%] { border-left: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); }\n\n\n\n.fb-palette-group[_ngcontent-%COMP%] { margin-bottom: 16px; }\n.fb-palette-title[_ngcontent-%COMP%] { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mj-text-muted); margin: 0 0 8px; }\n.fb-palette[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 6px; }\n.fb-palette-item[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; font: inherit; font-size: 0.875rem; padding: 8px 10px; cursor: pointer; border-radius: var(--mj-radius-md, 8px); border: 1px solid var(--mj-border-subtle); background: var(--mj-bg-surface-card, var(--mj-bg-surface)); color: var(--mj-text-primary); }\n.fb-palette-item[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); border-color: var(--mj-border-default); }\n.fb-palette-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { width: 18px; text-align: center; color: var(--mj-text-secondary); }\n\n\n\n.fb-canvas[_ngcontent-%COMP%] { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }\n.fb-canvas-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] { margin: 0 0 4px; font-size: 1.25rem; color: var(--mj-text-primary); }\n.fb-canvas-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 0; color: var(--mj-text-secondary); font-size: 0.9rem; }\n.fb-q-list[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 12px; }\n.fb-q[_ngcontent-%COMP%] { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--mj-radius-lg, 12px); border: 1px solid var(--mj-border-default); background: var(--mj-bg-surface-card, var(--mj-bg-surface)); cursor: pointer; }\n.fb-q[_ngcontent-%COMP%]:hover { border-color: var(--mj-border-strong); }\n.fb-q.is-selected[_ngcontent-%COMP%] { border-color: var(--mj-brand-primary); box-shadow: 0 0 0 1px var(--mj-brand-primary); }\n\n\n\n.fb-q-handle[_ngcontent-%COMP%] { flex: none; align-self: stretch; width: 26px; display: flex; align-items: center; justify-content: center; cursor: grab; border: none; background: transparent; color: var(--mj-text-muted); border-radius: var(--mj-radius-sm, 6px); touch-action: none; }\n.fb-q-handle[_ngcontent-%COMP%]:hover:not(:disabled) { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n.fb-q-handle[_ngcontent-%COMP%]:focus-visible { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); outline-offset: 1px; }\n.fb-q-handle[_ngcontent-%COMP%]:disabled { opacity: 0.35; cursor: not-allowed; }\n.fb-q-handle[_ngcontent-%COMP%]:active { cursor: grabbing; }\n\n\n\n.fb-q-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .fb-q[_ngcontent-%COMP%]:not(.cdk-drag-placeholder) { transition: transform var(--mj-transition-base, 0.18s ease); }\n.cdk-drag-preview.fb-q[_ngcontent-%COMP%] { box-shadow: 0 6px 18px var(--mjf-drag-shadow, var(--mj-shadow-color, rgba(0, 0, 0, 0.18))); border-color: var(--mj-brand-primary); }\n.fb-q-drag-preview[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--mj-radius-lg, 12px); border: 1px solid var(--mj-brand-primary); background: var(--mj-bg-surface-card, var(--mj-bg-surface)); color: var(--mj-text-primary); box-shadow: 0 6px 18px var(--mjf-drag-shadow, var(--mj-shadow-color, rgba(0, 0, 0, 0.18))); }\n.cdk-drag-placeholder[_ngcontent-%COMP%] { opacity: 0.4; border-style: dashed !important; border-color: var(--mj-brand-primary) !important; background: var(--mj-bg-surface-sunken) !important; }\n.cdk-drag-animating[_ngcontent-%COMP%] { transition: transform var(--mj-transition-base, 0.2s cubic-bezier(0, 0, 0.2, 1)); }\n.fb-q-main[_ngcontent-%COMP%] { flex: 1; min-width: 0; }\n.fb-q-top[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }\n.fb-q-num[_ngcontent-%COMP%] { font-size: 0.75rem; font-weight: 700; color: var(--mj-text-muted); }\n.fb-q-label[_ngcontent-%COMP%] { font-weight: 600; color: var(--mj-text-primary); word-break: break-word; }\n.fb-q-help[_ngcontent-%COMP%] { font-size: 0.8125rem; color: var(--mj-text-muted); margin-top: 3px; }\n.fb-q-side[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 6px; align-items: center; }\n.fb-q-btn[_ngcontent-%COMP%] { width: 30px; height: 28px; cursor: pointer; border-radius: var(--mj-radius-sm, 6px); border: 1px solid var(--mj-border-subtle); background: var(--mj-bg-surface); color: var(--mj-text-muted); }\n.fb-q-btn[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n.fb-q-btn[_ngcontent-%COMP%]:disabled { opacity: 0.35; cursor: not-allowed; }\n.fb-canvas-empty[_ngcontent-%COMP%] { text-align: center; color: var(--mj-text-muted); padding: 40px 0; }\n\n.fb-distribute[_ngcontent-%COMP%] { padding: 20px; max-width: 880px; margin: 0 auto; }\n.fb-design[_ngcontent-%COMP%] { flex: 1; min-height: 0; padding: 16px; overflow: hidden; }\n.fb-design[_ngcontent-%COMP%] mjf-design-panel[_ngcontent-%COMP%] { display: block; height: 100%; }\n\n\n\n@media (max-width: 900px) {\n .fb-body[_ngcontent-%COMP%] { grid-template-columns: 1fr; grid-auto-rows: min-content; overflow-y: auto; }\n .fb-pane--left[_ngcontent-%COMP%], .fb-pane--right[_ngcontent-%COMP%] { border: none; border-top: 1px solid var(--mj-border-default); }\n .fb-palette[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }\n}"] });
|
|
606
|
+
};
|
|
607
|
+
FormBuilderComponent = __decorate([
|
|
608
|
+
RegisterClass(BaseFormComponent, FORMS_ENTITY.Form, 10)
|
|
609
|
+
], FormBuilderComponent);
|
|
610
|
+
export { FormBuilderComponent };
|
|
611
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormBuilderComponent, [{
|
|
612
|
+
type: Component,
|
|
613
|
+
args: [{ selector: 'mjf-form-builder', standalone: true, imports: [
|
|
614
|
+
CommonModule,
|
|
615
|
+
FormsModule,
|
|
616
|
+
CdkDropList,
|
|
617
|
+
CdkDrag,
|
|
618
|
+
CdkDragHandle,
|
|
619
|
+
CdkDragPreview,
|
|
620
|
+
QuestionEditorComponent,
|
|
621
|
+
DistributionManagerComponent,
|
|
622
|
+
DesignPanelComponent,
|
|
623
|
+
FormPreviewModalComponent,
|
|
624
|
+
], providers: [BuilderStateService, DesignStateService, PublishService], template: "<div class=\"fb\">\n <!-- Topbar -->\n <header class=\"fb-top\">\n <input\n #nameInput\n class=\"fb-name\"\n [value]=\"record.Name\"\n (change)=\"setName(nameInput.value)\"\n aria-label=\"Form name\"\n />\n\n <div class=\"fb-seg\" role=\"group\" aria-label=\"Render mode\">\n <button\n type=\"button\"\n [class.is-on]=\"record.RenderMode === 'Scroll'\"\n [attr.aria-pressed]=\"record.RenderMode === 'Scroll'\"\n (click)=\"setRenderMode('Scroll')\"\n >Scroll</button>\n <button\n type=\"button\"\n [class.is-on]=\"record.RenderMode === 'OneQuestion'\"\n [attr.aria-pressed]=\"record.RenderMode === 'OneQuestion'\"\n (click)=\"setRenderMode('OneQuestion')\"\n >One question</button>\n </div>\n\n <div class=\"fb-spacer\"></div>\n\n @if (statusMessage) {\n <span class=\"fb-status\" role=\"status\">{{ statusMessage }}</span>\n }\n @if (dirty) {\n <span class=\"fb-dirty\" role=\"status\" title=\"Your changes go live on the public link only after you Publish.\">\n <i class=\"fa-solid fa-circle\" aria-hidden=\"true\"></i> Unpublished changes\n </span>\n }\n <button type=\"button\" class=\"mjf-btn mjf-btn--ghost\" [disabled]=\"busy || !tree\" (click)=\"openPreview()\">\n <i class=\"fa-solid fa-eye\" aria-hidden=\"true\"></i> Preview\n </button>\n <button type=\"button\" class=\"mjf-btn mjf-btn--primary\" [class.is-attention]=\"dirty\" [disabled]=\"busy\" (click)=\"publish()\">\n <i class=\"fa-solid fa-rocket\" aria-hidden=\"true\"></i> Publish\n </button>\n </header>\n\n <!-- Tabs -->\n <nav class=\"fb-tabs\" role=\"tablist\" aria-label=\"Builder workspace\">\n <button\n type=\"button\"\n class=\"fb-tab\"\n role=\"tab\"\n [class.is-on]=\"activeTab === 'build'\"\n [attr.aria-selected]=\"activeTab === 'build'\"\n (click)=\"setTab('build')\"\n >Build</button>\n <button\n type=\"button\"\n class=\"fb-tab\"\n role=\"tab\"\n [class.is-on]=\"activeTab === 'design'\"\n [attr.aria-selected]=\"activeTab === 'design'\"\n (click)=\"setTab('design')\"\n >Design</button>\n <button\n type=\"button\"\n class=\"fb-tab\"\n role=\"tab\"\n [class.is-on]=\"activeTab === 'distribute'\"\n [attr.aria-selected]=\"activeTab === 'distribute'\"\n (click)=\"setTab('distribute')\"\n >Distribute</button>\n </nav>\n\n @if (activeTab === 'build') {\n <div class=\"fb-body\">\n <!-- LEFT: palette -->\n <nav class=\"fb-pane fb-pane--left\" aria-label=\"Add question palette\">\n @for (group of paletteGroups; track group) {\n <div class=\"fb-palette-group\">\n <p class=\"fb-palette-title\">{{ group }}</p>\n <div class=\"fb-palette\" role=\"list\">\n @for (meta of typesInGroup(group); track meta.type) {\n <button\n type=\"button\"\n class=\"fb-palette-item\"\n role=\"listitem\"\n [disabled]=\"busy\"\n (click)=\"addQuestion(meta.type)\"\n >\n <i [class]=\"meta.icon\" aria-hidden=\"true\"></i> {{ meta.label }}\n </button>\n }\n </div>\n </div>\n }\n </nav>\n\n <!-- CENTER: canvas -->\n <section class=\"fb-pane fb-pane--center\" aria-label=\"Form canvas\">\n <div class=\"fb-canvas\">\n <div class=\"fb-canvas-head\">\n <h2>{{ record.Name }}</h2>\n @if (record.Description) {\n <p>{{ record.Description }}</p>\n }\n </div>\n\n @for (page of pages; track page.entity.ID) {\n @if (page.questions.length === 0) {\n <p class=\"fb-canvas-empty\">Add a question from the palette to get started.</p>\n }\n <div\n class=\"fb-q-list\"\n cdkDropList\n [cdkDropListData]=\"page.questions\"\n (cdkDropListDropped)=\"dropQuestion(page, $event)\"\n >\n @for (node of page.questions; track node.entity.ID) {\n <article\n class=\"fb-q\"\n cdkDrag\n [cdkDragData]=\"node\"\n [class.is-selected]=\"node.entity.ID === selectedQuestionId\"\n tabindex=\"0\"\n (click)=\"selectQuestion(node)\"\n (keydown.enter)=\"selectQuestion(node)\"\n [attr.aria-label]=\"'Edit question ' + node.entity.Prompt\"\n >\n <div class=\"fb-q-drag-preview\" *cdkDragPreview>\n <span class=\"fb-q-num\">{{ displayIndex(page, node) }}</span>\n <span class=\"fb-q-label\">{{ node.entity.Prompt }}</span>\n </div>\n <button\n type=\"button\"\n class=\"fb-q-handle\"\n cdkDragHandle\n [disabled]=\"busy\"\n [attr.aria-label]=\"'Drag to reorder question ' + node.entity.Prompt\"\n (click)=\"$event.stopPropagation()\"\n ><i class=\"fa-solid fa-grip-vertical\" aria-hidden=\"true\"></i></button>\n <div class=\"fb-q-main\">\n <div class=\"fb-q-top\">\n <span class=\"fb-q-num\">{{ displayIndex(page, node) }}</span>\n <span class=\"mjf-pill\"><i [class]=\"metaFor(node).icon\" aria-hidden=\"true\"></i> {{ metaFor(node).label }}</span>\n @if (node.entity.IsRequired) {\n <span class=\"mjf-pill\">Required</span>\n }\n </div>\n <div class=\"fb-q-label\">{{ node.entity.Prompt }}</div>\n @if (node.entity.HelpText) {\n <div class=\"fb-q-help\">{{ node.entity.HelpText }}</div>\n }\n </div>\n <div class=\"fb-q-side\">\n <button\n type=\"button\"\n class=\"fb-q-btn\"\n [disabled]=\"busy\"\n (click)=\"moveQuestion(page, node, -1); $event.stopPropagation()\"\n aria-label=\"Move up\"\n ><i class=\"fa-solid fa-chevron-up\" aria-hidden=\"true\"></i></button>\n <button\n type=\"button\"\n class=\"fb-q-btn\"\n [disabled]=\"busy\"\n (click)=\"moveQuestion(page, node, 1); $event.stopPropagation()\"\n aria-label=\"Move down\"\n ><i class=\"fa-solid fa-chevron-down\" aria-hidden=\"true\"></i></button>\n <button\n type=\"button\"\n class=\"fb-q-btn\"\n [disabled]=\"busy\"\n (click)=\"deleteQuestion(page, node); $event.stopPropagation()\"\n aria-label=\"Delete question\"\n ><i class=\"fa-solid fa-trash\" aria-hidden=\"true\"></i></button>\n </div>\n </article>\n }\n </div>\n }\n </div>\n </section>\n\n <!-- RIGHT: properties -->\n <aside class=\"fb-pane fb-pane--right\" aria-label=\"Question properties\">\n <mjf-question-editor\n [node]=\"selectedNode\"\n [conditionalSources]=\"conditionalSources\"\n (questionChanged)=\"onQuestionChanged($event)\"\n (addOptionRequested)=\"onAddOption($event)\"\n (removeOptionRequested)=\"onRemoveOption($event)\"\n ></mjf-question-editor>\n </aside>\n </div>\n } @else if (activeTab === 'design') {\n <div class=\"fb-design\">\n <mjf-design-panel\n [form]=\"record\"\n (styleApplied)=\"onStyleApplied()\"\n (previewRequested)=\"previewWithTokens($event)\"\n ></mjf-design-panel>\n </div>\n } @else {\n <div class=\"fb-distribute\">\n <mjf-distribution-manager [formId]=\"record.ID\"></mjf-distribution-manager>\n </div>\n }\n\n @if (previewDef) {\n <mjf-form-preview-modal [definition]=\"previewDef\" (closed)=\"closePreview()\"></mjf-form-preview-modal>\n }\n</div>\n", styles: ["\n:host {\n --mjf-builder-gap: 16px;\n --mjf-builder-radius: var(--mj-radius-md, 8px);\n}\n.mjf-input {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 10px;\n font: inherit;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mjf-builder-radius);\n transition: border-color var(--mj-transition-base, 0.15s ease);\n}\n.mjf-input:focus {\n outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary));\n outline-offset: 1px;\n border-color: var(--mj-brand-primary);\n}\ntextarea.mjf-input { min-height: 64px; resize: vertical; }\n.mjf-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--mjf-builder-gap); }\n.mjf-field-label { font-size: 0.8125rem; font-weight: 600; color: var(--mj-text-secondary); }\n.mjf-field-hint { font-size: 0.75rem; color: var(--mj-text-muted); }\n.mjf-row { display: flex; gap: 8px; align-items: center; }\n.mjf-btn {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;\n border-radius: var(--mjf-btn-radius, var(--mjf-builder-radius));\n border: 1px solid transparent;\n transition: background var(--mj-transition-base, 0.15s ease), border-color var(--mj-transition-base, 0.15s ease);\n}\n.mjf-btn:focus-visible { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); outline-offset: 2px; }\n.mjf-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n.mjf-btn--primary { color: var(--mj-brand-on-primary, var(--mj-text-inverse)); background: var(--mj-brand-primary); }\n.mjf-btn--primary:hover:not(:disabled) { background: var(--mj-brand-primary-hover, var(--mj-brand-primary)); }\n.mjf-btn--ghost { color: var(--mj-text-secondary); background: transparent; border-color: var(--mj-border-default); }\n.mjf-btn--ghost:hover:not(:disabled) { background: var(--mj-bg-surface-hover); }\n.mjf-btn--danger { color: var(--mj-status-error, var(--mj-color-error-600)); background: transparent; border-color: var(--mj-border-default); }\n.mjf-btn--danger:hover:not(:disabled) { background: var(--mj-bg-surface-hover); }\n.mjf-pill {\n display: inline-flex; align-items: center; gap: 5px;\n padding: 3px 9px; font-size: 0.75rem; font-weight: 600;\n border-radius: var(--mjf-pill-radius, var(--mj-radius-full, 999px));\n color: var(--mj-text-secondary); background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n}\n.mjf-switch {\n position: relative; display: inline-block; width: 38px; height: 22px; flex: none; cursor: pointer;\n border-radius: var(--mj-radius-full, 999px); background: var(--mj-border-strong);\n transition: background var(--mj-transition-base, 0.15s ease);\n border: none; padding: 0;\n}\n.mjf-switch::after {\n content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;\n border-radius: 50%; background: var(--mj-bg-surface);\n transition: transform var(--mj-transition-base, 0.15s ease);\n}\n.mjf-switch.is-on { background: var(--mj-brand-primary); }\n.mjf-switch.is-on::after { transform: translateX(16px); }\n.mjf-switch:focus-visible { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); outline-offset: 2px; }\n\n\n:host { display: block; height: 100%; color: var(--mj-text-primary); font-family: var(--mj-font-family, inherit); }\n.fb { display: flex; flex-direction: column; height: 100%; min-height: 480px; background: var(--mj-bg-page); }\n\n/* Topbar */\n.fb-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); flex-wrap: wrap; }\n.fb-name { font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--mj-text-primary); background: transparent; border: 1px solid transparent; border-radius: var(--mj-radius-md, 8px); padding: 6px 8px; min-width: 200px; flex: 1 1 200px; }\n.fb-name:hover { border-color: var(--mj-border-subtle); }\n.fb-name:focus { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); border-color: var(--mj-brand-primary); }\n.fb-spacer { flex: 1; }\n.fb-status { font-size: 0.8125rem; color: var(--mj-text-secondary); }\n.fb-dirty {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n font-size: 0.8125rem;\n color: var(--mj-status-warning, var(--mj-text-secondary));\n}\n.fb-dirty i { font-size: 0.5rem; }\n.mjf-btn.is-attention { box-shadow: 0 0 0 3px var(--mj-brand-primary-subtle, transparent); }\n\n/* Segmented control */\n.fb-seg { display: inline-flex; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-full, 999px); overflow: hidden; }\n.fb-seg button { font: inherit; font-size: 0.8125rem; font-weight: 600; padding: 6px 14px; cursor: pointer; border: none; background: var(--mj-bg-surface); color: var(--mj-text-secondary); }\n.fb-seg button.is-on { background: var(--mj-brand-primary); color: var(--mj-brand-on-primary, var(--mj-text-inverse)); }\n\n/* Tabs */\n.fb-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); }\n.fb-tab { font: inherit; font-weight: 600; font-size: 0.875rem; padding: 10px 14px; cursor: pointer; border: none; background: transparent; color: var(--mj-text-secondary); border-bottom: 2px solid transparent; }\n.fb-tab.is-on { color: var(--mj-brand-primary); border-bottom-color: var(--mj-brand-primary); }\n\n/* Body grid */\n.fb-body { flex: 1; display: grid; grid-template-columns: 220px 1fr 320px; min-height: 0; overflow: hidden; }\n.fb-pane { overflow-y: auto; padding: 16px; }\n.fb-pane--left { border-right: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); }\n.fb-pane--center { background: var(--mj-bg-page); }\n.fb-pane--right { border-left: 1px solid var(--mj-border-default); background: var(--mj-bg-surface); }\n\n/* Palette */\n.fb-palette-group { margin-bottom: 16px; }\n.fb-palette-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mj-text-muted); margin: 0 0 8px; }\n.fb-palette { display: flex; flex-direction: column; gap: 6px; }\n.fb-palette-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; font: inherit; font-size: 0.875rem; padding: 8px 10px; cursor: pointer; border-radius: var(--mj-radius-md, 8px); border: 1px solid var(--mj-border-subtle); background: var(--mj-bg-surface-card, var(--mj-bg-surface)); color: var(--mj-text-primary); }\n.fb-palette-item:hover { background: var(--mj-bg-surface-hover); border-color: var(--mj-border-default); }\n.fb-palette-item i { width: 18px; text-align: center; color: var(--mj-text-secondary); }\n\n/* Canvas */\n.fb-canvas { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }\n.fb-canvas-head h2 { margin: 0 0 4px; font-size: 1.25rem; color: var(--mj-text-primary); }\n.fb-canvas-head p { margin: 0; color: var(--mj-text-secondary); font-size: 0.9rem; }\n.fb-q-list { display: flex; flex-direction: column; gap: 12px; }\n.fb-q { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--mj-radius-lg, 12px); border: 1px solid var(--mj-border-default); background: var(--mj-bg-surface-card, var(--mj-bg-surface)); cursor: pointer; }\n.fb-q:hover { border-color: var(--mj-border-strong); }\n.fb-q.is-selected { border-color: var(--mj-brand-primary); box-shadow: 0 0 0 1px var(--mj-brand-primary); }\n\n/* Drag handle \u2014 pointer/touch reorder (arrows remain the keyboard fallback). */\n.fb-q-handle { flex: none; align-self: stretch; width: 26px; display: flex; align-items: center; justify-content: center; cursor: grab; border: none; background: transparent; color: var(--mj-text-muted); border-radius: var(--mj-radius-sm, 6px); touch-action: none; }\n.fb-q-handle:hover:not(:disabled) { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n.fb-q-handle:focus-visible { outline: 2px solid var(--mjf-focus-ring, var(--mj-brand-primary)); outline-offset: 1px; }\n.fb-q-handle:disabled { opacity: 0.35; cursor: not-allowed; }\n.fb-q-handle:active { cursor: grabbing; }\n\n/* CDK drag-drop visual states \u2014 token-only so dark mode stays intact. */\n.fb-q-list.cdk-drop-list-dragging .fb-q:not(.cdk-drag-placeholder) { transition: transform var(--mj-transition-base, 0.18s ease); }\n.cdk-drag-preview.fb-q { box-shadow: 0 6px 18px var(--mjf-drag-shadow, var(--mj-shadow-color, rgba(0, 0, 0, 0.18))); border-color: var(--mj-brand-primary); }\n.fb-q-drag-preview { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--mj-radius-lg, 12px); border: 1px solid var(--mj-brand-primary); background: var(--mj-bg-surface-card, var(--mj-bg-surface)); color: var(--mj-text-primary); box-shadow: 0 6px 18px var(--mjf-drag-shadow, var(--mj-shadow-color, rgba(0, 0, 0, 0.18))); }\n.cdk-drag-placeholder { opacity: 0.4; border-style: dashed !important; border-color: var(--mj-brand-primary) !important; background: var(--mj-bg-surface-sunken) !important; }\n.cdk-drag-animating { transition: transform var(--mj-transition-base, 0.2s cubic-bezier(0, 0, 0.2, 1)); }\n.fb-q-main { flex: 1; min-width: 0; }\n.fb-q-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }\n.fb-q-num { font-size: 0.75rem; font-weight: 700; color: var(--mj-text-muted); }\n.fb-q-label { font-weight: 600; color: var(--mj-text-primary); word-break: break-word; }\n.fb-q-help { font-size: 0.8125rem; color: var(--mj-text-muted); margin-top: 3px; }\n.fb-q-side { display: flex; flex-direction: column; gap: 6px; align-items: center; }\n.fb-q-btn { width: 30px; height: 28px; cursor: pointer; border-radius: var(--mj-radius-sm, 6px); border: 1px solid var(--mj-border-subtle); background: var(--mj-bg-surface); color: var(--mj-text-muted); }\n.fb-q-btn:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n.fb-q-btn:disabled { opacity: 0.35; cursor: not-allowed; }\n.fb-canvas-empty { text-align: center; color: var(--mj-text-muted); padding: 40px 0; }\n\n.fb-distribute { padding: 20px; max-width: 880px; margin: 0 auto; }\n.fb-design { flex: 1; min-height: 0; padding: 16px; overflow: hidden; }\n.fb-design mjf-design-panel { display: block; height: 100%; }\n\n/* Mobile: stack the panes. */\n@media (max-width: 900px) {\n .fb-body { grid-template-columns: 1fr; grid-auto-rows: min-content; overflow-y: auto; }\n .fb-pane--left, .fb-pane--right { border: none; border-top: 1px solid var(--mj-border-default); }\n .fb-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }\n}\n"] }]
|
|
625
|
+
}], null, null); })();
|
|
626
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FormBuilderComponent, { className: "FormBuilderComponent", filePath: "lib/builder/form-builder.component.ts", lineNumber: 79 }); })();
|
|
627
|
+
//# sourceMappingURL=form-builder.component.js.map
|