@loomui-ng/ui 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -2
- package/accordion/README.md +38 -0
- package/alert/README.md +32 -0
- package/alert-dialog/README.md +37 -0
- package/aspect-ratio/README.md +24 -0
- package/attachment/README.md +40 -0
- package/avatar/README.md +34 -0
- package/badge/README.md +29 -0
- package/breadcrumb/README.md +33 -0
- package/bubble/README.md +32 -0
- package/button/README.md +31 -0
- package/button-group/README.md +30 -0
- package/calendar/README.md +35 -0
- package/card/README.md +41 -0
- package/carousel/README.md +41 -0
- package/chart/README.md +25 -0
- package/checkbox/README.md +31 -0
- package/collapsible/README.md +31 -0
- package/combobox/README.md +47 -0
- package/command/README.md +44 -0
- package/context-menu/README.md +36 -0
- package/data-table/README.md +39 -0
- package/date-picker/README.md +23 -0
- package/dialog/README.md +52 -0
- package/direction/README.md +19 -0
- package/drawer/README.md +37 -0
- package/dropdown-menu/README.md +46 -0
- package/empty/README.md +38 -0
- package/fesm2022/loomui-ng-ui-accordion.mjs +555 -0
- package/fesm2022/loomui-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-alert-dialog.mjs +652 -0
- package/fesm2022/loomui-ng-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-alert.mjs +286 -0
- package/fesm2022/loomui-ng-ui-alert.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-aspect-ratio.mjs +97 -0
- package/fesm2022/loomui-ng-ui-aspect-ratio.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-attachment.mjs +713 -0
- package/fesm2022/loomui-ng-ui-attachment.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-avatar.mjs +561 -0
- package/fesm2022/loomui-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-badge.mjs +102 -0
- package/fesm2022/loomui-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-breadcrumb.mjs +520 -0
- package/fesm2022/loomui-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-bubble.mjs +386 -0
- package/fesm2022/loomui-ng-ui-bubble.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-button-group.mjs +193 -0
- package/fesm2022/loomui-ng-ui-button-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-button.mjs +162 -0
- package/fesm2022/loomui-ng-ui-button.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-calendar.mjs +681 -0
- package/fesm2022/loomui-ng-ui-calendar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-card.mjs +461 -0
- package/fesm2022/loomui-ng-ui-card.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-carousel.mjs +532 -0
- package/fesm2022/loomui-ng-ui-carousel.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-chart.mjs +373 -0
- package/fesm2022/loomui-ng-ui-chart.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-checkbox.mjs +265 -0
- package/fesm2022/loomui-ng-ui-checkbox.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-collapsible.mjs +274 -0
- package/fesm2022/loomui-ng-ui-collapsible.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-combobox.mjs +971 -0
- package/fesm2022/loomui-ng-ui-combobox.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-command.mjs +982 -0
- package/fesm2022/loomui-ng-ui-command.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-context-menu.mjs +1359 -0
- package/fesm2022/loomui-ng-ui-context-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-data-table.mjs +535 -0
- package/fesm2022/loomui-ng-ui-data-table.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-date-picker.mjs +312 -0
- package/fesm2022/loomui-ng-ui-date-picker.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-dialog.mjs +508 -0
- package/fesm2022/loomui-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-direction.mjs +112 -0
- package/fesm2022/loomui-ng-ui-direction.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-drawer.mjs +590 -0
- package/fesm2022/loomui-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-dropdown-menu.mjs +1322 -0
- package/fesm2022/loomui-ng-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-empty.mjs +408 -0
- package/fesm2022/loomui-ng-ui-empty.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-field.mjs +630 -0
- package/fesm2022/loomui-ng-ui-field.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-hover-card.mjs +230 -0
- package/fesm2022/loomui-ng-ui-hover-card.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-icon.mjs +498 -0
- package/fesm2022/loomui-ng-ui-icon.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input-group.mjs +463 -0
- package/fesm2022/loomui-ng-ui-input-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input-otp.mjs +586 -0
- package/fesm2022/loomui-ng-ui-input-otp.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-input.mjs +289 -0
- package/fesm2022/loomui-ng-ui-input.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-item.mjs +598 -0
- package/fesm2022/loomui-ng-ui-item.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-kbd.mjs +129 -0
- package/fesm2022/loomui-ng-ui-kbd.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-label.mjs +68 -0
- package/fesm2022/loomui-ng-ui-label.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-marker.mjs +234 -0
- package/fesm2022/loomui-ng-ui-marker.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-menubar.mjs +1523 -0
- package/fesm2022/loomui-ng-ui-menubar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-message-scroller.mjs +519 -0
- package/fesm2022/loomui-ng-ui-message-scroller.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-message.mjs +408 -0
- package/fesm2022/loomui-ng-ui-message.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-native-select.mjs +389 -0
- package/fesm2022/loomui-ng-ui-native-select.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-navigation-menu.mjs +609 -0
- package/fesm2022/loomui-ng-ui-navigation-menu.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-pagination.mjs +611 -0
- package/fesm2022/loomui-ng-ui-pagination.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-popover.mjs +358 -0
- package/fesm2022/loomui-ng-ui-popover.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-progress.mjs +159 -0
- package/fesm2022/loomui-ng-ui-progress.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-questionnaire.mjs +1012 -0
- package/fesm2022/loomui-ng-ui-questionnaire.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-radio-group.mjs +399 -0
- package/fesm2022/loomui-ng-ui-radio-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-resizable.mjs +518 -0
- package/fesm2022/loomui-ng-ui-resizable.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-scroll-area.mjs +135 -0
- package/fesm2022/loomui-ng-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-select.mjs +863 -0
- package/fesm2022/loomui-ng-ui-select.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-separator.mjs +114 -0
- package/fesm2022/loomui-ng-ui-separator.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-sheet.mjs +530 -0
- package/fesm2022/loomui-ng-ui-sheet.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-sidebar.mjs +1918 -0
- package/fesm2022/loomui-ng-ui-sidebar.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-skeleton.mjs +69 -0
- package/fesm2022/loomui-ng-ui-skeleton.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-slider.mjs +390 -0
- package/fesm2022/loomui-ng-ui-slider.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-spinner.mjs +85 -0
- package/fesm2022/loomui-ng-ui-spinner.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-switch.mjs +212 -0
- package/fesm2022/loomui-ng-ui-switch.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-table.mjs +559 -0
- package/fesm2022/loomui-ng-ui-table.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-tabs.mjs +544 -0
- package/fesm2022/loomui-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-textarea.mjs +206 -0
- package/fesm2022/loomui-ng-ui-textarea.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toast.mjs +432 -0
- package/fesm2022/loomui-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toggle-group.mjs +477 -0
- package/fesm2022/loomui-ng-ui-toggle-group.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-toggle.mjs +219 -0
- package/fesm2022/loomui-ng-ui-toggle.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-tooltip.mjs +240 -0
- package/fesm2022/loomui-ng-ui-tooltip.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-typography.mjs +129 -0
- package/fesm2022/loomui-ng-ui-typography.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui-utils.mjs +1533 -0
- package/fesm2022/loomui-ng-ui-utils.mjs.map +1 -0
- package/fesm2022/loomui-ng-ui.mjs +4 -0
- package/fesm2022/loomui-ng-ui.mjs.map +1 -0
- package/field/README.md +43 -0
- package/hover-card/README.md +31 -0
- package/icon/README.md +42 -0
- package/input/README.md +26 -0
- package/input-group/README.md +40 -0
- package/input-otp/README.md +35 -0
- package/item/README.md +33 -0
- package/kbd/README.md +21 -0
- package/label/README.md +24 -0
- package/marker/README.md +24 -0
- package/menubar/README.md +40 -0
- package/message/README.md +32 -0
- package/message-scroller/README.md +40 -0
- package/native-select/README.md +26 -0
- package/navigation-menu/README.md +39 -0
- package/package.json +325 -3
- package/pagination/README.md +37 -0
- package/popover/README.md +37 -0
- package/progress/README.md +25 -0
- package/questionnaire/README.md +52 -0
- package/radio-group/README.md +33 -0
- package/resizable/README.md +37 -0
- package/scroll-area/README.md +25 -0
- package/select/README.md +45 -0
- package/separator/README.md +28 -0
- package/sheet/README.md +38 -0
- package/sidebar/README.md +60 -0
- package/skeleton/README.md +21 -0
- package/slider/README.md +29 -0
- package/spinner/README.md +15 -0
- package/styles/loomui.css +330 -0
- package/switch/README.md +29 -0
- package/table/README.md +31 -0
- package/tabs/README.md +42 -0
- package/textarea/README.md +28 -0
- package/toast/README.md +27 -0
- package/toggle/README.md +27 -0
- package/toggle-group/README.md +37 -0
- package/tooltip/README.md +31 -0
- package/types/loomui-ng-ui-accordion.d.ts +141 -0
- package/types/loomui-ng-ui-alert-dialog.d.ts +175 -0
- package/types/loomui-ng-ui-alert.d.ts +77 -0
- package/types/loomui-ng-ui-aspect-ratio.d.ts +31 -0
- package/types/loomui-ng-ui-attachment.d.ts +192 -0
- package/types/loomui-ng-ui-avatar.d.ts +147 -0
- package/types/loomui-ng-ui-badge.d.ts +32 -0
- package/types/loomui-ng-ui-breadcrumb.d.ts +118 -0
- package/types/loomui-ng-ui-bubble.d.ts +100 -0
- package/types/loomui-ng-ui-button-group.d.ts +51 -0
- package/types/loomui-ng-ui-button.d.ts +57 -0
- package/types/loomui-ng-ui-calendar.d.ts +171 -0
- package/types/loomui-ng-ui-card.d.ts +123 -0
- package/types/loomui-ng-ui-carousel.d.ts +140 -0
- package/types/loomui-ng-ui-chart.d.ts +95 -0
- package/types/loomui-ng-ui-checkbox.d.ts +62 -0
- package/types/loomui-ng-ui-collapsible.d.ts +74 -0
- package/types/loomui-ng-ui-combobox.d.ts +229 -0
- package/types/loomui-ng-ui-command.d.ts +231 -0
- package/types/loomui-ng-ui-context-menu.d.ts +288 -0
- package/types/loomui-ng-ui-data-table.d.ts +111 -0
- package/types/loomui-ng-ui-date-picker.d.ts +63 -0
- package/types/loomui-ng-ui-dialog.d.ts +127 -0
- package/types/loomui-ng-ui-direction.d.ts +42 -0
- package/types/loomui-ng-ui-drawer.d.ts +149 -0
- package/types/loomui-ng-ui-dropdown-menu.d.ts +258 -0
- package/types/loomui-ng-ui-empty.d.ts +109 -0
- package/types/loomui-ng-ui-field.d.ts +169 -0
- package/types/loomui-ng-ui-hover-card.d.ts +62 -0
- package/types/loomui-ng-ui-icon.d.ts +156 -0
- package/types/loomui-ng-ui-input-group.d.ts +130 -0
- package/types/loomui-ng-ui-input-otp.d.ts +149 -0
- package/types/loomui-ng-ui-input.d.ts +89 -0
- package/types/loomui-ng-ui-item.d.ts +157 -0
- package/types/loomui-ng-ui-kbd.d.ts +36 -0
- package/types/loomui-ng-ui-label.d.ts +19 -0
- package/types/loomui-ng-ui-marker.d.ts +61 -0
- package/types/loomui-ng-ui-menubar.d.ts +321 -0
- package/types/loomui-ng-ui-message-scroller.d.ts +138 -0
- package/types/loomui-ng-ui-message.d.ts +109 -0
- package/types/loomui-ng-ui-native-select.d.ts +84 -0
- package/types/loomui-ng-ui-navigation-menu.d.ts +160 -0
- package/types/loomui-ng-ui-pagination.d.ts +130 -0
- package/types/loomui-ng-ui-popover.d.ts +90 -0
- package/types/loomui-ng-ui-progress.d.ts +39 -0
- package/types/loomui-ng-ui-questionnaire.d.ts +274 -0
- package/types/loomui-ng-ui-radio-group.d.ts +109 -0
- package/types/loomui-ng-ui-resizable.d.ts +121 -0
- package/types/loomui-ng-ui-scroll-area.d.ts +44 -0
- package/types/loomui-ng-ui-select.d.ts +204 -0
- package/types/loomui-ng-ui-separator.d.ts +35 -0
- package/types/loomui-ng-ui-sheet.d.ts +124 -0
- package/types/loomui-ng-ui-sidebar.d.ts +485 -0
- package/types/loomui-ng-ui-skeleton.d.ts +20 -0
- package/types/loomui-ng-ui-slider.d.ts +103 -0
- package/types/loomui-ng-ui-spinner.d.ts +19 -0
- package/types/loomui-ng-ui-switch.d.ts +56 -0
- package/types/loomui-ng-ui-table.d.ts +148 -0
- package/types/loomui-ng-ui-tabs.d.ts +148 -0
- package/types/loomui-ng-ui-textarea.d.ts +52 -0
- package/types/loomui-ng-ui-toast.d.ts +97 -0
- package/types/loomui-ng-ui-toggle-group.d.ts +138 -0
- package/types/loomui-ng-ui-toggle.d.ts +63 -0
- package/types/loomui-ng-ui-tooltip.d.ts +63 -0
- package/types/loomui-ng-ui-typography.d.ts +42 -0
- package/types/loomui-ng-ui-utils.d.ts +392 -0
- package/types/loomui-ng-ui.d.ts +5 -0
- package/typography/README.md +29 -0
|
@@ -0,0 +1,1012 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, booleanAttribute, computed, contentChildren, forwardRef, inject, input, model, output, signal } from "@angular/core";
|
|
3
|
+
import * as i1 from "@loomui-ng/ui/utils";
|
|
4
|
+
import { UiElementHost, cn } from "@loomui-ng/ui/utils";
|
|
5
|
+
import { UiIconSvg } from "@loomui-ng/ui/icon";
|
|
6
|
+
const questionnaireClass = "flex w-full min-w-0 flex-col gap-4 mx-auto max-w-md mt-auto";
|
|
7
|
+
const questionnaireProgressClass = "min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums";
|
|
8
|
+
const questionnaireItemClass = "flex min-w-0 flex-col gap-4 border-0 p-0 outline-none data-active:animate-in data-active:fade-in-0 data-active:slide-in-from-bottom-2 data-active:duration-300 motion-reduce:animate-none";
|
|
9
|
+
const questionnaireTitleClass = "cn-font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4 group-data-[size=sm]/card:text-sm";
|
|
10
|
+
const questionnaireDescriptionClass = "text-sm text-pretty text-muted-foreground";
|
|
11
|
+
const questionnaireChoicesClass = "group/questionnaire-choices grid min-w-0 gap-2";
|
|
12
|
+
const questionnaireChoiceClass = "group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
13
|
+
const questionnaireChoiceInputClass = "absolute inset-0 z-10 size-full cursor-pointer opacity-0";
|
|
14
|
+
const questionnaireChoiceIndicatorClass = "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary";
|
|
15
|
+
const questionnaireChoiceIndicatorDotClass = "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block";
|
|
16
|
+
const questionnaireChoiceLabelClass = "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug";
|
|
17
|
+
const questionnaireChoiceShortcutClass = "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex";
|
|
18
|
+
const questionnaireInputWrapperClass = "group/questionnaire-input relative w-full min-w-0";
|
|
19
|
+
const questionnaireInputClass = "h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground";
|
|
20
|
+
const questionnaireErrorClass = "mt-2 text-sm text-destructive";
|
|
21
|
+
const questionnaireActionsClass = "grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8";
|
|
22
|
+
const UI_QUESTIONNAIRE_GENERATED = [];
|
|
23
|
+
let uid = 0;
|
|
24
|
+
var UiQuestionnaire = class UiQuestionnaire {
|
|
25
|
+
items = contentChildren(forwardRef(() => UiQuestionnaireItem), {
|
|
26
|
+
...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
|
|
27
|
+
descendants: true
|
|
28
|
+
});
|
|
29
|
+
current = model(0, ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
|
|
30
|
+
shortcuts = input(true, {
|
|
31
|
+
...ngDevMode ? { debugName: "shortcuts" } : /* istanbul ignore next */ {},
|
|
32
|
+
transform: booleanAttribute
|
|
33
|
+
});
|
|
34
|
+
userClass = input("", {
|
|
35
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
36
|
+
alias: "class"
|
|
37
|
+
});
|
|
38
|
+
submitted = output();
|
|
39
|
+
total = computed(() => this.items().length, ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
40
|
+
isFirst = computed(() => this.current() <= 0, ...ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []);
|
|
41
|
+
isLast = computed(() => this.current() >= this.total() - 1, ...ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []);
|
|
42
|
+
classes = computed(() => cn(questionnaireClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
43
|
+
activeItem = computed(() => this.items()[this.current()], ...ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []);
|
|
44
|
+
previous() {
|
|
45
|
+
if (this.current() > 0) this.current.update((c) => c - 1);
|
|
46
|
+
}
|
|
47
|
+
next() {
|
|
48
|
+
const item = this.activeItem();
|
|
49
|
+
if (!item || !item.validate()) return;
|
|
50
|
+
if (!this.isLast()) this.current.update((c) => c + 1);
|
|
51
|
+
}
|
|
52
|
+
skip() {
|
|
53
|
+
if (!this.isLast()) this.current.update((c) => c + 1);
|
|
54
|
+
}
|
|
55
|
+
submit() {
|
|
56
|
+
const items = this.items();
|
|
57
|
+
for (let i = 0; i < items.length; i++) if (!items[i].validate()) {
|
|
58
|
+
this.current.set(i);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const result = {};
|
|
62
|
+
for (const it of items) result[it.name() || it.id] = it.multiple() ? it.values() : it.values()[0] ?? it.text();
|
|
63
|
+
this.submitted.emit(result);
|
|
64
|
+
}
|
|
65
|
+
el = inject(ElementRef).nativeElement;
|
|
66
|
+
onKey(e) {
|
|
67
|
+
const t = e.target;
|
|
68
|
+
if (this.shortcuts() && !e.ctrlKey && !e.metaKey && !e.altKey && /^[a-z0-9]$/i.test(e.key) && !(t instanceof HTMLInputElement && t.type === "text") && t.tagName !== "TEXTAREA") {
|
|
69
|
+
const choice = this.el.querySelector(`[data-slot=questionnaire-item]:not([hidden]) [data-shortcut="${e.key.toUpperCase()}"] input`);
|
|
70
|
+
if (choice) {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
choice.click();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (e.key !== "Enter" || e.isComposing) return;
|
|
77
|
+
if (t.tagName === "BUTTON" || t.tagName === "TEXTAREA") return;
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
if (e.ctrlKey || e.metaKey) this.submit();
|
|
80
|
+
else if (this.isLast()) this.submit();
|
|
81
|
+
else this.next();
|
|
82
|
+
}
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
84
|
+
minVersion: "12.0.0",
|
|
85
|
+
version: "22.2.2",
|
|
86
|
+
ngImport: i0,
|
|
87
|
+
type: UiQuestionnaire,
|
|
88
|
+
deps: [],
|
|
89
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
90
|
+
});
|
|
91
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
92
|
+
minVersion: "17.2.0",
|
|
93
|
+
version: "22.2.2",
|
|
94
|
+
type: UiQuestionnaire,
|
|
95
|
+
isStandalone: true,
|
|
96
|
+
selector: "form[uiQuestionnaire], ui-questionnaire",
|
|
97
|
+
inputs: {
|
|
98
|
+
current: {
|
|
99
|
+
classPropertyName: "current",
|
|
100
|
+
publicName: "current",
|
|
101
|
+
isSignal: true,
|
|
102
|
+
isRequired: false,
|
|
103
|
+
transformFunction: null
|
|
104
|
+
},
|
|
105
|
+
shortcuts: {
|
|
106
|
+
classPropertyName: "shortcuts",
|
|
107
|
+
publicName: "shortcuts",
|
|
108
|
+
isSignal: true,
|
|
109
|
+
isRequired: false,
|
|
110
|
+
transformFunction: null
|
|
111
|
+
},
|
|
112
|
+
userClass: {
|
|
113
|
+
classPropertyName: "userClass",
|
|
114
|
+
publicName: "class",
|
|
115
|
+
isSignal: true,
|
|
116
|
+
isRequired: false,
|
|
117
|
+
transformFunction: null
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
outputs: {
|
|
121
|
+
current: "currentChange",
|
|
122
|
+
submitted: "submitted"
|
|
123
|
+
},
|
|
124
|
+
host: {
|
|
125
|
+
attributes: {
|
|
126
|
+
"novalidate": "",
|
|
127
|
+
"data-slot": "questionnaire"
|
|
128
|
+
},
|
|
129
|
+
listeners: {
|
|
130
|
+
"keydown": "onKey($event)",
|
|
131
|
+
"submit": "$event.preventDefault(); submit()"
|
|
132
|
+
},
|
|
133
|
+
properties: {
|
|
134
|
+
"attr.data-current": "current()",
|
|
135
|
+
"attr.data-total": "total()",
|
|
136
|
+
"attr.data-first": "isFirst()",
|
|
137
|
+
"attr.data-last": "isLast()",
|
|
138
|
+
"attr.data-shortcuts": "shortcuts()",
|
|
139
|
+
"attr.class": "classes()"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
queries: [{
|
|
143
|
+
propertyName: "items",
|
|
144
|
+
predicate: i0.forwardRef(() => UiQuestionnaireItem),
|
|
145
|
+
descendants: true,
|
|
146
|
+
isSignal: true
|
|
147
|
+
}],
|
|
148
|
+
exportAs: ["uiQuestionnaire"],
|
|
149
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
150
|
+
ngImport: i0,
|
|
151
|
+
template: `<ng-content />`,
|
|
152
|
+
isInline: true,
|
|
153
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
157
|
+
minVersion: "12.0.0",
|
|
158
|
+
version: "22.2.2",
|
|
159
|
+
ngImport: i0,
|
|
160
|
+
type: UiQuestionnaire,
|
|
161
|
+
decorators: [{
|
|
162
|
+
type: Component,
|
|
163
|
+
args: [{
|
|
164
|
+
selector: "form[uiQuestionnaire], ui-questionnaire",
|
|
165
|
+
hostDirectives: [UiElementHost],
|
|
166
|
+
exportAs: "uiQuestionnaire",
|
|
167
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
168
|
+
host: {
|
|
169
|
+
novalidate: "",
|
|
170
|
+
"data-slot": "questionnaire",
|
|
171
|
+
"[attr.data-current]": "current()",
|
|
172
|
+
"[attr.data-total]": "total()",
|
|
173
|
+
"[attr.data-first]": "isFirst()",
|
|
174
|
+
"[attr.data-last]": "isLast()",
|
|
175
|
+
"[attr.data-shortcuts]": "shortcuts()",
|
|
176
|
+
"[attr.class]": "classes()",
|
|
177
|
+
"(keydown)": "onKey($event)",
|
|
178
|
+
"(submit)": "$event.preventDefault(); submit()"
|
|
179
|
+
},
|
|
180
|
+
template: `<ng-content />`
|
|
181
|
+
}]
|
|
182
|
+
}],
|
|
183
|
+
propDecorators: {
|
|
184
|
+
items: [{
|
|
185
|
+
type: i0.ContentChildren,
|
|
186
|
+
args: [forwardRef(() => UiQuestionnaireItem), {
|
|
187
|
+
descendants: true,
|
|
188
|
+
isSignal: true
|
|
189
|
+
}]
|
|
190
|
+
}],
|
|
191
|
+
current: [{
|
|
192
|
+
type: i0.Input,
|
|
193
|
+
args: [{
|
|
194
|
+
isSignal: true,
|
|
195
|
+
alias: "current",
|
|
196
|
+
required: false
|
|
197
|
+
}]
|
|
198
|
+
}, {
|
|
199
|
+
type: i0.Output,
|
|
200
|
+
args: ["currentChange"]
|
|
201
|
+
}],
|
|
202
|
+
shortcuts: [{
|
|
203
|
+
type: i0.Input,
|
|
204
|
+
args: [{
|
|
205
|
+
isSignal: true,
|
|
206
|
+
alias: "shortcuts",
|
|
207
|
+
required: false
|
|
208
|
+
}]
|
|
209
|
+
}],
|
|
210
|
+
userClass: [{
|
|
211
|
+
type: i0.Input,
|
|
212
|
+
args: [{
|
|
213
|
+
isSignal: true,
|
|
214
|
+
alias: "class",
|
|
215
|
+
required: false
|
|
216
|
+
}]
|
|
217
|
+
}],
|
|
218
|
+
submitted: [{
|
|
219
|
+
type: i0.Output,
|
|
220
|
+
args: ["submitted"]
|
|
221
|
+
}]
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
var UiQuestionnaireProgress = class UiQuestionnaireProgress {
|
|
225
|
+
root = inject(UiQuestionnaire);
|
|
226
|
+
userClass = input("", {
|
|
227
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
228
|
+
alias: "class"
|
|
229
|
+
});
|
|
230
|
+
classes = computed(() => cn(questionnaireProgressClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
232
|
+
minVersion: "12.0.0",
|
|
233
|
+
version: "22.2.2",
|
|
234
|
+
ngImport: i0,
|
|
235
|
+
type: UiQuestionnaireProgress,
|
|
236
|
+
deps: [],
|
|
237
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
238
|
+
});
|
|
239
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
240
|
+
minVersion: "17.1.0",
|
|
241
|
+
version: "22.2.2",
|
|
242
|
+
type: UiQuestionnaireProgress,
|
|
243
|
+
isStandalone: true,
|
|
244
|
+
selector: "div[uiQuestionnaireProgress], ui-questionnaire-progress",
|
|
245
|
+
inputs: { userClass: {
|
|
246
|
+
classPropertyName: "userClass",
|
|
247
|
+
publicName: "class",
|
|
248
|
+
isSignal: true,
|
|
249
|
+
isRequired: false,
|
|
250
|
+
transformFunction: null
|
|
251
|
+
} },
|
|
252
|
+
host: {
|
|
253
|
+
attributes: {
|
|
254
|
+
"role": "progressbar",
|
|
255
|
+
"aria-valuemin": "1",
|
|
256
|
+
"data-slot": "questionnaire-progress"
|
|
257
|
+
},
|
|
258
|
+
properties: {
|
|
259
|
+
"attr.aria-valuemax": "root.total()",
|
|
260
|
+
"attr.aria-valuenow": "root.current() + 1",
|
|
261
|
+
"attr.aria-valuetext": "\"Question \" + (root.current() + 1) + \" of \" + root.total()",
|
|
262
|
+
"attr.class": "classes()",
|
|
263
|
+
"textContent": "\"Question \" + (root.current() + 1) + \" of \" + root.total()"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
267
|
+
ngImport: i0
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
271
|
+
minVersion: "12.0.0",
|
|
272
|
+
version: "22.2.2",
|
|
273
|
+
ngImport: i0,
|
|
274
|
+
type: UiQuestionnaireProgress,
|
|
275
|
+
decorators: [{
|
|
276
|
+
type: Directive,
|
|
277
|
+
args: [{
|
|
278
|
+
selector: "div[uiQuestionnaireProgress], ui-questionnaire-progress",
|
|
279
|
+
hostDirectives: [UiElementHost],
|
|
280
|
+
host: {
|
|
281
|
+
role: "progressbar",
|
|
282
|
+
"aria-valuemin": "1",
|
|
283
|
+
"[attr.aria-valuemax]": "root.total()",
|
|
284
|
+
"[attr.aria-valuenow]": "root.current() + 1",
|
|
285
|
+
"[attr.aria-valuetext]": "\"Question \" + (root.current() + 1) + \" of \" + root.total()",
|
|
286
|
+
"data-slot": "questionnaire-progress",
|
|
287
|
+
"[attr.class]": "classes()",
|
|
288
|
+
"[textContent]": "\"Question \" + (root.current() + 1) + \" of \" + root.total()"
|
|
289
|
+
}
|
|
290
|
+
}]
|
|
291
|
+
}],
|
|
292
|
+
propDecorators: { userClass: [{
|
|
293
|
+
type: i0.Input,
|
|
294
|
+
args: [{
|
|
295
|
+
isSignal: true,
|
|
296
|
+
alias: "class",
|
|
297
|
+
required: false
|
|
298
|
+
}]
|
|
299
|
+
}] }
|
|
300
|
+
});
|
|
301
|
+
var UiQuestionnaireItem = class UiQuestionnaireItem {
|
|
302
|
+
root = inject(UiQuestionnaire);
|
|
303
|
+
id = `uiq-${++uid}`;
|
|
304
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
305
|
+
required = input(false, {
|
|
306
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
307
|
+
transform: booleanAttribute
|
|
308
|
+
});
|
|
309
|
+
multiple = input(false, {
|
|
310
|
+
...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
|
|
311
|
+
transform: booleanAttribute
|
|
312
|
+
});
|
|
313
|
+
userClass = input("", {
|
|
314
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
315
|
+
alias: "class"
|
|
316
|
+
});
|
|
317
|
+
values = signal([], ...ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []);
|
|
318
|
+
text = signal("", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
319
|
+
error = signal("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
320
|
+
errorClass = questionnaireErrorClass;
|
|
321
|
+
index = computed(() => this.root.items().indexOf(this), ...ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []);
|
|
322
|
+
active = computed(() => this.index() === this.root.current(), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
323
|
+
answered = computed(() => this.values().length > 0 || this.text().trim().length > 0, ...ngDevMode ? [{ debugName: "answered" }] : /* istanbul ignore next */ []);
|
|
324
|
+
status = computed(() => this.error() ? "invalid" : this.answered() ? "answered" : "pending", ...ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []);
|
|
325
|
+
classes = computed(() => cn(questionnaireItemClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
326
|
+
toggle(value) {
|
|
327
|
+
this.error.set("");
|
|
328
|
+
if (this.multiple()) this.values.update((v) => v.includes(value) ? v.filter((x) => x !== value) : [...v, value]);
|
|
329
|
+
else this.values.set([value]);
|
|
330
|
+
}
|
|
331
|
+
validate() {
|
|
332
|
+
if (this.required() && !this.answered()) {
|
|
333
|
+
this.error.set("This question is required.");
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
this.error.set("");
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
340
|
+
minVersion: "12.0.0",
|
|
341
|
+
version: "22.2.2",
|
|
342
|
+
ngImport: i0,
|
|
343
|
+
type: UiQuestionnaireItem,
|
|
344
|
+
deps: [],
|
|
345
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
346
|
+
});
|
|
347
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
348
|
+
minVersion: "17.0.0",
|
|
349
|
+
version: "22.2.2",
|
|
350
|
+
type: UiQuestionnaireItem,
|
|
351
|
+
isStandalone: true,
|
|
352
|
+
selector: "fieldset[uiQuestionnaireItem], ui-questionnaire-item",
|
|
353
|
+
inputs: {
|
|
354
|
+
name: {
|
|
355
|
+
classPropertyName: "name",
|
|
356
|
+
publicName: "name",
|
|
357
|
+
isSignal: true,
|
|
358
|
+
isRequired: false,
|
|
359
|
+
transformFunction: null
|
|
360
|
+
},
|
|
361
|
+
required: {
|
|
362
|
+
classPropertyName: "required",
|
|
363
|
+
publicName: "required",
|
|
364
|
+
isSignal: true,
|
|
365
|
+
isRequired: false,
|
|
366
|
+
transformFunction: null
|
|
367
|
+
},
|
|
368
|
+
multiple: {
|
|
369
|
+
classPropertyName: "multiple",
|
|
370
|
+
publicName: "multiple",
|
|
371
|
+
isSignal: true,
|
|
372
|
+
isRequired: false,
|
|
373
|
+
transformFunction: null
|
|
374
|
+
},
|
|
375
|
+
userClass: {
|
|
376
|
+
classPropertyName: "userClass",
|
|
377
|
+
publicName: "class",
|
|
378
|
+
isSignal: true,
|
|
379
|
+
isRequired: false,
|
|
380
|
+
transformFunction: null
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
host: {
|
|
384
|
+
attributes: { "data-slot": "questionnaire-item" },
|
|
385
|
+
properties: {
|
|
386
|
+
"attr.data-active": "active() ? \"\" : null",
|
|
387
|
+
"attr.data-status": "status()",
|
|
388
|
+
"attr.data-required": "required()",
|
|
389
|
+
"attr.data-multiple": "multiple()",
|
|
390
|
+
"attr.hidden": "active() ? null : \"\"",
|
|
391
|
+
"attr.inert": "active() ? null : \"\"",
|
|
392
|
+
"attr.class": "classes()"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
exportAs: ["uiQuestionnaireItem"],
|
|
396
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
397
|
+
ngImport: i0,
|
|
398
|
+
template: `<ng-content />
|
|
399
|
+
@if (error()) {
|
|
400
|
+
<p data-slot="questionnaire-error" role="alert" [class]="errorClass">{{ error() }}</p>
|
|
401
|
+
}`,
|
|
402
|
+
isInline: true,
|
|
403
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
407
|
+
minVersion: "12.0.0",
|
|
408
|
+
version: "22.2.2",
|
|
409
|
+
ngImport: i0,
|
|
410
|
+
type: UiQuestionnaireItem,
|
|
411
|
+
decorators: [{
|
|
412
|
+
type: Component,
|
|
413
|
+
args: [{
|
|
414
|
+
selector: "fieldset[uiQuestionnaireItem], ui-questionnaire-item",
|
|
415
|
+
hostDirectives: [UiElementHost],
|
|
416
|
+
exportAs: "uiQuestionnaireItem",
|
|
417
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
418
|
+
host: {
|
|
419
|
+
"data-slot": "questionnaire-item",
|
|
420
|
+
"[attr.data-active]": "active() ? \"\" : null",
|
|
421
|
+
"[attr.data-status]": "status()",
|
|
422
|
+
"[attr.data-required]": "required()",
|
|
423
|
+
"[attr.data-multiple]": "multiple()",
|
|
424
|
+
"[attr.hidden]": "active() ? null : \"\"",
|
|
425
|
+
"[attr.inert]": "active() ? null : \"\"",
|
|
426
|
+
"[attr.class]": "classes()"
|
|
427
|
+
},
|
|
428
|
+
template: `<ng-content />
|
|
429
|
+
@if (error()) {
|
|
430
|
+
<p data-slot="questionnaire-error" role="alert" [class]="errorClass">{{ error() }}</p>
|
|
431
|
+
}`
|
|
432
|
+
}]
|
|
433
|
+
}],
|
|
434
|
+
propDecorators: {
|
|
435
|
+
name: [{
|
|
436
|
+
type: i0.Input,
|
|
437
|
+
args: [{
|
|
438
|
+
isSignal: true,
|
|
439
|
+
alias: "name",
|
|
440
|
+
required: false
|
|
441
|
+
}]
|
|
442
|
+
}],
|
|
443
|
+
required: [{
|
|
444
|
+
type: i0.Input,
|
|
445
|
+
args: [{
|
|
446
|
+
isSignal: true,
|
|
447
|
+
alias: "required",
|
|
448
|
+
required: false
|
|
449
|
+
}]
|
|
450
|
+
}],
|
|
451
|
+
multiple: [{
|
|
452
|
+
type: i0.Input,
|
|
453
|
+
args: [{
|
|
454
|
+
isSignal: true,
|
|
455
|
+
alias: "multiple",
|
|
456
|
+
required: false
|
|
457
|
+
}]
|
|
458
|
+
}],
|
|
459
|
+
userClass: [{
|
|
460
|
+
type: i0.Input,
|
|
461
|
+
args: [{
|
|
462
|
+
isSignal: true,
|
|
463
|
+
alias: "class",
|
|
464
|
+
required: false
|
|
465
|
+
}]
|
|
466
|
+
}]
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
var UiQuestionnaireTitle = class UiQuestionnaireTitle {
|
|
470
|
+
userClass = input("", {
|
|
471
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
472
|
+
alias: "class"
|
|
473
|
+
});
|
|
474
|
+
classes = computed(() => cn(questionnaireTitleClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
475
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
476
|
+
minVersion: "12.0.0",
|
|
477
|
+
version: "22.2.2",
|
|
478
|
+
ngImport: i0,
|
|
479
|
+
type: UiQuestionnaireTitle,
|
|
480
|
+
deps: [],
|
|
481
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
482
|
+
});
|
|
483
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
484
|
+
minVersion: "17.1.0",
|
|
485
|
+
version: "22.2.2",
|
|
486
|
+
type: UiQuestionnaireTitle,
|
|
487
|
+
isStandalone: true,
|
|
488
|
+
selector: "legend[uiQuestionnaireTitle], ui-questionnaire-title",
|
|
489
|
+
inputs: { userClass: {
|
|
490
|
+
classPropertyName: "userClass",
|
|
491
|
+
publicName: "class",
|
|
492
|
+
isSignal: true,
|
|
493
|
+
isRequired: false,
|
|
494
|
+
transformFunction: null
|
|
495
|
+
} },
|
|
496
|
+
host: {
|
|
497
|
+
attributes: { "data-slot": "questionnaire-title" },
|
|
498
|
+
properties: { "attr.class": "classes()" }
|
|
499
|
+
},
|
|
500
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
501
|
+
ngImport: i0
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
505
|
+
minVersion: "12.0.0",
|
|
506
|
+
version: "22.2.2",
|
|
507
|
+
ngImport: i0,
|
|
508
|
+
type: UiQuestionnaireTitle,
|
|
509
|
+
decorators: [{
|
|
510
|
+
type: Directive,
|
|
511
|
+
args: [{
|
|
512
|
+
selector: "legend[uiQuestionnaireTitle], ui-questionnaire-title",
|
|
513
|
+
hostDirectives: [UiElementHost],
|
|
514
|
+
host: {
|
|
515
|
+
"data-slot": "questionnaire-title",
|
|
516
|
+
"[attr.class]": "classes()"
|
|
517
|
+
}
|
|
518
|
+
}]
|
|
519
|
+
}],
|
|
520
|
+
propDecorators: { userClass: [{
|
|
521
|
+
type: i0.Input,
|
|
522
|
+
args: [{
|
|
523
|
+
isSignal: true,
|
|
524
|
+
alias: "class",
|
|
525
|
+
required: false
|
|
526
|
+
}]
|
|
527
|
+
}] }
|
|
528
|
+
});
|
|
529
|
+
var UiQuestionnaireDescription = class UiQuestionnaireDescription {
|
|
530
|
+
userClass = input("", {
|
|
531
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
532
|
+
alias: "class"
|
|
533
|
+
});
|
|
534
|
+
classes = computed(() => cn(questionnaireDescriptionClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
535
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
536
|
+
minVersion: "12.0.0",
|
|
537
|
+
version: "22.2.2",
|
|
538
|
+
ngImport: i0,
|
|
539
|
+
type: UiQuestionnaireDescription,
|
|
540
|
+
deps: [],
|
|
541
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
542
|
+
});
|
|
543
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
544
|
+
minVersion: "17.1.0",
|
|
545
|
+
version: "22.2.2",
|
|
546
|
+
type: UiQuestionnaireDescription,
|
|
547
|
+
isStandalone: true,
|
|
548
|
+
selector: "p[uiQuestionnaireDescription], ui-questionnaire-description",
|
|
549
|
+
inputs: { userClass: {
|
|
550
|
+
classPropertyName: "userClass",
|
|
551
|
+
publicName: "class",
|
|
552
|
+
isSignal: true,
|
|
553
|
+
isRequired: false,
|
|
554
|
+
transformFunction: null
|
|
555
|
+
} },
|
|
556
|
+
host: {
|
|
557
|
+
attributes: { "data-slot": "questionnaire-description" },
|
|
558
|
+
properties: { "attr.class": "classes()" }
|
|
559
|
+
},
|
|
560
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
561
|
+
ngImport: i0
|
|
562
|
+
});
|
|
563
|
+
};
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
565
|
+
minVersion: "12.0.0",
|
|
566
|
+
version: "22.2.2",
|
|
567
|
+
ngImport: i0,
|
|
568
|
+
type: UiQuestionnaireDescription,
|
|
569
|
+
decorators: [{
|
|
570
|
+
type: Directive,
|
|
571
|
+
args: [{
|
|
572
|
+
selector: "p[uiQuestionnaireDescription], ui-questionnaire-description",
|
|
573
|
+
hostDirectives: [UiElementHost],
|
|
574
|
+
host: {
|
|
575
|
+
"data-slot": "questionnaire-description",
|
|
576
|
+
"[attr.class]": "classes()"
|
|
577
|
+
}
|
|
578
|
+
}]
|
|
579
|
+
}],
|
|
580
|
+
propDecorators: { userClass: [{
|
|
581
|
+
type: i0.Input,
|
|
582
|
+
args: [{
|
|
583
|
+
isSignal: true,
|
|
584
|
+
alias: "class",
|
|
585
|
+
required: false
|
|
586
|
+
}]
|
|
587
|
+
}] }
|
|
588
|
+
});
|
|
589
|
+
var UiQuestionnaireChoices = class UiQuestionnaireChoices {
|
|
590
|
+
userClass = input("", {
|
|
591
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
592
|
+
alias: "class"
|
|
593
|
+
});
|
|
594
|
+
classes = computed(() => cn(questionnaireChoicesClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
595
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
596
|
+
minVersion: "12.0.0",
|
|
597
|
+
version: "22.2.2",
|
|
598
|
+
ngImport: i0,
|
|
599
|
+
type: UiQuestionnaireChoices,
|
|
600
|
+
deps: [],
|
|
601
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
602
|
+
});
|
|
603
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
604
|
+
minVersion: "17.1.0",
|
|
605
|
+
version: "22.2.2",
|
|
606
|
+
type: UiQuestionnaireChoices,
|
|
607
|
+
isStandalone: true,
|
|
608
|
+
selector: "div[uiQuestionnaireChoices], ui-questionnaire-choices",
|
|
609
|
+
inputs: { userClass: {
|
|
610
|
+
classPropertyName: "userClass",
|
|
611
|
+
publicName: "class",
|
|
612
|
+
isSignal: true,
|
|
613
|
+
isRequired: false,
|
|
614
|
+
transformFunction: null
|
|
615
|
+
} },
|
|
616
|
+
host: {
|
|
617
|
+
attributes: { "data-slot": "questionnaire-choices" },
|
|
618
|
+
properties: { "attr.class": "classes()" }
|
|
619
|
+
},
|
|
620
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
621
|
+
ngImport: i0
|
|
622
|
+
});
|
|
623
|
+
};
|
|
624
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
625
|
+
minVersion: "12.0.0",
|
|
626
|
+
version: "22.2.2",
|
|
627
|
+
ngImport: i0,
|
|
628
|
+
type: UiQuestionnaireChoices,
|
|
629
|
+
decorators: [{
|
|
630
|
+
type: Directive,
|
|
631
|
+
args: [{
|
|
632
|
+
selector: "div[uiQuestionnaireChoices], ui-questionnaire-choices",
|
|
633
|
+
hostDirectives: [UiElementHost],
|
|
634
|
+
host: {
|
|
635
|
+
"data-slot": "questionnaire-choices",
|
|
636
|
+
"[attr.class]": "classes()"
|
|
637
|
+
}
|
|
638
|
+
}]
|
|
639
|
+
}],
|
|
640
|
+
propDecorators: { userClass: [{
|
|
641
|
+
type: i0.Input,
|
|
642
|
+
args: [{
|
|
643
|
+
isSignal: true,
|
|
644
|
+
alias: "class",
|
|
645
|
+
required: false
|
|
646
|
+
}]
|
|
647
|
+
}] }
|
|
648
|
+
});
|
|
649
|
+
var UiQuestionnaireChoice = class UiQuestionnaireChoice {
|
|
650
|
+
item = inject(UiQuestionnaireItem);
|
|
651
|
+
root = inject(UiQuestionnaire);
|
|
652
|
+
el = inject(ElementRef).nativeElement;
|
|
653
|
+
value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
654
|
+
shortcut = input("", ...ngDevMode ? [{ debugName: "shortcut" }] : /* istanbul ignore next */ []);
|
|
655
|
+
userClass = input("", {
|
|
656
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
657
|
+
alias: "class"
|
|
658
|
+
});
|
|
659
|
+
checked = computed(() => this.item.values().includes(this.value()), ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
660
|
+
shortcutKey = computed(() => {
|
|
661
|
+
if (this.shortcut()) return this.shortcut().toUpperCase();
|
|
662
|
+
const siblings = Array.from(this.el.parentElement?.querySelectorAll("[data-slot=questionnaire-choice]") ?? []);
|
|
663
|
+
return String(siblings.indexOf(this.el) + 1);
|
|
664
|
+
}, ...ngDevMode ? [{ debugName: "shortcutKey" }] : /* istanbul ignore next */ []);
|
|
665
|
+
classes = computed(() => cn(questionnaireChoiceClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
666
|
+
inputClass = questionnaireChoiceInputClass;
|
|
667
|
+
indicatorClass = questionnaireChoiceIndicatorClass;
|
|
668
|
+
dotClass = questionnaireChoiceIndicatorDotClass;
|
|
669
|
+
labelClass = questionnaireChoiceLabelClass;
|
|
670
|
+
shortcutClass = cn(questionnaireChoiceShortcutClass, "sm:inline-flex");
|
|
671
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
672
|
+
minVersion: "12.0.0",
|
|
673
|
+
version: "22.2.2",
|
|
674
|
+
ngImport: i0,
|
|
675
|
+
type: UiQuestionnaireChoice,
|
|
676
|
+
deps: [],
|
|
677
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
678
|
+
});
|
|
679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
680
|
+
minVersion: "17.0.0",
|
|
681
|
+
version: "22.2.2",
|
|
682
|
+
type: UiQuestionnaireChoice,
|
|
683
|
+
isStandalone: true,
|
|
684
|
+
selector: "label[uiQuestionnaireChoice], ui-questionnaire-choice",
|
|
685
|
+
inputs: {
|
|
686
|
+
value: {
|
|
687
|
+
classPropertyName: "value",
|
|
688
|
+
publicName: "value",
|
|
689
|
+
isSignal: true,
|
|
690
|
+
isRequired: true,
|
|
691
|
+
transformFunction: null
|
|
692
|
+
},
|
|
693
|
+
shortcut: {
|
|
694
|
+
classPropertyName: "shortcut",
|
|
695
|
+
publicName: "shortcut",
|
|
696
|
+
isSignal: true,
|
|
697
|
+
isRequired: false,
|
|
698
|
+
transformFunction: null
|
|
699
|
+
},
|
|
700
|
+
userClass: {
|
|
701
|
+
classPropertyName: "userClass",
|
|
702
|
+
publicName: "class",
|
|
703
|
+
isSignal: true,
|
|
704
|
+
isRequired: false,
|
|
705
|
+
transformFunction: null
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
host: {
|
|
709
|
+
attributes: { "data-slot": "questionnaire-choice" },
|
|
710
|
+
properties: {
|
|
711
|
+
"attr.data-shortcut": "shortcutKey()",
|
|
712
|
+
"attr.data-type": "item.multiple() ? \"checkbox\" : \"radio\"",
|
|
713
|
+
"attr.data-checked": "checked() ? \"\" : null",
|
|
714
|
+
"attr.class": "classes()"
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
718
|
+
ngImport: i0,
|
|
719
|
+
template: `
|
|
720
|
+
<input
|
|
721
|
+
[class]="inputClass"
|
|
722
|
+
data-slot="questionnaire-choice-input"
|
|
723
|
+
[type]="item.multiple() ? 'checkbox' : 'radio'"
|
|
724
|
+
[name]="item.name() || item.id"
|
|
725
|
+
[value]="value()"
|
|
726
|
+
[checked]="checked()"
|
|
727
|
+
(change)="item.toggle(value())"
|
|
728
|
+
/>
|
|
729
|
+
<span [class]="indicatorClass" data-slot="questionnaire-choice-indicator" aria-hidden="true">
|
|
730
|
+
@if (item.multiple()) {
|
|
731
|
+
@if (checked()) {
|
|
732
|
+
<svg uiIcon="check" class="size-3" strokeWidth="3"></svg>
|
|
733
|
+
}
|
|
734
|
+
} @else {
|
|
735
|
+
<span [class]="dotClass"></span>
|
|
736
|
+
}
|
|
737
|
+
</span>
|
|
738
|
+
<span [class]="labelClass" data-slot="questionnaire-choice-label"><ng-content /></span>
|
|
739
|
+
@if (root.shortcuts()) {
|
|
740
|
+
<kbd [class]="shortcutClass" data-slot="questionnaire-choice-shortcut" aria-hidden="true">{{ shortcutKey() }}</kbd>
|
|
741
|
+
}
|
|
742
|
+
`,
|
|
743
|
+
isInline: true,
|
|
744
|
+
styles: [":host:has(input:checked) [data-slot=questionnaire-choice-indicator]{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground)}\n"],
|
|
745
|
+
dependencies: [{
|
|
746
|
+
kind: "directive",
|
|
747
|
+
type: UiIconSvg,
|
|
748
|
+
selector: "svg[uiIcon]",
|
|
749
|
+
inputs: [
|
|
750
|
+
"uiIcon",
|
|
751
|
+
"icon",
|
|
752
|
+
"size",
|
|
753
|
+
"strokeWidth",
|
|
754
|
+
"absoluteStrokeWidth",
|
|
755
|
+
"color",
|
|
756
|
+
"label",
|
|
757
|
+
"class"
|
|
758
|
+
]
|
|
759
|
+
}],
|
|
760
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
761
|
+
});
|
|
762
|
+
};
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
764
|
+
minVersion: "12.0.0",
|
|
765
|
+
version: "22.2.2",
|
|
766
|
+
ngImport: i0,
|
|
767
|
+
type: UiQuestionnaireChoice,
|
|
768
|
+
decorators: [{
|
|
769
|
+
type: Component,
|
|
770
|
+
args: [{
|
|
771
|
+
selector: "label[uiQuestionnaireChoice], ui-questionnaire-choice",
|
|
772
|
+
hostDirectives: [UiElementHost],
|
|
773
|
+
imports: [UiIconSvg],
|
|
774
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
775
|
+
host: {
|
|
776
|
+
"data-slot": "questionnaire-choice",
|
|
777
|
+
"[attr.data-shortcut]": "shortcutKey()",
|
|
778
|
+
"[attr.data-type]": "item.multiple() ? \"checkbox\" : \"radio\"",
|
|
779
|
+
"[attr.data-checked]": "checked() ? \"\" : null",
|
|
780
|
+
"[attr.class]": "classes()"
|
|
781
|
+
},
|
|
782
|
+
template: `
|
|
783
|
+
<input
|
|
784
|
+
[class]="inputClass"
|
|
785
|
+
data-slot="questionnaire-choice-input"
|
|
786
|
+
[type]="item.multiple() ? 'checkbox' : 'radio'"
|
|
787
|
+
[name]="item.name() || item.id"
|
|
788
|
+
[value]="value()"
|
|
789
|
+
[checked]="checked()"
|
|
790
|
+
(change)="item.toggle(value())"
|
|
791
|
+
/>
|
|
792
|
+
<span [class]="indicatorClass" data-slot="questionnaire-choice-indicator" aria-hidden="true">
|
|
793
|
+
@if (item.multiple()) {
|
|
794
|
+
@if (checked()) {
|
|
795
|
+
<svg uiIcon="check" class="size-3" strokeWidth="3"></svg>
|
|
796
|
+
}
|
|
797
|
+
} @else {
|
|
798
|
+
<span [class]="dotClass"></span>
|
|
799
|
+
}
|
|
800
|
+
</span>
|
|
801
|
+
<span [class]="labelClass" data-slot="questionnaire-choice-label"><ng-content /></span>
|
|
802
|
+
@if (root.shortcuts()) {
|
|
803
|
+
<kbd [class]="shortcutClass" data-slot="questionnaire-choice-shortcut" aria-hidden="true">{{ shortcutKey() }}</kbd>
|
|
804
|
+
}
|
|
805
|
+
`,
|
|
806
|
+
styles: [":host:has(input:checked) [data-slot=questionnaire-choice-indicator]{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground)}\n"]
|
|
807
|
+
}]
|
|
808
|
+
}],
|
|
809
|
+
propDecorators: {
|
|
810
|
+
value: [{
|
|
811
|
+
type: i0.Input,
|
|
812
|
+
args: [{
|
|
813
|
+
isSignal: true,
|
|
814
|
+
alias: "value",
|
|
815
|
+
required: true
|
|
816
|
+
}]
|
|
817
|
+
}],
|
|
818
|
+
shortcut: [{
|
|
819
|
+
type: i0.Input,
|
|
820
|
+
args: [{
|
|
821
|
+
isSignal: true,
|
|
822
|
+
alias: "shortcut",
|
|
823
|
+
required: false
|
|
824
|
+
}]
|
|
825
|
+
}],
|
|
826
|
+
userClass: [{
|
|
827
|
+
type: i0.Input,
|
|
828
|
+
args: [{
|
|
829
|
+
isSignal: true,
|
|
830
|
+
alias: "class",
|
|
831
|
+
required: false
|
|
832
|
+
}]
|
|
833
|
+
}]
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
var UiQuestionnaireInput = class UiQuestionnaireInput {
|
|
837
|
+
item = inject(UiQuestionnaireItem);
|
|
838
|
+
placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
839
|
+
userClass = input("", {
|
|
840
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
841
|
+
alias: "class"
|
|
842
|
+
});
|
|
843
|
+
classes = computed(() => cn(questionnaireInputWrapperClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
844
|
+
inputClass = questionnaireInputClass;
|
|
845
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
846
|
+
minVersion: "12.0.0",
|
|
847
|
+
version: "22.2.2",
|
|
848
|
+
ngImport: i0,
|
|
849
|
+
type: UiQuestionnaireInput,
|
|
850
|
+
deps: [],
|
|
851
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
852
|
+
});
|
|
853
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
854
|
+
minVersion: "17.1.0",
|
|
855
|
+
version: "22.2.2",
|
|
856
|
+
type: UiQuestionnaireInput,
|
|
857
|
+
isStandalone: true,
|
|
858
|
+
selector: "div[uiQuestionnaireInput], ui-questionnaire-input",
|
|
859
|
+
inputs: {
|
|
860
|
+
placeholder: {
|
|
861
|
+
classPropertyName: "placeholder",
|
|
862
|
+
publicName: "placeholder",
|
|
863
|
+
isSignal: true,
|
|
864
|
+
isRequired: false,
|
|
865
|
+
transformFunction: null
|
|
866
|
+
},
|
|
867
|
+
userClass: {
|
|
868
|
+
classPropertyName: "userClass",
|
|
869
|
+
publicName: "class",
|
|
870
|
+
isSignal: true,
|
|
871
|
+
isRequired: false,
|
|
872
|
+
transformFunction: null
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
host: {
|
|
876
|
+
attributes: { "data-slot": "questionnaire-input-wrapper" },
|
|
877
|
+
properties: { "attr.class": "classes()" }
|
|
878
|
+
},
|
|
879
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
880
|
+
ngImport: i0,
|
|
881
|
+
template: `<input
|
|
882
|
+
data-slot="questionnaire-input"
|
|
883
|
+
type="text"
|
|
884
|
+
[class]="inputClass"
|
|
885
|
+
[placeholder]="placeholder()"
|
|
886
|
+
[value]="item.text()"
|
|
887
|
+
[attr.aria-invalid]="item.error() ? 'true' : null"
|
|
888
|
+
(input)="item.text.set($any($event.target).value)"
|
|
889
|
+
/>`,
|
|
890
|
+
isInline: true,
|
|
891
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
892
|
+
});
|
|
893
|
+
};
|
|
894
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
895
|
+
minVersion: "12.0.0",
|
|
896
|
+
version: "22.2.2",
|
|
897
|
+
ngImport: i0,
|
|
898
|
+
type: UiQuestionnaireInput,
|
|
899
|
+
decorators: [{
|
|
900
|
+
type: Component,
|
|
901
|
+
args: [{
|
|
902
|
+
selector: "div[uiQuestionnaireInput], ui-questionnaire-input",
|
|
903
|
+
hostDirectives: [UiElementHost],
|
|
904
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
905
|
+
host: {
|
|
906
|
+
"data-slot": "questionnaire-input-wrapper",
|
|
907
|
+
"[attr.class]": "classes()"
|
|
908
|
+
},
|
|
909
|
+
template: `<input
|
|
910
|
+
data-slot="questionnaire-input"
|
|
911
|
+
type="text"
|
|
912
|
+
[class]="inputClass"
|
|
913
|
+
[placeholder]="placeholder()"
|
|
914
|
+
[value]="item.text()"
|
|
915
|
+
[attr.aria-invalid]="item.error() ? 'true' : null"
|
|
916
|
+
(input)="item.text.set($any($event.target).value)"
|
|
917
|
+
/>`
|
|
918
|
+
}]
|
|
919
|
+
}],
|
|
920
|
+
propDecorators: {
|
|
921
|
+
placeholder: [{
|
|
922
|
+
type: i0.Input,
|
|
923
|
+
args: [{
|
|
924
|
+
isSignal: true,
|
|
925
|
+
alias: "placeholder",
|
|
926
|
+
required: false
|
|
927
|
+
}]
|
|
928
|
+
}],
|
|
929
|
+
userClass: [{
|
|
930
|
+
type: i0.Input,
|
|
931
|
+
args: [{
|
|
932
|
+
isSignal: true,
|
|
933
|
+
alias: "class",
|
|
934
|
+
required: false
|
|
935
|
+
}]
|
|
936
|
+
}]
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
var UiQuestionnaireActions = class UiQuestionnaireActions {
|
|
940
|
+
userClass = input("", {
|
|
941
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
942
|
+
alias: "class"
|
|
943
|
+
});
|
|
944
|
+
classes = computed(() => cn(questionnaireActionsClass, this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
945
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
946
|
+
minVersion: "12.0.0",
|
|
947
|
+
version: "22.2.2",
|
|
948
|
+
ngImport: i0,
|
|
949
|
+
type: UiQuestionnaireActions,
|
|
950
|
+
deps: [],
|
|
951
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
952
|
+
});
|
|
953
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
954
|
+
minVersion: "17.1.0",
|
|
955
|
+
version: "22.2.2",
|
|
956
|
+
type: UiQuestionnaireActions,
|
|
957
|
+
isStandalone: true,
|
|
958
|
+
selector: "div[uiQuestionnaireActions], ui-questionnaire-actions",
|
|
959
|
+
inputs: { userClass: {
|
|
960
|
+
classPropertyName: "userClass",
|
|
961
|
+
publicName: "class",
|
|
962
|
+
isSignal: true,
|
|
963
|
+
isRequired: false,
|
|
964
|
+
transformFunction: null
|
|
965
|
+
} },
|
|
966
|
+
host: {
|
|
967
|
+
attributes: { "data-slot": "questionnaire-actions" },
|
|
968
|
+
properties: { "attr.class": "classes()" }
|
|
969
|
+
},
|
|
970
|
+
hostDirectives: [{ directive: i1.UiElementHost }],
|
|
971
|
+
ngImport: i0
|
|
972
|
+
});
|
|
973
|
+
};
|
|
974
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
975
|
+
minVersion: "12.0.0",
|
|
976
|
+
version: "22.2.2",
|
|
977
|
+
ngImport: i0,
|
|
978
|
+
type: UiQuestionnaireActions,
|
|
979
|
+
decorators: [{
|
|
980
|
+
type: Directive,
|
|
981
|
+
args: [{
|
|
982
|
+
selector: "div[uiQuestionnaireActions], ui-questionnaire-actions",
|
|
983
|
+
hostDirectives: [UiElementHost],
|
|
984
|
+
host: {
|
|
985
|
+
"data-slot": "questionnaire-actions",
|
|
986
|
+
"[attr.class]": "classes()"
|
|
987
|
+
}
|
|
988
|
+
}]
|
|
989
|
+
}],
|
|
990
|
+
propDecorators: { userClass: [{
|
|
991
|
+
type: i0.Input,
|
|
992
|
+
args: [{
|
|
993
|
+
isSignal: true,
|
|
994
|
+
alias: "class",
|
|
995
|
+
required: false
|
|
996
|
+
}]
|
|
997
|
+
}] }
|
|
998
|
+
});
|
|
999
|
+
const UI_QUESTIONNAIRE = [
|
|
1000
|
+
UiQuestionnaire,
|
|
1001
|
+
UiQuestionnaireProgress,
|
|
1002
|
+
UiQuestionnaireItem,
|
|
1003
|
+
UiQuestionnaireTitle,
|
|
1004
|
+
UiQuestionnaireDescription,
|
|
1005
|
+
UiQuestionnaireChoices,
|
|
1006
|
+
UiQuestionnaireChoice,
|
|
1007
|
+
UiQuestionnaireInput,
|
|
1008
|
+
UiQuestionnaireActions
|
|
1009
|
+
];
|
|
1010
|
+
export { UI_QUESTIONNAIRE, UI_QUESTIONNAIRE_GENERATED, UiQuestionnaire, UiQuestionnaireActions, UiQuestionnaireChoice, UiQuestionnaireChoices, UiQuestionnaireDescription, UiQuestionnaireInput, UiQuestionnaireItem, UiQuestionnaireProgress, UiQuestionnaireTitle, questionnaireActionsClass, questionnaireChoiceClass, questionnaireChoiceIndicatorClass, questionnaireChoiceIndicatorDotClass, questionnaireChoiceInputClass, questionnaireChoiceLabelClass, questionnaireChoiceShortcutClass, questionnaireChoicesClass, questionnaireClass, questionnaireDescriptionClass, questionnaireErrorClass, questionnaireInputClass, questionnaireInputWrapperClass, questionnaireItemClass, questionnaireProgressClass, questionnaireTitleClass };
|
|
1011
|
+
|
|
1012
|
+
//# sourceMappingURL=loomui-ng-ui-questionnaire.mjs.map
|