@theseam/ui-common 1.0.2-beta.58 → 1.0.2-beta.60
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/fesm2022/theseam-ui-common-signature-input.mjs +894 -0
- package/fesm2022/theseam-ui-common-signature-input.mjs.map +1 -0
- package/fesm2022/theseam-ui-common-story-helpers.mjs +118 -55
- package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/package.json +5 -1
- package/signature-input/index.d.ts +306 -0
- package/signature-input/package.json +3 -0
- package/story-helpers/index.d.ts +60 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theseam-ui-common-story-helpers.mjs","sources":["../../../projects/ui-common/story-helpers/arg-type-helpers.ts","../../../projects/ui-common/story-helpers/args-to-tpl.ts","../../../projects/ui-common/story-helpers/story-empty.component.ts","../../../projects/ui-common/story-helpers/initial-route-factory.ts","../../../projects/ui-common/story-helpers/initial-route.service.ts","../../../projects/ui-common/story-helpers/story-initial-route.ts","../../../projects/ui-common/story-helpers/route-button.ts","../../../projects/ui-common/story-helpers/routes-arg-type.ts","../../../projects/ui-common/story-helpers/story-empty-with-route.component.ts","../../../projects/ui-common/story-helpers/story-modal-container.component.ts","../../../projects/ui-common/story-helpers/story-helper-components.module.ts","../../../projects/ui-common/story-helpers/on-story-bootstrapped-exec.ts","../../../projects/ui-common/story-helpers/on-story-bootstrapped-trigger.ts","../../../projects/ui-common/story-helpers/story-preferences-accessor.service.ts","../../../projects/ui-common/story-helpers/add-injector-to-args.ts","../../../projects/ui-common/story-helpers/theseam-ui-common-story-helpers.ts"],"sourcesContent":["// import { ArgType } from '@storybook/addons'\n\nimport { OutlineThemeNames, ThemeNames } from '@theseam/ui-common/models'\n\ndeclare type ArgType = any\n\nexport const themeArgType: ArgType = {\n options: ThemeNames,\n control: {\n type: 'select',\n },\n description: `Theme style.`,\n}\n\nexport const themeWithOutlineArgType: ArgType = {\n options: [...ThemeNames, ...OutlineThemeNames],\n control: {\n type: 'select',\n },\n description: `Theme style.`,\n}\n\nexport const sizeArgType: ArgType = {\n options: [undefined, 'sm', 'lg'],\n control: {\n type: 'select',\n },\n description: `Size.`,\n}\n\nexport const buttonTypeArgType: ArgType = {\n options: ['button', 'submit'],\n control: {\n type: 'select',\n },\n description: `Button type.`,\n}\n","/* eslint-disable no-prototype-builtins */\nimport { action, HandlerFunction } from 'storybook/actions'\nimport { AngularRenderer, ArgTypes } from '@storybook/angular'\nimport { useStoryContext } from 'storybook/preview-api'\n\nexport interface ArgsTplParts {\n actions: { [prop: string]: HandlerFunction }\n tplfragment: string\n}\n\n/**\n * This is an attempt at simplifying the use of auto-generated args in stories\n * defined with `template`, since Angular doesn't have a way to simply use a\n * spread operator syntax.\n *\n * @experimental\n */\n// export function argsToTplParts(args: any, argTypes: ArgTypes): ArgsTplParts {\n// // console.log({ args, argTypes })\n// const parts: ArgsTplParts = {\n// actions: {},\n// tplfragment: ''\n// }\n\n// Object.keys(argTypes).forEach(k => {\n// // Inputs\n// if (\n// // Is in the inputs category\n// argTypes[k].table.category === 'inputs' &&\n// // Needs a control to be able to change from auto-generated args.\n// argTypes[k]?.hasOwnProperty('control') &&\n// // Assuming the arg might not be in props if there isn't an arg value.\n// args.hasOwnProperty(k)\n// ) {\n// parts.tplfragment += `[${k}]=\"${k}\" `\n// }\n\n// // Outputs\n// if (\n// // Is in the outputs category\n// argTypes[k]?.table?.category === 'outputs'\n// ) {\n// // Without access to props, I don't know if I can get an action into the\n// // template context like this.\n// parts.tplfragment += `(${k})=\"${k}($event)\" `\n// parts.actions[k] = action(k)\n// }\n// })\n\n// return parts\n// }\n\nfunction removeDuplicates(arr: string[]) {\n const seen: { [k: string]: boolean } = {}\n return arr.filter((item) => {\n if (!seen[item]) {\n seen[item] = true\n return true\n }\n return false\n })\n}\n\nexport interface ArgsTplOptions {\n /**\n * Properties to always bind to the template.\n */\n alwaysBind?: string[]\n /**\n * Properties to exclude from bidning to the template.\n */\n exclude?: string[]\n}\n\n/**\n * This is an attempt at simplifying the use of auto-generated args in stories\n * defined with `template`, since Angular doesn't have a way to simply use a\n * spread operator syntax.\n *\n * @experimental\n */\nexport function argsToTpl(options?: ArgsTplOptions) {\n const context = useStoryContext<AngularRenderer>()\n\n const exclude = [\n ...(context?.parameters?.argsToTplOptions?.exclude || []),\n ...(options?.exclude || []),\n ]\n\n const alwaysBind = context?.parameters?.argsToTplOptions?.alwaysBind || []\n\n const props = removeDuplicates([...alwaysBind, ...Object.keys(context.args)])\n\n const parts = props\n .filter((k) => exclude.indexOf(k) === -1)\n .map((k) => {\n // Outputs\n if (\n context.argTypes[k]?.hasOwnProperty('action') &&\n (context.args.hasOwnProperty(k) || alwaysBind.indexOf(k) !== -1)\n ) {\n return `(${k})=\"${k}($event)\"`\n }\n\n // Inputs\n if (context.args.hasOwnProperty(k) || alwaysBind.indexOf(k) !== -1) {\n return `[${k}]=\"${k}\"`\n }\n })\n\n return parts.length > 0 ? parts.join(' ') : ''\n}\n","import { Component } from '@angular/core'\n\n@Component({ template: ``, standalone: true })\nexport class StoryEmptyComponent {}\n","import { StoryInitialRouteService } from './initial-route.service'\n\nexport function storyInitialRouteFactory(\n _storyInitialRouteService: StoryInitialRouteService,\n) {\n return () => _storyInitialRouteService.setInitialRoute()\n}\n","import { Injectable, InjectionToken, Injector } from '@angular/core'\nimport { NavigationEnd, Router } from '@angular/router'\nimport { filter, take } from 'rxjs/operators'\n\nexport const STORY_INITIAL_ROUTE_URL = new InjectionToken<any>(\n 'STORY_INITIAL_ROUTE_URL',\n)\n\n@Injectable()\nexport class StoryInitialRouteService {\n constructor(private _injector: Injector) {}\n\n public setInitialRoute() {\n const _router = this._injector.get(Router)\n const url = this._injector.get(STORY_INITIAL_ROUTE_URL)\n if (_router.navigated) {\n _router.navigateByUrl(url)\n } else {\n _router.events\n .pipe(\n filter((e) => e instanceof NavigationEnd),\n take(1),\n )\n .subscribe(() => {\n _router.navigateByUrl(url)\n })\n }\n }\n}\n","import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core'\n\nimport { storyInitialRouteFactory } from './initial-route-factory'\nimport {\n StoryInitialRouteService,\n STORY_INITIAL_ROUTE_URL,\n} from './initial-route.service'\n\n@NgModule()\nexport class StoryInitialRouteModule {\n static forRoot(url: string): ModuleWithProviders<StoryInitialRouteModule> {\n return {\n ngModule: StoryInitialRouteModule,\n providers: [\n StoryInitialRouteService,\n {\n provide: APP_INITIALIZER,\n useFactory: storyInitialRouteFactory,\n deps: [StoryInitialRouteService],\n multi: true,\n },\n { provide: STORY_INITIAL_ROUTE_URL, useValue: url },\n ],\n }\n }\n}\n","// import { button } from '@storybook/addon-knobs'\n\n/**\n * Until I find a way to avoid '@storybook/addon-knobs' from interfering with\n * NgZone I can't import it in the knob when built by ng-packagr.\n */\nexport function routeButton(buttonKnob: any, url: string) {\n return buttonKnob(url, () => {\n location.hash = `#${url}`\n return false\n })\n}\n","// import { ArgType } from '@storybook/addons'\n\ndeclare const __STORYBOOK_ADDONS: any\n\nfunction goToHashUrl(url: string): void {\n location.hash = `#${url}`\n}\n\n// __STORYBOOK_ADDONS.getChannel().on('custom/go-to-hash', (data: { hash: string }) => {\n\n// goToHashUrl(data.hash)\n// })\n\n// __STORYBOOK_ADDONS.getChannel().on('storyArgsUpdated', (data: { hash: string }) => {\n// console.log('storyArgsUpdated')\n// })\n\nexport function routesArgType(routes: string[]) /*: ArgType*/ {\n return {\n options: routes,\n control: {\n type: 'select',\n // Runs in the 'manager', so I am emitting to a channel in the 'preview'.\n onChange: (e: any, a: any) => {\n __STORYBOOK_ADDONS.getChannel().emit('custom/go-to-hash', { hash: e })\n return e\n },\n },\n }\n}\n","import { Component } from '@angular/core'\n\n@Component({ template: `<router-outlet></router-outlet>`, standalone: false })\nexport class StoryEmptyWithRouteComponent {}\n","import { Component, Injector, Input, OnDestroy } from '@angular/core'\nimport { combineLatest, Observable, of, ReplaySubject, Subject } from 'rxjs'\nimport { auditTime, map, startWith, takeUntil } from 'rxjs/operators'\n\nimport { ModalConfig, ModalRef, MODAL_DATA } from '@theseam/ui-common/modal'\nimport type { ComponentType } from '@theseam/ui-common/models'\n\nclass FakeModalRef<T, R = any> implements Partial<ModalRef<T, R>> {\n afterOpened() {\n return of(undefined)\n }\n\n close(dialogResult?: R): void {}\n}\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'story-modal-container-component',\n template: `\n <div class=\"cdk-overlay-container\">\n <div\n class=\"cdk-overlay-backdrop cdk-overlay-dark-backdrop cdk-overlay-backdrop-showing\"\n ></div>\n <div\n class=\"cdk-global-overlay-wrapper\"\n dir=\"ltr\"\n style=\"justify-content: flex-start; align-items: center; pointer-events: auto\"\n seamOverlayScrollbar\n >\n <div\n class=\"seam-modal-container modal-dialog modal-dialog-centered {{\n modalConfig?.modalSize\n ? 'modal-' + modalConfig?.modalSize\n : 'modal-lg'\n }}\"\n tabindex=\"-1\"\n [class.modal-lg]=\"!modalConfig\"\n >\n <div class=\"modal-content\">\n <ng-container *ngIf=\"_outletData$ | async as outletData\">\n <ng-container\n *ngComponentOutlet=\"\n outletData.component;\n injector: outletData.injector\n \"\n ></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n `,\n styles: [\n `\n .seam-modal-container[tabindex='-1']:focus {\n outline: 0 !important;\n }\n `,\n ],\n standalone: false,\n})\nexport class StoryModalContainerComponent<T, D = any> implements OnDestroy {\n private readonly _ngUnsubscribe = new Subject<void>()\n\n @Input() set component(c: ComponentType<T>) {\n this._component.next(c)\n }\n @Input() set data(d: D) {\n this._data.next(d)\n }\n\n @Input() modalConfig?: ModalConfig<D>\n\n _component = new ReplaySubject<ComponentType<T>>(1)\n _data = new ReplaySubject<D>(1)\n\n _outletData$: Observable<{\n component: ComponentType<T>\n injector: Injector\n } | null>\n\n constructor(private _injector: Injector) {\n this._outletData$ = combineLatest([\n this._component.asObservable(),\n this._data.asObservable().pipe(startWith(undefined)),\n ]).pipe(\n auditTime(0),\n map(([component, data]) => ({\n component,\n injector: this._createInjector(data),\n })),\n takeUntil(this._ngUnsubscribe),\n )\n }\n\n ngOnDestroy() {\n this._ngUnsubscribe.next(undefined)\n this._ngUnsubscribe.complete()\n }\n\n private _createInjector(data?: D): Injector {\n return Injector.create({\n providers: [\n { provide: ModalRef, useClass: FakeModalRef, deps: [] },\n { provide: MODAL_DATA, useValue: data },\n ],\n parent: this._injector,\n })\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { RouterModule } from '@angular/router'\n\nimport { TheSeamOverlayScrollbarDirective } from '@theseam/ui-common/scrollbar'\n\nimport { StoryEmptyWithRouteComponent } from './story-empty-with-route.component'\nimport { StoryModalContainerComponent } from './story-modal-container.component'\n\n@NgModule({\n declarations: [StoryEmptyWithRouteComponent, StoryModalContainerComponent],\n imports: [CommonModule, RouterModule, TheSeamOverlayScrollbarDirective],\n exports: [StoryEmptyWithRouteComponent, StoryModalContainerComponent],\n})\nexport class StoryHelperComponentsModule {}\n","import { APP_BOOTSTRAP_LISTENER, ComponentRef } from '@angular/core'\n// import { STORY } from '@storybook/angular/dist/ts3.9/client/preview/angular/app.token'\n// import { StoryFnAngularReturnType } from '@storybook/angular/dist/ts3.9/client/preview/types'\nimport { Observable } from 'rxjs'\nimport { first } from 'rxjs/operators'\n\n/**\n * Can be used to access a stories component after the story has been bootstrapped.\n *\n * Example:\n * ```ts\n * @Component({\n * selector: 'story-example',\n * template: `Touched: {{ exControl.touched }}`\n * })\n * class StoryExampleComponent {\n * exControl = new FormControl('')\n * }\n *\n * export const TouchExample2 = () => ({\n * moduleMetadata: {\n * declarations: [ StoryExampleComponent ],\n * providers: [ onStoryBootstrappedExec((c: StoryExampleComponent) => c.exControl.markAsTouched()) ]\n * },\n * props: { },\n * component: StoryExampleComponent\n * })\n * ```\n */\n// export function onStoryBootstrappedExec<T = any>(callback: (component: T) => void) {\n// function bootstrapped(componentRef: ComponentRef<any>) {\n// const data = componentRef.instance.target.injector.get(STORY, null) as Observable<StoryFnAngularReturnType> | null\n// if (!data) {\n// console.warn(`STORY provider not found.`)\n// return\n// }\n// data?.pipe(first()).subscribe(story => {\n// if (!story.component) {\n// console.warn(`'onStoryBootstrappedExec' only supported on stories that provide 'component' property.`)\n// return\n// }\n\n// let c = null\n// for (let i = 0; i < componentRef.instance.target.length; i++) {\n// const tmp = componentRef.instance.target._embeddedViews[i].nodes?.find((f: any) => f?.instance instanceof story.component)\n// const comp = tmp?.instance\n// if (comp) {\n// c = comp\n// break\n// }\n// }\n\n// if (!c) {\n// console.warn(`Story component instance not found.`)\n// return\n// }\n\n// if (c) {\n// callback(c)\n// }\n// })\n// }\n\n// return {\n// provide: APP_BOOTSTRAP_LISTENER,\n// useValue: bootstrapped,\n// multi: true\n// }\n// }\n","import { APP_BOOTSTRAP_LISTENER, ComponentRef, ElementRef } from '@angular/core'\n\n// TODO: Consider supporting a target selection function, so that complex\n// selections that can't be expressed by a simple selector can be used.\n\n/**\n * Can be used to trigger an event on a target element when the story component has been bootstrapped.\n *\n * Example:\n * ```\n * export const TouchExample1 = () => ({\n * moduleMetadata: {\n * providers: [ onStoryBootstrappedTrigger('input', 'blur') ]\n * },\n * props: { control: new FormControl('') },\n * template: `\n * <input type=\"text\" [formControl]=\"control\">\n * Touched: {{ control.touched }}\n * `\n * })\n * ```\n */\nexport function onStoryBootstrappedTrigger(\n targetSelector: string,\n eventName: string,\n) {\n function bootstrapped(componentRef: ComponentRef<any>) {\n const elementRef = componentRef.injector.get(ElementRef, null)\n const target = elementRef?.nativeElement.querySelector(targetSelector)\n if (!target) {\n // eslint-disable-next-line no-console\n console.warn(\n `Unable to trigger event '${eventName}'. Target '${targetSelector}' not found.`,\n )\n }\n\n const e = document.createEvent('HTMLEvents')\n e.initEvent('blur', false, true)\n target.dispatchEvent(e)\n }\n\n return {\n provide: APP_BOOTSTRAP_LISTENER,\n useValue: bootstrapped,\n multi: true,\n }\n}\n","import { Injectable } from '@angular/core'\nimport { Observable, of } from 'rxjs'\n\nimport { TheSeamPreferencesAccessor } from '@theseam/ui-common/services'\n\nconst ACCESSOR_PREFIX = 'story-pref'\n\n@Injectable()\nexport class StoryPreferencesAccessorService\n implements TheSeamPreferencesAccessor\n{\n /**\n * Gets a preference.\n */\n public get(name: string): Observable<string> {\n // console.log('get', name)\n return of(localStorage.getItem(`${ACCESSOR_PREFIX}-${name}`) || '{}')\n }\n\n /**\n * Update a preference.\n */\n public update(name: string, value: string): Observable<string> {\n // console.log('update', name)\n localStorage.setItem(`${ACCESSOR_PREFIX}-${name}`, value)\n return this.get(name)\n }\n\n /**\n * Delete a preference.\n */\n public delete(name: string): Observable<boolean> {\n localStorage.removeItem(`${ACCESSOR_PREFIX}-${name}`)\n return of(true)\n }\n}\n","import { APP_INITIALIZER, Injector } from '@angular/core'\n\nimport { AngularRenderer, applicationConfig } from '@storybook/angular'\nimport { DecoratorFunction } from 'storybook/internal/csf'\n\nexport const INJECTOR_TO_ARGS_PROPERTY_NAME = '__getInjector'\n\n// TODO: Decide a better way to persist the injector reference than poluting\n// args with a value that isn't really meant to be an arg.\n\n/**\n * Storybook decorator that stores the Angular Injector in\n * args, for retrieval in play function.\n */\nexport const addInjectorGetterToArgs =\n (\n argName: string = INJECTOR_TO_ARGS_PROPERTY_NAME,\n ): DecoratorFunction<AngularRenderer> =>\n (story: any, context: any) => {\n // TODO: Test this more thoroughly.\n let injector: Injector | null = null\n context.args[argName] = () => injector\n return applicationConfig({\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: (injectorService: Injector) => () => {\n injector = injectorService\n },\n deps: [Injector],\n multi: true,\n },\n ],\n })(story, context)\n }\n\nexport const getInjectorFromArgs = (\n args: any,\n argName: string = INJECTOR_TO_ARGS_PROPERTY_NAME,\n): Injector => {\n if (!args || typeof args[argName] !== 'function') {\n throw Error(`Injector getter function '${argName}' not found.`)\n }\n const injector = args[argName]()\n if (!injector) {\n throw Error(\n `Injector not found. Did you add 'addInjectorGetterToArgs' to your story dectorators?`,\n )\n }\n\n return injector\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAAA;AAMO,MAAM,YAAY,GAAY;AACnC,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,OAAO,EAAE;AACP,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,WAAW,EAAE,CAAA,YAAA,CAAc;;AAGtB,MAAM,uBAAuB,GAAY;AAC9C,IAAA,OAAO,EAAE,CAAC,GAAG,UAAU,EAAE,GAAG,iBAAiB,CAAC;AAC9C,IAAA,OAAO,EAAE;AACP,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,WAAW,EAAE,CAAA,YAAA,CAAc;;AAGtB,MAAM,WAAW,GAAY;AAClC,IAAA,OAAO,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAChC,IAAA,OAAO,EAAE;AACP,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,WAAW,EAAE,CAAA,KAAA,CAAO;;AAGf,MAAM,iBAAiB,GAAY;AACxC,IAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;AAC7B,IAAA,OAAO,EAAE;AACP,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,WAAW,EAAE,CAAA,YAAA,CAAc;;;ACzB7B;;;;;;AAMG;AACH;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA,SAAS,gBAAgB,CAAC,GAAa,EAAA;IACrC,MAAM,IAAI,GAA6B,EAAE;AACzC,IAAA,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAI;AACzB,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACf,YAAA,IA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AU,EAAE,CAAC,eAAyB,KAAK,MAAK;oBAC9C,QAAQ,GAAG,eAAe;gBAC5B,CAAC;gBACD,IAAI,EAAE,CAAC,QAAQ,CAAC;AAChB,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA;AACF,KAAA,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC;AACpB;AAEK,MAAM,mBAAmB,GAAG,CACjC,IAAS,EACT,OAAA,GAAkB,8BAA8B,KACpC;IACZ,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,UAAU,EAAE;AAChD,QAAA,MAAM,KAAK,CAAC,CAAA,0BAAA,EAA6B,OAAO,CAAA,YAAA,CAAc,CAAC;IACjE;AACA,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE;IAChC,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,MAAM,KAAK,CACT,CAAA,oFAAA,CAAsF,CACvF;IACH;AAEA,IAAA,OAAO,QAAQ;AACjB;;ACnDA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-story-helpers.mjs","sources":["../../../projects/ui-common/story-helpers/arg-type-helpers.ts","../../../projects/ui-common/story-helpers/args-to-tpl.ts","../../../projects/ui-common/story-helpers/story-empty.component.ts","../../../projects/ui-common/story-helpers/initial-route-factory.ts","../../../projects/ui-common/story-helpers/initial-route.service.ts","../../../projects/ui-common/story-helpers/story-initial-route.ts","../../../projects/ui-common/story-helpers/route-button.ts","../../../projects/ui-common/story-helpers/routes-arg-type.ts","../../../projects/ui-common/story-helpers/story-empty-with-route.component.ts","../../../projects/ui-common/story-helpers/story-modal-container.component.ts","../../../projects/ui-common/story-helpers/story-helper-components.module.ts","../../../projects/ui-common/story-helpers/story-modal-decorator.ts","../../../projects/ui-common/story-helpers/on-story-bootstrapped-exec.ts","../../../projects/ui-common/story-helpers/on-story-bootstrapped-trigger.ts","../../../projects/ui-common/story-helpers/story-preferences-accessor.service.ts","../../../projects/ui-common/story-helpers/add-injector-to-args.ts","../../../projects/ui-common/story-helpers/theseam-ui-common-story-helpers.ts"],"sourcesContent":["// import { ArgType } from '@storybook/addons'\n\nimport { OutlineThemeNames, ThemeNames } from '@theseam/ui-common/models'\n\ndeclare type ArgType = any\n\nexport const themeArgType: ArgType = {\n options: ThemeNames,\n control: {\n type: 'select',\n },\n description: `Theme style.`,\n}\n\nexport const themeWithOutlineArgType: ArgType = {\n options: [...ThemeNames, ...OutlineThemeNames],\n control: {\n type: 'select',\n },\n description: `Theme style.`,\n}\n\nexport const sizeArgType: ArgType = {\n options: [undefined, 'sm', 'lg'],\n control: {\n type: 'select',\n },\n description: `Size.`,\n}\n\nexport const buttonTypeArgType: ArgType = {\n options: ['button', 'submit'],\n control: {\n type: 'select',\n },\n description: `Button type.`,\n}\n","/* eslint-disable no-prototype-builtins */\nimport { action, HandlerFunction } from 'storybook/actions'\nimport { AngularRenderer, ArgTypes } from '@storybook/angular'\nimport { useStoryContext } from 'storybook/preview-api'\n\nexport interface ArgsTplParts {\n actions: { [prop: string]: HandlerFunction }\n tplfragment: string\n}\n\n/**\n * This is an attempt at simplifying the use of auto-generated args in stories\n * defined with `template`, since Angular doesn't have a way to simply use a\n * spread operator syntax.\n *\n * @experimental\n */\n// export function argsToTplParts(args: any, argTypes: ArgTypes): ArgsTplParts {\n// // console.log({ args, argTypes })\n// const parts: ArgsTplParts = {\n// actions: {},\n// tplfragment: ''\n// }\n\n// Object.keys(argTypes).forEach(k => {\n// // Inputs\n// if (\n// // Is in the inputs category\n// argTypes[k].table.category === 'inputs' &&\n// // Needs a control to be able to change from auto-generated args.\n// argTypes[k]?.hasOwnProperty('control') &&\n// // Assuming the arg might not be in props if there isn't an arg value.\n// args.hasOwnProperty(k)\n// ) {\n// parts.tplfragment += `[${k}]=\"${k}\" `\n// }\n\n// // Outputs\n// if (\n// // Is in the outputs category\n// argTypes[k]?.table?.category === 'outputs'\n// ) {\n// // Without access to props, I don't know if I can get an action into the\n// // template context like this.\n// parts.tplfragment += `(${k})=\"${k}($event)\" `\n// parts.actions[k] = action(k)\n// }\n// })\n\n// return parts\n// }\n\nfunction removeDuplicates(arr: string[]) {\n const seen: { [k: string]: boolean } = {}\n return arr.filter((item) => {\n if (!seen[item]) {\n seen[item] = true\n return true\n }\n return false\n })\n}\n\nexport interface ArgsTplOptions {\n /**\n * Properties to always bind to the template.\n */\n alwaysBind?: string[]\n /**\n * Properties to exclude from bidning to the template.\n */\n exclude?: string[]\n}\n\n/**\n * This is an attempt at simplifying the use of auto-generated args in stories\n * defined with `template`, since Angular doesn't have a way to simply use a\n * spread operator syntax.\n *\n * @experimental\n */\nexport function argsToTpl(options?: ArgsTplOptions) {\n const context = useStoryContext<AngularRenderer>()\n\n const exclude = [\n ...(context?.parameters?.argsToTplOptions?.exclude || []),\n ...(options?.exclude || []),\n ]\n\n const alwaysBind = context?.parameters?.argsToTplOptions?.alwaysBind || []\n\n const props = removeDuplicates([...alwaysBind, ...Object.keys(context.args)])\n\n const parts = props\n .filter((k) => exclude.indexOf(k) === -1)\n .map((k) => {\n // Outputs\n if (\n context.argTypes[k]?.hasOwnProperty('action') &&\n (context.args.hasOwnProperty(k) || alwaysBind.indexOf(k) !== -1)\n ) {\n return `(${k})=\"${k}($event)\"`\n }\n\n // Inputs\n if (context.args.hasOwnProperty(k) || alwaysBind.indexOf(k) !== -1) {\n return `[${k}]=\"${k}\"`\n }\n })\n\n return parts.length > 0 ? parts.join(' ') : ''\n}\n","import { Component } from '@angular/core'\n\n@Component({ template: ``, standalone: true })\nexport class StoryEmptyComponent {}\n","import { StoryInitialRouteService } from './initial-route.service'\n\nexport function storyInitialRouteFactory(\n _storyInitialRouteService: StoryInitialRouteService,\n) {\n return () => _storyInitialRouteService.setInitialRoute()\n}\n","import { Injectable, InjectionToken, Injector } from '@angular/core'\nimport { NavigationEnd, Router } from '@angular/router'\nimport { filter, take } from 'rxjs/operators'\n\nexport const STORY_INITIAL_ROUTE_URL = new InjectionToken<any>(\n 'STORY_INITIAL_ROUTE_URL',\n)\n\n@Injectable()\nexport class StoryInitialRouteService {\n constructor(private _injector: Injector) {}\n\n public setInitialRoute() {\n const _router = this._injector.get(Router)\n const url = this._injector.get(STORY_INITIAL_ROUTE_URL)\n if (_router.navigated) {\n _router.navigateByUrl(url)\n } else {\n _router.events\n .pipe(\n filter((e) => e instanceof NavigationEnd),\n take(1),\n )\n .subscribe(() => {\n _router.navigateByUrl(url)\n })\n }\n }\n}\n","import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core'\n\nimport { storyInitialRouteFactory } from './initial-route-factory'\nimport {\n StoryInitialRouteService,\n STORY_INITIAL_ROUTE_URL,\n} from './initial-route.service'\n\n@NgModule()\nexport class StoryInitialRouteModule {\n static forRoot(url: string): ModuleWithProviders<StoryInitialRouteModule> {\n return {\n ngModule: StoryInitialRouteModule,\n providers: [\n StoryInitialRouteService,\n {\n provide: APP_INITIALIZER,\n useFactory: storyInitialRouteFactory,\n deps: [StoryInitialRouteService],\n multi: true,\n },\n { provide: STORY_INITIAL_ROUTE_URL, useValue: url },\n ],\n }\n }\n}\n","// import { button } from '@storybook/addon-knobs'\n\n/**\n * Until I find a way to avoid '@storybook/addon-knobs' from interfering with\n * NgZone I can't import it in the knob when built by ng-packagr.\n */\nexport function routeButton(buttonKnob: any, url: string) {\n return buttonKnob(url, () => {\n location.hash = `#${url}`\n return false\n })\n}\n","// import { ArgType } from '@storybook/addons'\n\ndeclare const __STORYBOOK_ADDONS: any\n\nfunction goToHashUrl(url: string): void {\n location.hash = `#${url}`\n}\n\n// __STORYBOOK_ADDONS.getChannel().on('custom/go-to-hash', (data: { hash: string }) => {\n\n// goToHashUrl(data.hash)\n// })\n\n// __STORYBOOK_ADDONS.getChannel().on('storyArgsUpdated', (data: { hash: string }) => {\n// console.log('storyArgsUpdated')\n// })\n\nexport function routesArgType(routes: string[]) /*: ArgType*/ {\n return {\n options: routes,\n control: {\n type: 'select',\n // Runs in the 'manager', so I am emitting to a channel in the 'preview'.\n onChange: (e: any, a: any) => {\n __STORYBOOK_ADDONS.getChannel().emit('custom/go-to-hash', { hash: e })\n return e\n },\n },\n }\n}\n","import { Component } from '@angular/core'\n\n@Component({ template: `<router-outlet></router-outlet>`, standalone: false })\nexport class StoryEmptyWithRouteComponent {}\n","import { CommonModule } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n Injector,\n Input,\n signal,\n TemplateRef,\n} from '@angular/core'\nimport { of } from 'rxjs'\n\nimport { ModalConfig, ModalRef, MODAL_DATA } from '@theseam/ui-common/modal'\nimport type { ComponentType } from '@theseam/ui-common/models'\nimport { TheSeamOverlayScrollbarDirective } from '@theseam/ui-common/scrollbar'\n\nclass FakeModalRef<T, R = any> implements Partial<ModalRef<T, R>> {\n afterOpened() {\n return of(undefined)\n }\n\n close(_dialogResult?: R): void {\n /* no-op in stories */\n }\n}\n\n/**\n * Renders its content (or an imperatively provided component/template) inside\n * a stand-in modal frame so stories can preview components that are normally\n * opened through the modal service.\n *\n * Three ways to provide content, checked in order:\n * 1. `[component]` input — renders via `ngComponentOutlet`. Kept for\n * compatibility with existing app stories.\n * 2. `[template]` input — renders a `TemplateRef` via `ngTemplateOutlet`.\n * 3. Projected content (`<ng-content>`) — the preferred form for new stories\n * because Storybook's default template auto-binds inputs/outputs.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'story-modal-container-component',\n imports: [CommonModule, TheSeamOverlayScrollbarDirective],\n template: `\n <div class=\"cdk-overlay-container\">\n <div\n class=\"cdk-overlay-backdrop cdk-overlay-dark-backdrop cdk-overlay-backdrop-showing\"\n ></div>\n <div\n class=\"cdk-global-overlay-wrapper\"\n dir=\"ltr\"\n style=\"justify-content: flex-start; align-items: center; pointer-events: auto\"\n seamOverlayScrollbar\n >\n <div\n class=\"seam-modal-container modal-dialog modal-dialog-centered {{\n _modalSizeClass()\n }}\"\n tabindex=\"-1\"\n >\n <div class=\"modal-content\">\n @if (_component(); as c) {\n <ng-container\n *ngComponentOutlet=\"c; injector: _componentInjector()\"\n ></ng-container>\n } @else if (template) {\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n </div>\n </div>\n </div>\n </div>\n `,\n styles: [\n `\n .seam-modal-container[tabindex='-1']:focus {\n outline: 0 !important;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class StoryModalContainerComponent<T = unknown, D = any> {\n constructor(private readonly _injector: Injector) {}\n\n @Input()\n set component(c: ComponentType<T> | null | undefined) {\n this._component.set(c ?? null)\n }\n\n @Input()\n set data(d: D | null | undefined) {\n this._data.set(d ?? null)\n }\n\n @Input()\n set modalConfig(config: ModalConfig<D> | null | undefined) {\n this._modalConfig.set(config ?? null)\n }\n get modalConfig(): ModalConfig<D> | null {\n return this._modalConfig()\n }\n\n @Input() template?: TemplateRef<unknown> | null\n\n protected readonly _component = signal<ComponentType<T> | null>(null)\n private readonly _data = signal<D | null>(null)\n private readonly _modalConfig = signal<ModalConfig<D> | null>(null)\n\n protected readonly _componentInjector = computed(() =>\n this._createInjector(this._data()),\n )\n\n // No default size — stories opt into a Bootstrap modal size via\n // `modalConfig.modalSize`, matching how the real ModalService is used.\n protected readonly _modalSizeClass = computed(() => {\n const size = this._modalConfig()?.modalSize\n return size ? `modal-${size}` : ''\n })\n\n private _createInjector(data: D | null): Injector {\n return Injector.create({\n providers: [\n { provide: ModalRef, useClass: FakeModalRef, deps: [] },\n { provide: MODAL_DATA, useValue: data ?? undefined },\n ],\n parent: this._injector,\n })\n }\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { RouterModule } from '@angular/router'\n\nimport { TheSeamOverlayScrollbarDirective } from '@theseam/ui-common/scrollbar'\n\nimport { StoryEmptyWithRouteComponent } from './story-empty-with-route.component'\nimport { StoryModalContainerComponent } from './story-modal-container.component'\n\n@NgModule({\n declarations: [StoryEmptyWithRouteComponent],\n imports: [\n CommonModule,\n RouterModule,\n TheSeamOverlayScrollbarDirective,\n StoryModalContainerComponent,\n ],\n exports: [StoryEmptyWithRouteComponent, StoryModalContainerComponent],\n})\nexport class StoryHelperComponentsModule {}\n","import { componentWrapperDecorator, Decorator } from '@storybook/angular'\n\nimport { ModalConfig } from '@theseam/ui-common/modal'\n\nimport { StoryModalContainerComponent } from './story-modal-container.component'\n\nexport interface StoryModalDecoratorOptions {\n /**\n * Passed through to `StoryModalContainerComponent`'s `modalConfig` input.\n * Commonly used to opt into a Bootstrap modal size, e.g.\n * `{ modalSize: 'lg' }`.\n */\n modalConfig?: ModalConfig\n}\n\n/**\n * Wraps a story's rendered component in `<story-modal-container-component>`\n * so it previews inside a stand-in modal frame. Storybook's default template\n * binds the story's args to the wrapped component, so inputs/outputs (e.g.\n * for the Actions addon) work without extra wiring.\n *\n * Use as an entry in a story's `decorators` array:\n *\n * ```ts\n * const meta: Meta<MyModalComponent> = {\n * title: 'Modal/My',\n * component: MyModalComponent,\n * decorators: [storyModalDecorator({ modalConfig: { modalSize: 'lg' } })],\n * }\n * ```\n */\nexport function storyModalDecorator(\n options?: StoryModalDecoratorOptions,\n): Decorator {\n return (storyFn, storyContext) => {\n const result = componentWrapperDecorator(\n (story) => `\n <story-modal-container-component [modalConfig]=\"_storyModalConfig\">\n ${story}\n </story-modal-container-component>\n `,\n )(storyFn, storyContext)\n\n return {\n ...result,\n props: {\n ...(result.props ?? {}),\n // Prefixed to avoid colliding with a story's own args.\n _storyModalConfig: options?.modalConfig ?? null,\n },\n moduleMetadata: {\n ...(result.moduleMetadata ?? {}),\n imports: [\n ...(result.moduleMetadata?.imports ?? []),\n StoryModalContainerComponent,\n ],\n },\n }\n }\n}\n","import { APP_BOOTSTRAP_LISTENER, ComponentRef } from '@angular/core'\n// import { STORY } from '@storybook/angular/dist/ts3.9/client/preview/angular/app.token'\n// import { StoryFnAngularReturnType } from '@storybook/angular/dist/ts3.9/client/preview/types'\nimport { Observable } from 'rxjs'\nimport { first } from 'rxjs/operators'\n\n/**\n * Can be used to access a stories component after the story has been bootstrapped.\n *\n * Example:\n * ```ts\n * @Component({\n * selector: 'story-example',\n * template: `Touched: {{ exControl.touched }}`\n * })\n * class StoryExampleComponent {\n * exControl = new FormControl('')\n * }\n *\n * export const TouchExample2 = () => ({\n * moduleMetadata: {\n * declarations: [ StoryExampleComponent ],\n * providers: [ onStoryBootstrappedExec((c: StoryExampleComponent) => c.exControl.markAsTouched()) ]\n * },\n * props: { },\n * component: StoryExampleComponent\n * })\n * ```\n */\n// export function onStoryBootstrappedExec<T = any>(callback: (component: T) => void) {\n// function bootstrapped(componentRef: ComponentRef<any>) {\n// const data = componentRef.instance.target.injector.get(STORY, null) as Observable<StoryFnAngularReturnType> | null\n// if (!data) {\n// console.warn(`STORY provider not found.`)\n// return\n// }\n// data?.pipe(first()).subscribe(story => {\n// if (!story.component) {\n// console.warn(`'onStoryBootstrappedExec' only supported on stories that provide 'component' property.`)\n// return\n// }\n\n// let c = null\n// for (let i = 0; i < componentRef.instance.target.length; i++) {\n// const tmp = componentRef.instance.target._embeddedViews[i].nodes?.find((f: any) => f?.instance instanceof story.component)\n// const comp = tmp?.instance\n// if (comp) {\n// c = comp\n// break\n// }\n// }\n\n// if (!c) {\n// console.warn(`Story component instance not found.`)\n// return\n// }\n\n// if (c) {\n// callback(c)\n// }\n// })\n// }\n\n// return {\n// provide: APP_BOOTSTRAP_LISTENER,\n// useValue: bootstrapped,\n// multi: true\n// }\n// }\n","import { APP_BOOTSTRAP_LISTENER, ComponentRef, ElementRef } from '@angular/core'\n\n// TODO: Consider supporting a target selection function, so that complex\n// selections that can't be expressed by a simple selector can be used.\n\n/**\n * Can be used to trigger an event on a target element when the story component has been bootstrapped.\n *\n * Example:\n * ```\n * export const TouchExample1 = () => ({\n * moduleMetadata: {\n * providers: [ onStoryBootstrappedTrigger('input', 'blur') ]\n * },\n * props: { control: new FormControl('') },\n * template: `\n * <input type=\"text\" [formControl]=\"control\">\n * Touched: {{ control.touched }}\n * `\n * })\n * ```\n */\nexport function onStoryBootstrappedTrigger(\n targetSelector: string,\n eventName: string,\n) {\n function bootstrapped(componentRef: ComponentRef<any>) {\n const elementRef = componentRef.injector.get(ElementRef, null)\n const target = elementRef?.nativeElement.querySelector(targetSelector)\n if (!target) {\n // eslint-disable-next-line no-console\n console.warn(\n `Unable to trigger event '${eventName}'. Target '${targetSelector}' not found.`,\n )\n }\n\n const e = document.createEvent('HTMLEvents')\n e.initEvent('blur', false, true)\n target.dispatchEvent(e)\n }\n\n return {\n provide: APP_BOOTSTRAP_LISTENER,\n useValue: bootstrapped,\n multi: true,\n }\n}\n","import { Injectable } from '@angular/core'\nimport { Observable, of } from 'rxjs'\n\nimport { TheSeamPreferencesAccessor } from '@theseam/ui-common/services'\n\nconst ACCESSOR_PREFIX = 'story-pref'\n\n@Injectable()\nexport class StoryPreferencesAccessorService\n implements TheSeamPreferencesAccessor\n{\n /**\n * Gets a preference.\n */\n public get(name: string): Observable<string> {\n // console.log('get', name)\n return of(localStorage.getItem(`${ACCESSOR_PREFIX}-${name}`) || '{}')\n }\n\n /**\n * Update a preference.\n */\n public update(name: string, value: string): Observable<string> {\n // console.log('update', name)\n localStorage.setItem(`${ACCESSOR_PREFIX}-${name}`, value)\n return this.get(name)\n }\n\n /**\n * Delete a preference.\n */\n public delete(name: string): Observable<boolean> {\n localStorage.removeItem(`${ACCESSOR_PREFIX}-${name}`)\n return of(true)\n }\n}\n","import { APP_INITIALIZER, Injector } from '@angular/core'\n\nimport { AngularRenderer, applicationConfig } from '@storybook/angular'\nimport { DecoratorFunction } from 'storybook/internal/csf'\n\nexport const INJECTOR_TO_ARGS_PROPERTY_NAME = '__getInjector'\n\n// TODO: Decide a better way to persist the injector reference than poluting\n// args with a value that isn't really meant to be an arg.\n\n/**\n * Storybook decorator that stores the Angular Injector in\n * args, for retrieval in play function.\n */\nexport const addInjectorGetterToArgs =\n (\n argName: string = INJECTOR_TO_ARGS_PROPERTY_NAME,\n ): DecoratorFunction<AngularRenderer> =>\n (story: any, context: any) => {\n // TODO: Test this more thoroughly.\n let injector: Injector | null = null\n context.args[argName] = () => injector\n return applicationConfig({\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: (injectorService: Injector) => () => {\n injector = injectorService\n },\n deps: [Injector],\n multi: true,\n },\n ],\n })(story, context)\n }\n\nexport const getInjectorFromArgs = (\n args: any,\n argName: string = INJECTOR_TO_ARGS_PROPERTY_NAME,\n): Injector => {\n if (!args || typeof args[argName] !== 'function') {\n throw Error(`Injector getter function '${argName}' not found.`)\n }\n const injector = args[argName]()\n if (!injector) {\n throw Error(\n `Injector not found. Did you add 'addInjectorGetterToArgs' to your story dectorators?`,\n )\n }\n\n return injector\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AAMO,MAAM,YAAY,GAAY;AACnC,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,OAAO,EAAE;AACP,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,WAAW,EAAE,CAAA,YAAA,CAAc;;AAGtB,MAAM,uBAAuB,GAAY;AAC9C,IAAA,OAAO,EAAE,CAAC,GAAG,UAAU,EAAE,GAAG,iBAAiB,CAAC;AAC9C,IAAA,OAAO,EAAE;AACP,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,WAAW,EAAE,CAAA,YAAA,CAAc;;AAGtB,MAAM,WAAW,GAAY;AAClC,IAAA,OAAO,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAChC,IAAA,OAAO,EAAE;AACP,QAAA,IAAI,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,WAAW,EAAE,CAAA,KAAA,CAAO;;AAGf,MAAM,iBAAiB,GAAY;AACxC,IAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;AAC7B,IAAA,OAAO,EAAE;AACP,QAAA,IAAI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,CAAsF,CACvF;IACH;AAEA,IAAA,OAAO,QAAQ;AACjB;;ACnDA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theseam/ui-common",
|
|
3
|
-
"version": "1.0.2-beta.
|
|
3
|
+
"version": "1.0.2-beta.60",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "^20.2.3",
|
|
6
6
|
"@angular/common": "^20.3.0",
|
|
@@ -267,6 +267,10 @@
|
|
|
267
267
|
"types": "./shared/index.d.ts",
|
|
268
268
|
"default": "./fesm2022/theseam-ui-common-shared.mjs"
|
|
269
269
|
},
|
|
270
|
+
"./signature-input": {
|
|
271
|
+
"types": "./signature-input/index.d.ts",
|
|
272
|
+
"default": "./fesm2022/theseam-ui-common-signature-input.mjs"
|
|
273
|
+
},
|
|
270
274
|
"./states-counties-map": {
|
|
271
275
|
"types": "./states-counties-map/index.d.ts",
|
|
272
276
|
"default": "./fesm2022/theseam-ui-common-states-counties-map.mjs"
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import * as _almothafar_angular_signature_pad from '@almothafar/angular-signature-pad';
|
|
2
|
+
import { NgSignaturePadOptions } from '@almothafar/angular-signature-pad';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { InjectionToken, AfterViewInit, EventEmitter } from '@angular/core';
|
|
5
|
+
import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
|
|
6
|
+
import { FormGroup, FormControl, ControlValueAccessor } from '@angular/forms';
|
|
7
|
+
import { NgxFileDropEntry } from 'ngx-file-drop';
|
|
8
|
+
import { ModalConfig } from '@theseam/ui-common/modal';
|
|
9
|
+
import * as _angular_cdk_testing from '@angular/cdk/testing';
|
|
10
|
+
import { ComponentHarness, TestElement, BaseHarnessFilters, HarnessPredicate } from '@angular/cdk/testing';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Options for `szimek/signature_pad` exposed by
|
|
14
|
+
* `@almothafar/angular-signature-pad`. Re-exported here so consumers don't
|
|
15
|
+
* have to reach into the third-party module directly.
|
|
16
|
+
*/
|
|
17
|
+
type SignaturePadOptions = NgSignaturePadOptions;
|
|
18
|
+
type SignatureInputOptions = NgSignaturePadOptions;
|
|
19
|
+
interface SignatureInputItem {
|
|
20
|
+
clear(): void;
|
|
21
|
+
}
|
|
22
|
+
interface SignatureInputContainer {
|
|
23
|
+
registerInputItem(type: string, item: SignatureInputItem): boolean;
|
|
24
|
+
unregisterInputItem(type: string, item: SignatureInputItem): boolean;
|
|
25
|
+
}
|
|
26
|
+
type SignatureInputType = 'pen' | 'text' | 'img';
|
|
27
|
+
type SignatureInputResetType = 'delete' | 'cancel';
|
|
28
|
+
type SignatureInputPanelResult = {
|
|
29
|
+
type: 'submit';
|
|
30
|
+
value: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'cancel';
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare const THESEAM_SIGNATURE_INPUT_CONTAINER: InjectionToken<SignatureInputContainer>;
|
|
36
|
+
|
|
37
|
+
interface SignatureInputPanelForm {
|
|
38
|
+
pen: FormControl<string | null>;
|
|
39
|
+
text: FormControl<string | null>;
|
|
40
|
+
img: FormControl<string | null>;
|
|
41
|
+
}
|
|
42
|
+
declare class TheSeamSignatureInputPanelComponent implements SignatureInputContainer {
|
|
43
|
+
private readonly _layout;
|
|
44
|
+
private readonly _modalRef;
|
|
45
|
+
/** Emitted when the panel is submitted or canceled. */
|
|
46
|
+
readonly result: _angular_core.OutputEmitterRef<SignatureInputPanelResult>;
|
|
47
|
+
protected readonly _faSignature: _fortawesome_fontawesome_common_types.IconDefinition;
|
|
48
|
+
protected readonly _faUpload: _fortawesome_fontawesome_common_types.IconDefinition;
|
|
49
|
+
protected readonly _faKeyboard: _fortawesome_fontawesome_common_types.IconDefinition;
|
|
50
|
+
protected readonly _activeType: _angular_core.WritableSignal<SignatureInputType>;
|
|
51
|
+
protected readonly _resetType: _angular_core.Signal<SignatureInputResetType>;
|
|
52
|
+
readonly _form: FormGroup<SignatureInputPanelForm>;
|
|
53
|
+
private readonly _registeredInputItems;
|
|
54
|
+
private readonly _activeControl$;
|
|
55
|
+
private readonly _activeValue$;
|
|
56
|
+
private readonly _canSubmit$;
|
|
57
|
+
protected readonly _value: _angular_core.Signal<string | null>;
|
|
58
|
+
protected readonly _valueEmpty: _angular_core.Signal<boolean>;
|
|
59
|
+
protected readonly _canSubmit: _angular_core.Signal<boolean>;
|
|
60
|
+
protected readonly _isSm: _angular_core.Signal<boolean>;
|
|
61
|
+
showType(type: SignatureInputType): void;
|
|
62
|
+
registerInputItem(type: string, item: SignatureInputItem): boolean;
|
|
63
|
+
unregisterInputItem(type: string, item: SignatureInputItem): boolean;
|
|
64
|
+
reset(): void;
|
|
65
|
+
protected _onClearBtnClick(event: Event): void;
|
|
66
|
+
protected _onCancelBtnClick(event: Event): void;
|
|
67
|
+
protected _onSubmitBtnClick(event: Event): void;
|
|
68
|
+
private _emit;
|
|
69
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TheSeamSignatureInputPanelComponent, never>;
|
|
70
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TheSeamSignatureInputPanelComponent, "seam-signature-input-panel", never, {}, { "result": "result"; }, never, never, true, never>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare class TheSeamSignatureInputPenComponent implements ControlValueAccessor, SignatureInputItem {
|
|
74
|
+
private readonly _container;
|
|
75
|
+
private readonly _destroyRef;
|
|
76
|
+
readonly options: _angular_core.InputSignalWithTransform<_almothafar_angular_signature_pad.NgSignaturePadOptions, _almothafar_angular_signature_pad.NgSignaturePadOptions>;
|
|
77
|
+
readonly beginDrawing: _angular_core.OutputEmitterRef<MouseEvent | Touch>;
|
|
78
|
+
readonly endDrawing: _angular_core.OutputEmitterRef<MouseEvent | Touch>;
|
|
79
|
+
private readonly _signaturePad;
|
|
80
|
+
private readonly _value;
|
|
81
|
+
private readonly _disabled;
|
|
82
|
+
protected readonly _canvasWidth: _angular_core.Signal<number | undefined>;
|
|
83
|
+
protected readonly _canvasHeight: _angular_core.Signal<number | undefined>;
|
|
84
|
+
private _onChange;
|
|
85
|
+
private _onTouched;
|
|
86
|
+
constructor();
|
|
87
|
+
writeValue(value: string | null): void;
|
|
88
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
89
|
+
registerOnTouched(fn: () => void): void;
|
|
90
|
+
setDisabledState(isDisabled: boolean): void;
|
|
91
|
+
clear(): void;
|
|
92
|
+
protected _drawStart(event: MouseEvent | Touch): void;
|
|
93
|
+
protected _drawComplete(event: MouseEvent | Touch): void;
|
|
94
|
+
private _getDataURL;
|
|
95
|
+
private _applyValueToPad;
|
|
96
|
+
private _setValue;
|
|
97
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TheSeamSignatureInputPenComponent, never>;
|
|
98
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TheSeamSignatureInputPenComponent, "seam-signature-input-pen", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "beginDrawing": "beginDrawing"; "endDrawing": "endDrawing"; }, never, never, true, never>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
type SignatureFontState = 'loading' | 'inactive' | 'active';
|
|
102
|
+
declare class TheSeamSignatureInputTextComponent implements ControlValueAccessor, SignatureInputItem, AfterViewInit {
|
|
103
|
+
private readonly _fontLoader;
|
|
104
|
+
private readonly _container;
|
|
105
|
+
private readonly _destroyRef;
|
|
106
|
+
private readonly _typeCanvas;
|
|
107
|
+
readonly _nameControl: FormControl<string | null>;
|
|
108
|
+
private readonly _fontState;
|
|
109
|
+
protected readonly _fontLoading: _angular_core.Signal<boolean>;
|
|
110
|
+
protected readonly _fontInactive: _angular_core.Signal<boolean>;
|
|
111
|
+
protected readonly _fontNotActive: _angular_core.Signal<boolean>;
|
|
112
|
+
private readonly _disabled;
|
|
113
|
+
protected readonly _disabledOrFontNotActive: _angular_core.Signal<boolean>;
|
|
114
|
+
protected readonly _canvasWidth = 500;
|
|
115
|
+
protected readonly _canvasHeight = 127;
|
|
116
|
+
/** Current form value (rendered bitmap data URL). */
|
|
117
|
+
private _value;
|
|
118
|
+
/**
|
|
119
|
+
* When the user last typed a name (if any) on this instance. `null` means
|
|
120
|
+
* there is no user-typed signature on this instance — the canvas should
|
|
121
|
+
* keep whatever image was restored from `_value`.
|
|
122
|
+
*/
|
|
123
|
+
private _renderedText;
|
|
124
|
+
private _onChange;
|
|
125
|
+
private _onTouched;
|
|
126
|
+
constructor();
|
|
127
|
+
ngAfterViewInit(): void;
|
|
128
|
+
writeValue(value: string | null): void;
|
|
129
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
130
|
+
registerOnTouched(fn: () => void): void;
|
|
131
|
+
setDisabledState(isDisabled: boolean): void;
|
|
132
|
+
clear(): void;
|
|
133
|
+
protected _onKeyDownEnter(): void;
|
|
134
|
+
protected _onNameInputBlur(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Paint the given data URL onto the canvas as an image. Used when the
|
|
137
|
+
* component mounts with a pre-existing form value — the user's typed name
|
|
138
|
+
* isn't recoverable from the rendered bitmap, only the bitmap itself.
|
|
139
|
+
*/
|
|
140
|
+
private _drawImageToCanvas;
|
|
141
|
+
/**
|
|
142
|
+
* Render `_nameControl.value` as text onto the canvas and publish the
|
|
143
|
+
* result as the form value. A null/empty name clears both.
|
|
144
|
+
*/
|
|
145
|
+
private _drawTextToCanvas;
|
|
146
|
+
private _clearCanvas;
|
|
147
|
+
private _setValue;
|
|
148
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TheSeamSignatureInputTextComponent, never>;
|
|
149
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TheSeamSignatureInputTextComponent, "seam-signature-input-text", never, {}, {}, never, never, true, never>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare class TheSeamSignatureInputImgComponent implements ControlValueAccessor, SignatureInputItem {
|
|
153
|
+
static readonly MAX_FILE_SIZE: number;
|
|
154
|
+
private readonly _container;
|
|
155
|
+
private readonly _destroyRef;
|
|
156
|
+
/**
|
|
157
|
+
* The File is only needed for validation at selection time. Once it's been
|
|
158
|
+
* converted to a data URL and stored in the form value, we don't need the
|
|
159
|
+
* File again — so there's no point trying to round-trip it through
|
|
160
|
+
* writeValue / form state. The preview renders off the current form value.
|
|
161
|
+
*/
|
|
162
|
+
protected readonly _fileControl: FormControl<File | null>;
|
|
163
|
+
private readonly _fileStatus;
|
|
164
|
+
protected readonly _sizeError: _angular_core.Signal<string | null>;
|
|
165
|
+
/**
|
|
166
|
+
* Single source of truth for both the form value and the preview image.
|
|
167
|
+
* External writes (writeValue) and successful uploads both funnel through
|
|
168
|
+
* here, so switching tabs and coming back always shows the last committed
|
|
169
|
+
* signature.
|
|
170
|
+
*/
|
|
171
|
+
private readonly _value;
|
|
172
|
+
protected readonly _previewDataUrl: _angular_core.Signal<string | null>;
|
|
173
|
+
protected readonly _previewBackgroundImage: _angular_core.Signal<string | null>;
|
|
174
|
+
private _onChange;
|
|
175
|
+
private _onTouched;
|
|
176
|
+
constructor();
|
|
177
|
+
writeValue(value: string | null): void;
|
|
178
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
179
|
+
registerOnTouched(fn: () => void): void;
|
|
180
|
+
setDisabledState(isDisabled: boolean): void;
|
|
181
|
+
clear(): void;
|
|
182
|
+
openFileBrowse(): void;
|
|
183
|
+
protected _onFileDropped(files: NgxFileDropEntry[]): void;
|
|
184
|
+
private _setValue;
|
|
185
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TheSeamSignatureInputImgComponent, never>;
|
|
186
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TheSeamSignatureInputImgComponent, "seam-signature-input-img", never, {}, {}, never, never, true, never>;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Opens the signature input panel in a modal when the host button/anchor is
|
|
191
|
+
* clicked, and writes the submitted data URL back through its bound form
|
|
192
|
+
* control. Implements `ControlValueAccessor` so it works with any of the form
|
|
193
|
+
* binding styles (`formControl`, `formControlName`, `ngModel`).
|
|
194
|
+
*
|
|
195
|
+
* Usage:
|
|
196
|
+
*
|
|
197
|
+
* ```html
|
|
198
|
+
* <button seamButton theme="primary" seamSignatureInput formControlName="signature">
|
|
199
|
+
* Sign
|
|
200
|
+
* </button>
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* The selector-name input accepts a partial `ModalConfig` for cases that need
|
|
204
|
+
* to tweak the modal (e.g. `disableClose`):
|
|
205
|
+
*
|
|
206
|
+
* ```html
|
|
207
|
+
* <button
|
|
208
|
+
* seamButton
|
|
209
|
+
* [seamSignatureInput]="{ disableClose: true }"
|
|
210
|
+
* formControlName="signature"
|
|
211
|
+
* >Sign</button>
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
declare class TheSeamSignatureInputButtonDirective implements ControlValueAccessor {
|
|
215
|
+
private readonly _modal;
|
|
216
|
+
private readonly _elementRef;
|
|
217
|
+
private readonly _seamButton;
|
|
218
|
+
private readonly _seamAnchor;
|
|
219
|
+
/**
|
|
220
|
+
* Partial `ModalConfig` passthrough. Most consumers leave this unset; the
|
|
221
|
+
* signature panel's styles assume the default modal size.
|
|
222
|
+
*/
|
|
223
|
+
modalConfig: ModalConfig | null | undefined;
|
|
224
|
+
/** Emits the submitted data URL when the user applies a signature. */
|
|
225
|
+
signed: EventEmitter<string>;
|
|
226
|
+
/** Emits when the user dismisses the panel without submitting. */
|
|
227
|
+
canceled: EventEmitter<void>;
|
|
228
|
+
private _value;
|
|
229
|
+
private _disabled;
|
|
230
|
+
private _onChange;
|
|
231
|
+
private _onTouched;
|
|
232
|
+
writeValue(value: string | null): void;
|
|
233
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
234
|
+
registerOnTouched(fn: () => void): void;
|
|
235
|
+
setDisabledState(isDisabled: boolean): void;
|
|
236
|
+
/** @ignore */
|
|
237
|
+
_onClick(): void;
|
|
238
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TheSeamSignatureInputButtonDirective, never>;
|
|
239
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TheSeamSignatureInputButtonDirective, "button[seamSignatureInput], a[seamSignatureInput]", ["seamSignatureInput"], { "modalConfig": { "alias": "seamSignatureInput"; "required": false; }; }, { "signed": "signed"; "canceled": "canceled"; }, never, never, true, never>;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
declare class TheSeamSignatureInputImgHarness extends ComponentHarness {
|
|
243
|
+
static hostSelector: string;
|
|
244
|
+
private readonly _fileDrop;
|
|
245
|
+
private readonly _sizeError;
|
|
246
|
+
private readonly _preview;
|
|
247
|
+
getSizeError(): Promise<string | null>;
|
|
248
|
+
hasPreview(): Promise<boolean>;
|
|
249
|
+
getPreviewSrc(): Promise<string | null>;
|
|
250
|
+
getFileDrop(): Promise<_angular_cdk_testing.TestElement>;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
declare class TheSeamSignatureInputPenHarness extends ComponentHarness {
|
|
254
|
+
static hostSelector: string;
|
|
255
|
+
private readonly _canvas;
|
|
256
|
+
getCanvas(): Promise<_angular_cdk_testing.TestElement>;
|
|
257
|
+
getCanvasWidth(): Promise<number | null>;
|
|
258
|
+
getCanvasHeight(): Promise<number | null>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
declare class TheSeamSignatureInputTextHarness extends ComponentHarness {
|
|
262
|
+
static hostSelector: string;
|
|
263
|
+
private readonly _input;
|
|
264
|
+
private readonly _canvas;
|
|
265
|
+
getInput(): Promise<_angular_cdk_testing.TestElement>;
|
|
266
|
+
enterName(text: string): Promise<void>;
|
|
267
|
+
getInputValue(): Promise<string>;
|
|
268
|
+
isInputDisabled(): Promise<boolean>;
|
|
269
|
+
getCanvas(): Promise<_angular_cdk_testing.TestElement>;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
declare class TheSeamSignatureInputPanelHarness extends ComponentHarness {
|
|
273
|
+
static hostSelector: string;
|
|
274
|
+
private readonly _drawBtn;
|
|
275
|
+
private readonly _typeBtn;
|
|
276
|
+
private readonly _uploadBtn;
|
|
277
|
+
private readonly _footerBtns;
|
|
278
|
+
private readonly _penHarness;
|
|
279
|
+
private readonly _textHarness;
|
|
280
|
+
private readonly _imgHarness;
|
|
281
|
+
showType(type: SignatureInputType): Promise<void>;
|
|
282
|
+
getActiveType(): Promise<SignatureInputType | null>;
|
|
283
|
+
getPen(): Promise<TheSeamSignatureInputPenHarness | null>;
|
|
284
|
+
getText(): Promise<TheSeamSignatureInputTextHarness | null>;
|
|
285
|
+
getImg(): Promise<TheSeamSignatureInputImgHarness | null>;
|
|
286
|
+
getClearOrDeleteButton(): Promise<TestElement>;
|
|
287
|
+
getCancelButton(): Promise<TestElement>;
|
|
288
|
+
getSubmitButton(): Promise<TestElement>;
|
|
289
|
+
isSubmitDisabled(): Promise<boolean>;
|
|
290
|
+
cancel(): Promise<void>;
|
|
291
|
+
submit(): Promise<void>;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
interface SignatureInputButtonHarnessFilters extends BaseHarnessFilters {
|
|
295
|
+
text?: string | RegExp;
|
|
296
|
+
}
|
|
297
|
+
declare class TheSeamSignatureInputButtonHarness extends ComponentHarness {
|
|
298
|
+
static hostSelector: string;
|
|
299
|
+
static with(options?: SignatureInputButtonHarnessFilters): HarnessPredicate<TheSeamSignatureInputButtonHarness>;
|
|
300
|
+
getText(): Promise<string>;
|
|
301
|
+
isDisabled(): Promise<boolean>;
|
|
302
|
+
click(): Promise<void>;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export { THESEAM_SIGNATURE_INPUT_CONTAINER, TheSeamSignatureInputButtonDirective, TheSeamSignatureInputButtonHarness, TheSeamSignatureInputImgComponent, TheSeamSignatureInputImgHarness, TheSeamSignatureInputPanelComponent, TheSeamSignatureInputPanelHarness, TheSeamSignatureInputPenComponent, TheSeamSignatureInputPenHarness, TheSeamSignatureInputTextComponent, TheSeamSignatureInputTextHarness };
|
|
306
|
+
export type { SignatureFontState, SignatureInputContainer, SignatureInputItem, SignatureInputOptions, SignatureInputPanelResult, SignatureInputResetType, SignatureInputType, SignaturePadOptions };
|
package/story-helpers/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { HandlerFunction } from 'storybook/actions';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ModuleWithProviders,
|
|
4
|
-
import
|
|
3
|
+
import { ModuleWithProviders, Injector, TemplateRef, InjectionToken, ComponentRef } from '@angular/core';
|
|
4
|
+
import * as i2 from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/router';
|
|
6
|
+
import * as i4 from '@theseam/ui-common/scrollbar';
|
|
5
7
|
import { ModalConfig } from '@theseam/ui-common/modal';
|
|
6
8
|
import { ComponentType } from '@theseam/ui-common/models';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import * as i5 from '@theseam/ui-common/scrollbar';
|
|
9
|
+
import { Decorator, AngularRenderer } from '@storybook/angular';
|
|
10
|
+
import { Observable } from 'rxjs';
|
|
10
11
|
import { TheSeamPreferencesAccessor } from '@theseam/ui-common/services';
|
|
11
|
-
import { AngularRenderer } from '@storybook/angular';
|
|
12
12
|
import { DecoratorFunction } from 'storybook/internal/csf';
|
|
13
13
|
|
|
14
14
|
declare type ArgType = any;
|
|
@@ -73,28 +73,39 @@ declare class StoryEmptyWithRouteComponent {
|
|
|
73
73
|
static ɵcmp: i0.ɵɵComponentDeclaration<StoryEmptyWithRouteComponent, "ng-component", never, {}, {}, never, never, false, never>;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Renders its content (or an imperatively provided component/template) inside
|
|
78
|
+
* a stand-in modal frame so stories can preview components that are normally
|
|
79
|
+
* opened through the modal service.
|
|
80
|
+
*
|
|
81
|
+
* Three ways to provide content, checked in order:
|
|
82
|
+
* 1. `[component]` input — renders via `ngComponentOutlet`. Kept for
|
|
83
|
+
* compatibility with existing app stories.
|
|
84
|
+
* 2. `[template]` input — renders a `TemplateRef` via `ngTemplateOutlet`.
|
|
85
|
+
* 3. Projected content (`<ng-content>`) — the preferred form for new stories
|
|
86
|
+
* because Storybook's default template auto-binds inputs/outputs.
|
|
87
|
+
*/
|
|
88
|
+
declare class StoryModalContainerComponent<T = unknown, D = any> {
|
|
89
|
+
private readonly _injector;
|
|
88
90
|
constructor(_injector: Injector);
|
|
89
|
-
|
|
91
|
+
set component(c: ComponentType<T> | null | undefined);
|
|
92
|
+
set data(d: D | null | undefined);
|
|
93
|
+
set modalConfig(config: ModalConfig<D> | null | undefined);
|
|
94
|
+
get modalConfig(): ModalConfig<D> | null;
|
|
95
|
+
template?: TemplateRef<unknown> | null;
|
|
96
|
+
protected readonly _component: i0.WritableSignal<ComponentType<T> | null>;
|
|
97
|
+
private readonly _data;
|
|
98
|
+
private readonly _modalConfig;
|
|
99
|
+
protected readonly _componentInjector: i0.Signal<Injector>;
|
|
100
|
+
protected readonly _modalSizeClass: i0.Signal<string>;
|
|
90
101
|
private _createInjector;
|
|
91
102
|
static ɵfac: i0.ɵɵFactoryDeclaration<StoryModalContainerComponent<any, any>, never>;
|
|
92
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StoryModalContainerComponent<any, any>, "story-modal-container-component", never, { "component": { "alias": "component"; "required": false; }; "data": { "alias": "data"; "required": false; }; "modalConfig": { "alias": "modalConfig"; "required": false; }; }, {}, never,
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StoryModalContainerComponent<any, any>, "story-modal-container-component", never, { "component": { "alias": "component"; "required": false; }; "data": { "alias": "data"; "required": false; }; "modalConfig": { "alias": "modalConfig"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
93
104
|
}
|
|
94
105
|
|
|
95
106
|
declare class StoryHelperComponentsModule {
|
|
96
107
|
static ɵfac: i0.ɵɵFactoryDeclaration<StoryHelperComponentsModule, never>;
|
|
97
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<StoryHelperComponentsModule, [typeof StoryEmptyWithRouteComponent, typeof
|
|
108
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StoryHelperComponentsModule, [typeof StoryEmptyWithRouteComponent], [typeof i2.CommonModule, typeof i3.RouterModule, typeof i4.TheSeamOverlayScrollbarDirective, typeof StoryModalContainerComponent], [typeof StoryEmptyWithRouteComponent, typeof StoryModalContainerComponent]>;
|
|
98
109
|
static ɵinj: i0.ɵɵInjectorDeclaration<StoryHelperComponentsModule>;
|
|
99
110
|
}
|
|
100
111
|
|
|
@@ -109,6 +120,32 @@ declare class StoryInitialRouteService {
|
|
|
109
120
|
|
|
110
121
|
declare function storyInitialRouteFactory(_storyInitialRouteService: StoryInitialRouteService): () => void;
|
|
111
122
|
|
|
123
|
+
interface StoryModalDecoratorOptions {
|
|
124
|
+
/**
|
|
125
|
+
* Passed through to `StoryModalContainerComponent`'s `modalConfig` input.
|
|
126
|
+
* Commonly used to opt into a Bootstrap modal size, e.g.
|
|
127
|
+
* `{ modalSize: 'lg' }`.
|
|
128
|
+
*/
|
|
129
|
+
modalConfig?: ModalConfig;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Wraps a story's rendered component in `<story-modal-container-component>`
|
|
133
|
+
* so it previews inside a stand-in modal frame. Storybook's default template
|
|
134
|
+
* binds the story's args to the wrapped component, so inputs/outputs (e.g.
|
|
135
|
+
* for the Actions addon) work without extra wiring.
|
|
136
|
+
*
|
|
137
|
+
* Use as an entry in a story's `decorators` array:
|
|
138
|
+
*
|
|
139
|
+
* ```ts
|
|
140
|
+
* const meta: Meta<MyModalComponent> = {
|
|
141
|
+
* title: 'Modal/My',
|
|
142
|
+
* component: MyModalComponent,
|
|
143
|
+
* decorators: [storyModalDecorator({ modalConfig: { modalSize: 'lg' } })],
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
declare function storyModalDecorator(options?: StoryModalDecoratorOptions): Decorator;
|
|
148
|
+
|
|
112
149
|
/**
|
|
113
150
|
* Can be used to trigger an event on a target element when the story component has been bootstrapped.
|
|
114
151
|
*
|
|
@@ -157,5 +194,5 @@ declare const INJECTOR_TO_ARGS_PROPERTY_NAME = "__getInjector";
|
|
|
157
194
|
declare const addInjectorGetterToArgs: (argName?: string) => DecoratorFunction<AngularRenderer>;
|
|
158
195
|
declare const getInjectorFromArgs: (args: any, argName?: string) => Injector;
|
|
159
196
|
|
|
160
|
-
export { INJECTOR_TO_ARGS_PROPERTY_NAME, STORY_INITIAL_ROUTE_URL, StoryEmptyComponent, StoryEmptyWithRouteComponent, StoryHelperComponentsModule, StoryInitialRouteModule, StoryInitialRouteService, StoryModalContainerComponent, StoryPreferencesAccessorService, addInjectorGetterToArgs, argsToTpl, buttonTypeArgType, getInjectorFromArgs, onStoryBootstrappedTrigger, routeButton, routesArgType, sizeArgType, storyInitialRouteFactory, themeArgType, themeWithOutlineArgType };
|
|
161
|
-
export type { ArgsTplOptions, ArgsTplParts };
|
|
197
|
+
export { INJECTOR_TO_ARGS_PROPERTY_NAME, STORY_INITIAL_ROUTE_URL, StoryEmptyComponent, StoryEmptyWithRouteComponent, StoryHelperComponentsModule, StoryInitialRouteModule, StoryInitialRouteService, StoryModalContainerComponent, StoryPreferencesAccessorService, addInjectorGetterToArgs, argsToTpl, buttonTypeArgType, getInjectorFromArgs, onStoryBootstrappedTrigger, routeButton, routesArgType, sizeArgType, storyInitialRouteFactory, storyModalDecorator, themeArgType, themeWithOutlineArgType };
|
|
198
|
+
export type { ArgsTplOptions, ArgsTplParts, StoryModalDecoratorOptions };
|