@wirabyte/ui 1.0.0-beta.0 → 1.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/esm2020/accordion/accordion.component.mjs +4 -4
- package/esm2020/alert/alert-dialog.component.mjs +3 -3
- package/esm2020/avatar/avatar.component.mjs +10 -5
- package/esm2020/avatar/avatar.types.mjs +2 -2
- package/esm2020/breadcrumb/breadcrumb.component.mjs +5 -3
- package/esm2020/button/button.component.mjs +3 -3
- package/esm2020/button/button.styles.mjs +2 -2
- package/esm2020/card/card.component.mjs +8 -8
- package/esm2020/chat/chat.component.mjs +370 -0
- package/esm2020/chat/chat.module.mjs +17 -0
- package/esm2020/chat/chat.types.mjs +2 -0
- package/esm2020/chat/public-api.mjs +4 -0
- package/esm2020/chat/wirabyte-ui-chat.mjs +5 -0
- package/esm2020/config/options.mjs +1 -1
- package/esm2020/config/theme.service.mjs +35 -3
- package/esm2020/config/wu-config.service.mjs +9 -1
- package/esm2020/core/catalog.mjs +22 -2
- package/esm2020/core/families.mjs +43 -1
- package/esm2020/core/overrides.mjs +26 -1
- package/esm2020/core/thai/locale.mjs +67 -1
- package/esm2020/datepicker/datepicker.component.mjs +2 -2
- package/esm2020/descriptions/descriptions.component.mjs +112 -0
- package/esm2020/descriptions/descriptions.module.mjs +17 -0
- package/esm2020/descriptions/public-api.mjs +3 -0
- package/esm2020/descriptions/wirabyte-ui-descriptions.mjs +5 -0
- package/esm2020/dialog/dialog.component.mjs +3 -3
- package/esm2020/drawer/drawer.component.mjs +3 -3
- package/esm2020/emptystate/emptystate.component.mjs +3 -3
- package/esm2020/errorpage/errorpage.component.mjs +3 -3
- package/esm2020/fieldset/fieldset.component.mjs +4 -4
- package/esm2020/metergroup/metergroup.component.mjs +29 -5
- package/esm2020/metergroup/metergroup.types.mjs +1 -1
- package/esm2020/navbar/navbar.component.mjs +3 -3
- package/esm2020/panel/panel.component.mjs +6 -6
- package/esm2020/popover/popover.base.mjs +3 -3
- package/esm2020/result/result.component.mjs +3 -3
- package/esm2020/scheduler/public-api.mjs +4 -0
- package/esm2020/scheduler/scheduler.component.mjs +483 -0
- package/esm2020/scheduler/scheduler.module.mjs +17 -0
- package/esm2020/scheduler/scheduler.types.mjs +2 -0
- package/esm2020/scheduler/wirabyte-ui-scheduler.mjs +5 -0
- package/esm2020/selectbutton/selectbutton.component.mjs +23 -5
- package/esm2020/signaturepad/public-api.mjs +3 -0
- package/esm2020/signaturepad/signaturepad.component.mjs +289 -0
- package/esm2020/signaturepad/signaturepad.module.mjs +17 -0
- package/esm2020/signaturepad/wirabyte-ui-signaturepad.mjs +5 -0
- package/esm2020/stat/public-api.mjs +3 -0
- package/esm2020/stat/stat.component.mjs +128 -0
- package/esm2020/stat/stat.module.mjs +17 -0
- package/esm2020/stat/wirabyte-ui-stat.mjs +5 -0
- package/esm2020/table/table.celleditor.mjs +4 -4
- package/esm2020/tabs/tabs.component.mjs +3 -3
- package/esm2020/tag/tag.component.mjs +3 -3
- package/esm2020/textarea/textarea.directive.mjs +19 -1
- package/esm2020/thai/thai.pipes.mjs +2 -2
- package/esm2020/toolbar/toolbar.component.mjs +7 -7
- package/fesm2015/wirabyte-ui-accordion.mjs +3 -3
- package/fesm2015/wirabyte-ui-accordion.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-alert.mjs +2 -2
- package/fesm2015/wirabyte-ui-alert.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-avatar.mjs +11 -5
- package/fesm2015/wirabyte-ui-avatar.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-breadcrumb.mjs +4 -2
- package/fesm2015/wirabyte-ui-breadcrumb.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-button.mjs +3 -3
- package/fesm2015/wirabyte-ui-button.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-card.mjs +7 -7
- package/fesm2015/wirabyte-ui-card.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-chat.mjs +399 -0
- package/fesm2015/wirabyte-ui-chat.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-config.mjs +42 -2
- package/fesm2015/wirabyte-ui-config.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-core.mjs +147 -2
- package/fesm2015/wirabyte-ui-core.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-datepicker.mjs +1 -1
- package/fesm2015/wirabyte-ui-datepicker.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-descriptions.mjs +133 -0
- package/fesm2015/wirabyte-ui-descriptions.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-dialog.mjs +2 -2
- package/fesm2015/wirabyte-ui-dialog.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-drawer.mjs +2 -2
- package/fesm2015/wirabyte-ui-drawer.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-emptystate.mjs +2 -2
- package/fesm2015/wirabyte-ui-emptystate.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-errorpage.mjs +2 -2
- package/fesm2015/wirabyte-ui-errorpage.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-fieldset.mjs +3 -3
- package/fesm2015/wirabyte-ui-fieldset.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-metergroup.mjs +29 -4
- package/fesm2015/wirabyte-ui-metergroup.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-navbar.mjs +2 -2
- package/fesm2015/wirabyte-ui-navbar.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-panel.mjs +5 -5
- package/fesm2015/wirabyte-ui-panel.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-popover.mjs +2 -2
- package/fesm2015/wirabyte-ui-popover.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-result.mjs +2 -2
- package/fesm2015/wirabyte-ui-result.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-scheduler.mjs +514 -0
- package/fesm2015/wirabyte-ui-scheduler.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-selectbutton.mjs +22 -4
- package/fesm2015/wirabyte-ui-selectbutton.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-signaturepad.mjs +313 -0
- package/fesm2015/wirabyte-ui-signaturepad.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-stat.mjs +151 -0
- package/fesm2015/wirabyte-ui-stat.mjs.map +1 -0
- package/fesm2015/wirabyte-ui-table.mjs +3 -3
- package/fesm2015/wirabyte-ui-table.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-tabs.mjs +2 -2
- package/fesm2015/wirabyte-ui-tabs.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-tag.mjs +2 -2
- package/fesm2015/wirabyte-ui-tag.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-textarea.mjs +18 -0
- package/fesm2015/wirabyte-ui-textarea.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-thai.mjs +1 -1
- package/fesm2015/wirabyte-ui-thai.mjs.map +1 -1
- package/fesm2015/wirabyte-ui-toolbar.mjs +6 -6
- package/fesm2015/wirabyte-ui-toolbar.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-accordion.mjs +3 -3
- package/fesm2020/wirabyte-ui-accordion.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-alert.mjs +2 -2
- package/fesm2020/wirabyte-ui-alert.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-avatar.mjs +11 -5
- package/fesm2020/wirabyte-ui-avatar.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-breadcrumb.mjs +4 -2
- package/fesm2020/wirabyte-ui-breadcrumb.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-button.mjs +3 -3
- package/fesm2020/wirabyte-ui-button.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-card.mjs +7 -7
- package/fesm2020/wirabyte-ui-card.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-chat.mjs +391 -0
- package/fesm2020/wirabyte-ui-chat.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-config.mjs +42 -2
- package/fesm2020/wirabyte-ui-config.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-core.mjs +155 -2
- package/fesm2020/wirabyte-ui-core.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-datepicker.mjs +1 -1
- package/fesm2020/wirabyte-ui-datepicker.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-descriptions.mjs +133 -0
- package/fesm2020/wirabyte-ui-descriptions.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-dialog.mjs +2 -2
- package/fesm2020/wirabyte-ui-dialog.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-drawer.mjs +2 -2
- package/fesm2020/wirabyte-ui-drawer.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-emptystate.mjs +2 -2
- package/fesm2020/wirabyte-ui-emptystate.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-errorpage.mjs +2 -2
- package/fesm2020/wirabyte-ui-errorpage.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-fieldset.mjs +3 -3
- package/fesm2020/wirabyte-ui-fieldset.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-metergroup.mjs +28 -4
- package/fesm2020/wirabyte-ui-metergroup.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-navbar.mjs +2 -2
- package/fesm2020/wirabyte-ui-navbar.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-panel.mjs +5 -5
- package/fesm2020/wirabyte-ui-panel.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-popover.mjs +2 -2
- package/fesm2020/wirabyte-ui-popover.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-result.mjs +2 -2
- package/fesm2020/wirabyte-ui-result.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-scheduler.mjs +504 -0
- package/fesm2020/wirabyte-ui-scheduler.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-selectbutton.mjs +22 -4
- package/fesm2020/wirabyte-ui-selectbutton.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-signaturepad.mjs +310 -0
- package/fesm2020/wirabyte-ui-signaturepad.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-stat.mjs +149 -0
- package/fesm2020/wirabyte-ui-stat.mjs.map +1 -0
- package/fesm2020/wirabyte-ui-table.mjs +3 -3
- package/fesm2020/wirabyte-ui-table.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-tabs.mjs +2 -2
- package/fesm2020/wirabyte-ui-tabs.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-tag.mjs +2 -2
- package/fesm2020/wirabyte-ui-tag.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-textarea.mjs +18 -0
- package/fesm2020/wirabyte-ui-textarea.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-thai.mjs +1 -1
- package/fesm2020/wirabyte-ui-thai.mjs.map +1 -1
- package/fesm2020/wirabyte-ui-toolbar.mjs +6 -6
- package/fesm2020/wirabyte-ui-toolbar.mjs.map +1 -1
- package/metergroup/metergroup.component.d.ts +16 -3
- package/metergroup/metergroup.types.d.ts +6 -0
- package/package.json +41 -1
- 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/arun-blue/theme.css +30 -1
- package/themes/arun-green/theme.css +30 -1
- package/themes/arun-orange/theme.css +30 -1
- package/themes/arun-purple/theme.css +30 -1
- package/themes/md-dark-deeppurple/theme.css +30 -1
- package/themes/md-dark-indigo/theme.css +30 -1
- package/themes/md-light-deeppurple/theme.css +30 -1
- package/themes/md-light-indigo/theme.css +30 -1
- package/themes/ratri-blue/theme.css +30 -1
- package/themes/ratri-green/theme.css +30 -1
- package/themes/ratri-orange/theme.css +30 -1
- package/themes/ratri-purple/theme.css +30 -1
- package/themes/sayan-blue/theme.css +30 -1
- package/themes/sayan-green/theme.css +30 -1
- package/themes/sayan-orange/theme.css +30 -1
- package/themes/sayan-purple/theme.css +30 -1
- package/themes/sila-dark-blue/theme.css +30 -1
- package/themes/sila-dark-indigo/theme.css +30 -1
- package/themes/sila-dark-purple/theme.css +30 -1
- package/themes/sila-dark-teal/theme.css +30 -1
- package/themes/sila-light-blue/theme.css +30 -1
- package/themes/sila-light-indigo/theme.css +30 -1
- package/themes/sila-light-purple/theme.css +30 -1
- package/themes/sila-light-teal/theme.css +30 -1
- package/themes/sila-light-wira/theme.css +30 -1
|
@@ -28,7 +28,7 @@ class WuToolbar {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
WuToolbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WuToolbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
-
WuToolbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WuToolbar, isStandalone: true, selector: "wu-toolbar", inputs: { ariaLabel: "ariaLabel", styleClass: "styleClass", style: "style" }, queries: [{ propertyName: "startRef", first: true, predicate: ["start"],
|
|
31
|
+
WuToolbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WuToolbar, isStandalone: true, selector: "wu-toolbar", inputs: { ariaLabel: "ariaLabel", styleClass: "styleClass", style: "style" }, queries: [{ propertyName: "startRef", first: true, predicate: ["start"], read: TemplateRef }, { propertyName: "centerRef", first: true, predicate: ["center"], read: TemplateRef }, { propertyName: "endRef", first: true, predicate: ["end"], read: TemplateRef }, { propertyName: "leftRef", first: true, predicate: ["left"], read: TemplateRef }, { propertyName: "rightRef", first: true, predicate: ["right"], read: TemplateRef }, { propertyName: "slotTemplates", predicate: WuTemplate }], ngImport: i0, template: `<div class="wu-toolbar p-toolbar p-component" role="toolbar" [class]="styleClass || ''" [style]="hostStyle" [attr.aria-label]="ariaLabel || null">
|
|
32
32
|
<div class="wu-toolbar-start p-toolbar-start p-toolbar-group-start p-toolbar-group-left"><ng-content select="[wuToolbarStart]"></ng-content><ng-content></ng-content><ng-container *ngIf="startTemplate"><ng-container *ngTemplateOutlet="startTemplate"></ng-container></ng-container></div>
|
|
33
33
|
<div class="wu-toolbar-center p-toolbar-center p-toolbar-group-center"><ng-content select="[wuToolbarCenter]"></ng-content><ng-container *ngIf="centerTemplate"><ng-container *ngTemplateOutlet="centerTemplate"></ng-container></ng-container></div>
|
|
34
34
|
<div class="wu-toolbar-end p-toolbar-end p-toolbar-group-end p-toolbar-group-right"><ng-content select="[wuToolbarEnd]"></ng-content><ng-container *ngIf="endTemplate"><ng-container *ngTemplateOutlet="endTemplate"></ng-container></ng-container></div>
|
|
@@ -51,19 +51,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
51
51
|
args: [WuTemplate]
|
|
52
52
|
}], startRef: [{
|
|
53
53
|
type: ContentChild,
|
|
54
|
-
args: ['start', { read: TemplateRef }]
|
|
54
|
+
args: ['start', { read: TemplateRef, descendants: false }]
|
|
55
55
|
}], centerRef: [{
|
|
56
56
|
type: ContentChild,
|
|
57
|
-
args: ['center', { read: TemplateRef }]
|
|
57
|
+
args: ['center', { read: TemplateRef, descendants: false }]
|
|
58
58
|
}], endRef: [{
|
|
59
59
|
type: ContentChild,
|
|
60
|
-
args: ['end', { read: TemplateRef }]
|
|
60
|
+
args: ['end', { read: TemplateRef, descendants: false }]
|
|
61
61
|
}], leftRef: [{
|
|
62
62
|
type: ContentChild,
|
|
63
|
-
args: ['left', { read: TemplateRef }]
|
|
63
|
+
args: ['left', { read: TemplateRef, descendants: false }]
|
|
64
64
|
}], rightRef: [{
|
|
65
65
|
type: ContentChild,
|
|
66
|
-
args: ['right', { read: TemplateRef }]
|
|
66
|
+
args: ['right', { read: TemplateRef, descendants: false }]
|
|
67
67
|
}] } });
|
|
68
68
|
|
|
69
69
|
/** For NgModule apps. Standalone apps can import `WuToolbar` directly. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirabyte-ui-toolbar.mjs","sources":["../../lib/toolbar/toolbar.component.ts","../../lib/toolbar/toolbar.module.ts","../../lib/toolbar/wirabyte-ui-toolbar.ts"],"sourcesContent":["import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, inject, Input, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵWU_SKIP_VERSION_CHECK, WuTemplate } from '@wirabyte/ui/config';\n\n/**\n * Row of actions in three groups that wrap on narrow screens:\n * `<wu-toolbar><div wuToolbarStart>…</div><div wuToolbarCenter>…</div><div wuToolbarEnd>…</div></wu-toolbar>`.\n * Unmarked content goes to the start group. The `start` / `center` / `end` templates (`left` / `right` in the older\n * names) work too.\n */\n@Component({\n selector: 'wu-toolbar',\n standalone: true,\n imports: [NgIf, NgTemplateOutlet],\n template: `<div class=\"wu-toolbar p-toolbar p-component\" role=\"toolbar\" [class]=\"styleClass || ''\" [style]=\"hostStyle\" [attr.aria-label]=\"ariaLabel || null\">\n <div class=\"wu-toolbar-start p-toolbar-start p-toolbar-group-start p-toolbar-group-left\"><ng-content select=\"[wuToolbarStart]\"></ng-content><ng-content></ng-content><ng-container *ngIf=\"startTemplate\"><ng-container *ngTemplateOutlet=\"startTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-center p-toolbar-center p-toolbar-group-center\"><ng-content select=\"[wuToolbarCenter]\"></ng-content><ng-container *ngIf=\"centerTemplate\"><ng-container *ngTemplateOutlet=\"centerTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-end p-toolbar-end p-toolbar-group-end p-toolbar-group-right\"><ng-content select=\"[wuToolbarEnd]\"></ng-content><ng-container *ngIf=\"endTemplate\"><ng-container *ngTemplateOutlet=\"endTemplate\"></ng-container></ng-container></div>\n</div>`,\n styleUrls: ['./toolbar.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuToolbar {\n @Input() ariaLabel?: string;\n /** Classes for the element, as before. */\n @Input() styleClass?: string | null;\n /** Inline styles as an object: `[style]=\"{ width: '20rem' }\"` (a plain style attribute works as it is). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() style?: Record<string, any> | string | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get hostStyle(): Record<string, any> | null {\n return this.style && typeof this.style === 'object' ? this.style : null;\n }\n\n @ContentChildren(WuTemplate) protected slotTemplates?: QueryList<WuTemplate>;\n @ContentChild('start', { read: TemplateRef }) protected startRef?: TemplateRef<unknown>;\n @ContentChild('center', { read: TemplateRef }) protected centerRef?: TemplateRef<unknown>;\n @ContentChild('end', { read: TemplateRef }) protected endRef?: TemplateRef<unknown>;\n @ContentChild('left', { read: TemplateRef }) protected leftRef?: TemplateRef<unknown>;\n @ContentChild('right', { read: TemplateRef }) protected rightRef?: TemplateRef<unknown>;\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n get startTemplate(): TemplateRef<unknown> | null {\n return this.startRef || this.leftRef || ɵfindTemplate(this.slotTemplates, 'start') || ɵfindTemplate(this.slotTemplates, 'left');\n }\n get centerTemplate(): TemplateRef<unknown> | null {\n return this.centerRef || ɵfindTemplate(this.slotTemplates, 'center');\n }\n get endTemplate(): TemplateRef<unknown> | null {\n return this.endRef || this.rightRef || ɵfindTemplate(this.slotTemplates, 'end') || ɵfindTemplate(this.slotTemplates, 'right');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuToolbar } from './toolbar.component';\n\n/** For NgModule apps. Standalone apps can import `WuToolbar` directly. */\n@NgModule({\n imports: [WuToolbar, WuTemplate],\n exports: [WuToolbar, WuTemplate],\n})\nexport class WuToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAIA;;;;;AAKG;MAcU,SAAS,CAAA;;AAQpB,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;KACzE;AASD,IAAA,WAAA,GAAA;AACE,QAAA,uBAAuB,CAAC,MAAM,CAAC,sBAAsB,EAA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ent":["import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, inject, Input, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵWU_SKIP_VERSION_CHECK, WuTemplate } from '@wirabyte/ui/config';\n\n/**\n * Row of actions in three groups that wrap on narrow screens:\n * `<wu-toolbar><div wuToolbarStart>…</div><div wuToolbarCenter>…</div><div wuToolbarEnd>…</div></wu-toolbar>`.\n * Unmarked content goes to the start group. The `start` / `center` / `end` templates (`left` / `right` in the older\n * names) work too.\n */\n@Component({\n selector: 'wu-toolbar',\n standalone: true,\n imports: [NgIf, NgTemplateOutlet],\n template: `<div class=\"wu-toolbar p-toolbar p-component\" role=\"toolbar\" [class]=\"styleClass || ''\" [style]=\"hostStyle\" [attr.aria-label]=\"ariaLabel || null\">\n <div class=\"wu-toolbar-start p-toolbar-start p-toolbar-group-start p-toolbar-group-left\"><ng-content select=\"[wuToolbarStart]\"></ng-content><ng-content></ng-content><ng-container *ngIf=\"startTemplate\"><ng-container *ngTemplateOutlet=\"startTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-center p-toolbar-center p-toolbar-group-center\"><ng-content select=\"[wuToolbarCenter]\"></ng-content><ng-container *ngIf=\"centerTemplate\"><ng-container *ngTemplateOutlet=\"centerTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-end p-toolbar-end p-toolbar-group-end p-toolbar-group-right\"><ng-content select=\"[wuToolbarEnd]\"></ng-content><ng-container *ngIf=\"endTemplate\"><ng-container *ngTemplateOutlet=\"endTemplate\"></ng-container></ng-container></div>\n</div>`,\n styleUrls: ['./toolbar.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuToolbar {\n @Input() ariaLabel?: string;\n /** Classes for the element, as before. */\n @Input() styleClass?: string | null;\n /** Inline styles as an object: `[style]=\"{ width: '20rem' }\"` (a plain style attribute works as it is). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() style?: Record<string, any> | string | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get hostStyle(): Record<string, any> | null {\n return this.style && typeof this.style === 'object' ? this.style : null;\n }\n\n @ContentChildren(WuTemplate) protected slotTemplates?: QueryList<WuTemplate>;\n @ContentChild('start', { read: TemplateRef, descendants: false }) protected startRef?: TemplateRef<unknown>;\n @ContentChild('center', { read: TemplateRef, descendants: false }) protected centerRef?: TemplateRef<unknown>;\n @ContentChild('end', { read: TemplateRef, descendants: false }) protected endRef?: TemplateRef<unknown>;\n @ContentChild('left', { read: TemplateRef, descendants: false }) protected leftRef?: TemplateRef<unknown>;\n @ContentChild('right', { read: TemplateRef, descendants: false }) protected rightRef?: TemplateRef<unknown>;\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n get startTemplate(): TemplateRef<unknown> | null {\n return this.startRef || this.leftRef || ɵfindTemplate(this.slotTemplates, 'start') || ɵfindTemplate(this.slotTemplates, 'left');\n }\n get centerTemplate(): TemplateRef<unknown> | null {\n return this.centerRef || ɵfindTemplate(this.slotTemplates, 'center');\n }\n get endTemplate(): TemplateRef<unknown> | null {\n return this.endRef || this.rightRef || ɵfindTemplate(this.slotTemplates, 'end') || ɵfindTemplate(this.slotTemplates, 'right');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuToolbar } from './toolbar.component';\n\n/** For NgModule apps. Standalone apps can import `WuToolbar` directly. */\n@NgModule({\n imports: [WuToolbar, WuTemplate],\n exports: [WuToolbar, WuTemplate],\n})\nexport class WuToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAIA;;;;;AAKG;MAcU,SAAS,CAAA;;AAQpB,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,K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EAAA,CAAA,CAAA;AAEpB,eAAA,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,CAAA,EAAA,CAAA,CAAA;4FAGR,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,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import { ɵmeterParts, WuMeterContext, WuMeterGroupContext, WuMeterItem, WuMeterLabelPosition, WuMeterOrientation } from './metergroup.types';
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ɵmeterParts, WuMeterContext, WuMeterGroupContext, WuMeterItem, WuMeterItemClickEvent, WuMeterLabelPosition, WuMeterOrientation } from './metergroup.types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
type Parts = ReturnType<typeof ɵmeterParts>;
|
|
5
5
|
/**
|
|
@@ -22,6 +22,13 @@ export declare class WuMeterGroup {
|
|
|
22
22
|
labelPosition: WuMeterLabelPosition;
|
|
23
23
|
/** Legend items in a row or a column. */
|
|
24
24
|
labelOrientation: WuMeterOrientation;
|
|
25
|
+
/** Each legend item shows its value too: `เปิด 12 (24%)`. */
|
|
26
|
+
set showValue(v: unknown);
|
|
27
|
+
get showValue(): boolean;
|
|
28
|
+
/** Legend items become buttons that emit `(onItemClick)`, e.g. to open the list for that status. */
|
|
29
|
+
set clickable(v: unknown);
|
|
30
|
+
get clickable(): boolean;
|
|
31
|
+
readonly onItemClick: EventEmitter<WuMeterItemClickEvent>;
|
|
25
32
|
styleClass?: string;
|
|
26
33
|
/** Inline styles for the root element, as an object: `[style]="{ width: '20rem' }"`. */
|
|
27
34
|
style?: Record<string, any> | string | null;
|
|
@@ -39,7 +46,13 @@ export declare class WuMeterGroup {
|
|
|
39
46
|
private _value;
|
|
40
47
|
private _min;
|
|
41
48
|
private _max;
|
|
49
|
+
private _showValue;
|
|
50
|
+
private _clickable;
|
|
51
|
+
private readonly config;
|
|
42
52
|
constructor();
|
|
53
|
+
/** The legend text of one item. */
|
|
54
|
+
labelText(item: WuMeterItem, percent: number): string;
|
|
55
|
+
itemClick(event: Event, item: WuMeterItem, index: number): void;
|
|
43
56
|
/** `<ng-template pTemplate="label" let-value let-totalPercent="totalPercent" let-percentages="percentages">`: the whole legend. */
|
|
44
57
|
get labelTemplate(): TemplateRef<unknown> | null;
|
|
45
58
|
/** `<ng-template pTemplate="meter" let-item let-size="size" let-class="class">`: one segment. */
|
|
@@ -54,6 +67,6 @@ export declare class WuMeterGroup {
|
|
|
54
67
|
meterContext(index: number): WuMeterContext;
|
|
55
68
|
private refresh;
|
|
56
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<WuMeterGroup, never>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WuMeterGroup, "wu-metergroup, wu-meterGroup, wu-meter-group", never, { "value": "value"; "min": "min"; "max": "max"; "orientation": "orientation"; "reverse": "reverse"; "labelPosition": "labelPosition"; "labelOrientation": "labelOrientation"; "styleClass": "styleClass"; "style": "style"; "ariaLabel": "ariaLabel"; }, {}, ["labelRef", "meterRef", "startRef", "endRef", "iconRef", "templates"], never, true, never>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WuMeterGroup, "wu-metergroup, wu-meterGroup, wu-meter-group", never, { "value": "value"; "min": "min"; "max": "max"; "orientation": "orientation"; "reverse": "reverse"; "labelPosition": "labelPosition"; "labelOrientation": "labelOrientation"; "showValue": "showValue"; "clickable": "clickable"; "styleClass": "styleClass"; "style": "style"; "ariaLabel": "ariaLabel"; }, { "onItemClick": "onItemClick"; }, ["labelRef", "meterRef", "startRef", "endRef", "iconRef", "templates"], never, true, never>;
|
|
58
71
|
}
|
|
59
72
|
export {};
|
|
@@ -7,6 +7,12 @@ export interface WuMeterItem {
|
|
|
7
7
|
/** Icon class shown in the legend instead of the colour dot. */
|
|
8
8
|
icon?: string;
|
|
9
9
|
}
|
|
10
|
+
/** `(onItemClick)` of a clickable legend: the item, its place in `value`, and the click. */
|
|
11
|
+
export interface WuMeterItemClickEvent {
|
|
12
|
+
originalEvent: Event;
|
|
13
|
+
item: WuMeterItem;
|
|
14
|
+
index: number;
|
|
15
|
+
}
|
|
10
16
|
export type WuMeterOrientation = 'horizontal' | 'vertical';
|
|
11
17
|
export type WuMeterLabelPosition = 'start' | 'end';
|
|
12
18
|
/** Context of the `label`, `start` and `end` templates. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirabyte/ui",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "WiraUI UI components for Angular 15–17: familiar API, Thai-first, themable with SCSS, CSS or TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://ui.wirabyte.com",
|
|
@@ -197,6 +197,14 @@
|
|
|
197
197
|
"node": "./fesm2015/wirabyte-ui-chartjs.mjs",
|
|
198
198
|
"default": "./fesm2020/wirabyte-ui-chartjs.mjs"
|
|
199
199
|
},
|
|
200
|
+
"./chat": {
|
|
201
|
+
"types": "./chat/index.d.ts",
|
|
202
|
+
"esm2020": "./esm2020/chat/wirabyte-ui-chat.mjs",
|
|
203
|
+
"es2020": "./fesm2020/wirabyte-ui-chat.mjs",
|
|
204
|
+
"es2015": "./fesm2015/wirabyte-ui-chat.mjs",
|
|
205
|
+
"node": "./fesm2015/wirabyte-ui-chat.mjs",
|
|
206
|
+
"default": "./fesm2020/wirabyte-ui-chat.mjs"
|
|
207
|
+
},
|
|
200
208
|
"./checkbox": {
|
|
201
209
|
"types": "./checkbox/index.d.ts",
|
|
202
210
|
"esm2020": "./esm2020/checkbox/wirabyte-ui-checkbox.mjs",
|
|
@@ -261,6 +269,14 @@
|
|
|
261
269
|
"node": "./fesm2015/wirabyte-ui-datepicker.mjs",
|
|
262
270
|
"default": "./fesm2020/wirabyte-ui-datepicker.mjs"
|
|
263
271
|
},
|
|
272
|
+
"./descriptions": {
|
|
273
|
+
"types": "./descriptions/index.d.ts",
|
|
274
|
+
"esm2020": "./esm2020/descriptions/wirabyte-ui-descriptions.mjs",
|
|
275
|
+
"es2020": "./fesm2020/wirabyte-ui-descriptions.mjs",
|
|
276
|
+
"es2015": "./fesm2015/wirabyte-ui-descriptions.mjs",
|
|
277
|
+
"node": "./fesm2015/wirabyte-ui-descriptions.mjs",
|
|
278
|
+
"default": "./fesm2020/wirabyte-ui-descriptions.mjs"
|
|
279
|
+
},
|
|
264
280
|
"./dialog": {
|
|
265
281
|
"types": "./dialog/index.d.ts",
|
|
266
282
|
"esm2020": "./esm2020/dialog/wirabyte-ui-dialog.mjs",
|
|
@@ -653,6 +669,14 @@
|
|
|
653
669
|
"node": "./fesm2015/wirabyte-ui-ripple.mjs",
|
|
654
670
|
"default": "./fesm2020/wirabyte-ui-ripple.mjs"
|
|
655
671
|
},
|
|
672
|
+
"./scheduler": {
|
|
673
|
+
"types": "./scheduler/index.d.ts",
|
|
674
|
+
"esm2020": "./esm2020/scheduler/wirabyte-ui-scheduler.mjs",
|
|
675
|
+
"es2020": "./fesm2020/wirabyte-ui-scheduler.mjs",
|
|
676
|
+
"es2015": "./fesm2015/wirabyte-ui-scheduler.mjs",
|
|
677
|
+
"node": "./fesm2015/wirabyte-ui-scheduler.mjs",
|
|
678
|
+
"default": "./fesm2020/wirabyte-ui-scheduler.mjs"
|
|
679
|
+
},
|
|
656
680
|
"./scroller": {
|
|
657
681
|
"types": "./scroller/index.d.ts",
|
|
658
682
|
"esm2020": "./esm2020/scroller/wirabyte-ui-scroller.mjs",
|
|
@@ -685,6 +709,14 @@
|
|
|
685
709
|
"node": "./fesm2015/wirabyte-ui-selectbutton.mjs",
|
|
686
710
|
"default": "./fesm2020/wirabyte-ui-selectbutton.mjs"
|
|
687
711
|
},
|
|
712
|
+
"./signaturepad": {
|
|
713
|
+
"types": "./signaturepad/index.d.ts",
|
|
714
|
+
"esm2020": "./esm2020/signaturepad/wirabyte-ui-signaturepad.mjs",
|
|
715
|
+
"es2020": "./fesm2020/wirabyte-ui-signaturepad.mjs",
|
|
716
|
+
"es2015": "./fesm2015/wirabyte-ui-signaturepad.mjs",
|
|
717
|
+
"node": "./fesm2015/wirabyte-ui-signaturepad.mjs",
|
|
718
|
+
"default": "./fesm2020/wirabyte-ui-signaturepad.mjs"
|
|
719
|
+
},
|
|
688
720
|
"./sitefooter": {
|
|
689
721
|
"types": "./sitefooter/index.d.ts",
|
|
690
722
|
"esm2020": "./esm2020/sitefooter/wirabyte-ui-sitefooter.mjs",
|
|
@@ -725,6 +757,14 @@
|
|
|
725
757
|
"node": "./fesm2015/wirabyte-ui-splitter.mjs",
|
|
726
758
|
"default": "./fesm2020/wirabyte-ui-splitter.mjs"
|
|
727
759
|
},
|
|
760
|
+
"./stat": {
|
|
761
|
+
"types": "./stat/index.d.ts",
|
|
762
|
+
"esm2020": "./esm2020/stat/wirabyte-ui-stat.mjs",
|
|
763
|
+
"es2020": "./fesm2020/wirabyte-ui-stat.mjs",
|
|
764
|
+
"es2015": "./fesm2015/wirabyte-ui-stat.mjs",
|
|
765
|
+
"node": "./fesm2015/wirabyte-ui-stat.mjs",
|
|
766
|
+
"default": "./fesm2020/wirabyte-ui-stat.mjs"
|
|
767
|
+
},
|
|
728
768
|
"./stepper": {
|
|
729
769
|
"types": "./stepper/index.d.ts",
|
|
730
770
|
"esm2020": "./esm2020/stepper/wirabyte-ui-stepper.mjs",
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, QueryList, TemplateRef } from '@angular/core';
|
|
2
|
+
import { WuTemplate } from '@wirabyte/ui/config';
|
|
3
|
+
import { WuSchedulerDateClickEvent, WuSchedulerEvent, WuSchedulerEventChangeEvent, WuSchedulerEventClickEvent, WuSchedulerView, ɵWuPlacedEvent } from './scheduler.types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/** One day column of the day / week views, or one cell of the month grid. */
|
|
6
|
+
interface DayCell {
|
|
7
|
+
key: string;
|
|
8
|
+
date: Date;
|
|
9
|
+
today: boolean;
|
|
10
|
+
outside: boolean;
|
|
11
|
+
allDay: ɵWuPlacedEvent[];
|
|
12
|
+
timed: ɵWuPlacedEvent[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Appointments on a calendar: `<wu-scheduler [events]="appointments" [(view)]="view" [(date)]="day" [editable]="true"
|
|
16
|
+
* (onEventChange)="move($event)" (onDateClick)="create($event)">`. A month grid, a week or a day of hours
|
|
17
|
+
* (`startHour`–`endHour`), all-day events in their own row, overlapping events side by side, a line at the current
|
|
18
|
+
* time. Years follow the app's calendar (พ.ศ. in Thai). With `editable`, events are dragged to another day or time
|
|
19
|
+
* (snapped to `slotMinutes`); the scheduler emits the new times and the app updates `events`.
|
|
20
|
+
*/
|
|
21
|
+
export declare class WuScheduler implements OnDestroy {
|
|
22
|
+
set events(v: WuSchedulerEvent[] | null | undefined);
|
|
23
|
+
get events(): WuSchedulerEvent[];
|
|
24
|
+
set view(v: WuSchedulerView | null | undefined);
|
|
25
|
+
get view(): WuSchedulerView;
|
|
26
|
+
/** The day the view shows (week and month views: the period around it). Default: today. */
|
|
27
|
+
set date(v: Date | string | number | null | undefined);
|
|
28
|
+
get date(): Date;
|
|
29
|
+
/** The view buttons offered. Default all three. */
|
|
30
|
+
views: WuSchedulerView[] | null | undefined;
|
|
31
|
+
/** First and last hour of the day and week views. Default 7–20. */
|
|
32
|
+
set startHour(v: unknown);
|
|
33
|
+
get startHour(): number;
|
|
34
|
+
set endHour(v: unknown);
|
|
35
|
+
get endHour(): number;
|
|
36
|
+
/** Rows of the time grid, and where a dragged event snaps to. Default 30 minutes. */
|
|
37
|
+
set slotMinutes(v: unknown);
|
|
38
|
+
get slotMinutes(): number;
|
|
39
|
+
/** First day of the week, 0 = Sunday. Default: the locale's. */
|
|
40
|
+
firstDayOfWeek?: number | null;
|
|
41
|
+
/** Events can be dragged to another day or time. */
|
|
42
|
+
set editable(v: unknown);
|
|
43
|
+
get editable(): boolean;
|
|
44
|
+
/** Events a month cell lists before "+N more". Default 3. */
|
|
45
|
+
set maxEventsPerDay(v: unknown);
|
|
46
|
+
get maxEventsPerDay(): number;
|
|
47
|
+
/** Height of the day and week views' hour grid area. Default: the theme's hour height × the hours shown. */
|
|
48
|
+
height?: string | number | null;
|
|
49
|
+
styleClass?: string | null;
|
|
50
|
+
style?: Record<string, any> | string | null;
|
|
51
|
+
readonly viewChange: EventEmitter<WuSchedulerView>;
|
|
52
|
+
readonly dateChange: EventEmitter<Date>;
|
|
53
|
+
readonly onEventClick: EventEmitter<WuSchedulerEventClickEvent>;
|
|
54
|
+
readonly onDateClick: EventEmitter<WuSchedulerDateClickEvent>;
|
|
55
|
+
readonly onEventChange: EventEmitter<WuSchedulerEventChangeEvent>;
|
|
56
|
+
protected templates?: QueryList<WuTemplate>;
|
|
57
|
+
protected eventRef?: unknown;
|
|
58
|
+
private _events;
|
|
59
|
+
private _view;
|
|
60
|
+
private _date;
|
|
61
|
+
private _startHour;
|
|
62
|
+
private _endHour;
|
|
63
|
+
private _slot;
|
|
64
|
+
private _editable;
|
|
65
|
+
private _max;
|
|
66
|
+
private cache;
|
|
67
|
+
private dragged;
|
|
68
|
+
private now;
|
|
69
|
+
private readonly timer;
|
|
70
|
+
private readonly cdr;
|
|
71
|
+
private readonly config;
|
|
72
|
+
private readonly i18n;
|
|
73
|
+
private readonly translated;
|
|
74
|
+
constructor();
|
|
75
|
+
ngOnDestroy(): void;
|
|
76
|
+
get t(): {
|
|
77
|
+
today: string;
|
|
78
|
+
previous: string;
|
|
79
|
+
next: string;
|
|
80
|
+
day: string;
|
|
81
|
+
week: string;
|
|
82
|
+
month: string;
|
|
83
|
+
allDay: string;
|
|
84
|
+
more: string;
|
|
85
|
+
noEvents: string;
|
|
86
|
+
} | undefined;
|
|
87
|
+
get eventTemplate(): TemplateRef<unknown> | null;
|
|
88
|
+
get rootClass(): string;
|
|
89
|
+
get rootStyle(): Record<string, any>;
|
|
90
|
+
get viewButtons(): WuSchedulerView[];
|
|
91
|
+
viewLabel(v: WuSchedulerView): string;
|
|
92
|
+
get hours(): number[];
|
|
93
|
+
get weekdayNames(): string[];
|
|
94
|
+
get days(): DayCell[];
|
|
95
|
+
/** Month view: the days in rows of seven. */
|
|
96
|
+
get weeks(): DayCell[][];
|
|
97
|
+
get title(): string;
|
|
98
|
+
dayHeader(cell: DayCell): string;
|
|
99
|
+
hourLabel(h: number): string;
|
|
100
|
+
/** The current-time line: % down the visible hours, or `null` outside them. */
|
|
101
|
+
nowTop(cell: DayCell): number | null;
|
|
102
|
+
visible(cell: DayCell): ɵWuPlacedEvent[];
|
|
103
|
+
hidden(cell: DayCell): number;
|
|
104
|
+
moreText(n: number): string;
|
|
105
|
+
eventStyle(p: ɵWuPlacedEvent): Record<string, string>;
|
|
106
|
+
placedStyle(p: ɵWuPlacedEvent): Record<string, string>;
|
|
107
|
+
canDrag(p: ɵWuPlacedEvent): boolean;
|
|
108
|
+
trackCell(_: number, c: DayCell): string;
|
|
109
|
+
trackEvent(_: number, p: ɵWuPlacedEvent): string;
|
|
110
|
+
setView(v: WuSchedulerView): void;
|
|
111
|
+
move(step: -1 | 1): void;
|
|
112
|
+
goToday(): void;
|
|
113
|
+
/** Month view: a day's "+N more" opens that day. */
|
|
114
|
+
openDay(date: Date): void;
|
|
115
|
+
eventClick(event: Event, p: ɵWuPlacedEvent): void;
|
|
116
|
+
/** A click on an empty month cell. */
|
|
117
|
+
cellClick(event: Event, cell: DayCell): void;
|
|
118
|
+
/** A click on the hour grid: the slot under the pointer. */
|
|
119
|
+
slotClick(event: MouseEvent, cell: DayCell): void;
|
|
120
|
+
allDayClick(event: Event, cell: DayCell): void;
|
|
121
|
+
dragStart(event: DragEvent, p: ɵWuPlacedEvent): void;
|
|
122
|
+
dragOver(event: DragEvent): void;
|
|
123
|
+
dragEnd(): void;
|
|
124
|
+
/** Dropped on a month cell or an all-day row: same time of day, another date. */
|
|
125
|
+
dropOnDay(event: DragEvent, cell: DayCell): void;
|
|
126
|
+
/** Dropped on the hour grid: the slot under the pointer, same length. */
|
|
127
|
+
dropOnTime(event: DragEvent, cell: DayCell): void;
|
|
128
|
+
private get weekStart();
|
|
129
|
+
private go;
|
|
130
|
+
private tick;
|
|
131
|
+
/** The slot under the pointer on a day column, snapped to `slotMinutes`. */
|
|
132
|
+
private timeAt;
|
|
133
|
+
private range;
|
|
134
|
+
private build;
|
|
135
|
+
private year;
|
|
136
|
+
private monthName;
|
|
137
|
+
private monthShort;
|
|
138
|
+
private dayName;
|
|
139
|
+
private weekdayShort;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WuScheduler, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WuScheduler, "wu-scheduler", never, { "events": "events"; "view": "view"; "date": "date"; "views": "views"; "startHour": "startHour"; "endHour": "endHour"; "slotMinutes": "slotMinutes"; "firstDayOfWeek": "firstDayOfWeek"; "editable": "editable"; "maxEventsPerDay": "maxEventsPerDay"; "height": "height"; "styleClass": "styleClass"; "style": "style"; }, { "viewChange": "viewChange"; "dateChange": "dateChange"; "onEventClick": "onEventClick"; "onDateClick": "onDateClick"; "onEventChange": "onEventChange"; }, ["eventRef", "templates"], never, true, never>;
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./scheduler.component";
|
|
3
|
+
/** For NgModule apps. Standalone apps can import `WuScheduler` directly. */
|
|
4
|
+
export declare class WuSchedulerModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WuSchedulerModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WuSchedulerModule, never, [typeof i1.WuScheduler], [typeof i1.WuScheduler]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<WuSchedulerModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type WuSchedulerView = 'day' | 'week' | 'month';
|
|
2
|
+
export interface WuSchedulerEvent {
|
|
3
|
+
id?: string | number;
|
|
4
|
+
title: string;
|
|
5
|
+
start: Date | string | number;
|
|
6
|
+
/** Default: an hour after `start` (all-day events: the same day). */
|
|
7
|
+
end?: Date | string | number | null;
|
|
8
|
+
allDay?: boolean;
|
|
9
|
+
/** Any CSS colour for the bar and tint. Default: the theme's primary colour. */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** A line under the title in the day and week views. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** `false` keeps this one in place when the scheduler is `editable`. */
|
|
14
|
+
editable?: boolean;
|
|
15
|
+
/** Anything else the app needs back in the events it gets. */
|
|
16
|
+
data?: unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface WuSchedulerEventClickEvent {
|
|
19
|
+
originalEvent: Event;
|
|
20
|
+
event: WuSchedulerEvent;
|
|
21
|
+
}
|
|
22
|
+
/** `(onDateClick)`: an empty day (month view, `allDay`) or a time slot (day and week views) was clicked. */
|
|
23
|
+
export interface WuSchedulerDateClickEvent {
|
|
24
|
+
originalEvent: Event;
|
|
25
|
+
date: Date;
|
|
26
|
+
allDay: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** `(onEventChange)`: an event was dragged to a new time. The app saves it and passes new `events`. */
|
|
29
|
+
export interface WuSchedulerEventChangeEvent {
|
|
30
|
+
event: WuSchedulerEvent;
|
|
31
|
+
start: Date;
|
|
32
|
+
end: Date;
|
|
33
|
+
}
|
|
34
|
+
/** An event placed on the grid (time views: its column lane; month view: just the day). */
|
|
35
|
+
export interface ɵWuPlacedEvent {
|
|
36
|
+
key: string;
|
|
37
|
+
event: WuSchedulerEvent;
|
|
38
|
+
start: Date;
|
|
39
|
+
end: Date;
|
|
40
|
+
/** Day and week views: top and height in % of the visible hours; left and width in % of the day column. */
|
|
41
|
+
top: number;
|
|
42
|
+
height: number;
|
|
43
|
+
left: number;
|
|
44
|
+
width: number;
|
|
45
|
+
time: string;
|
|
46
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/** Fixed design data. packages/themes/scripts/gen-scss-data.mjs writes the Sass copy of these tables. */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.COMPONENT_TOKENS = exports.VERSION_CATALOG = exports.CLASSIC_THEMES = exports.PRESET_NAMES = exports.PRESETS = exports.FAMILY_GENERATION = exports.SEMANTIC_DEFAULTS = exports.SEMANTIC_KEYS = exports.FOCUS_STYLES = exports.SHADOWS = exports.DENSITY = exports.FONTS = exports.SURFACES = exports.PRIMARY_SWATCHES = void 0;
|
|
5
|
+
exports.googleFontHref = googleFontHref;
|
|
5
6
|
exports.presetExportName = presetExportName;
|
|
6
7
|
exports.PRIMARY_SWATCHES = [
|
|
7
8
|
/** Wirabyte brand blue (wirabyte.com --wb-primary). */
|
|
@@ -43,6 +44,26 @@ exports.SURFACES = {
|
|
|
43
44
|
ink: ['#f6f8fc', '#eef2f9', '#e3e8f1', '#cfd7e4', '#98a5b8', '#556274', '#334155', '#2a3a52', '#1c2839', '#0e1624', '#070b14'],
|
|
44
45
|
};
|
|
45
46
|
exports.FONTS = ['Kanit', 'Sarabun', 'Prompt', 'Noto Sans Thai', 'IBM Plex Sans Thai', 'Anuphan', 'Inter', 'Roboto'];
|
|
47
|
+
/** Google Fonts families the presets, ng add and the Studio use, with the weights to ask for (the API refuses weights a family lacks). */
|
|
48
|
+
const GOOGLE_FONT_WEIGHTS = {
|
|
49
|
+
...Object.fromEntries(exports.FONTS.map((f) => [f, ':wght@400;500;600;700'])),
|
|
50
|
+
'Noto Sans Thai Looped': ':wght@400;500;600;700',
|
|
51
|
+
'Noto Serif Thai': ':wght@400;500;600;700',
|
|
52
|
+
Taviraj: ':wght@400;500;600;700',
|
|
53
|
+
Trirong: ':wght@400;500;600;700',
|
|
54
|
+
Pridi: ':wght@400;500;600;700',
|
|
55
|
+
Itim: '',
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The Google Fonts stylesheet for the first family of a CSS `font-family` value (`"'Kanit', sans-serif"`), or `null` when
|
|
59
|
+
* it is not a family the themes know.
|
|
60
|
+
*/
|
|
61
|
+
function googleFontHref(fontFamily) {
|
|
62
|
+
const name = fontFamily.split(',')[0].trim().replace(/^['"]|['"]$/g, '');
|
|
63
|
+
if (!Object.prototype.hasOwnProperty.call(GOOGLE_FONT_WEIGHTS, name))
|
|
64
|
+
return null;
|
|
65
|
+
return `https://fonts.googleapis.com/css2?family=${name.replace(/ /g, '+')}${GOOGLE_FONT_WEIGHTS[name]}&display=swap`;
|
|
66
|
+
}
|
|
46
67
|
/** Density multiplies every padding a preset defines (1 = the preset's own spacing). */
|
|
47
68
|
exports.DENSITY = {
|
|
48
69
|
compact: 0.8,
|
|
@@ -125,7 +146,7 @@ exports.PRESETS = {
|
|
|
125
146
|
material: { ...styled, family: 'material', label: 'Material', fontFamily: 'Roboto', primary: '#10b981', surface: 'slate', semantic: MATERIAL_SEMANTIC, radius: 6, shadow: 'material', ripple: true, focusRing: 'inset' },
|
|
126
147
|
phet: { ...styled, family: 'phet', label: 'Phet', primary: '#10b981', surface: 'slate', semantic: PHET_SEMANTIC, radius: 6, shadow: 'phet', ripple: false, focusRing: 'bold', transition: 0 },
|
|
127
148
|
// ---- v3: WiraUI's own ----
|
|
128
|
-
wira: { family: 'wira', label: 'Wira', primary: '#1e7ae0', surface: 'ink', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Kanit', fontSize: 14, lineHeight: 1.6, radius:
|
|
149
|
+
wira: { family: 'wira', label: 'Wira', primary: '#1e7ae0', surface: 'ink', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Kanit', fontSize: 14, lineHeight: 1.6, radius: 10, density: 'normal', shadow: 'soft', ripple: false, focusRing: 'ring', transition: 150, scheme: 'light' },
|
|
129
150
|
lanna: { family: 'wira', label: 'Lanna', primary: '#0d9488', surface: 'stone', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Sarabun', fontSize: 15, lineHeight: 1.7, radius: 12, density: 'comfortable', shadow: 'soft', ripple: false, focusRing: 'ring', transition: 200, scheme: 'light' },
|
|
130
151
|
siam: { family: 'wira', label: 'Siam', primary: '#6366f1', surface: 'gray', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Prompt', fontSize: 14, lineHeight: 1.6, radius: 4, density: 'normal', shadow: 'elevated', ripple: true, focusRing: 'outline', transition: 200, scheme: 'light' },
|
|
131
152
|
nakhon: { family: 'wira', label: 'Nakhon', primary: '#3b82f6', surface: 'zinc', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'IBM Plex Sans Thai', fontSize: 13, lineHeight: 1.55, radius: 2, density: 'compact', shadow: 'none', ripple: false, focusRing: 'outline', transition: 100, scheme: 'light' },
|
|
@@ -77,6 +77,37 @@ function merge(...parts) {
|
|
|
77
77
|
// ---------- Mali (the styled default) is the base every family starts from ----------
|
|
78
78
|
const MALI = merge({
|
|
79
79
|
light: {
|
|
80
|
+
// Titles (card, dialog, drawer, panel, fieldset, alert, empty state, result, error page): the body font unless a
|
|
81
|
+
// theme sets $heading-font-family / semantic.headingFontFamily, e.g. Kanit titles over IBM Plex Sans Thai text.
|
|
82
|
+
'heading-font-family': v('font-family'),
|
|
83
|
+
// Components new in release 1. They follow the card, field and tag tokens, so every preset styles them.
|
|
84
|
+
'stat-gap': '0.875rem',
|
|
85
|
+
'stat-icon-size': '2.75rem',
|
|
86
|
+
'stat-label-size': '0.875rem',
|
|
87
|
+
'stat-value-size': '1.75rem',
|
|
88
|
+
'stat-value-weight': '700',
|
|
89
|
+
'descriptions-gap': '0.75rem 1.5rem',
|
|
90
|
+
'descriptions-label-color': v('text-muted'),
|
|
91
|
+
'descriptions-label-weight': '400',
|
|
92
|
+
'descriptions-label-width': '9rem',
|
|
93
|
+
'descriptions-bordered-label-bg': v('hover-bg'),
|
|
94
|
+
'signature-height': '12rem',
|
|
95
|
+
'signature-ink': v('text'),
|
|
96
|
+
'signature-line': v('border'),
|
|
97
|
+
'chat-height': '32rem',
|
|
98
|
+
'chat-bubble-radius': '1.125rem',
|
|
99
|
+
'chat-bubble-bg': v('hover-bg'),
|
|
100
|
+
'chat-bubble-color': v('text'),
|
|
101
|
+
'chat-mine-bg': v('primary-color'),
|
|
102
|
+
'chat-mine-color': v('primary-contrast'),
|
|
103
|
+
'chat-meta-color': v('text-muted'),
|
|
104
|
+
'chat-gap': '0.25rem',
|
|
105
|
+
'scheduler-hour-height': '3rem',
|
|
106
|
+
'scheduler-border': v('border'),
|
|
107
|
+
'scheduler-today-bg': 'color-mix(in srgb, var(--wu-primary-color) 7%, transparent)',
|
|
108
|
+
'scheduler-event-bg': 'color-mix(in srgb, var(--wu-primary-color) 14%, var(--wu-card-bg))',
|
|
109
|
+
'scheduler-event-color': v('primary-soft-text'),
|
|
110
|
+
'scheduler-event-bar': v('primary-color'),
|
|
80
111
|
'primary-color': p(500),
|
|
81
112
|
'primary-hover': p(600),
|
|
82
113
|
'primary-active': p(700),
|
|
@@ -186,6 +217,9 @@ const MALI = merge({
|
|
|
186
217
|
'tag-padding-x': '0.5rem',
|
|
187
218
|
'tag-gap': '0.25rem',
|
|
188
219
|
'tag-fill': '0%',
|
|
220
|
+
// The soft look is the tag's colour at this strength over whatever is behind it, so it shows on white cards and
|
|
221
|
+
// grey pages alike (a fixed pale shade nearly vanished on a grey page).
|
|
222
|
+
'tag-soft-mix': '14%',
|
|
189
223
|
'badge-size': '1.5rem',
|
|
190
224
|
'badge-font-size': '0.75rem',
|
|
191
225
|
'badge-font-weight': '700',
|
|
@@ -1729,6 +1763,14 @@ const WIRA = merge(MALI, severities([600, 700, 800, 50, 800], [400, 300, 200, 40
|
|
|
1729
1763
|
'spinner-color-2': v('primary-color'),
|
|
1730
1764
|
'spinner-color-3': v('primary-color'),
|
|
1731
1765
|
'spinner-color-4': v('primary-color'),
|
|
1766
|
+
// A lighter, current look: table heads without a band, in quiet text; the chosen menu item a soft tint of the
|
|
1767
|
+
// primary colour rather than a solid bar.
|
|
1768
|
+
'table-head-bg': 'transparent',
|
|
1769
|
+
'table-head-color': v('text-muted'),
|
|
1770
|
+
'table-head-weight': '500',
|
|
1771
|
+
'table-head-hover-bg': v('hover-bg'),
|
|
1772
|
+
'aside-menu-item-active-bg': 'color-mix(in srgb, var(--wu-primary-color) 12%, transparent)',
|
|
1773
|
+
'aside-menu-item-active-color': v('primary-color'),
|
|
1732
1774
|
},
|
|
1733
1775
|
dark: {
|
|
1734
1776
|
'primary-soft': mix(p(400), 16, s(800)),
|
|
@@ -124,6 +124,10 @@ function setTokens(set, s950) {
|
|
|
124
124
|
const f = sem.fontFamily;
|
|
125
125
|
t.light['font-family'] = /[,'"]/.test(f) ? f : `'${f}', sans-serif`;
|
|
126
126
|
}
|
|
127
|
+
if (sem.headingFontFamily !== undefined) {
|
|
128
|
+
const f = sem.headingFontFamily;
|
|
129
|
+
t.light['heading-font-family'] = /[,'"]/.test(f) ? f : `'${f}', sans-serif`;
|
|
130
|
+
}
|
|
127
131
|
if (sem.fontSize !== undefined) {
|
|
128
132
|
if (typeof sem.fontSize === 'number')
|
|
129
133
|
(0, tokens_1.mergeTokens)(t, (0, tokens_1.fontTokens)({ fontSize: sem.fontSize }));
|
|
@@ -151,8 +155,29 @@ function setTokens(set, s950) {
|
|
|
151
155
|
if (v !== undefined)
|
|
152
156
|
(0, tokens_1.mergeTokens)(t, (0, tokens_1.componentValue)(spec, v));
|
|
153
157
|
}
|
|
158
|
+
const raw = set.tokens || {};
|
|
159
|
+
for (const name of Object.keys(raw)) {
|
|
160
|
+
if (!knownToken(name))
|
|
161
|
+
throw new Error(`wiraui: unknown token ${name} (write the name without --wu-, e.g. 'table-header-bg')`);
|
|
162
|
+
t.light[name] = String(raw[name]);
|
|
163
|
+
}
|
|
154
164
|
return t;
|
|
155
165
|
}
|
|
166
|
+
let tokenNames = null;
|
|
167
|
+
/** Every token some preset defines, so a misspelt name in `tokens` is caught instead of silently doing nothing. */
|
|
168
|
+
function knownToken(name) {
|
|
169
|
+
if (!tokenNames) {
|
|
170
|
+
tokenNames = new Set();
|
|
171
|
+
for (const id of Object.keys(catalog_1.PRESETS)) {
|
|
172
|
+
const t = (0, tokens_1.computeTokens)((0, config_1.defaults)(id));
|
|
173
|
+
for (const k of Object.keys(t.light))
|
|
174
|
+
tokenNames.add(k);
|
|
175
|
+
for (const k of Object.keys(t.dark))
|
|
176
|
+
tokenNames.add(k);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return tokenNames.has(name);
|
|
180
|
+
}
|
|
156
181
|
/**
|
|
157
182
|
* Only the tokens an override set touches; derived tokens follow through `var()`.
|
|
158
183
|
* With `scheme: 'dark'` (Sayan, Ratri, sila-dark-*) the dark values are the only values.
|