@wirabyte/ui 2.0.0-beta.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +6 -6
- package/avatar/avatar.component.d.ts +4 -2
- package/avatar/avatar.types.d.ts +3 -0
- package/breadcrumb/breadcrumb.component.d.ts +3 -1
- package/button/button.styles.d.ts +1 -1
- package/chat/chat.component.d.ts +118 -0
- package/chat/chat.module.d.ts +8 -0
- package/chat/chat.types.d.ts +64 -0
- package/chat/index.d.ts +5 -0
- package/chat/public-api.d.ts +3 -0
- package/config/options.d.ts +6 -0
- package/config/theme.service.d.ts +5 -0
- package/config/wu-config.service.d.ts +6 -0
- package/core/catalog.d.ts +6 -1
- package/core/overrides.d.ts +7 -0
- package/core/thai/locale.d.ts +47 -0
- package/datepicker/datepicker.component.d.ts +1 -1
- package/descriptions/descriptions.component.d.ts +56 -0
- package/descriptions/descriptions.module.d.ts +8 -0
- package/descriptions/index.d.ts +5 -0
- package/descriptions/public-api.d.ts +2 -0
- package/esm2022/accordion/accordion.component.mjs +4 -4
- package/esm2022/alert/alert-dialog.component.mjs +3 -3
- package/esm2022/avatar/avatar.component.mjs +11 -5
- package/esm2022/avatar/avatar.types.mjs +2 -2
- package/esm2022/breadcrumb/breadcrumb.component.mjs +5 -3
- package/esm2022/button/button.component.mjs +2 -2
- package/esm2022/button/button.styles.mjs +2 -2
- package/esm2022/card/card.component.mjs +8 -8
- package/esm2022/chat/chat.component.mjs +370 -0
- package/esm2022/chat/chat.module.mjs +17 -0
- package/esm2022/chat/chat.types.mjs +2 -0
- package/esm2022/chat/public-api.mjs +4 -0
- package/esm2022/chat/wirabyte-ui-chat.mjs +5 -0
- package/esm2022/config/options.mjs +1 -1
- package/esm2022/config/theme.service.mjs +35 -3
- package/esm2022/config/wu-config.service.mjs +9 -1
- package/esm2022/core/catalog.mjs +22 -2
- package/esm2022/core/families.mjs +43 -1
- package/esm2022/core/overrides.mjs +26 -1
- package/esm2022/core/thai/locale.mjs +67 -1
- package/esm2022/datepicker/datepicker.component.mjs +3 -3
- package/esm2022/descriptions/descriptions.component.mjs +112 -0
- package/esm2022/descriptions/descriptions.module.mjs +17 -0
- package/esm2022/descriptions/public-api.mjs +3 -0
- package/esm2022/descriptions/wirabyte-ui-descriptions.mjs +5 -0
- package/esm2022/dialog/dialog.component.mjs +3 -3
- package/esm2022/drawer/drawer.component.mjs +3 -3
- package/esm2022/emptystate/emptystate.component.mjs +3 -3
- package/esm2022/errorpage/errorpage.component.mjs +3 -3
- package/esm2022/fieldset/fieldset.component.mjs +4 -4
- package/esm2022/metergroup/metergroup.component.mjs +19 -5
- package/esm2022/metergroup/metergroup.types.mjs +1 -1
- package/esm2022/navbar/navbar.component.mjs +3 -3
- package/esm2022/panel/panel.component.mjs +6 -6
- package/esm2022/popover/popover.base.mjs +3 -3
- package/esm2022/result/result.component.mjs +3 -3
- package/esm2022/scheduler/public-api.mjs +4 -0
- package/esm2022/scheduler/scheduler.component.mjs +483 -0
- package/esm2022/scheduler/scheduler.module.mjs +17 -0
- package/esm2022/scheduler/scheduler.types.mjs +2 -0
- package/esm2022/scheduler/wirabyte-ui-scheduler.mjs +5 -0
- package/esm2022/selectbutton/selectbutton.component.mjs +25 -4
- package/esm2022/signaturepad/public-api.mjs +3 -0
- package/esm2022/signaturepad/signaturepad.component.mjs +289 -0
- package/esm2022/signaturepad/signaturepad.module.mjs +17 -0
- package/esm2022/signaturepad/wirabyte-ui-signaturepad.mjs +5 -0
- package/esm2022/stat/public-api.mjs +3 -0
- package/esm2022/stat/stat.component.mjs +128 -0
- package/esm2022/stat/stat.module.mjs +17 -0
- package/esm2022/stat/wirabyte-ui-stat.mjs +5 -0
- package/esm2022/table/table.celleditor.mjs +4 -4
- package/esm2022/tabs/tabs.component.mjs +3 -3
- package/esm2022/tag/tag.component.mjs +2 -2
- package/esm2022/textarea/textarea.directive.mjs +19 -1
- package/esm2022/thai/thai.pipes.mjs +2 -2
- package/esm2022/toolbar/toolbar.component.mjs +7 -7
- package/fesm2022/wirabyte-ui-accordion.mjs +3 -3
- package/fesm2022/wirabyte-ui-accordion.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-alert.mjs +2 -2
- package/fesm2022/wirabyte-ui-alert.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-avatar.mjs +12 -5
- package/fesm2022/wirabyte-ui-avatar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-breadcrumb.mjs +4 -2
- package/fesm2022/wirabyte-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-button.mjs +3 -3
- package/fesm2022/wirabyte-ui-button.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-card.mjs +7 -7
- package/fesm2022/wirabyte-ui-card.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-chat.mjs +391 -0
- package/fesm2022/wirabyte-ui-chat.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-config.mjs +42 -2
- package/fesm2022/wirabyte-ui-config.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-core.mjs +155 -2
- package/fesm2022/wirabyte-ui-core.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-datepicker.mjs +2 -2
- package/fesm2022/wirabyte-ui-datepicker.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-descriptions.mjs +133 -0
- package/fesm2022/wirabyte-ui-descriptions.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-dialog.mjs +2 -2
- package/fesm2022/wirabyte-ui-dialog.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-drawer.mjs +2 -2
- package/fesm2022/wirabyte-ui-drawer.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-emptystate.mjs +2 -2
- package/fesm2022/wirabyte-ui-emptystate.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-errorpage.mjs +2 -2
- package/fesm2022/wirabyte-ui-errorpage.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-fieldset.mjs +3 -3
- package/fesm2022/wirabyte-ui-fieldset.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-metergroup.mjs +18 -4
- package/fesm2022/wirabyte-ui-metergroup.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-navbar.mjs +2 -2
- package/fesm2022/wirabyte-ui-navbar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-panel.mjs +5 -5
- package/fesm2022/wirabyte-ui-panel.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-popover.mjs +2 -2
- package/fesm2022/wirabyte-ui-popover.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-result.mjs +2 -2
- package/fesm2022/wirabyte-ui-result.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-scheduler.mjs +504 -0
- package/fesm2022/wirabyte-ui-scheduler.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-selectbutton.mjs +24 -3
- package/fesm2022/wirabyte-ui-selectbutton.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-signaturepad.mjs +310 -0
- package/fesm2022/wirabyte-ui-signaturepad.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-stat.mjs +149 -0
- package/fesm2022/wirabyte-ui-stat.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-table.mjs +3 -3
- package/fesm2022/wirabyte-ui-table.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tabs.mjs +2 -2
- package/fesm2022/wirabyte-ui-tabs.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tag.mjs +2 -2
- package/fesm2022/wirabyte-ui-tag.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-textarea.mjs +18 -0
- package/fesm2022/wirabyte-ui-textarea.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-thai.mjs +1 -1
- package/fesm2022/wirabyte-ui-thai.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-toolbar.mjs +6 -6
- package/fesm2022/wirabyte-ui-toolbar.mjs.map +1 -1
- package/metergroup/metergroup.component.d.ts +11 -2
- package/metergroup/metergroup.types.d.ts +6 -0
- package/package.json +60 -30
- package/scheduler/index.d.ts +5 -0
- package/scheduler/public-api.d.ts +3 -0
- package/scheduler/scheduler.component.d.ts +143 -0
- package/scheduler/scheduler.module.d.ts +8 -0
- package/scheduler/scheduler.types.d.ts +46 -0
- package/schematics/core/catalog.cjs +22 -1
- package/schematics/core/families.cjs +42 -0
- package/schematics/core/overrides.cjs +25 -0
- package/schematics/core/thai/locale.cjs +66 -0
- package/schematics/ng-add/index.cjs +3 -1
- package/selectbutton/selectbutton.component.d.ts +12 -1
- package/signaturepad/index.d.ts +5 -0
- package/signaturepad/public-api.d.ts +2 -0
- package/signaturepad/signaturepad.component.d.ts +98 -0
- package/signaturepad/signaturepad.module.d.ts +8 -0
- package/stat/index.d.ts +5 -0
- package/stat/public-api.d.ts +2 -0
- package/stat/stat.component.d.ts +61 -0
- package/stat/stat.module.d.ts +8 -0
- package/textarea/textarea.directive.d.ts +2 -0
- package/theme/_data.scss +239 -7
- package/theme/_index.scss +29 -0
- package/themes/mali/amber.css +30 -1
- package/themes/mali/blue.css +30 -1
- package/themes/mali/cyan.css +30 -1
- package/themes/mali/emerald.css +30 -1
- package/themes/mali/fuchsia.css +30 -1
- package/themes/mali/green.css +30 -1
- package/themes/mali/indigo.css +30 -1
- package/themes/mali/lime.css +30 -1
- package/themes/mali/orange.css +30 -1
- package/themes/mali/pink.css +30 -1
- package/themes/mali/purple.css +30 -1
- package/themes/mali/red.css +30 -1
- package/themes/mali/rose.css +30 -1
- package/themes/mali/sky.css +30 -1
- package/themes/mali/teal.css +30 -1
- package/themes/mali/theme.css +30 -1
- package/themes/mali/violet.css +30 -1
- package/themes/mali/wira.css +30 -1
- package/themes/mali/yellow.css +30 -1
- package/themes/material/amber.css +30 -1
- package/themes/material/blue.css +30 -1
- package/themes/material/cyan.css +30 -1
- package/themes/material/emerald.css +30 -1
- package/themes/material/fuchsia.css +30 -1
- package/themes/material/green.css +30 -1
- package/themes/material/indigo.css +30 -1
- package/themes/material/lime.css +30 -1
- package/themes/material/orange.css +30 -1
- package/themes/material/pink.css +30 -1
- package/themes/material/purple.css +30 -1
- package/themes/material/red.css +30 -1
- package/themes/material/rose.css +30 -1
- package/themes/material/sky.css +30 -1
- package/themes/material/teal.css +30 -1
- package/themes/material/theme.css +30 -1
- package/themes/material/violet.css +30 -1
- package/themes/material/wira.css +30 -1
- package/themes/material/yellow.css +30 -1
- package/themes/phet/amber.css +30 -1
- package/themes/phet/blue.css +30 -1
- package/themes/phet/cyan.css +30 -1
- package/themes/phet/emerald.css +30 -1
- package/themes/phet/fuchsia.css +30 -1
- package/themes/phet/green.css +30 -1
- package/themes/phet/indigo.css +30 -1
- package/themes/phet/lime.css +30 -1
- package/themes/phet/orange.css +30 -1
- package/themes/phet/pink.css +30 -1
- package/themes/phet/purple.css +30 -1
- package/themes/phet/red.css +30 -1
- package/themes/phet/rose.css +30 -1
- package/themes/phet/sky.css +30 -1
- package/themes/phet/teal.css +30 -1
- package/themes/phet/theme.css +30 -1
- package/themes/phet/violet.css +30 -1
- package/themes/phet/wira.css +30 -1
- package/themes/phet/yellow.css +30 -1
- package/themes/sila/amber.css +30 -1
- package/themes/sila/blue.css +30 -1
- package/themes/sila/cyan.css +30 -1
- package/themes/sila/emerald.css +30 -1
- package/themes/sila/fuchsia.css +30 -1
- package/themes/sila/green.css +30 -1
- package/themes/sila/indigo.css +30 -1
- package/themes/sila/lime.css +30 -1
- package/themes/sila/orange.css +30 -1
- package/themes/sila/pink.css +30 -1
- package/themes/sila/purple.css +30 -1
- package/themes/sila/red.css +30 -1
- package/themes/sila/rose.css +30 -1
- package/themes/sila/sky.css +30 -1
- package/themes/sila/teal.css +30 -1
- package/themes/sila/theme.css +30 -1
- package/themes/sila/violet.css +30 -1
- package/themes/sila/wira.css +30 -1
- package/themes/sila/yellow.css +30 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirabyte-ui-panel.mjs","sources":["../../lib/panel/panel.component.ts","../../lib/panel/panel.component.html","../../lib/panel/panel.module.ts","../../lib/panel/wirabyte-ui-panel.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n inject,\n input,\n model,\n output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵrefreshOnTranslation, ɵuniqueId, ɵWU_SKIP_VERSION_CHECK, WuConfig, WuTemplate } from '@wirabyte/ui/config';\nimport { WuPanelToggler } from './panel.types';\n\n/**\n * Titled box that can collapse: `<wu-panel header=\"รายละเอียด\" toggleable [(collapsed)]=\"closed\">`.\n * Slots: `[wuPanelHeader]` (extra header content), `[wuPanelIcons]` (buttons next to the toggler), `[wuPanelFooter]`.\n */\n@Component({\n selector: 'wu-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './panel.component.html',\n styleUrl: './panel.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuPanel {\n private readonly slotTemplates = contentChildren(WuTemplate);\n private readonly headerRef = contentChild('header', { read: TemplateRef });\n readonly headerTemplate = computed(() => this.headerRef() || ɵfindTemplate(this.slotTemplates(), 'header'));\n private readonly iconsRef = contentChild('icons', { read: TemplateRef });\n readonly iconsTemplate = computed(() => this.iconsRef() || ɵfindTemplate(this.slotTemplates(), 'icons'));\n private readonly footerRef = contentChild('footer', { read: TemplateRef });\n readonly footerTemplate = computed(() => this.footerRef() || ɵfindTemplate(this.slotTemplates(), 'footer'));\n readonly header = input<string>();\n readonly toggleable = input(false, { transform: booleanAttribute });\n /** Two-way: `[(collapsed)]`. */\n readonly collapsed = model(false);\n readonly toggler = input<WuPanelToggler>('icon');\n\n readonly onToggle = output<{ collapsed: boolean }>();\n\n private readonly config = inject(WuConfig);\n readonly titleId = ɵuniqueId('wu-panel-title');\n readonly contentId = ɵuniqueId('wu-panel-content');\n readonly isCollapsed = computed(() => this.toggleable() && !!this.collapsed());\n /** Classes for the root element, as before (`styleClass=\"w-full\"`). */\n readonly styleClass = input<string | null | undefined>();\n /** Inline styles for the root element, as an object: `[style]=\"{ width: '20rem' }\"`. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly style = input<Record<string, any> | string | null | undefined>();\n /** The `style` object for the root (a plain style attribute already styles the host). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly rootStyle = computed(() => {\n const s = this.style();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return s && typeof s === 'object' ? (s as Record<string, any>) : null;\n });\n readonly classes = computed(() => [this.baseClasses(), this.styleClass()].filter(Boolean).join(' '));\n readonly baseClasses = computed(() => {\n const c = ['wu-panel', 'p-panel', 'p-component'];\n if (this.toggleable()) c.push('wu-panel-toggleable', 'p-panel-toggleable');\n if (this.isCollapsed()) c.push('wu-panel-collapsed');\n return c.join(' ');\n });\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n const i18n = ɵrefreshOnTranslation();\n inject(DestroyRef).onDestroy(() => i18n.unsubscribe());\n }\n\n togglerLabel(): string {\n return this.isCollapsed() ? this.config.translation.expand : this.config.translation.collapse;\n }\n\n toggle(event?: Event): void {\n event?.stopPropagation();\n if (!this.toggleable()) return;\n const next = !this.isCollapsed();\n this.collapsed.set(next);\n this.onToggle.emit({ collapsed: next });\n }\n\n headerClick(): void {\n if (this.toggler() === 'header') this.toggle();\n }\n}\n","<div [class]=\"classes()\" [style]=\"rootStyle()\">\n <div class=\"wu-panel-header p-panel-header\" [style.cursor]=\"toggleable() && toggler() === 'header' ? 'pointer' : null\" (click)=\"headerClick()\">\n @if (header()) {\n <span class=\"wu-panel-title p-panel-title\" [id]=\"titleId\">{{ header() }}</span>\n }\n @if (headerTemplate(); as t) {\n <ng-container *ngTemplateOutlet=\"t\"></ng-container>\n }\n <ng-content select=\"[wuPanelHeader], wu-header\"></ng-content>\n <div class=\"wu-panel-icons p-panel-icons\">\n <ng-content select=\"[wuPanelIcons]\"></ng-content>\n @if (iconsTemplate(); as t) {\n <ng-container *ngTemplateOutlet=\"t\"></ng-container>\n }\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"wu-panel-toggler p-panel-toggler\"\n [attr.aria-expanded]=\"!isCollapsed()\"\n [attr.aria-controls]=\"contentId\"\n [attr.aria-label]=\"togglerLabel()\"\n (click)=\"toggle($event)\"\n >\n @if (isCollapsed()) {\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M8 3v10M3 8h10\"></path></svg>\n } @else {\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M3 8h10\"></path></svg>\n }\n </button>\n }\n </div>\n </div>\n <div\n class=\"wu-panel-content-container p-panel-content-container\"\n [id]=\"contentId\"\n role=\"region\"\n [attr.aria-labelledby]=\"header() ? titleId : null\"\n [attr.inert]=\"isCollapsed() ? '' : null\"\n >\n <div class=\"wu-panel-content-inner\">\n <div class=\"wu-panel-content p-panel-content\"><ng-content></ng-content></div>\n <div class=\"wu-panel-footer p-panel-footer\">\n <ng-content select=\"[wuPanelFooter], wu-footer\"></ng-content>\n @if (footerTemplate(); as t) {\n <ng-container *ngTemplateOutlet=\"t\"></ng-container>\n }\n </div>\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { WuFooter, WuHeader } from '@wirabyte/ui/card';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuPanel } from './panel.component';\n\n/** For NgModule apps. Standalone apps can import `WuPanel` directly. `<wu-header>` / `<wu-footer>` slots come with it. */\n@NgModule({\n imports: [WuPanel, WuHeader, WuFooter, WuTemplate],\n exports: [WuPanel, WuHeader, WuFooter, WuTemplate],\n})\nexport class WuPanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵfindTemplate","ɵuniqueId","ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK","ɵrefreshOnTranslation"],"mappings":";;;;;;AAmBA;;;AAGG;MAUU,OAAO,CAAA;AAwClB,IAAA,WAAA,GAAA;AAvCiB,QAAA,IAAA,CAAA,aAAa,GAAG,eAAe,CAAC,UAAU,CAAC;QAC3C,IAAA,CAAA,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QACjE,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,QAAQ,CAAC,CAAC;QAC1F,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAC/D,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;QACvF,IAAA,CAAA,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QACjE,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,QAAQ,CAAC,CAAC;QAClG,IAAA,CAAA,MAAM,GAAG,KAAK,EAAU;QACxB,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;;AAE1D,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC;AACxB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAiB,M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A,OAAA,EAAA,CACvC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;gHAEtC,aAAa,EAAA,CAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC;oBAClD,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC;AACnD,iBAAA;;;ACTD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"wirabyte-ui-panel.mjs","sources":["../../lib/panel/panel.component.ts","../../lib/panel/panel.component.html","../../lib/panel/panel.module.ts","../../lib/panel/wirabyte-ui-panel.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n inject,\n input,\n model,\n output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵrefreshOnTranslation, ɵuniqueId, ɵWU_SKIP_VERSION_CHECK, WuConfig, WuTemplate } from '@wirabyte/ui/config';\nimport { WuPanelToggler } from './panel.types';\n\n/**\n * Titled box that can collapse: `<wu-panel header=\"รายละเอียด\" toggleable [(collapsed)]=\"closed\">`.\n * Slots: `[wuPanelHeader]` (extra header content), `[wuPanelIcons]` (buttons next to the toggler), `[wuPanelFooter]`.\n */\n@Component({\n selector: 'wu-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './panel.component.html',\n styleUrl: './panel.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuPanel {\n private readonly slotTemplates = contentChildren(WuTemplate);\n private readonly headerRef = contentChild('header', { read: TemplateRef, descendants: false });\n readonly headerTemplate = computed(() => this.headerRef() || ɵfindTemplate(this.slotTemplates(), 'header'));\n private readonly iconsRef = contentChild('icons', { read: TemplateRef, descendants: false });\n readonly iconsTemplate = computed(() => this.iconsRef() || ɵfindTemplate(this.slotTemplates(), 'icons'));\n private readonly footerRef = contentChild('footer', { read: TemplateRef, descendants: false });\n readonly footerTemplate = computed(() => this.footerRef() || ɵfindTemplate(this.slotTemplates(), 'footer'));\n readonly header = input<string>();\n readonly toggleable = input(false, { transform: booleanAttribute });\n /** Two-way: `[(collapsed)]`. */\n readonly collapsed = model(false);\n readonly toggler = input<WuPanelToggler>('icon');\n\n readonly onToggle = output<{ collapsed: boolean }>();\n\n private readonly config = inject(WuConfig);\n readonly titleId = ɵuniqueId('wu-panel-title');\n readonly contentId = ɵuniqueId('wu-panel-content');\n readonly isCollapsed = computed(() => this.toggleable() && !!this.collapsed());\n /** Classes for the root element, as before (`styleClass=\"w-full\"`). */\n readonly styleClass = input<string | null | undefined>();\n /** Inline styles for the root element, as an object: `[style]=\"{ width: '20rem' }\"`. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly style = input<Record<string, any> | string | null | undefined>();\n /** The `style` object for the root (a plain style attribute already styles the host). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly rootStyle = computed(() => {\n const s = this.style();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return s && typeof s === 'object' ? (s as Record<string, any>) : null;\n });\n readonly classes = computed(() => [this.baseClasses(), this.styleClass()].filter(Boolean).join(' '));\n readonly baseClasses = computed(() => {\n const c = ['wu-panel', 'p-panel', 'p-component'];\n if (this.toggleable()) c.push('wu-panel-toggleable', 'p-panel-toggleable');\n if (this.isCollapsed()) c.push('wu-panel-collapsed');\n return c.join(' ');\n });\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n const i18n = ɵrefreshOnTranslation();\n inject(DestroyRef).onDestroy(() => i18n.unsubscribe());\n }\n\n togglerLabel(): string {\n return this.isCollapsed() ? this.config.translation.expand : this.config.translation.collapse;\n }\n\n toggle(event?: Event): void {\n event?.stopPropagation();\n if (!this.toggleable()) return;\n const next = !this.isCollapsed();\n this.collapsed.set(next);\n this.onToggle.emit({ collapsed: next });\n }\n\n headerClick(): void {\n if (this.toggler() === 'header') this.toggle();\n }\n}\n","<div [class]=\"classes()\" [style]=\"rootStyle()\">\n <div class=\"wu-panel-header p-panel-header\" [style.cursor]=\"toggleable() && toggler() === 'header' ? 'pointer' : null\" (click)=\"headerClick()\">\n @if (header()) {\n <span class=\"wu-panel-title p-panel-title\" [id]=\"titleId\">{{ header() }}</span>\n }\n @if (headerTemplate(); as t) {\n <ng-container *ngTemplateOutlet=\"t\"></ng-container>\n }\n <ng-content select=\"[wuPanelHeader], wu-header\"></ng-content>\n <div class=\"wu-panel-icons p-panel-icons\">\n <ng-content select=\"[wuPanelIcons]\"></ng-content>\n @if (iconsTemplate(); as t) {\n <ng-container *ngTemplateOutlet=\"t\"></ng-container>\n }\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"wu-panel-toggler p-panel-toggler\"\n [attr.aria-expanded]=\"!isCollapsed()\"\n [attr.aria-controls]=\"contentId\"\n [attr.aria-label]=\"togglerLabel()\"\n (click)=\"toggle($event)\"\n >\n @if (isCollapsed()) {\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M8 3v10M3 8h10\"></path></svg>\n } @else {\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M3 8h10\"></path></svg>\n }\n </button>\n }\n </div>\n </div>\n <div\n class=\"wu-panel-content-container p-panel-content-container\"\n [id]=\"contentId\"\n role=\"region\"\n [attr.aria-labelledby]=\"header() ? titleId : null\"\n [attr.inert]=\"isCollapsed() ? '' : null\"\n >\n <div class=\"wu-panel-content-inner\">\n <div class=\"wu-panel-content p-panel-content\"><ng-content></ng-content></div>\n <div class=\"wu-panel-footer p-panel-footer\">\n <ng-content select=\"[wuPanelFooter], wu-footer\"></ng-content>\n @if (footerTemplate(); as t) {\n <ng-container *ngTemplateOutlet=\"t\"></ng-container>\n }\n </div>\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { WuFooter, WuHeader } from '@wirabyte/ui/card';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuPanel } from './panel.component';\n\n/** For NgModule apps. Standalone apps can import `WuPanel` directly. `<wu-header>` / `<wu-footer>` slots come with it. */\n@NgModule({\n imports: [WuPanel, WuHeader, WuFooter, WuTemplate],\n exports: [WuPanel, WuHeader, WuFooter, WuTemplate],\n})\nexport class WuPanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵfindTemplate","ɵuniqueId","ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK","ɵrefreshOnTranslation"],"mappings":";;;;;;AAmBA;;;AAGG;MAUU,OAAO,CAAA;AAwClB,IAAA,WAAA,GAAA;AAvCiB,QAAA,IAAA,CAAA,aAAa,GAAG,eAAe,CAAC,UAAU,CAAC;AAC3C,QAAA,IAAA,CAAA,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QACrF,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC1F,QAAA,IAAA,CAAA,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QACnF,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,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,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2nEAAA,EAAA,MAAA,EAAA,CAAA,slFAAA,CAAA,EAAA;;;AEzBjD;MAKa,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAAA,OAAA,EAAA,CAHd,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CACvC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;gHAEtC,aAAa,EAAA,CAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC;oBAClD,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC;AACnD,iBAAA;;;ACTD;;AAEG;;"}
|
|
@@ -129,7 +129,7 @@ class ɵWuPopoverBase {
|
|
|
129
129
|
return t && t.nodeType === 1 ? t : null;
|
|
130
130
|
}
|
|
131
131
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ɵWuPopoverBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
132
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ɵWuPopoverBase, inputs: { dismissable: "dismissable", showCloseIcon: "showCloseIcon", ariaCloseLabel: "ariaCloseLabel", style: "style", styleClass: "styleClass", focusOnShow: "focusOnShow", appendTo: "appendTo", baseZIndex: "baseZIndex", autoZIndex: "autoZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions" }, outputs: { onShow: "onShow", onHide: "onHide" }, queries: [{ propertyName: "contentRef", first: true, predicate: ["content"],
|
|
132
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ɵWuPopoverBase, inputs: { dismissable: "dismissable", showCloseIcon: "showCloseIcon", ariaCloseLabel: "ariaCloseLabel", style: "style", styleClass: "styleClass", focusOnShow: "focusOnShow", appendTo: "appendTo", baseZIndex: "baseZIndex", autoZIndex: "autoZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions" }, outputs: { onShow: "onShow", onHide: "onHide" }, queries: [{ propertyName: "contentRef", first: true, predicate: ["content"], read: TemplateRef }, { propertyName: "slotTemplates", predicate: WuTemplate }], viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true }], ngImport: i0 }); }
|
|
133
133
|
}
|
|
134
134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ɵWuPopoverBase, decorators: [{
|
|
135
135
|
type: Directive
|
|
@@ -164,7 +164,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
164
164
|
args: [WuTemplate]
|
|
165
165
|
}], contentRef: [{
|
|
166
166
|
type: ContentChild,
|
|
167
|
-
args: ['content', { read: TemplateRef }]
|
|
167
|
+
args: ['content', { read: TemplateRef, descendants: false }]
|
|
168
168
|
}], panelRef: [{
|
|
169
169
|
type: ViewChild,
|
|
170
170
|
args: ['panel']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirabyte-ui-popover.mjs","sources":["../../lib/popover/popover.base.ts","../../lib/popover/popover.component.ts","../../lib/popover/popover.component.html","../../lib/popover/popover.module.ts","../../lib/popover/wirabyte-ui-popover.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectorRef,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵfocusable, ɵrefreshOnTranslation, ɵtoBool, ɵWU_SKIP_VERSION_CHECK, WuConfig, ɵWuPopup, WuTemplate } from '@wirabyte/ui/config';\nimport { WuLocale } from '@wirabyte/ui/core';\n\n/**\n * Shared logic of wu-popover (v1 and v2/v3 templates): a panel with an arrow under (or over) whatever opened it.\n * `#op` + `(click)=\"op.toggle($event)\"`, as existing templates do.\n */\n@Directive()\nexport abstract class ɵWuPopoverBase implements OnDestroy {\n /** A click outside closes it. Default true. */\n @Input() set dismissable(v: unknown) { this._dismissable = v === undefined || ɵtoBool(v); }\n /** An × in the corner. */\n @Input() set showCloseIcon(v: unknown) { this._showCloseIcon = ɵtoBool(v); }\n get showCloseIcon(): boolean { return this._showCloseIcon; }\n @Input() ariaCloseLabel?: string;\n @Input() style?: Record<string, string | number> | null;\n @Input() styleClass?: string;\n /** Move focus into the panel when it opens. Default true. */\n @Input() set focusOnShow(v: unknown) { this._focusOnShow = v === undefined || ɵtoBool(v); }\n /** Accepted for templates moving over; the panel is in the top layer. */\n @Input() appendTo: unknown;\n @Input() baseZIndex: unknown;\n @Input() autoZIndex: unknown;\n @Input() showTransitionOptions: unknown;\n @Input() hideTransitionOptions: unknown;\n\n @Output() readonly onShow = new EventEmitter<void>();\n @Output() readonly onHide = new EventEmitter<void>();\n\n @ContentChildren(WuTemplate) protected slotTemplates?: QueryList<WuTemplate>;\n @ContentChild('content', { read: TemplateRef }) protected contentRef?: TemplateRef<unknown>;\n /** A `content` template (`pTemplate=\"content\"` / `#content`), with `let-closeCallback=\"closeCallback\"`. */\n get contentTemplate(): TemplateRef<unknown> | null {\n return this.contentRef || ɵfindTemplate(this.slotTemplates, 'content');\n }\n readonly contentContext = { closeCallback: () => this.hide() };\n\n @ViewChild('panel') panelRef?: ElementRef<HTMLElement>;\n\n overlayVisible = false;\n flipped = false;\n private _dismissable = true;\n private _showCloseIcon = false;\n private _focusOnShow = true;\n private target: HTMLElement | null = null;\n private popup: ɵWuPopup | null = null;\n protected readonly cdr = inject(ChangeDetectorRef);\n private readonly config = inject(WuConfig);\n private readonly doc = inject(DOCUMENT);\n private readonly i18n = ɵrefreshOnTranslation();\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n get t(): WuLocale {\n return this.config.translation;\n }\n\n /** Opens under `target` (default: the element that got the event), or closes when already open for it. */\n toggle(event?: Event | null, target?: HTMLElement | EventTarget | null): void {\n const t = this.resolveTarget(event, target);\n if (this.overlayVisible && (!t || t === this.target)) this.hide();\n else this.show(event, t);\n }\n\n show(event?: Event | null, target?: HTMLElement | EventTarget | null): void {\n const t = this.resolveTarget(event, target);\n if (!t) return;\n if (this.overlayVisible) {\n this.target = t;\n this.popup?.close();\n this.attach();\n return;\n }\n this.target = t;\n this.overlayVisible = true;\n this.cdr.detectChanges();\n this.attach();\n if (this._focusOnShow) {\n const panel = this.panelRef?.nativeElement;\n const first = panel && (panel.querySelector<HTMLElement>('[autofocus]') || ɵfocusable(panel)[0]);\n first?.focus({ preventScroll: true });\n }\n this.onShow.emit();\n }\n\n hide(): void {\n if (!this.overlayVisible) return;\n this.popup?.close();\n this.popup = null;\n this.overlayVisible = false;\n const panel = this.panelRef?.nativeElement;\n if (panel && panel.contains(this.doc.activeElement)) this.target?.focus({ preventScroll: true });\n this.cdr.markForCheck();\n this.onHide.emit();\n }\n\n /** Places the panel again, e.g. after its content changed size. */\n align(): void {\n this.popup?.position();\n }\n\n keydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n }\n\n ngOnDestroy(): void {\n this.popup?.close();\n this.i18n.unsubscribe();\n }\n\n private attach(): void {\n const panel = this.panelRef?.nativeElement;\n if (!panel || !this.target) return;\n this.popup = new ɵWuPopup(this.target, panel, {\n sheet: false,\n gap: 10,\n sheetClass: 'wu-popover-sheet',\n modalClass: 'wu-popover-modal',\n onOutside: () => {\n if (this._dismissable) this.hide();\n },\n onLost: () => this.hide(),\n onEscape: (e) => {\n e.preventDefault();\n this.hide();\n },\n onPosition: (popup, anchor) => {\n const flipped = popup.placement === 'above';\n panel.classList.toggle('wu-popover-flipped', flipped);\n panel.classList.toggle('p-popover-flipped', flipped);\n panel.classList.toggle('p-overlaypanel-flipped', flipped);\n // The arrow points at the middle of the anchor, wherever the panel was pushed to fit.\n const at = anchor.left + anchor.width / 2 - panel.getBoundingClientRect().left;\n panel.style.setProperty('--_arrow', `${Math.round(Math.min(Math.max(at, 16), panel.offsetWidth - 16))}px`);\n },\n });\n this.popup.open();\n }\n\n private resolveTarget(event?: Event | null, target?: HTMLElement | EventTarget | null): HTMLElement | null {\n const t = (target || event?.currentTarget || event?.target || null) as HTMLElement | null;\n return t && t.nodeType === 1 ? t : null;\n }\n}\n","import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ɵWuPopoverBase } from './popover.base';\n\n/**\n * A panel under whatever opened it: `<wu-popover #op>…</wu-popover>` + `(click)=\"op.toggle($event)\"`.\n * In the top layer, so it shows above dialogs and is never clipped; flips above when there is no room below.\n */\n@Component({\n selector: 'wu-popover, wu-overlaypanel, wu-overlayPanel',\n standalone: true,\n exportAs: 'wuPopover',\n imports: [NgClass, NgStyle, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuPopover extends ɵWuPopoverBase {}\n","@if (overlayVisible) {\n <div\n #panel\n popover=\"manual\"\n role=\"dialog\"\n class=\"wu-popover p-popover p-component\"\n [ngClass]=\"styleClass || ''\"\n [ngStyle]=\"style || null\"\n (keydown)=\"keydown($event)\"\n >\n <div class=\"wu-popover-content p-popover-content\">\n <ng-content></ng-content>\n @if (contentTemplate) {\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: contentContext\"></ng-container>\n }\n </div>\n @if (showCloseIcon) {\n <button type=\"button\" class=\"wu-popover-close p-popover-close-button\" [attr.aria-label]=\"ariaCloseLabel || t.close\" (click)=\"hide()\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M4 4l8 8M12 4l-8 8\"></path></svg>\n </button>\n }\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuPopover } from './popover.component';\n\n/** For NgModule apps. Standalone apps can import `WuPopover` directly. */\n@NgModule({\n imports: [WuPopover, WuTemplate],\n exports: [WuPopover, WuTemplate],\n})\nexport class WuPopoverModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵtoBool","ɵfindTemplate","ɵrefreshOnTranslation","ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK","ɵfocusable","ɵWuPopup"],"mappings":";;;;;AAmBA;;;AAGG;MAEmB,cAAc,CAAA;;AAElC,IAAA,IAAa,WAAW,CAAC,CAAU,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,KAAK,SAAS,IAAIA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;;AAE1F,IAAA,IAAa,aAAa,CAAC,CAAU,EAAA,EAAI,IAAI,CAAC,cAAc,GAAGA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,IAAI,aAAa,KAAc,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC;;AAK3D,IAAA,I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,WAAW,EAAA,OAAA,EACZ,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,CAAC,iBAG9B,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,43BAAA,EAAA,MAAA,EAAA,CAAA,8tDAAA,CAAA,EAAA;;;AEZjD;MAKa,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHhB,SAAS,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CACrB,SAAS,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;gHAEpB,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AACjC,iBAAA;;;ACRD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"wirabyte-ui-popover.mjs","sources":["../../lib/popover/popover.base.ts","../../lib/popover/popover.component.ts","../../lib/popover/popover.component.html","../../lib/popover/popover.module.ts","../../lib/popover/wirabyte-ui-popover.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectorRef,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵfocusable, ɵrefreshOnTranslation, ɵtoBool, ɵWU_SKIP_VERSION_CHECK, WuConfig, ɵWuPopup, WuTemplate } from '@wirabyte/ui/config';\nimport { WuLocale } from '@wirabyte/ui/core';\n\n/**\n * Shared logic of wu-popover (v1 and v2/v3 templates): a panel with an arrow under (or over) whatever opened it.\n * `#op` + `(click)=\"op.toggle($event)\"`, as existing templates do.\n */\n@Directive()\nexport abstract class ɵWuPopoverBase implements OnDestroy {\n /** A click outside closes it. Default true. */\n @Input() set dismissable(v: unknown) { this._dismissable = v === undefined || ɵtoBool(v); }\n /** An × in the corner. */\n @Input() set showCloseIcon(v: unknown) { this._showCloseIcon = ɵtoBool(v); }\n get showCloseIcon(): boolean { return this._showCloseIcon; }\n @Input() ariaCloseLabel?: string;\n @Input() style?: Record<string, string | number> | null;\n @Input() styleClass?: string;\n /** Move focus into the panel when it opens. Default true. */\n @Input() set focusOnShow(v: unknown) { this._focusOnShow = v === undefined || ɵtoBool(v); }\n /** Accepted for templates moving over; the panel is in the top layer. */\n @Input() appendTo: unknown;\n @Input() baseZIndex: unknown;\n @Input() autoZIndex: unknown;\n @Input() showTransitionOptions: unknown;\n @Input() hideTransitionOptions: unknown;\n\n @Output() readonly onShow = new EventEmitter<void>();\n @Output() readonly onHide = new EventEmitter<void>();\n\n @ContentChildren(WuTemplate) protected slotTemplates?: QueryList<WuTemplate>;\n @ContentChild('content', { read: TemplateRef, descendants: false }) protected contentRef?: TemplateRef<unknown>;\n /** A `content` template (`pTemplate=\"content\"` / `#content`), with `let-closeCallback=\"closeCallback\"`. */\n get contentTemplate(): TemplateRef<unknown> | null {\n return this.contentRef || ɵfindTemplate(this.slotTemplates, 'content');\n }\n readonly contentContext = { closeCallback: () => this.hide() };\n\n @ViewChild('panel') panelRef?: ElementRef<HTMLElement>;\n\n overlayVisible = false;\n flipped = false;\n private _dismissable = true;\n private _showCloseIcon = false;\n private _focusOnShow = true;\n private target: HTMLElement | null = null;\n private popup: ɵWuPopup | null = null;\n protected readonly cdr = inject(ChangeDetectorRef);\n private readonly config = inject(WuConfig);\n private readonly doc = inject(DOCUMENT);\n private readonly i18n = ɵrefreshOnTranslation();\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n get t(): WuLocale {\n return this.config.translation;\n }\n\n /** Opens under `target` (default: the element that got the event), or closes when already open for it. */\n toggle(event?: Event | null, target?: HTMLElement | EventTarget | null): void {\n const t = this.resolveTarget(event, target);\n if (this.overlayVisible && (!t || t === this.target)) this.hide();\n else this.show(event, t);\n }\n\n show(event?: Event | null, target?: HTMLElement | EventTarget | null): void {\n const t = this.resolveTarget(event, target);\n if (!t) return;\n if (this.overlayVisible) {\n this.target = t;\n this.popup?.close();\n this.attach();\n return;\n }\n this.target = t;\n this.overlayVisible = true;\n this.cdr.detectChanges();\n this.attach();\n if (this._focusOnShow) {\n const panel = this.panelRef?.nativeElement;\n const first = panel && (panel.querySelector<HTMLElement>('[autofocus]') || ɵfocusable(panel)[0]);\n first?.focus({ preventScroll: true });\n }\n this.onShow.emit();\n }\n\n hide(): void {\n if (!this.overlayVisible) return;\n this.popup?.close();\n this.popup = null;\n this.overlayVisible = false;\n const panel = this.panelRef?.nativeElement;\n if (panel && panel.contains(this.doc.activeElement)) this.target?.focus({ preventScroll: true });\n this.cdr.markForCheck();\n this.onHide.emit();\n }\n\n /** Places the panel again, e.g. after its content changed size. */\n align(): void {\n this.popup?.position();\n }\n\n keydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n }\n\n ngOnDestroy(): void {\n this.popup?.close();\n this.i18n.unsubscribe();\n }\n\n private attach(): void {\n const panel = this.panelRef?.nativeElement;\n if (!panel || !this.target) return;\n this.popup = new ɵWuPopup(this.target, panel, {\n sheet: false,\n gap: 10,\n sheetClass: 'wu-popover-sheet',\n modalClass: 'wu-popover-modal',\n onOutside: () => {\n if (this._dismissable) this.hide();\n },\n onLost: () => this.hide(),\n onEscape: (e) => {\n e.preventDefault();\n this.hide();\n },\n onPosition: (popup, anchor) => {\n const flipped = popup.placement === 'above';\n panel.classList.toggle('wu-popover-flipped', flipped);\n panel.classList.toggle('p-popover-flipped', flipped);\n panel.classList.toggle('p-overlaypanel-flipped', flipped);\n // The arrow points at the middle of the anchor, wherever the panel was pushed to fit.\n const at = anchor.left + anchor.width / 2 - panel.getBoundingClientRect().left;\n panel.style.setProperty('--_arrow', `${Math.round(Math.min(Math.max(at, 16), panel.offsetWidth - 16))}px`);\n },\n });\n this.popup.open();\n }\n\n private resolveTarget(event?: Event | null, target?: HTMLElement | EventTarget | null): HTMLElement | null {\n const t = (target || event?.currentTarget || event?.target || null) as HTMLElement | null;\n return t && t.nodeType === 1 ? t : null;\n }\n}\n","import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ɵWuPopoverBase } from './popover.base';\n\n/**\n * A panel under whatever opened it: `<wu-popover #op>…</wu-popover>` + `(click)=\"op.toggle($event)\"`.\n * In the top layer, so it shows above dialogs and is never clipped; flips above when there is no room below.\n */\n@Component({\n selector: 'wu-popover, wu-overlaypanel, wu-overlayPanel',\n standalone: true,\n exportAs: 'wuPopover',\n imports: [NgClass, NgStyle, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuPopover extends ɵWuPopoverBase {}\n","@if (overlayVisible) {\n <div\n #panel\n popover=\"manual\"\n role=\"dialog\"\n class=\"wu-popover p-popover p-component\"\n [ngClass]=\"styleClass || ''\"\n [ngStyle]=\"style || null\"\n (keydown)=\"keydown($event)\"\n >\n <div class=\"wu-popover-content p-popover-content\">\n <ng-content></ng-content>\n @if (contentTemplate) {\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: contentContext\"></ng-container>\n }\n </div>\n @if (showCloseIcon) {\n <button type=\"button\" class=\"wu-popover-close p-popover-close-button\" [attr.aria-label]=\"ariaCloseLabel || t.close\" (click)=\"hide()\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M4 4l8 8M12 4l-8 8\"></path></svg>\n </button>\n }\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuPopover } from './popover.component';\n\n/** For NgModule apps. Standalone apps can import `WuPopover` directly. */\n@NgModule({\n imports: [WuPopover, WuTemplate],\n exports: [WuPopover, WuTemplate],\n})\nexport class WuPopoverModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵtoBool","ɵfindTemplate","ɵrefreshOnTranslation","ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK","ɵfocusable","ɵWuPopup"],"mappings":";;;;;AAmBA;;;AAGG;MAEmB,cAAc,CAAA;;AAElC,IAAA,IAAa,WAAW,CAAC,CAAU,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,KAAK,SAAS,IAAIA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;;AAE1F,IAAA,IAAa,aAAa,CAAC,CAAU,EAAA,EAAI,IAAI,CAAC,cAAc,GAAGA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,IAAI,aAAa,KAAc,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC;;AAK3D,IAAA,IAAa,WAAW,CAAC,CAAU,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,KAAK,SAAS,IAAIA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;;AAc1F,IAAA,IAAI,eAAe,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,UAAU,IAAIC,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC;IACxE;AAiBA,IAAA,WAAA,GAAA;AAzBmB,QAAA,IAAA,CAAA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EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHhB,SAAS,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CACrB,SAAS,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;gHAEpB,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AACjC,iBAAA;;;ACRD;;AAEG;;"}
|
|
@@ -50,11 +50,11 @@ class WuResult {
|
|
|
50
50
|
return this.style && typeof this.style === 'object' ? this.style : null;
|
|
51
51
|
}
|
|
52
52
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WuResult, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: WuResult, isStandalone: true, selector: "wu-result", inputs: { status: "status", title: "title", subtitle: "subtitle", icon: "icon", showIcon: "showIcon", styleClass: "styleClass", style: "style" }, host: { properties: { "attr.title": "null" }, classAttribute: "wu-result-host" }, ngImport: i0, template: "<div class=\"wu-result\" [class]=\"styleClass || ''\" [style]=\"rootStyle\" [attr.data-status]=\"status\">\n <ng-container *ngIf=\"shown\">\n <span *ngIf=\"!isCode; else code\" class=\"wu-result-mark\" aria-hidden=\"true\">\n <i *ngIf=\"icon; else mark\" [ngClass]=\"icon\"></i>\n <ng-template #mark>\n <svg viewBox=\"0 0 48 48\" focusable=\"false\" [ngSwitch]=\"status\">\n <path *ngSwitchCase=\"'success'\" d=\"m14 24.5 7 7 13-14\"></path>\n <path *ngSwitchCase=\"'error'\" d=\"m16 16 16 16m0-16L16 32\"></path>\n <g *ngSwitchCase=\"'warning'\">\n <path d=\"M24 13v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"34.5\" r=\"2.6\"></circle>\n </g>\n <g *ngSwitchDefault>\n <path d=\"M24 21v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"13.5\" r=\"2.6\"></circle>\n </g>\n </svg>\n </ng-template>\n </span>\n <ng-template #code>\n <svg class=\"wu-result-art\" viewBox=\"0 0 240 110\" aria-hidden=\"true\" focusable=\"false\" [ngSwitch]=\"status\">\n <text class=\"wu-rs-digit\" x=\"52\" y=\"92\" text-anchor=\"middle\">{{ status === '500' ? '5' : '4' }}</text>\n <circle class=\"wu-rs-soft\" cx=\"120\" cy=\"60\" r=\"38\"></circle>\n <g *ngSwitchCase=\"'403'\">\n <path class=\"wu-rs-shackle\" d=\"M108 56v-8a12 12 0 0 1 24 0v8\"></path>\n <rect class=\"wu-rs-accent-fill\" x=\"102\" y=\"55\" width=\"36\" height=\"28\" rx=\"6\"></rect>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"66\" r=\"3.5\"></circle>\n <path class=\"wu-rs-paper-line\" d=\"M120 68v7\"></path>\n </g>\n <g *ngSwitchCase=\"'500'\">\n <path class=\"wu-rs-accent-fill\" d=\"M126 30 106 63h13l-6 27 22-36h-13z\"></path>\n </g>\n <g *ngSwitchDefault>\n <circle class=\"wu-rs-ring\" cx=\"120\" cy=\"60\" r=\"24\"></circle>\n <path class=\"wu-rs-accent-fill\" d=\"m132 48-8 16-16 8 8-16z\"></path>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"60\" r=\"2.5\"></circle>\n </g>\n <text class=\"wu-rs-digit\" x=\"188\" y=\"92\" text-anchor=\"middle\">{{ status === '403' ? '3' : status === '500' ? '0' : '4' }}</text>\n </svg>\n </ng-template>\n </ng-container>\n <p *ngIf=\"titleText\" class=\"wu-result-title\">{{ titleText }}</p>\n <p *ngIf=\"subtitleText\" class=\"wu-result-subtitle\">{{ subtitleText }}</p>\n <div class=\"wu-result-extra\"><ng-content select=\"[wuResultExtra]\"></ng-content></div>\n <div class=\"wu-result-content\"><ng-content></ng-content></div>\n</div>\n", styles: ["@layer wiraui.components{wu-result{display:block}.wu-result{display:flex;flex-direction:column;align-items:center;gap:var(--wu-result-gap);padding:var(--wu-result-padding);text-align:center;font-family:var(--wu-font-family)}.wu-result-mark{display:inline-flex;align-items:center;justify-content:center;width:var(--wu-result-icon-box);height:var(--wu-result-icon-box);margin-bottom:.75rem;border-radius:50%;color:var(--wu-info-color);background:var(--wu-info-bg);font-size:calc(var(--wu-result-icon-box) * .45);line-height:1}.wu-result[data-status=success] .wu-result-mark{color:var(--wu-success-color);background:var(--wu-success-bg)}.wu-result[data-status=error] .wu-result-mark{color:var(--wu-danger-color);background:var(--wu-danger-bg)}.wu-result[data-status=warning] .wu-result-mark{color:var(--wu-warn-color);background:var(--wu-warn-bg)}.wu-result-mark svg{width:60%;height:60%;fill:none;stroke:currentColor;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:round}.wu-result-mark .wu-result-dot{fill:currentColor;stroke:none}.wu-result-art{display:block;width:var(--wu-result-art-width);max-width:100%;height:auto;margin-bottom:.5rem;overflow:visible}.wu-rs-digit{fill:var(--wu-result-code-color);font-family:var(--wu-font-family);font-size:88px;font-weight:700}.wu-rs-soft{fill:var(--wu-result-art-soft)}.wu-rs-ring{fill:var(--wu-result-art-paper);stroke:var(--wu-result-art-accent);stroke-width:4}.wu-rs-shackle{fill:none;stroke:var(--wu-result-art-accent);stroke-width:5;stroke-linecap:round}.wu-rs-accent-fill{fill:var(--wu-result-art-accent);stroke:var(--wu-result-art-accent);stroke-width:2;stroke-linejoin:round}.wu-rs-paper-fill{fill:var(--wu-result-art-paper)}.wu-rs-paper-line{stroke:var(--wu-result-art-paper);stroke-width:3;stroke-linecap:round}.wu-result-title{margin:0;color:var(--wu-result-title-color);font-size:var(--wu-result-title-size);font-weight:var(--wu-result-title-weight);line-height:var(--wu-line-height)}.wu-result-subtitle{margin:0;max-width:36rem;color:var(--wu-result-description-color);line-height:var(--wu-line-height)}.wu-result-extra{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--wu-result-actions-gap);margin-top:1rem}.wu-result-content{box-sizing:border-box;width:100%;max-width:40rem;margin-top:1rem;padding:var(--wu-result-content-padding);border-radius:var(--wu-result-content-radius);background:var(--wu-result-content-bg);text-align:start}.wu-result-extra:empty,.wu-result-content:empty{display:none}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: WuResult, isStandalone: true, selector: "wu-result", inputs: { status: "status", title: "title", subtitle: "subtitle", icon: "icon", showIcon: "showIcon", styleClass: "styleClass", style: "style" }, host: { properties: { "attr.title": "null" }, classAttribute: "wu-result-host" }, ngImport: i0, template: "<div class=\"wu-result\" [class]=\"styleClass || ''\" [style]=\"rootStyle\" [attr.data-status]=\"status\">\n <ng-container *ngIf=\"shown\">\n <span *ngIf=\"!isCode; else code\" class=\"wu-result-mark\" aria-hidden=\"true\">\n <i *ngIf=\"icon; else mark\" [ngClass]=\"icon\"></i>\n <ng-template #mark>\n <svg viewBox=\"0 0 48 48\" focusable=\"false\" [ngSwitch]=\"status\">\n <path *ngSwitchCase=\"'success'\" d=\"m14 24.5 7 7 13-14\"></path>\n <path *ngSwitchCase=\"'error'\" d=\"m16 16 16 16m0-16L16 32\"></path>\n <g *ngSwitchCase=\"'warning'\">\n <path d=\"M24 13v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"34.5\" r=\"2.6\"></circle>\n </g>\n <g *ngSwitchDefault>\n <path d=\"M24 21v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"13.5\" r=\"2.6\"></circle>\n </g>\n </svg>\n </ng-template>\n </span>\n <ng-template #code>\n <svg class=\"wu-result-art\" viewBox=\"0 0 240 110\" aria-hidden=\"true\" focusable=\"false\" [ngSwitch]=\"status\">\n <text class=\"wu-rs-digit\" x=\"52\" y=\"92\" text-anchor=\"middle\">{{ status === '500' ? '5' : '4' }}</text>\n <circle class=\"wu-rs-soft\" cx=\"120\" cy=\"60\" r=\"38\"></circle>\n <g *ngSwitchCase=\"'403'\">\n <path class=\"wu-rs-shackle\" d=\"M108 56v-8a12 12 0 0 1 24 0v8\"></path>\n <rect class=\"wu-rs-accent-fill\" x=\"102\" y=\"55\" width=\"36\" height=\"28\" rx=\"6\"></rect>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"66\" r=\"3.5\"></circle>\n <path class=\"wu-rs-paper-line\" d=\"M120 68v7\"></path>\n </g>\n <g *ngSwitchCase=\"'500'\">\n <path class=\"wu-rs-accent-fill\" d=\"M126 30 106 63h13l-6 27 22-36h-13z\"></path>\n </g>\n <g *ngSwitchDefault>\n <circle class=\"wu-rs-ring\" cx=\"120\" cy=\"60\" r=\"24\"></circle>\n <path class=\"wu-rs-accent-fill\" d=\"m132 48-8 16-16 8 8-16z\"></path>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"60\" r=\"2.5\"></circle>\n </g>\n <text class=\"wu-rs-digit\" x=\"188\" y=\"92\" text-anchor=\"middle\">{{ status === '403' ? '3' : status === '500' ? '0' : '4' }}</text>\n </svg>\n </ng-template>\n </ng-container>\n <p *ngIf=\"titleText\" class=\"wu-result-title\">{{ titleText }}</p>\n <p *ngIf=\"subtitleText\" class=\"wu-result-subtitle\">{{ subtitleText }}</p>\n <div class=\"wu-result-extra\"><ng-content select=\"[wuResultExtra]\"></ng-content></div>\n <div class=\"wu-result-content\"><ng-content></ng-content></div>\n</div>\n", styles: ["@layer wiraui.components{wu-result{display:block}.wu-result{display:flex;flex-direction:column;align-items:center;gap:var(--wu-result-gap);padding:var(--wu-result-padding);text-align:center;font-family:var(--wu-font-family)}.wu-result-mark{display:inline-flex;align-items:center;justify-content:center;width:var(--wu-result-icon-box);height:var(--wu-result-icon-box);margin-bottom:.75rem;border-radius:50%;color:var(--wu-info-color);background:var(--wu-info-bg);font-size:calc(var(--wu-result-icon-box) * .45);line-height:1}.wu-result[data-status=success] .wu-result-mark{color:var(--wu-success-color);background:var(--wu-success-bg)}.wu-result[data-status=error] .wu-result-mark{color:var(--wu-danger-color);background:var(--wu-danger-bg)}.wu-result[data-status=warning] .wu-result-mark{color:var(--wu-warn-color);background:var(--wu-warn-bg)}.wu-result-mark svg{width:60%;height:60%;fill:none;stroke:currentColor;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:round}.wu-result-mark .wu-result-dot{fill:currentColor;stroke:none}.wu-result-art{display:block;width:var(--wu-result-art-width);max-width:100%;height:auto;margin-bottom:.5rem;overflow:visible}.wu-rs-digit{fill:var(--wu-result-code-color);font-family:var(--wu-font-family);font-size:88px;font-weight:700}.wu-rs-soft{fill:var(--wu-result-art-soft)}.wu-rs-ring{fill:var(--wu-result-art-paper);stroke:var(--wu-result-art-accent);stroke-width:4}.wu-rs-shackle{fill:none;stroke:var(--wu-result-art-accent);stroke-width:5;stroke-linecap:round}.wu-rs-accent-fill{fill:var(--wu-result-art-accent);stroke:var(--wu-result-art-accent);stroke-width:2;stroke-linejoin:round}.wu-rs-paper-fill{fill:var(--wu-result-art-paper)}.wu-rs-paper-line{stroke:var(--wu-result-art-paper);stroke-width:3;stroke-linecap:round}.wu-result-title{font-family:var(--wu-heading-font-family);margin:0;color:var(--wu-result-title-color);font-size:var(--wu-result-title-size);font-weight:var(--wu-result-title-weight);line-height:var(--wu-line-height)}.wu-result-subtitle{margin:0;max-width:36rem;color:var(--wu-result-description-color);line-height:var(--wu-line-height)}.wu-result-extra{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--wu-result-actions-gap);margin-top:1rem}.wu-result-content{box-sizing:border-box;width:100%;max-width:40rem;margin-top:1rem;padding:var(--wu-result-content-padding);border-radius:var(--wu-result-content-radius);background:var(--wu-result-content-bg);text-align:start}.wu-result-extra:empty,.wu-result-content:empty{display:none}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
54
54
|
}
|
|
55
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WuResult, decorators: [{
|
|
56
56
|
type: Component,
|
|
57
|
-
args: [{ selector: 'wu-result', standalone: true, imports: [NgClass, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'wu-result-host', '[attr.title]': 'null' }, template: "<div class=\"wu-result\" [class]=\"styleClass || ''\" [style]=\"rootStyle\" [attr.data-status]=\"status\">\n <ng-container *ngIf=\"shown\">\n <span *ngIf=\"!isCode; else code\" class=\"wu-result-mark\" aria-hidden=\"true\">\n <i *ngIf=\"icon; else mark\" [ngClass]=\"icon\"></i>\n <ng-template #mark>\n <svg viewBox=\"0 0 48 48\" focusable=\"false\" [ngSwitch]=\"status\">\n <path *ngSwitchCase=\"'success'\" d=\"m14 24.5 7 7 13-14\"></path>\n <path *ngSwitchCase=\"'error'\" d=\"m16 16 16 16m0-16L16 32\"></path>\n <g *ngSwitchCase=\"'warning'\">\n <path d=\"M24 13v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"34.5\" r=\"2.6\"></circle>\n </g>\n <g *ngSwitchDefault>\n <path d=\"M24 21v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"13.5\" r=\"2.6\"></circle>\n </g>\n </svg>\n </ng-template>\n </span>\n <ng-template #code>\n <svg class=\"wu-result-art\" viewBox=\"0 0 240 110\" aria-hidden=\"true\" focusable=\"false\" [ngSwitch]=\"status\">\n <text class=\"wu-rs-digit\" x=\"52\" y=\"92\" text-anchor=\"middle\">{{ status === '500' ? '5' : '4' }}</text>\n <circle class=\"wu-rs-soft\" cx=\"120\" cy=\"60\" r=\"38\"></circle>\n <g *ngSwitchCase=\"'403'\">\n <path class=\"wu-rs-shackle\" d=\"M108 56v-8a12 12 0 0 1 24 0v8\"></path>\n <rect class=\"wu-rs-accent-fill\" x=\"102\" y=\"55\" width=\"36\" height=\"28\" rx=\"6\"></rect>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"66\" r=\"3.5\"></circle>\n <path class=\"wu-rs-paper-line\" d=\"M120 68v7\"></path>\n </g>\n <g *ngSwitchCase=\"'500'\">\n <path class=\"wu-rs-accent-fill\" d=\"M126 30 106 63h13l-6 27 22-36h-13z\"></path>\n </g>\n <g *ngSwitchDefault>\n <circle class=\"wu-rs-ring\" cx=\"120\" cy=\"60\" r=\"24\"></circle>\n <path class=\"wu-rs-accent-fill\" d=\"m132 48-8 16-16 8 8-16z\"></path>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"60\" r=\"2.5\"></circle>\n </g>\n <text class=\"wu-rs-digit\" x=\"188\" y=\"92\" text-anchor=\"middle\">{{ status === '403' ? '3' : status === '500' ? '0' : '4' }}</text>\n </svg>\n </ng-template>\n </ng-container>\n <p *ngIf=\"titleText\" class=\"wu-result-title\">{{ titleText }}</p>\n <p *ngIf=\"subtitleText\" class=\"wu-result-subtitle\">{{ subtitleText }}</p>\n <div class=\"wu-result-extra\"><ng-content select=\"[wuResultExtra]\"></ng-content></div>\n <div class=\"wu-result-content\"><ng-content></ng-content></div>\n</div>\n", styles: ["@layer wiraui.components{wu-result{display:block}.wu-result{display:flex;flex-direction:column;align-items:center;gap:var(--wu-result-gap);padding:var(--wu-result-padding);text-align:center;font-family:var(--wu-font-family)}.wu-result-mark{display:inline-flex;align-items:center;justify-content:center;width:var(--wu-result-icon-box);height:var(--wu-result-icon-box);margin-bottom:.75rem;border-radius:50%;color:var(--wu-info-color);background:var(--wu-info-bg);font-size:calc(var(--wu-result-icon-box) * .45);line-height:1}.wu-result[data-status=success] .wu-result-mark{color:var(--wu-success-color);background:var(--wu-success-bg)}.wu-result[data-status=error] .wu-result-mark{color:var(--wu-danger-color);background:var(--wu-danger-bg)}.wu-result[data-status=warning] .wu-result-mark{color:var(--wu-warn-color);background:var(--wu-warn-bg)}.wu-result-mark svg{width:60%;height:60%;fill:none;stroke:currentColor;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:round}.wu-result-mark .wu-result-dot{fill:currentColor;stroke:none}.wu-result-art{display:block;width:var(--wu-result-art-width);max-width:100%;height:auto;margin-bottom:.5rem;overflow:visible}.wu-rs-digit{fill:var(--wu-result-code-color);font-family:var(--wu-font-family);font-size:88px;font-weight:700}.wu-rs-soft{fill:var(--wu-result-art-soft)}.wu-rs-ring{fill:var(--wu-result-art-paper);stroke:var(--wu-result-art-accent);stroke-width:4}.wu-rs-shackle{fill:none;stroke:var(--wu-result-art-accent);stroke-width:5;stroke-linecap:round}.wu-rs-accent-fill{fill:var(--wu-result-art-accent);stroke:var(--wu-result-art-accent);stroke-width:2;stroke-linejoin:round}.wu-rs-paper-fill{fill:var(--wu-result-art-paper)}.wu-rs-paper-line{stroke:var(--wu-result-art-paper);stroke-width:3;stroke-linecap:round}.wu-result-title{margin:0;color:var(--wu-result-title-color);font-size:var(--wu-result-title-size);font-weight:var(--wu-result-title-weight);line-height:var(--wu-line-height)}.wu-result-subtitle{margin:0;max-width:36rem;color:var(--wu-result-description-color);line-height:var(--wu-line-height)}.wu-result-extra{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--wu-result-actions-gap);margin-top:1rem}.wu-result-content{box-sizing:border-box;width:100%;max-width:40rem;margin-top:1rem;padding:var(--wu-result-content-padding);border-radius:var(--wu-result-content-radius);background:var(--wu-result-content-bg);text-align:start}.wu-result-extra:empty,.wu-result-content:empty{display:none}}\n"] }]
|
|
57
|
+
args: [{ selector: 'wu-result', standalone: true, imports: [NgClass, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'wu-result-host', '[attr.title]': 'null' }, template: "<div class=\"wu-result\" [class]=\"styleClass || ''\" [style]=\"rootStyle\" [attr.data-status]=\"status\">\n <ng-container *ngIf=\"shown\">\n <span *ngIf=\"!isCode; else code\" class=\"wu-result-mark\" aria-hidden=\"true\">\n <i *ngIf=\"icon; else mark\" [ngClass]=\"icon\"></i>\n <ng-template #mark>\n <svg viewBox=\"0 0 48 48\" focusable=\"false\" [ngSwitch]=\"status\">\n <path *ngSwitchCase=\"'success'\" d=\"m14 24.5 7 7 13-14\"></path>\n <path *ngSwitchCase=\"'error'\" d=\"m16 16 16 16m0-16L16 32\"></path>\n <g *ngSwitchCase=\"'warning'\">\n <path d=\"M24 13v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"34.5\" r=\"2.6\"></circle>\n </g>\n <g *ngSwitchDefault>\n <path d=\"M24 21v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"13.5\" r=\"2.6\"></circle>\n </g>\n </svg>\n </ng-template>\n </span>\n <ng-template #code>\n <svg class=\"wu-result-art\" viewBox=\"0 0 240 110\" aria-hidden=\"true\" focusable=\"false\" [ngSwitch]=\"status\">\n <text class=\"wu-rs-digit\" x=\"52\" y=\"92\" text-anchor=\"middle\">{{ status === '500' ? '5' : '4' }}</text>\n <circle class=\"wu-rs-soft\" cx=\"120\" cy=\"60\" r=\"38\"></circle>\n <g *ngSwitchCase=\"'403'\">\n <path class=\"wu-rs-shackle\" d=\"M108 56v-8a12 12 0 0 1 24 0v8\"></path>\n <rect class=\"wu-rs-accent-fill\" x=\"102\" y=\"55\" width=\"36\" height=\"28\" rx=\"6\"></rect>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"66\" r=\"3.5\"></circle>\n <path class=\"wu-rs-paper-line\" d=\"M120 68v7\"></path>\n </g>\n <g *ngSwitchCase=\"'500'\">\n <path class=\"wu-rs-accent-fill\" d=\"M126 30 106 63h13l-6 27 22-36h-13z\"></path>\n </g>\n <g *ngSwitchDefault>\n <circle class=\"wu-rs-ring\" cx=\"120\" cy=\"60\" r=\"24\"></circle>\n <path class=\"wu-rs-accent-fill\" d=\"m132 48-8 16-16 8 8-16z\"></path>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"60\" r=\"2.5\"></circle>\n </g>\n <text class=\"wu-rs-digit\" x=\"188\" y=\"92\" text-anchor=\"middle\">{{ status === '403' ? '3' : status === '500' ? '0' : '4' }}</text>\n </svg>\n </ng-template>\n </ng-container>\n <p *ngIf=\"titleText\" class=\"wu-result-title\">{{ titleText }}</p>\n <p *ngIf=\"subtitleText\" class=\"wu-result-subtitle\">{{ subtitleText }}</p>\n <div class=\"wu-result-extra\"><ng-content select=\"[wuResultExtra]\"></ng-content></div>\n <div class=\"wu-result-content\"><ng-content></ng-content></div>\n</div>\n", styles: ["@layer wiraui.components{wu-result{display:block}.wu-result{display:flex;flex-direction:column;align-items:center;gap:var(--wu-result-gap);padding:var(--wu-result-padding);text-align:center;font-family:var(--wu-font-family)}.wu-result-mark{display:inline-flex;align-items:center;justify-content:center;width:var(--wu-result-icon-box);height:var(--wu-result-icon-box);margin-bottom:.75rem;border-radius:50%;color:var(--wu-info-color);background:var(--wu-info-bg);font-size:calc(var(--wu-result-icon-box) * .45);line-height:1}.wu-result[data-status=success] .wu-result-mark{color:var(--wu-success-color);background:var(--wu-success-bg)}.wu-result[data-status=error] .wu-result-mark{color:var(--wu-danger-color);background:var(--wu-danger-bg)}.wu-result[data-status=warning] .wu-result-mark{color:var(--wu-warn-color);background:var(--wu-warn-bg)}.wu-result-mark svg{width:60%;height:60%;fill:none;stroke:currentColor;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:round}.wu-result-mark .wu-result-dot{fill:currentColor;stroke:none}.wu-result-art{display:block;width:var(--wu-result-art-width);max-width:100%;height:auto;margin-bottom:.5rem;overflow:visible}.wu-rs-digit{fill:var(--wu-result-code-color);font-family:var(--wu-font-family);font-size:88px;font-weight:700}.wu-rs-soft{fill:var(--wu-result-art-soft)}.wu-rs-ring{fill:var(--wu-result-art-paper);stroke:var(--wu-result-art-accent);stroke-width:4}.wu-rs-shackle{fill:none;stroke:var(--wu-result-art-accent);stroke-width:5;stroke-linecap:round}.wu-rs-accent-fill{fill:var(--wu-result-art-accent);stroke:var(--wu-result-art-accent);stroke-width:2;stroke-linejoin:round}.wu-rs-paper-fill{fill:var(--wu-result-art-paper)}.wu-rs-paper-line{stroke:var(--wu-result-art-paper);stroke-width:3;stroke-linecap:round}.wu-result-title{font-family:var(--wu-heading-font-family);margin:0;color:var(--wu-result-title-color);font-size:var(--wu-result-title-size);font-weight:var(--wu-result-title-weight);line-height:var(--wu-line-height)}.wu-result-subtitle{margin:0;max-width:36rem;color:var(--wu-result-description-color);line-height:var(--wu-line-height)}.wu-result-extra{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--wu-result-actions-gap);margin-top:1rem}.wu-result-content{box-sizing:border-box;width:100%;max-width:40rem;margin-top:1rem;padding:var(--wu-result-content-padding);border-radius:var(--wu-result-content-radius);background:var(--wu-result-content-bg);text-align:start}.wu-result-extra:empty,.wu-result-content:empty{display:none}}\n"] }]
|
|
58
58
|
}], ctorParameters: () => [], propDecorators: { status: [{
|
|
59
59
|
type: Input
|
|
60
60
|
}], title: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirabyte-ui-result.mjs","sources":["../../lib/result/result.component.ts","../../lib/result/result.component.html","../../lib/result/result.module.ts","../../lib/result/wirabyte-ui-result.ts"],"sourcesContent":["import { NgClass, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { ɵassertSupportedAngular, ɵrefreshOnTranslation, ɵWU_SKIP_VERSION_CHECK, WuConfig } from '@wirabyte/ui/config';\nimport { WuResultStatus } from '@wirabyte/ui/core';\n\nexport type { WuResultStatus };\n\nconst STATUSES: readonly WuResultStatus[] = ['success', 'error', 'info', 'warning', '403', '404', '500'];\n\n/**\n * The page or panel after a task ends, or instead of a page that cannot be shown:\n * `<wu-result status=\"success\" title=\"ส่งใบสมัครแล้ว\"><wu-button wuResultExtra label=\"กลับหน้าแรก\"></wu-button></wu-result>`.\n * `success`, `error`, `info` and `warning` draw a large status mark in the theme's colours; `403`, `404` and `500` draw\n * the code with a picture in place of its 0. Title and line come from the locale unless given. Elements marked\n * `wuResultExtra` sit in a row of actions; anything else inside the tag goes in a details box under them.\n */\n@Component({\n selector: 'wu-result',\n standalone: true,\n imports: [NgClass, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault],\n templateUrl: './result.component.html',\n styleUrls: ['./result.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n // `title` is an input here: keep it off the host so the whole block gets no browser tooltip.\n host: { class: 'wu-result-host', '[attr.title]': 'null' },\n})\nexport class WuResult implements OnDestroy {\n /** Default `'info'`. Numbers work too: `[status]=\"404\"`. */\n @Input() set status(v: WuResultStatus | number | string | null | undefined) {\n const s = String(v ?? '') as WuResultStatus;\n this._status = STATUSES.includes(s) ? s : 'info';\n }\n get status(): WuResultStatus {\n return this._status;\n }\n /** Default: the locale's title for `status`; `''` shows none. */\n @Input() title?: string | null;\n /** The line under the title. Default: the locale's line for `status`; `''` shows none. */\n @Input() subtitle?: string | null;\n /** An icon class (`'wi wi-rocket'`) in the status circle instead of the drawn mark. */\n @Input() icon?: string | null;\n /** `false` leaves out the mark or picture. */\n @Input() showIcon: boolean | string | null | undefined = true;\n @Input() styleClass?: string | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() style?: Record<string, any> | string | null;\n\n private _status: WuResultStatus = 'info';\n private readonly config = inject(WuConfig);\n private readonly i18n = ɵrefreshOnTranslation();\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n ngOnDestroy(): void {\n this.i18n.unsubscribe();\n }\n\n // ---------- what the template reads ----------\n\n get titleText(): string {\n return this.title ?? this.config.translation.result?.[this._status]?.title ?? '';\n }\n get subtitleText(): string {\n return this.subtitle ?? this.config.translation.result?.[this._status]?.description ?? '';\n }\n /** 403, 404 and 500 draw their code; the others a status mark. */\n get isCode(): boolean {\n return this._status === '403' || this._status === '404' || this._status === '500';\n }\n get shown(): boolean {\n return this.showIcon !== false && this.showIcon !== 'false';\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get rootStyle(): Record<string, any> | null {\n return this.style && typeof this.style === 'object' ? this.style : null;\n }\n}\n","<div class=\"wu-result\" [class]=\"styleClass || ''\" [style]=\"rootStyle\" [attr.data-status]=\"status\">\n <ng-container *ngIf=\"shown\">\n <span *ngIf=\"!isCode; else code\" class=\"wu-result-mark\" aria-hidden=\"true\">\n <i *ngIf=\"icon; else mark\" [ngClass]=\"icon\"></i>\n <ng-template #mark>\n <svg viewBox=\"0 0 48 48\" focusable=\"false\" [ngSwitch]=\"status\">\n <path *ngSwitchCase=\"'success'\" d=\"m14 24.5 7 7 13-14\"></path>\n <path *ngSwitchCase=\"'error'\" d=\"m16 16 16 16m0-16L16 32\"></path>\n <g *ngSwitchCase=\"'warning'\">\n <path d=\"M24 13v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"34.5\" r=\"2.6\"></circle>\n </g>\n <g *ngSwitchDefault>\n <path d=\"M24 21v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"13.5\" r=\"2.6\"></circle>\n </g>\n </svg>\n </ng-template>\n </span>\n <ng-template #code>\n <svg class=\"wu-result-art\" viewBox=\"0 0 240 110\" aria-hidden=\"true\" focusable=\"false\" [ngSwitch]=\"status\">\n <text class=\"wu-rs-digit\" x=\"52\" y=\"92\" text-anchor=\"middle\">{{ status === '500' ? '5' : '4' }}</text>\n <circle class=\"wu-rs-soft\" cx=\"120\" cy=\"60\" r=\"38\"></circle>\n <g *ngSwitchCase=\"'403'\">\n <path class=\"wu-rs-shackle\" d=\"M108 56v-8a12 12 0 0 1 24 0v8\"></path>\n <rect class=\"wu-rs-accent-fill\" x=\"102\" y=\"55\" width=\"36\" height=\"28\" rx=\"6\"></rect>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"66\" r=\"3.5\"></circle>\n <path class=\"wu-rs-paper-line\" d=\"M120 68v7\"></path>\n </g>\n <g *ngSwitchCase=\"'500'\">\n <path class=\"wu-rs-accent-fill\" d=\"M126 30 106 63h13l-6 27 22-36h-13z\"></path>\n </g>\n <g *ngSwitchDefault>\n <circle class=\"wu-rs-ring\" cx=\"120\" cy=\"60\" r=\"24\"></circle>\n <path class=\"wu-rs-accent-fill\" d=\"m132 48-8 16-16 8 8-16z\"></path>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"60\" r=\"2.5\"></circle>\n </g>\n <text class=\"wu-rs-digit\" x=\"188\" y=\"92\" text-anchor=\"middle\">{{ status === '403' ? '3' : status === '500' ? '0' : '4' }}</text>\n </svg>\n </ng-template>\n </ng-container>\n <p *ngIf=\"titleText\" class=\"wu-result-title\">{{ titleText }}</p>\n <p *ngIf=\"subtitleText\" class=\"wu-result-subtitle\">{{ subtitleText }}</p>\n <div class=\"wu-result-extra\"><ng-content select=\"[wuResultExtra]\"></ng-content></div>\n <div class=\"wu-result-content\"><ng-content></ng-content></div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { WuResult } from './result.component';\n\n/** For NgModule apps. Standalone apps can import `WuResult` directly. */\n@NgModule({\n imports: [WuResult],\n exports: [WuResult],\n})\nexport class WuResultModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵrefreshOnTranslation","ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK"],"mappings":";;;;;AAOA,MAAM,QAAQ,GAA8B,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AAExG;;;;;;AAMG;MAYU,QAAQ,CAAA;;IAEnB,IAAa,MAAM,CAAC,CAAsD,EAAA;QACxE,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAmB;AAC3C,QAAA,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM;IAClD;AACA,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;IACrB;AAiBA,IAAA,WAAA,GAAA;;QATS,IAAA,CAAA,QAAQ,GAAwC,IAAI;QAKrD,IAAA,CAAA,OAAO,GAAmB,MAAM;AACvB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;QACzB,IAAA,CAAA,IAAI,GAAGA,qBAAqB,EAAE;AAG7C,QAAAC,uBAAuB,CAAC,MAAM,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pB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EAEzC,EAAE,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,wnFAAA,EAAA,MAAA,EAAA,CAAA,y6EAAA,CAAA,EAAA;wDAI5C,MAAM,EAAA,CAAA;sBAAlB;gBAQQ,KAAK,EAAA,CAAA;sBAAb;gBAEQ,QAAQ,EAAA,CAAA;sBAAhB;gBAEQ,IAAI,EAAA,CAAA;sBAAZ;gBAEQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBAEQ,KAAK,EAAA,CAAA;sBAAb;;;AE3CH;MAKa,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAd,cAAc,EAAA,OAAA,EAAA,CAHf,QAAQ,CAAA,EAAA,OAAA,EAAA,CACR,QAAQ,CAAA,EAAA,CAAA,CAAA;gHAEP,cAAc,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,QAAQ,CAAC;oBACnB,OAAO,EAAE,CAAC,QAAQ,CAAC;AACpB,iBAAA;;;ACPD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"wirabyte-ui-result.mjs","sources":["../../lib/result/result.component.ts","../../lib/result/result.component.html","../../lib/result/result.module.ts","../../lib/result/wirabyte-ui-result.ts"],"sourcesContent":["import { NgClass, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { ɵassertSupportedAngular, ɵrefreshOnTranslation, ɵWU_SKIP_VERSION_CHECK, WuConfig } from '@wirabyte/ui/config';\nimport { WuResultStatus } from '@wirabyte/ui/core';\n\nexport type { WuResultStatus };\n\nconst STATUSES: readonly WuResultStatus[] = ['success', 'error', 'info', 'warning', '403', '404', '500'];\n\n/**\n * The page or panel after a task ends, or instead of a page that cannot be shown:\n * `<wu-result status=\"success\" title=\"ส่งใบสมัครแล้ว\"><wu-button wuResultExtra label=\"กลับหน้าแรก\"></wu-button></wu-result>`.\n * `success`, `error`, `info` and `warning` draw a large status mark in the theme's colours; `403`, `404` and `500` draw\n * the code with a picture in place of its 0. Title and line come from the locale unless given. Elements marked\n * `wuResultExtra` sit in a row of actions; anything else inside the tag goes in a details box under them.\n */\n@Component({\n selector: 'wu-result',\n standalone: true,\n imports: [NgClass, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault],\n templateUrl: './result.component.html',\n styleUrls: ['./result.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n // `title` is an input here: keep it off the host so the whole block gets no browser tooltip.\n host: { class: 'wu-result-host', '[attr.title]': 'null' },\n})\nexport class WuResult implements OnDestroy {\n /** Default `'info'`. Numbers work too: `[status]=\"404\"`. */\n @Input() set status(v: WuResultStatus | number | string | null | undefined) {\n const s = String(v ?? '') as WuResultStatus;\n this._status = STATUSES.includes(s) ? s : 'info';\n }\n get status(): WuResultStatus {\n return this._status;\n }\n /** Default: the locale's title for `status`; `''` shows none. */\n @Input() title?: string | null;\n /** The line under the title. Default: the locale's line for `status`; `''` shows none. */\n @Input() subtitle?: string | null;\n /** An icon class (`'wi wi-rocket'`) in the status circle instead of the drawn mark. */\n @Input() icon?: string | null;\n /** `false` leaves out the mark or picture. */\n @Input() showIcon: boolean | string | null | undefined = true;\n @Input() styleClass?: string | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() style?: Record<string, any> | string | null;\n\n private _status: WuResultStatus = 'info';\n private readonly config = inject(WuConfig);\n private readonly i18n = ɵrefreshOnTranslation();\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n ngOnDestroy(): void {\n this.i18n.unsubscribe();\n }\n\n // ---------- what the template reads ----------\n\n get titleText(): string {\n return this.title ?? this.config.translation.result?.[this._status]?.title ?? '';\n }\n get subtitleText(): string {\n return this.subtitle ?? this.config.translation.result?.[this._status]?.description ?? '';\n }\n /** 403, 404 and 500 draw their code; the others a status mark. */\n get isCode(): boolean {\n return this._status === '403' || this._status === '404' || this._status === '500';\n }\n get shown(): boolean {\n return this.showIcon !== false && this.showIcon !== 'false';\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get rootStyle(): Record<string, any> | null {\n return this.style && typeof this.style === 'object' ? this.style : null;\n }\n}\n","<div class=\"wu-result\" [class]=\"styleClass || ''\" [style]=\"rootStyle\" [attr.data-status]=\"status\">\n <ng-container *ngIf=\"shown\">\n <span *ngIf=\"!isCode; else code\" class=\"wu-result-mark\" aria-hidden=\"true\">\n <i *ngIf=\"icon; else mark\" [ngClass]=\"icon\"></i>\n <ng-template #mark>\n <svg viewBox=\"0 0 48 48\" focusable=\"false\" [ngSwitch]=\"status\">\n <path *ngSwitchCase=\"'success'\" d=\"m14 24.5 7 7 13-14\"></path>\n <path *ngSwitchCase=\"'error'\" d=\"m16 16 16 16m0-16L16 32\"></path>\n <g *ngSwitchCase=\"'warning'\">\n <path d=\"M24 13v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"34.5\" r=\"2.6\"></circle>\n </g>\n <g *ngSwitchDefault>\n <path d=\"M24 21v14\"></path>\n <circle class=\"wu-result-dot\" cx=\"24\" cy=\"13.5\" r=\"2.6\"></circle>\n </g>\n </svg>\n </ng-template>\n </span>\n <ng-template #code>\n <svg class=\"wu-result-art\" viewBox=\"0 0 240 110\" aria-hidden=\"true\" focusable=\"false\" [ngSwitch]=\"status\">\n <text class=\"wu-rs-digit\" x=\"52\" y=\"92\" text-anchor=\"middle\">{{ status === '500' ? '5' : '4' }}</text>\n <circle class=\"wu-rs-soft\" cx=\"120\" cy=\"60\" r=\"38\"></circle>\n <g *ngSwitchCase=\"'403'\">\n <path class=\"wu-rs-shackle\" d=\"M108 56v-8a12 12 0 0 1 24 0v8\"></path>\n <rect class=\"wu-rs-accent-fill\" x=\"102\" y=\"55\" width=\"36\" height=\"28\" rx=\"6\"></rect>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"66\" r=\"3.5\"></circle>\n <path class=\"wu-rs-paper-line\" d=\"M120 68v7\"></path>\n </g>\n <g *ngSwitchCase=\"'500'\">\n <path class=\"wu-rs-accent-fill\" d=\"M126 30 106 63h13l-6 27 22-36h-13z\"></path>\n </g>\n <g *ngSwitchDefault>\n <circle class=\"wu-rs-ring\" cx=\"120\" cy=\"60\" r=\"24\"></circle>\n <path class=\"wu-rs-accent-fill\" d=\"m132 48-8 16-16 8 8-16z\"></path>\n <circle class=\"wu-rs-paper-fill\" cx=\"120\" cy=\"60\" r=\"2.5\"></circle>\n </g>\n <text class=\"wu-rs-digit\" x=\"188\" y=\"92\" text-anchor=\"middle\">{{ status === '403' ? '3' : status === '500' ? '0' : '4' }}</text>\n </svg>\n </ng-template>\n </ng-container>\n <p *ngIf=\"titleText\" class=\"wu-result-title\">{{ titleText }}</p>\n <p *ngIf=\"subtitleText\" class=\"wu-result-subtitle\">{{ subtitleText }}</p>\n <div class=\"wu-result-extra\"><ng-content select=\"[wuResultExtra]\"></ng-content></div>\n <div class=\"wu-result-content\"><ng-content></ng-content></div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { WuResult } from './result.component';\n\n/** For NgModule apps. Standalone apps can import `WuResult` directly. */\n@NgModule({\n imports: [WuResult],\n exports: [WuResult],\n})\nexport class WuResultModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵrefreshOnTranslation","ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK"],"mappings":";;;;;AAOA,MAAM,QAAQ,GAA8B,CAAC,SAAS,EAAE,OAAO,EAAE,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