@ojiepermana/angular 22.0.1 → 22.0.29
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/README.md +61 -311
- package/fesm2022/ojiepermana-angular-chart.mjs +10 -0
- package/fesm2022/ojiepermana-angular-component.mjs +10 -0
- package/fesm2022/ojiepermana-angular-navigation.mjs +10 -0
- package/fesm2022/ojiepermana-angular-sdk.mjs +10 -0
- package/fesm2022/ojiepermana-angular-theme.mjs +4 -384
- package/fesm2022/ojiepermana-angular.mjs +15 -16
- package/package.json +25 -425
- package/types/ojiepermana-angular-chart.d.ts +1 -0
- package/types/ojiepermana-angular-component.d.ts +1 -0
- package/types/ojiepermana-angular-navigation.d.ts +1 -0
- package/types/ojiepermana-angular-sdk.d.ts +1 -0
- package/types/ojiepermana-angular-theme.d.ts +1 -116
- package/types/ojiepermana-angular.d.ts +5 -3
- package/.npmignore +0 -2
- package/collection.json +0 -30
- package/component/accordion/README.md +0 -195
- package/component/accordion/package.json +0 -4
- package/component/alert/README.md +0 -182
- package/component/alert/package.json +0 -4
- package/component/alert-dialog/README.md +0 -239
- package/component/alert-dialog/package.json +0 -4
- package/component/aspect-ratio/README.md +0 -112
- package/component/aspect-ratio/package.json +0 -4
- package/component/avatar/README.md +0 -176
- package/component/avatar/package.json +0 -4
- package/component/badge/README.md +0 -133
- package/component/badge/package.json +0 -4
- package/component/breadcrumb/README.md +0 -216
- package/component/breadcrumb/package.json +0 -4
- package/component/button/README.md +0 -139
- package/component/button/package.json +0 -4
- package/component/button-group/README.md +0 -208
- package/component/button-group/package.json +0 -4
- package/component/calendar/README.md +0 -132
- package/component/calendar/package.json +0 -4
- package/component/card/README.md +0 -220
- package/component/card/package.json +0 -4
- package/component/carousel/README.md +0 -276
- package/component/carousel/package.json +0 -4
- package/component/chart/README.md +0 -249
- package/component/chart/area/package.json +0 -4
- package/component/chart/bar/package.json +0 -4
- package/component/chart/line/package.json +0 -4
- package/component/chart/package.json +0 -4
- package/component/chart/pie/package.json +0 -4
- package/component/chart/radar/package.json +0 -4
- package/component/chart/radial/package.json +0 -4
- package/component/chart/scatter/package.json +0 -4
- package/component/checkbox/README.md +0 -149
- package/component/checkbox/package.json +0 -4
- package/component/collapsible/README.md +0 -195
- package/component/collapsible/package.json +0 -4
- package/component/combobox/README.md +0 -198
- package/component/combobox/package.json +0 -4
- package/component/command/README.md +0 -275
- package/component/command/package.json +0 -4
- package/component/composer/README.md +0 -235
- package/component/composer/package.json +0 -4
- package/component/context-menu/README.md +0 -267
- package/component/context-menu/package.json +0 -4
- package/component/date-picker/README.md +0 -177
- package/component/date-picker/package.json +0 -4
- package/component/dialog/README.md +0 -237
- package/component/dialog/package.json +0 -4
- package/component/drawer/README.md +0 -145
- package/component/drawer/package.json +0 -4
- package/component/dropdown-menu/README.md +0 -311
- package/component/dropdown-menu/package.json +0 -4
- package/component/editor/README.md +0 -136
- package/component/editor/package.json +0 -4
- package/component/empty/README.md +0 -183
- package/component/empty/package.json +0 -4
- package/component/form/README.md +0 -210
- package/component/form/package.json +0 -4
- package/component/hover-card/README.md +0 -146
- package/component/hover-card/package.json +0 -4
- package/component/input/README.md +0 -159
- package/component/input/package.json +0 -4
- package/component/input-group/README.md +0 -239
- package/component/input-group/package.json +0 -4
- package/component/input-otp/README.md +0 -278
- package/component/input-otp/package.json +0 -4
- package/component/item/README.md +0 -247
- package/component/item/package.json +0 -4
- package/component/kanban/README.md +0 -81
- package/component/kanban/package.json +0 -4
- package/component/kbd/README.md +0 -139
- package/component/kbd/package.json +0 -4
- package/component/label/README.md +0 -136
- package/component/label/package.json +0 -4
- package/component/menubar/README.md +0 -269
- package/component/menubar/package.json +0 -4
- package/component/native-select/README.md +0 -176
- package/component/native-select/package.json +0 -4
- package/component/navigation-menu/README.md +0 -160
- package/component/navigation-menu/package.json +0 -4
- package/component/pagination/README.md +0 -144
- package/component/pagination/package.json +0 -4
- package/component/pillbox/README.md +0 -67
- package/component/pillbox/package.json +0 -4
- package/component/popover/README.md +0 -43
- package/component/popover/package.json +0 -4
- package/component/progress/README.md +0 -160
- package/component/progress/package.json +0 -4
- package/component/radio/README.md +0 -209
- package/component/radio/package.json +0 -4
- package/component/resizable/README.md +0 -168
- package/component/resizable/package.json +0 -4
- package/component/scroll-area/README.md +0 -143
- package/component/scroll-area/package.json +0 -4
- package/component/select/README.md +0 -174
- package/component/select/package.json +0 -4
- package/component/separator/README.md +0 -170
- package/component/separator/package.json +0 -4
- package/component/sheet/README.md +0 -183
- package/component/sheet/package.json +0 -4
- package/component/skeleton/README.md +0 -158
- package/component/skeleton/package.json +0 -4
- package/component/slider/README.md +0 -207
- package/component/slider/package.json +0 -4
- package/component/spinner/README.md +0 -160
- package/component/spinner/package.json +0 -4
- package/component/switch/README.md +0 -166
- package/component/switch/package.json +0 -4
- package/component/table/README.md +0 -291
- package/component/table/package.json +0 -4
- package/component/tabs/README.md +0 -219
- package/component/tabs/package.json +0 -4
- package/component/textarea/README.md +0 -154
- package/component/textarea/package.json +0 -4
- package/component/timeline/README.md +0 -94
- package/component/timeline/package.json +0 -4
- package/component/toast/README.md +0 -321
- package/component/toast/package.json +0 -4
- package/component/toggle/README.md +0 -131
- package/component/toggle/package.json +0 -4
- package/component/toggle-group/README.md +0 -206
- package/component/toggle-group/package.json +0 -4
- package/component/tooltip/README.md +0 -211
- package/component/tooltip/package.json +0 -4
- package/component/utils/package.json +0 -4
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +0 -189
- package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +0 -276
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-alert.mjs +0 -99
- package/fesm2022/ojiepermana-angular-component-alert.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +0 -37
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +0 -139
- package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-badge.mjs +0 -50
- package/fesm2022/ojiepermana-angular-component-badge.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +0 -200
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +0 -103
- package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-button.mjs +0 -68
- package/fesm2022/ojiepermana-angular-component-button.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +0 -88
- package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-card.mjs +0 -152
- package/fesm2022/ojiepermana-angular-component-card.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +0 -334
- package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-area.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-bar.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-line.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-pie.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-radar.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-radial.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart.mjs +0 -3925
- package/fesm2022/ojiepermana-angular-component-chart.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +0 -114
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +0 -124
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +0 -272
- package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-command.mjs +0 -293
- package/fesm2022/ojiepermana-angular-component-command.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-composer.mjs +0 -352
- package/fesm2022/ojiepermana-angular-component-composer.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +0 -103
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +0 -170
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +0 -279
- package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +0 -492
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-editor.mjs +0 -717
- package/fesm2022/ojiepermana-angular-component-editor.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-empty.mjs +0 -145
- package/fesm2022/ojiepermana-angular-component-empty.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-form.mjs +0 -366
- package/fesm2022/ojiepermana-angular-component-form.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +0 -297
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +0 -179
- package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +0 -514
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-input.mjs +0 -45
- package/fesm2022/ojiepermana-angular-component-input.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-item.mjs +0 -264
- package/fesm2022/ojiepermana-angular-component-item.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +0 -314
- package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +0 -55
- package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-label.mjs +0 -33
- package/fesm2022/ojiepermana-angular-component-label.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +0 -308
- package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +0 -67
- package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +0 -413
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +0 -226
- package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +0 -812
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-popover.mjs +0 -169
- package/fesm2022/ojiepermana-angular-component-popover.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-progress.mjs +0 -60
- package/fesm2022/ojiepermana-angular-component-progress.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-radio.mjs +0 -122
- package/fesm2022/ojiepermana-angular-component-radio.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +0 -481
- package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +0 -54
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-select.mjs +0 -176
- package/fesm2022/ojiepermana-angular-component-select.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-separator.mjs +0 -37
- package/fesm2022/ojiepermana-angular-component-separator.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +0 -284
- package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +0 -31
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-slider.mjs +0 -423
- package/fesm2022/ojiepermana-angular-component-slider.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +0 -60
- package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-switch.mjs +0 -116
- package/fesm2022/ojiepermana-angular-component-switch.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-table.mjs +0 -155
- package/fesm2022/ojiepermana-angular-component-table.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +0 -272
- package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +0 -39
- package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +0 -237
- package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-toast.mjs +0 -71
- package/fesm2022/ojiepermana-angular-component-toast.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +0 -289
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +0 -82
- package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +0 -354
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-utils.mjs +0 -13
- package/fesm2022/ojiepermana-angular-component-utils.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-generator-api.mjs +0 -68
- package/fesm2022/ojiepermana-angular-generator-api.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-component.mjs +0 -602
- package/fesm2022/ojiepermana-angular-layout-component.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-provider.mjs +0 -21
- package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-services.mjs +0 -116
- package/fesm2022/ojiepermana-angular-layout-services.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-shell.mjs +0 -48
- package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +0 -30
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-token.mjs +0 -33
- package/fesm2022/ojiepermana-angular-layout-token.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-type-empty.mjs +0 -49
- package/fesm2022/ojiepermana-angular-layout-type-empty.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs +0 -128
- package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs +0 -123
- package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout.mjs +0 -485
- package/fesm2022/ojiepermana-angular-layout.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +0 -334
- package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +0 -63
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-item.mjs +0 -559
- package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +0 -213
- package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +0 -401
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +0 -670
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +0 -4
- package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-provider.mjs +0 -35
- package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-services.mjs +0 -294
- package/fesm2022/ojiepermana-angular-theme-services.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-token.mjs +0 -56
- package/fesm2022/ojiepermana-angular-theme-token.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular.mjs.map +0 -1
- package/generator/api/README.md +0 -252
- package/generator/api/bin/package.json +0 -3
- package/generator/api/bin/schematics/init/index.js +0 -90
- package/generator/api/bin/schematics/ng-add/index.js +0 -131
- package/generator/api/bin/schematics/sdk/index.js +0 -76
- package/generator/api/bin/src/config/loader.js +0 -41
- package/generator/api/bin/src/config/schema.js +0 -57
- package/generator/api/bin/src/emit/client.js +0 -248
- package/generator/api/bin/src/emit/metadata.js +0 -295
- package/generator/api/bin/src/emit/models.js +0 -106
- package/generator/api/bin/src/emit/navigation.js +0 -56
- package/generator/api/bin/src/emit/operations.js +0 -122
- package/generator/api/bin/src/emit/public-api.js +0 -54
- package/generator/api/bin/src/emit/services.js +0 -87
- package/generator/api/bin/src/engine.js +0 -65
- package/generator/api/bin/src/layout/per-domain.js +0 -359
- package/generator/api/bin/src/parser/bundle.js +0 -25
- package/generator/api/bin/src/parser/ir.js +0 -320
- package/generator/api/bin/src/parser/types.js +0 -7
- package/generator/api/bin/src/render/template.js +0 -58
- package/generator/api/bin/src/writer/index.js +0 -278
- package/generator/api/package.json +0 -4
- package/generator/api/schematics/init/schema.json +0 -19
- package/generator/api/schematics/ng-add/schema.json +0 -14
- package/generator/api/schematics/sdk/schema.json +0 -19
- package/generator/api/sdk.config.example.json +0 -24
- package/generator/guide/README.md +0 -84
- package/generator/guide/bin/package.json +0 -3
- package/generator/guide/bin/schematics/build/index.js +0 -36
- package/generator/guide/bin/schematics/init/index.js +0 -70
- package/generator/guide/bin/src/config/loader.js +0 -50
- package/generator/guide/bin/src/config/schema.js +0 -12
- package/generator/guide/bin/src/engine/component.js +0 -74
- package/generator/guide/bin/src/engine/frontmatter.js +0 -42
- package/generator/guide/bin/src/engine/index.js +0 -42
- package/generator/guide/bin/src/engine/naming.js +0 -39
- package/generator/guide/bin/src/engine/render.js +0 -36
- package/generator/guide/bin/src/engine/routes.js +0 -106
- package/generator/guide/bin/src/engine/walk.js +0 -35
- package/generator/guide/guide.config.example.json +0 -9
- package/generator/guide/schematics/build/schema.json +0 -14
- package/generator/guide/schematics/init/schema.json +0 -19
- package/layout/component/package.json +0 -4
- package/layout/package.json +0 -4
- package/layout/provider/package.json +0 -4
- package/layout/services/package.json +0 -4
- package/layout/shell/package.json +0 -4
- package/layout/token/directive/package.json +0 -4
- package/layout/token/package.json +0 -4
- package/layout/type/empty/package.json +0 -4
- package/layout/type/horizontal/package.json +0 -4
- package/layout/type/vertical/package.json +0 -4
- package/navigation/demo-data/package.json +0 -4
- package/navigation/icon/package.json +0 -4
- package/navigation/item/package.json +0 -4
- package/navigation/service/package.json +0 -4
- package/navigation/sidebar/package.json +0 -4
- package/navigation/topbar/README.md +0 -196
- package/navigation/topbar/package.json +0 -4
- package/navigation/types/package.json +0 -4
- package/theme/README.md +0 -174
- package/theme/package.json +0 -4
- package/theme/provider/package.json +0 -4
- package/theme/services/package.json +0 -4
- package/theme/styles/foundation/components.css +0 -81
- package/theme/styles/foundation/layers.css +0 -15
- package/theme/styles/foundation/tokens.css +0 -55
- package/theme/styles/index.css +0 -37
- package/theme/styles/integrations/material/autocomplete.css +0 -178
- package/theme/styles/integrations/material/button.css +0 -468
- package/theme/styles/integrations/material/dialog.css +0 -152
- package/theme/styles/integrations/material/select.css +0 -175
- package/theme/styles/integrations/material/slide-toggle.css +0 -234
- package/theme/styles/integrations/material/slider.css +0 -194
- package/theme/styles/integrations/material/tabs.css +0 -229
- package/theme/styles/integrations/material.css +0 -264
- package/theme/styles/integrations/tailwind.css +0 -114
- package/theme/styles/variants/color/amber.css +0 -31
- package/theme/styles/variants/color/base.css +0 -36
- package/theme/styles/variants/color/blue.css +0 -31
- package/theme/styles/variants/color/cyan.css +0 -31
- package/theme/styles/variants/color/emerald.css +0 -31
- package/theme/styles/variants/color/fuchsia.css +0 -31
- package/theme/styles/variants/color/green.css +0 -31
- package/theme/styles/variants/color/index.css +0 -22
- package/theme/styles/variants/color/indigo.css +0 -31
- package/theme/styles/variants/color/lime.css +0 -31
- package/theme/styles/variants/color/orange.css +0 -31
- package/theme/styles/variants/color/pink.css +0 -31
- package/theme/styles/variants/color/purple.css +0 -31
- package/theme/styles/variants/color/red.css +0 -31
- package/theme/styles/variants/color/rose.css +0 -31
- package/theme/styles/variants/color/sky.css +0 -31
- package/theme/styles/variants/color/teal.css +0 -31
- package/theme/styles/variants/color/violet.css +0 -31
- package/theme/styles/variants/color/yellow.css +0 -31
- package/theme/styles/variants/mode/dark.css +0 -20
- package/theme/styles/variants/mode/index.css +0 -6
- package/theme/styles/variants/mode/light.css +0 -24
- package/theme/styles/variants/style/brutal.css +0 -50
- package/theme/styles/variants/style/default.css +0 -54
- package/theme/styles/variants/style/index.css +0 -8
- package/theme/styles/variants/style/sharp.css +0 -50
- package/theme/styles/variants/style/soft.css +0 -50
- package/theme/token/package.json +0 -4
- package/types/ojiepermana-angular-component-accordion.d.ts +0 -51
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +0 -93
- package/types/ojiepermana-angular-component-alert.d.ts +0 -37
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +0 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +0 -51
- package/types/ojiepermana-angular-component-badge.d.ts +0 -19
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +0 -46
- package/types/ojiepermana-angular-component-button-group.d.ts +0 -26
- package/types/ojiepermana-angular-component-button.d.ts +0 -22
- package/types/ojiepermana-angular-component-calendar.d.ts +0 -33
- package/types/ojiepermana-angular-component-card.d.ts +0 -60
- package/types/ojiepermana-angular-component-carousel.d.ts +0 -86
- package/types/ojiepermana-angular-component-chart-area.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-bar.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-line.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-pie.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-radar.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-radial.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-scatter.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart.d.ts +0 -1094
- package/types/ojiepermana-angular-component-checkbox.d.ts +0 -35
- package/types/ojiepermana-angular-component-collapsible.d.ts +0 -42
- package/types/ojiepermana-angular-component-combobox.d.ts +0 -50
- package/types/ojiepermana-angular-component-command.d.ts +0 -99
- package/types/ojiepermana-angular-component-composer.d.ts +0 -90
- package/types/ojiepermana-angular-component-context-menu.d.ts +0 -35
- package/types/ojiepermana-angular-component-date-picker.d.ts +0 -41
- package/types/ojiepermana-angular-component-dialog.d.ts +0 -87
- package/types/ojiepermana-angular-component-drawer.d.ts +0 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +0 -137
- package/types/ojiepermana-angular-component-editor.d.ts +0 -123
- package/types/ojiepermana-angular-component-empty.d.ts +0 -50
- package/types/ojiepermana-angular-component-form.d.ts +0 -141
- package/types/ojiepermana-angular-component-hover-card.d.ts +0 -74
- package/types/ojiepermana-angular-component-input-group.d.ts +0 -51
- package/types/ojiepermana-angular-component-input-otp.d.ts +0 -136
- package/types/ojiepermana-angular-component-input.d.ts +0 -16
- package/types/ojiepermana-angular-component-item.d.ts +0 -88
- package/types/ojiepermana-angular-component-kanban.d.ts +0 -70
- package/types/ojiepermana-angular-component-kbd.d.ts +0 -16
- package/types/ojiepermana-angular-component-label.d.ts +0 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +0 -67
- package/types/ojiepermana-angular-component-native-select.d.ts +0 -26
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +0 -96
- package/types/ojiepermana-angular-component-pagination.d.ts +0 -33
- package/types/ojiepermana-angular-component-pillbox.d.ts +0 -157
- package/types/ojiepermana-angular-component-popover.d.ts +0 -43
- package/types/ojiepermana-angular-component-progress.d.ts +0 -17
- package/types/ojiepermana-angular-component-radio.d.ts +0 -40
- package/types/ojiepermana-angular-component-resizable.d.ts +0 -99
- package/types/ojiepermana-angular-component-scroll-area.d.ts +0 -19
- package/types/ojiepermana-angular-component-select.d.ts +0 -57
- package/types/ojiepermana-angular-component-separator.d.ts +0 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +0 -76
- package/types/ojiepermana-angular-component-skeleton.d.ts +0 -10
- package/types/ojiepermana-angular-component-slider.d.ts +0 -74
- package/types/ojiepermana-angular-component-spinner.d.ts +0 -13
- package/types/ojiepermana-angular-component-switch.d.ts +0 -40
- package/types/ojiepermana-angular-component-table.d.ts +0 -52
- package/types/ojiepermana-angular-component-tabs.d.ts +0 -92
- package/types/ojiepermana-angular-component-textarea.d.ts +0 -12
- package/types/ojiepermana-angular-component-timeline.d.ts +0 -63
- package/types/ojiepermana-angular-component-toast.d.ts +0 -38
- package/types/ojiepermana-angular-component-toggle-group.d.ts +0 -89
- package/types/ojiepermana-angular-component-toggle.d.ts +0 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +0 -89
- package/types/ojiepermana-angular-component-utils.d.ts +0 -5
- package/types/ojiepermana-angular-generator-api.d.ts +0 -86
- package/types/ojiepermana-angular-layout-component.d.ts +0 -205
- package/types/ojiepermana-angular-layout-provider.d.ts +0 -6
- package/types/ojiepermana-angular-layout-services.d.ts +0 -25
- package/types/ojiepermana-angular-layout-shell.d.ts +0 -8
- package/types/ojiepermana-angular-layout-token-directive.d.ts +0 -13
- package/types/ojiepermana-angular-layout-token.d.ts +0 -36
- package/types/ojiepermana-angular-layout-type-empty.d.ts +0 -22
- package/types/ojiepermana-angular-layout-type-horizontal.d.ts +0 -36
- package/types/ojiepermana-angular-layout-type-vertical.d.ts +0 -38
- package/types/ojiepermana-angular-layout.d.ts +0 -164
- package/types/ojiepermana-angular-navigation-demo-data.d.ts +0 -5
- package/types/ojiepermana-angular-navigation-icon.d.ts +0 -17
- package/types/ojiepermana-angular-navigation-item.d.ts +0 -54
- package/types/ojiepermana-angular-navigation-service.d.ts +0 -77
- package/types/ojiepermana-angular-navigation-sidebar.d.ts +0 -75
- package/types/ojiepermana-angular-navigation-topbar.d.ts +0 -74
- package/types/ojiepermana-angular-navigation-types.d.ts +0 -135
- package/types/ojiepermana-angular-theme-provider.d.ts +0 -11
- package/types/ojiepermana-angular-theme-services.d.ts +0 -55
- package/types/ojiepermana-angular-theme-token.d.ts +0 -57
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { numberAttribute, input, booleanAttribute, output, computed, ChangeDetectionStrategy, Component, inject, ElementRef, signal, forwardRef } from '@angular/core';
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import { cn } from '@ojiepermana/angular/component/utils';
|
|
5
|
-
|
|
6
|
-
const COMPOSER_BASE = 'block w-full min-w-0 text-sm text-foreground';
|
|
7
|
-
const COMPOSER_SHELL_BASE = [
|
|
8
|
-
'relative min-w-0 border border-input bg-background shadow-sm',
|
|
9
|
-
'transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring',
|
|
10
|
-
'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive',
|
|
11
|
-
'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',
|
|
12
|
-
'[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1',
|
|
13
|
-
].join(' ');
|
|
14
|
-
const composerShellVariantClasses = {
|
|
15
|
-
default: 'rounded-xl',
|
|
16
|
-
input: 'rounded-md',
|
|
17
|
-
};
|
|
18
|
-
const COMPOSER_BODY_BASE = '[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1';
|
|
19
|
-
const nullableNumberAttribute = (value) => {
|
|
20
|
-
if (value === null || value === undefined || value === '') {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return numberAttribute(value);
|
|
24
|
-
};
|
|
25
|
-
class ComposerComponent {
|
|
26
|
-
variant = input('default', /* @ts-ignore */
|
|
27
|
-
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
28
|
-
inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
29
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
30
|
-
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
31
|
-
submit = input('cmd-enter', /* @ts-ignore */
|
|
32
|
-
...(ngDevMode ? [{ debugName: "submit" }] : /* istanbul ignore next */ []));
|
|
33
|
-
submitForm = input(true, { ...(ngDevMode ? { debugName: "submitForm" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
34
|
-
class = input('', /* @ts-ignore */
|
|
35
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
36
|
-
submitRequested = output();
|
|
37
|
-
classes = computed(() => cn(COMPOSER_BASE, this.class()), /* @ts-ignore */
|
|
38
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
39
|
-
shellClasses = computed(() => cn(COMPOSER_SHELL_BASE, composerShellVariantClasses[this.variant()]), /* @ts-ignore */
|
|
40
|
-
...(ngDevMode ? [{ debugName: "shellClasses" }] : /* istanbul ignore next */ []));
|
|
41
|
-
bodyClasses = computed(() => cn(COMPOSER_BODY_BASE, this.inline()
|
|
42
|
-
? [
|
|
43
|
-
'flex items-end gap-1 px-1 py-1',
|
|
44
|
-
'[&>[data-slot=composer-actions-leading]]:order-10',
|
|
45
|
-
'[&>[data-slot=composer-input]]:order-20',
|
|
46
|
-
'[&>[data-slot=composer-actions-trailing]]:order-30',
|
|
47
|
-
].join(' ')
|
|
48
|
-
: [
|
|
49
|
-
'flex flex-wrap items-end gap-1.5 px-2 py-1.5',
|
|
50
|
-
'[&>[data-slot=composer-input]]:order-10 [&>[data-slot=composer-input]]:basis-full',
|
|
51
|
-
'[&>[data-slot=composer-actions-leading]]:order-20',
|
|
52
|
-
'[&>[data-slot=composer-actions-trailing]]:order-30 [&>[data-slot=composer-actions-trailing]]:ml-auto',
|
|
53
|
-
].join(' ')), /* @ts-ignore */
|
|
54
|
-
...(ngDevMode ? [{ debugName: "bodyClasses" }] : /* istanbul ignore next */ []));
|
|
55
|
-
handleInputKeydown(event) {
|
|
56
|
-
if (this.disabled() || event.key !== 'Enter' || event.defaultPrevented) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const shouldSubmit = this.submit() === 'enter' ? !event.shiftKey && !event.isComposing : event.metaKey || event.ctrlKey;
|
|
60
|
-
if (!shouldSubmit) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
event.preventDefault();
|
|
64
|
-
this.submitRequested.emit(event);
|
|
65
|
-
if (this.submitForm()) {
|
|
66
|
-
this.requestNearestFormSubmit(event.target);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
requestNearestFormSubmit(target) {
|
|
70
|
-
if (!(target instanceof Element)) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
const form = target.closest('form');
|
|
74
|
-
if (form && typeof form.requestSubmit === 'function') {
|
|
75
|
-
form.requestSubmit();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerComponent, isStandalone: true, selector: "ui-composer", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, submit: { classPropertyName: "submit", publicName: "submit", isSignal: true, isRequired: false, transformFunction: null }, submitForm: { classPropertyName: "submitForm", publicName: "submitForm", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitRequested: "submitRequested" }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer\"", "attr.data-variant": "variant()", "attr.data-inline": "inline() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null", "attr.inert": "disabled() ? \"\" : null" } }, ngImport: i0, template: `
|
|
80
|
-
<div
|
|
81
|
-
data-slot="composer-shell"
|
|
82
|
-
[class]="shellClasses()"
|
|
83
|
-
[attr.data-disabled]="disabled() ? 'true' : null"
|
|
84
|
-
[attr.aria-invalid]="invalid() ? 'true' : null">
|
|
85
|
-
<ng-content select="ui-composer-header" />
|
|
86
|
-
<div data-slot="composer-body" [class]="bodyClasses()">
|
|
87
|
-
<ng-content select="ui-composer-actions-leading" />
|
|
88
|
-
<ng-content select="textarea[ui-composer-input], ui-composer-input" />
|
|
89
|
-
<ng-content select="ui-composer-actions-trailing" />
|
|
90
|
-
</div>
|
|
91
|
-
<ng-content select="ui-composer-footer" />
|
|
92
|
-
</div>
|
|
93
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
94
|
-
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerComponent, decorators: [{
|
|
96
|
-
type: Component,
|
|
97
|
-
args: [{
|
|
98
|
-
selector: 'ui-composer',
|
|
99
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
100
|
-
host: {
|
|
101
|
-
'[class]': 'classes()',
|
|
102
|
-
'[attr.data-slot]': '"composer"',
|
|
103
|
-
'[attr.data-variant]': 'variant()',
|
|
104
|
-
'[attr.data-inline]': 'inline() ? "true" : null',
|
|
105
|
-
'[attr.data-disabled]': 'disabled() ? "true" : null',
|
|
106
|
-
'[attr.aria-disabled]': 'disabled() ? "true" : null',
|
|
107
|
-
'[attr.aria-invalid]': 'invalid() ? "true" : null',
|
|
108
|
-
'[attr.inert]': 'disabled() ? "" : null',
|
|
109
|
-
},
|
|
110
|
-
template: `
|
|
111
|
-
<div
|
|
112
|
-
data-slot="composer-shell"
|
|
113
|
-
[class]="shellClasses()"
|
|
114
|
-
[attr.data-disabled]="disabled() ? 'true' : null"
|
|
115
|
-
[attr.aria-invalid]="invalid() ? 'true' : null">
|
|
116
|
-
<ng-content select="ui-composer-header" />
|
|
117
|
-
<div data-slot="composer-body" [class]="bodyClasses()">
|
|
118
|
-
<ng-content select="ui-composer-actions-leading" />
|
|
119
|
-
<ng-content select="textarea[ui-composer-input], ui-composer-input" />
|
|
120
|
-
<ng-content select="ui-composer-actions-trailing" />
|
|
121
|
-
</div>
|
|
122
|
-
<ng-content select="ui-composer-footer" />
|
|
123
|
-
</div>
|
|
124
|
-
`,
|
|
125
|
-
}]
|
|
126
|
-
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], submit: [{ type: i0.Input, args: [{ isSignal: true, alias: "submit", required: false }] }], submitForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitForm", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], submitRequested: [{ type: i0.Output, args: ["submitRequested"] }] } });
|
|
127
|
-
class ComposerHeaderComponent {
|
|
128
|
-
class = input('', /* @ts-ignore */
|
|
129
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
130
|
-
classes = computed(() => cn('flex min-w-0 flex-wrap gap-2 border-b border-border/70 px-2.5 py-2', this.class()), /* @ts-ignore */
|
|
131
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
132
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
133
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerHeaderComponent, isStandalone: true, selector: "ui-composer-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
134
|
-
}
|
|
135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerHeaderComponent, decorators: [{
|
|
136
|
-
type: Component,
|
|
137
|
-
args: [{
|
|
138
|
-
selector: 'ui-composer-header',
|
|
139
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
140
|
-
host: {
|
|
141
|
-
'[class]': 'classes()',
|
|
142
|
-
'[attr.data-slot]': '"composer-header"',
|
|
143
|
-
},
|
|
144
|
-
template: `<ng-content />`,
|
|
145
|
-
}]
|
|
146
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
147
|
-
class ComposerFooterComponent {
|
|
148
|
-
class = input('', /* @ts-ignore */
|
|
149
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
150
|
-
classes = computed(() => cn('border-t border-border/70 px-2.5 py-1.5 text-xs leading-5 text-muted-foreground', this.class()), /* @ts-ignore */
|
|
151
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
152
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
153
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerFooterComponent, isStandalone: true, selector: "ui-composer-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
154
|
-
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerFooterComponent, decorators: [{
|
|
156
|
-
type: Component,
|
|
157
|
-
args: [{
|
|
158
|
-
selector: 'ui-composer-footer',
|
|
159
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
160
|
-
host: {
|
|
161
|
-
'[class]': 'classes()',
|
|
162
|
-
'[attr.data-slot]': '"composer-footer"',
|
|
163
|
-
},
|
|
164
|
-
template: `<ng-content />`,
|
|
165
|
-
}]
|
|
166
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
167
|
-
class ComposerActionsLeadingComponent {
|
|
168
|
-
class = input('', /* @ts-ignore */
|
|
169
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
170
|
-
classes = computed(() => cn('flex min-h-8 shrink-0 items-center gap-1', this.class()), /* @ts-ignore */
|
|
171
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
172
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsLeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
173
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerActionsLeadingComponent, isStandalone: true, selector: "ui-composer-actions-leading", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-leading\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
174
|
-
}
|
|
175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsLeadingComponent, decorators: [{
|
|
176
|
-
type: Component,
|
|
177
|
-
args: [{
|
|
178
|
-
selector: 'ui-composer-actions-leading',
|
|
179
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
180
|
-
host: {
|
|
181
|
-
'[class]': 'classes()',
|
|
182
|
-
'[attr.data-slot]': '"composer-actions-leading"',
|
|
183
|
-
},
|
|
184
|
-
template: `<ng-content />`,
|
|
185
|
-
}]
|
|
186
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
187
|
-
class ComposerActionsTrailingComponent {
|
|
188
|
-
class = input('', /* @ts-ignore */
|
|
189
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
190
|
-
classes = computed(() => cn('flex min-h-8 shrink-0 items-center justify-end gap-1', this.class()), /* @ts-ignore */
|
|
191
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
192
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsTrailingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
193
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerActionsTrailingComponent, isStandalone: true, selector: "ui-composer-actions-trailing", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-trailing\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
194
|
-
}
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsTrailingComponent, decorators: [{
|
|
196
|
-
type: Component,
|
|
197
|
-
args: [{
|
|
198
|
-
selector: 'ui-composer-actions-trailing',
|
|
199
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
200
|
-
host: {
|
|
201
|
-
'[class]': 'classes()',
|
|
202
|
-
'[attr.data-slot]': '"composer-actions-trailing"',
|
|
203
|
-
},
|
|
204
|
-
template: `<ng-content />`,
|
|
205
|
-
}]
|
|
206
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
207
|
-
class ComposerInputComponent {
|
|
208
|
-
composer = inject(ComposerComponent, { optional: true });
|
|
209
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
210
|
-
invalidInput = input(false, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), alias: 'aria-invalid', transform: booleanAttribute });
|
|
211
|
-
class = input('', /* @ts-ignore */
|
|
212
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
213
|
-
disabled = computed(() => this.disabledInput() || this.composer?.disabled() === true, /* @ts-ignore */
|
|
214
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
215
|
-
invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true, /* @ts-ignore */
|
|
216
|
-
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
217
|
-
classes = computed(() => cn('min-h-10 w-full rounded-sm bg-transparent px-2 py-2 text-sm leading-6 outline-none', 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', this.class()), /* @ts-ignore */
|
|
218
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
219
|
-
handleKeydown(event) {
|
|
220
|
-
this.composer?.handleInputKeydown(event);
|
|
221
|
-
}
|
|
222
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
223
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerInputComponent, isStandalone: true, selector: "ui-composer-input", inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
224
|
-
}
|
|
225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerInputComponent, decorators: [{
|
|
226
|
-
type: Component,
|
|
227
|
-
args: [{
|
|
228
|
-
selector: 'ui-composer-input',
|
|
229
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
230
|
-
host: {
|
|
231
|
-
'[class]': 'classes()',
|
|
232
|
-
'[attr.data-slot]': '"composer-input"',
|
|
233
|
-
'[attr.data-disabled]': 'disabled() ? "true" : null',
|
|
234
|
-
'[attr.aria-disabled]': 'disabled() ? "true" : null',
|
|
235
|
-
'[attr.aria-invalid]': 'invalid() ? "true" : null',
|
|
236
|
-
'(keydown)': 'handleKeydown($event)',
|
|
237
|
-
},
|
|
238
|
-
template: `<ng-content />`,
|
|
239
|
-
}]
|
|
240
|
-
}], propDecorators: { disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalidInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
241
|
-
class ComposerTextareaComponent {
|
|
242
|
-
el = inject(ElementRef);
|
|
243
|
-
composer = inject(ComposerComponent, { optional: true });
|
|
244
|
-
rows = input(2, { ...(ngDevMode ? { debugName: "rows" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
245
|
-
maxRows = input(null, { ...(ngDevMode ? { debugName: "maxRows" } : /* istanbul ignore next */ {}), transform: nullableNumberAttribute });
|
|
246
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
247
|
-
invalidInput = input(false, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), alias: 'aria-invalid', transform: booleanAttribute });
|
|
248
|
-
class = input('', /* @ts-ignore */
|
|
249
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
250
|
-
disabledState = signal(false, /* @ts-ignore */
|
|
251
|
-
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
252
|
-
disabled = computed(() => this.disabledInput() || this.disabledState() || this.composer?.disabled() === true, /* @ts-ignore */
|
|
253
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
254
|
-
invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true, /* @ts-ignore */
|
|
255
|
-
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
256
|
-
classes = computed(() => cn([
|
|
257
|
-
'max-h-none min-h-10 w-full resize-none bg-transparent px-2 py-2 text-sm leading-6 text-foreground shadow-none outline-none',
|
|
258
|
-
'placeholder:text-muted-foreground',
|
|
259
|
-
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
260
|
-
].join(' '), this.class()), /* @ts-ignore */
|
|
261
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
262
|
-
onChange = () => { };
|
|
263
|
-
onTouched = () => { };
|
|
264
|
-
ngAfterViewInit() {
|
|
265
|
-
queueMicrotask(() => this.resizeToContent());
|
|
266
|
-
}
|
|
267
|
-
writeValue(value) {
|
|
268
|
-
this.el.nativeElement.value = value ?? '';
|
|
269
|
-
queueMicrotask(() => this.resizeToContent());
|
|
270
|
-
}
|
|
271
|
-
registerOnChange(fn) {
|
|
272
|
-
this.onChange = fn;
|
|
273
|
-
}
|
|
274
|
-
registerOnTouched(fn) {
|
|
275
|
-
this.onTouched = fn;
|
|
276
|
-
}
|
|
277
|
-
setDisabledState(isDisabled) {
|
|
278
|
-
this.disabledState.set(isDisabled);
|
|
279
|
-
}
|
|
280
|
-
resizeToContent() {
|
|
281
|
-
const textarea = this.el.nativeElement;
|
|
282
|
-
textarea.style.height = 'auto';
|
|
283
|
-
const maxRows = this.maxRows();
|
|
284
|
-
if (!maxRows) {
|
|
285
|
-
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
286
|
-
textarea.style.overflowY = 'hidden';
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
const lineHeight = this.getLineHeight(textarea);
|
|
290
|
-
const maxHeight = lineHeight * Math.max(maxRows, this.rows());
|
|
291
|
-
const nextHeight = Math.min(textarea.scrollHeight, maxHeight);
|
|
292
|
-
textarea.style.height = `${nextHeight}px`;
|
|
293
|
-
textarea.style.overflowY = textarea.scrollHeight > maxHeight ? 'auto' : 'hidden';
|
|
294
|
-
}
|
|
295
|
-
focus() {
|
|
296
|
-
this.el.nativeElement.focus();
|
|
297
|
-
}
|
|
298
|
-
handleInput() {
|
|
299
|
-
this.resizeToContent();
|
|
300
|
-
this.onChange(this.el.nativeElement.value);
|
|
301
|
-
}
|
|
302
|
-
handleBlur() {
|
|
303
|
-
this.onTouched();
|
|
304
|
-
}
|
|
305
|
-
handleKeydown(event) {
|
|
306
|
-
this.composer?.handleInputKeydown(event);
|
|
307
|
-
}
|
|
308
|
-
getLineHeight(textarea) {
|
|
309
|
-
const lineHeight = Number.parseFloat(getComputedStyle(textarea).lineHeight);
|
|
310
|
-
return Number.isFinite(lineHeight) ? lineHeight : 24;
|
|
311
|
-
}
|
|
312
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
313
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerTextareaComponent, isStandalone: true, selector: "textarea[ui-composer-input]", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "handleInput()", "blur": "handleBlur()", "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.rows": "rows()", "attr.disabled": "disabled() ? \"\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, providers: [
|
|
314
|
-
{
|
|
315
|
-
provide: NG_VALUE_ACCESSOR,
|
|
316
|
-
useExisting: forwardRef(() => ComposerTextareaComponent),
|
|
317
|
-
multi: true,
|
|
318
|
-
},
|
|
319
|
-
], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
320
|
-
}
|
|
321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerTextareaComponent, decorators: [{
|
|
322
|
-
type: Component,
|
|
323
|
-
args: [{
|
|
324
|
-
selector: 'textarea[ui-composer-input]',
|
|
325
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
326
|
-
providers: [
|
|
327
|
-
{
|
|
328
|
-
provide: NG_VALUE_ACCESSOR,
|
|
329
|
-
useExisting: forwardRef(() => ComposerTextareaComponent),
|
|
330
|
-
multi: true,
|
|
331
|
-
},
|
|
332
|
-
],
|
|
333
|
-
host: {
|
|
334
|
-
'[class]': 'classes()',
|
|
335
|
-
'[attr.data-slot]': '"composer-input"',
|
|
336
|
-
'[attr.rows]': 'rows()',
|
|
337
|
-
'[attr.disabled]': 'disabled() ? "" : null',
|
|
338
|
-
'[attr.aria-invalid]': 'invalid() ? "true" : null',
|
|
339
|
-
'(input)': 'handleInput()',
|
|
340
|
-
'(blur)': 'handleBlur()',
|
|
341
|
-
'(keydown)': 'handleKeydown($event)',
|
|
342
|
-
},
|
|
343
|
-
template: '',
|
|
344
|
-
}]
|
|
345
|
-
}], propDecorators: { rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalidInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Generated bundle index. Do not edit.
|
|
349
|
-
*/
|
|
350
|
-
|
|
351
|
-
export { ComposerActionsLeadingComponent, ComposerActionsTrailingComponent, ComposerComponent, ComposerFooterComponent, ComposerHeaderComponent, ComposerInputComponent, ComposerTextareaComponent };
|
|
352
|
-
//# sourceMappingURL=ojiepermana-angular-component-composer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ojiepermana-angular-component-composer.mjs","sources":["../../../projects/angular/component/composer/composer.component.ts","../../../projects/angular/component/composer/ojiepermana-angular-component-composer.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\nexport type ComposerVariant = 'default' | 'input';\nexport type ComposerSubmitBehavior = 'cmd-enter' | 'enter';\n\nconst COMPOSER_BASE = 'block w-full min-w-0 text-sm text-foreground';\n\nconst COMPOSER_SHELL_BASE = [\n 'relative min-w-0 border border-input bg-background shadow-sm',\n 'transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring',\n 'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive',\n 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\n '[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1',\n].join(' ');\n\nconst composerShellVariantClasses: Record<ComposerVariant, string> = {\n default: 'rounded-xl',\n input: 'rounded-md',\n};\n\nconst COMPOSER_BODY_BASE = '[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1';\n\nconst nullableNumberAttribute = (value: unknown): number | null => {\n if (value === null || value === undefined || value === '') {\n return null;\n }\n\n return numberAttribute(value);\n};\n\n@Component({\n selector: 'ui-composer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer\"',\n '[attr.data-variant]': 'variant()',\n '[attr.data-inline]': 'inline() ? \"true\" : null',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.inert]': 'disabled() ? \"\" : null',\n },\n template: `\n <div\n data-slot=\"composer-shell\"\n [class]=\"shellClasses()\"\n [attr.data-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\">\n <ng-content select=\"ui-composer-header\" />\n <div data-slot=\"composer-body\" [class]=\"bodyClasses()\">\n <ng-content select=\"ui-composer-actions-leading\" />\n <ng-content select=\"textarea[ui-composer-input], ui-composer-input\" />\n <ng-content select=\"ui-composer-actions-trailing\" />\n </div>\n <ng-content select=\"ui-composer-footer\" />\n </div>\n `,\n})\nexport class ComposerComponent {\n readonly variant = input<ComposerVariant>('default');\n readonly inline = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly invalid = input(false, { transform: booleanAttribute });\n readonly submit = input<ComposerSubmitBehavior>('cmd-enter');\n readonly submitForm = input(true, { transform: booleanAttribute });\n readonly class = input<string>('');\n\n readonly submitRequested = output<KeyboardEvent>();\n\n protected readonly classes = computed(() => cn(COMPOSER_BASE, this.class()));\n protected readonly shellClasses = computed(() =>\n cn(COMPOSER_SHELL_BASE, composerShellVariantClasses[this.variant()]),\n );\n protected readonly bodyClasses = computed(() =>\n cn(\n COMPOSER_BODY_BASE,\n this.inline()\n ? [\n 'flex items-end gap-1 px-1 py-1',\n '[&>[data-slot=composer-actions-leading]]:order-10',\n '[&>[data-slot=composer-input]]:order-20',\n '[&>[data-slot=composer-actions-trailing]]:order-30',\n ].join(' ')\n : [\n 'flex flex-wrap items-end gap-1.5 px-2 py-1.5',\n '[&>[data-slot=composer-input]]:order-10 [&>[data-slot=composer-input]]:basis-full',\n '[&>[data-slot=composer-actions-leading]]:order-20',\n '[&>[data-slot=composer-actions-trailing]]:order-30 [&>[data-slot=composer-actions-trailing]]:ml-auto',\n ].join(' '),\n ),\n );\n\n handleInputKeydown(event: KeyboardEvent): void {\n if (this.disabled() || event.key !== 'Enter' || event.defaultPrevented) {\n return;\n }\n\n const shouldSubmit =\n this.submit() === 'enter' ? !event.shiftKey && !event.isComposing : event.metaKey || event.ctrlKey;\n\n if (!shouldSubmit) {\n return;\n }\n\n event.preventDefault();\n this.submitRequested.emit(event);\n\n if (this.submitForm()) {\n this.requestNearestFormSubmit(event.target);\n }\n }\n\n private requestNearestFormSubmit(target: EventTarget | null): void {\n if (!(target instanceof Element)) {\n return;\n }\n\n const form = target.closest('form');\n if (form && typeof form.requestSubmit === 'function') {\n form.requestSubmit();\n }\n }\n}\n\n@Component({\n selector: 'ui-composer-header',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-header\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerHeaderComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('flex min-w-0 flex-wrap gap-2 border-b border-border/70 px-2.5 py-2', this.class()),\n );\n}\n\n@Component({\n selector: 'ui-composer-footer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-footer\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerFooterComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('border-t border-border/70 px-2.5 py-1.5 text-xs leading-5 text-muted-foreground', this.class()),\n );\n}\n\n@Component({\n selector: 'ui-composer-actions-leading',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-actions-leading\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerActionsLeadingComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('flex min-h-8 shrink-0 items-center gap-1', this.class()));\n}\n\n@Component({\n selector: 'ui-composer-actions-trailing',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-actions-trailing\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerActionsTrailingComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('flex min-h-8 shrink-0 items-center justify-end gap-1', this.class()));\n}\n\n@Component({\n selector: 'ui-composer-input',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-input\"',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '(keydown)': 'handleKeydown($event)',\n },\n template: `<ng-content />`,\n})\nexport class ComposerInputComponent {\n private readonly composer = inject(ComposerComponent, { optional: true });\n\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly invalidInput = input(false, { alias: 'aria-invalid', transform: booleanAttribute });\n readonly class = input<string>('');\n\n protected readonly disabled = computed(() => this.disabledInput() || this.composer?.disabled() === true);\n protected readonly invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true);\n protected readonly classes = computed(() =>\n cn(\n 'min-h-10 w-full rounded-sm bg-transparent px-2 py-2 text-sm leading-6 outline-none',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n this.class(),\n ),\n );\n\n protected handleKeydown(event: KeyboardEvent): void {\n this.composer?.handleInputKeydown(event);\n }\n}\n\n@Component({\n selector: 'textarea[ui-composer-input]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ComposerTextareaComponent),\n multi: true,\n },\n ],\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-input\"',\n '[attr.rows]': 'rows()',\n '[attr.disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '(input)': 'handleInput()',\n '(blur)': 'handleBlur()',\n '(keydown)': 'handleKeydown($event)',\n },\n template: '',\n})\nexport class ComposerTextareaComponent implements AfterViewInit, ControlValueAccessor {\n private readonly el = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n private readonly composer = inject(ComposerComponent, { optional: true });\n\n readonly rows = input(2, { transform: numberAttribute });\n readonly maxRows = input<number | null>(null, { transform: nullableNumberAttribute });\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly invalidInput = input(false, { alias: 'aria-invalid', transform: booleanAttribute });\n readonly class = input<string>('');\n\n private readonly disabledState = signal(false);\n protected readonly disabled = computed(\n () => this.disabledInput() || this.disabledState() || this.composer?.disabled() === true,\n );\n protected readonly invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true);\n protected readonly classes = computed(() =>\n cn(\n [\n 'max-h-none min-h-10 w-full resize-none bg-transparent px-2 py-2 text-sm leading-6 text-foreground shadow-none outline-none',\n 'placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n ].join(' '),\n this.class(),\n ),\n );\n\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n ngAfterViewInit(): void {\n queueMicrotask(() => this.resizeToContent());\n }\n\n writeValue(value: string | null): void {\n this.el.nativeElement.value = value ?? '';\n queueMicrotask(() => this.resizeToContent());\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledState.set(isDisabled);\n }\n\n resizeToContent(): void {\n const textarea = this.el.nativeElement;\n textarea.style.height = 'auto';\n\n const maxRows = this.maxRows();\n if (!maxRows) {\n textarea.style.height = `${textarea.scrollHeight}px`;\n textarea.style.overflowY = 'hidden';\n return;\n }\n\n const lineHeight = this.getLineHeight(textarea);\n const maxHeight = lineHeight * Math.max(maxRows, this.rows());\n const nextHeight = Math.min(textarea.scrollHeight, maxHeight);\n\n textarea.style.height = `${nextHeight}px`;\n textarea.style.overflowY = textarea.scrollHeight > maxHeight ? 'auto' : 'hidden';\n }\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n\n protected handleInput(): void {\n this.resizeToContent();\n this.onChange(this.el.nativeElement.value);\n }\n\n protected handleBlur(): void {\n this.onTouched();\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n this.composer?.handleInputKeydown(event);\n }\n\n private getLineHeight(textarea: HTMLTextAreaElement): number {\n const lineHeight = Number.parseFloat(getComputedStyle(textarea).lineHeight);\n return Number.isFinite(lineHeight) ? lineHeight : 24;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAoBA,MAAM,aAAa,GAAG,8CAA8C;AAEpE,MAAM,mBAAmB,GAAG;IAC1B,8DAA8D;IAC9D,0GAA0G;IAC1G,0FAA0F;IAC1F,yEAAyE;IACzE,8EAA8E;AAC/E,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,2BAA2B,GAAoC;AACnE,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,KAAK,EAAE,YAAY;CACpB;AAED,MAAM,kBAAkB,GAAG,8EAA8E;AAEzG,MAAM,uBAAuB,GAAG,CAAC,KAAc,KAAmB;AAChE,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE;AACzD,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,OAAO,eAAe,CAAC,KAAK,CAAC;AAC/B,CAAC;MA+BY,iBAAiB,CAAA;IACnB,OAAO,GAAG,KAAK,CAAkB,SAAS;gFAAC;IAC3C,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACtD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACvD,MAAM,GAAG,KAAK,CAAyB,WAAW;+EAAC;IACnD,UAAU,GAAG,KAAK,CAAC,IAAI,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACzD,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;IAEzB,eAAe,GAAG,MA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AAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,yBAAyB,CAAC;AACxD,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAWS,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAED,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAtBrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,6BAA6B;oBACvC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC;AACxD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,kBAAkB,EAAE,kBAAkB;AACtC,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,wBAAwB;AAC3C,wBAAA,qBAAqB,EAAE,2BAA2B;AAClD,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,QAAQ,EAAE,cAAc;AACxB,wBAAA,WAAW,EAAE,uBAAuB;AACrC,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACpQD;;AAEG;;;;"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
2
|
-
import { TemplatePortal } from '@angular/cdk/portal';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, ViewContainerRef, ElementRef, DestroyRef, input, output, signal, Directive } from '@angular/core';
|
|
5
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { merge } from 'rxjs';
|
|
7
|
-
import { filter } from 'rxjs/operators';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Opens a menu anchored to the cursor when the host fires `contextmenu`.
|
|
11
|
-
* Reuses `<ng-template uiMenuContent>` from the dropdown-menu entry.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* <div [uiContextMenuTrigger]="menu" class="p-12 border">Right-click me</div>
|
|
15
|
-
* <ng-template uiMenuContent #menu>
|
|
16
|
-
* <ui-menu-surface>
|
|
17
|
-
* <button ui-menu-item>Copy</button>
|
|
18
|
-
* <button ui-menu-item>Paste</button>
|
|
19
|
-
* </ui-menu-surface>
|
|
20
|
-
* </ng-template>
|
|
21
|
-
*/
|
|
22
|
-
class ContextMenuTriggerDirective {
|
|
23
|
-
overlay = inject(Overlay);
|
|
24
|
-
vcr = inject(ViewContainerRef);
|
|
25
|
-
el = inject(ElementRef);
|
|
26
|
-
destroyRef = inject(DestroyRef);
|
|
27
|
-
uiContextMenuTrigger = input.required(/* @ts-ignore */
|
|
28
|
-
...(ngDevMode ? [{ debugName: "uiContextMenuTrigger" }] : /* istanbul ignore next */ []));
|
|
29
|
-
disabled = input(false, /* @ts-ignore */
|
|
30
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
31
|
-
openedChange = output();
|
|
32
|
-
overlayRef = null;
|
|
33
|
-
isOpen = signal(false, /* @ts-ignore */
|
|
34
|
-
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
35
|
-
onContextMenu(event) {
|
|
36
|
-
if (this.disabled())
|
|
37
|
-
return;
|
|
38
|
-
event.preventDefault();
|
|
39
|
-
this.close();
|
|
40
|
-
this.openAt(event.clientX, event.clientY);
|
|
41
|
-
}
|
|
42
|
-
onKeyDown(event) {
|
|
43
|
-
const isContextMenuKey = event.key === 'ContextMenu' || (event.shiftKey && event.key === 'F10');
|
|
44
|
-
if (!isContextMenuKey || this.disabled()) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
event.preventDefault();
|
|
48
|
-
const rect = this.el.nativeElement.getBoundingClientRect();
|
|
49
|
-
this.close();
|
|
50
|
-
this.openAt(rect.left + rect.width / 2, rect.top + rect.height / 2);
|
|
51
|
-
}
|
|
52
|
-
openAt(x, y) {
|
|
53
|
-
this.overlayRef = this.overlay.create({
|
|
54
|
-
positionStrategy: this.overlay
|
|
55
|
-
.position()
|
|
56
|
-
.flexibleConnectedTo({ x, y })
|
|
57
|
-
.withPositions([
|
|
58
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
59
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
60
|
-
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
61
|
-
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
|
|
62
|
-
]),
|
|
63
|
-
scrollStrategy: this.overlay.scrollStrategies.close(),
|
|
64
|
-
hasBackdrop: false,
|
|
65
|
-
panelClass: 'ui-menu-panel',
|
|
66
|
-
});
|
|
67
|
-
const portal = new TemplatePortal(this.uiContextMenuTrigger().template, this.vcr);
|
|
68
|
-
this.overlayRef.attach(portal);
|
|
69
|
-
merge(this.overlayRef.outsidePointerEvents(), this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')), this.overlayRef.detachments())
|
|
70
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
71
|
-
.subscribe(() => this.close());
|
|
72
|
-
this.isOpen.set(true);
|
|
73
|
-
this.openedChange.emit(true);
|
|
74
|
-
}
|
|
75
|
-
close() {
|
|
76
|
-
if (!this.overlayRef)
|
|
77
|
-
return;
|
|
78
|
-
this.overlayRef.dispose();
|
|
79
|
-
this.overlayRef = null;
|
|
80
|
-
this.isOpen.set(false);
|
|
81
|
-
this.openedChange.emit(false);
|
|
82
|
-
}
|
|
83
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ContextMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: ContextMenuTriggerDirective, isStandalone: true, selector: "[uiContextMenuTrigger]", inputs: { uiContextMenuTrigger: { classPropertyName: "uiContextMenuTrigger", publicName: "uiContextMenuTrigger", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "contextmenu": "onContextMenu($event)", "keydown": "onKeyDown($event)" } }, exportAs: ["uiContextMenuTrigger"], ngImport: i0 });
|
|
85
|
-
}
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ContextMenuTriggerDirective, decorators: [{
|
|
87
|
-
type: Directive,
|
|
88
|
-
args: [{
|
|
89
|
-
selector: '[uiContextMenuTrigger]',
|
|
90
|
-
exportAs: 'uiContextMenuTrigger',
|
|
91
|
-
host: {
|
|
92
|
-
'(contextmenu)': 'onContextMenu($event)',
|
|
93
|
-
'(keydown)': 'onKeyDown($event)',
|
|
94
|
-
},
|
|
95
|
-
}]
|
|
96
|
-
}], propDecorators: { uiContextMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiContextMenuTrigger", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }] } });
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Generated bundle index. Do not edit.
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
export { ContextMenuTriggerDirective };
|
|
103
|
-
//# sourceMappingURL=ojiepermana-angular-component-context-menu.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ojiepermana-angular-component-context-menu.mjs","sources":["../../../projects/angular/component/context-menu/context-menu-trigger.directive.ts","../../../projects/angular/component/context-menu/ojiepermana-angular-component-context-menu.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, ViewContainerRef, inject, input, output, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport type { MenuContentDirective } from '@ojiepermana/angular/component/dropdown-menu';\n\n/**\n * Opens a menu anchored to the cursor when the host fires `contextmenu`.\n * Reuses `<ng-template uiMenuContent>` from the dropdown-menu entry.\n *\n * @example\n * <div [uiContextMenuTrigger]=\"menu\" class=\"p-12 border\">Right-click me</div>\n * <ng-template uiMenuContent #menu>\n * <ui-menu-surface>\n * <button ui-menu-item>Copy</button>\n * <button ui-menu-item>Paste</button>\n * </ui-menu-surface>\n * </ng-template>\n */\n@Directive({\n selector: '[uiContextMenuTrigger]',\n exportAs: 'uiContextMenuTrigger',\n host: {\n '(contextmenu)': 'onContextMenu($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class ContextMenuTriggerDirective {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly uiContextMenuTrigger = input.required<MenuContentDirective>();\n readonly disabled = input<boolean>(false);\n\n readonly openedChange = output<boolean>();\n\n private overlayRef: OverlayRef | null = null;\n readonly isOpen = signal(false);\n\n protected onContextMenu(event: MouseEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n this.close();\n this.openAt(event.clientX, event.clientY);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const isContextMenuKey = event.key === 'ContextMenu' || (event.shiftKey && event.key === 'F10');\n\n if (!isContextMenuKey || this.disabled()) {\n return;\n }\n\n event.preventDefault();\n\n const rect = this.el.nativeElement.getBoundingClientRect();\n this.close();\n this.openAt(rect.left + rect.width / 2, rect.top + rect.height / 2);\n }\n\n openAt(x: number, y: number): void {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo({ x, y })\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n ]),\n scrollStrategy: this.overlay.scrollStrategies.close(),\n hasBackdrop: false,\n panelClass: 'ui-menu-panel',\n });\n\n const portal = new TemplatePortal(this.uiContextMenuTrigger().template, this.vcr);\n this.overlayRef.attach(portal);\n\n merge(\n this.overlayRef.outsidePointerEvents(),\n this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')),\n this.overlayRef.detachments(),\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.close());\n\n this.isOpen.set(true);\n this.openedChange.emit(true);\n }\n\n close(): void {\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.isOpen.set(false);\n this.openedChange.emit(false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQA;;;;;;;;;;;;AAYG;MASU,2BAA2B,CAAA;AACrB,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAChD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAEvC,oBAAoB,GAAG,KAAK,CAAC,QAAQ;6FAAwB;IAC7D,QAAQ,GAAG,KAAK,CAAU,K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