From f2486cd38917203fc0d65f82e4c294cb5ef0f231 Mon Sep 17 00:00:00 2001 From: PhilippMDoerner Date: Thu, 12 Dec 2024 11:38:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20a717d?= =?UTF-8?q?dd7d06a25ce007fc6af43326a0fe29ab99c=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc | 2 +- .../dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 | 2 +- ...ae96869c.iframe.bundle.js => 7857.96884d62.iframe.bundle.js | 2 +- ...e-carousel-image-carousel-stories.2e5fdad9.iframe.bundle.js | 1 - ...e-carousel-image-carousel-stories.75dd7557.iframe.bundle.js | 1 + design/organisms/graph/graph.component.html | 3 +++ design/organisms/image-carousel/image-carousel.component.html | 3 +++ iframe.html | 2 +- project.json | 2 +- ....iframe.bundle.js => runtime~main.8a146d1e.iframe.bundle.js | 2 +- 10 files changed, 13 insertions(+), 7 deletions(-) rename 7857.ae96869c.iframe.bundle.js => 7857.96884d62.iframe.bundle.js (72%) delete mode 100644 design-organisms-image-carousel-image-carousel-stories.2e5fdad9.iframe.bundle.js create mode 100644 design-organisms-image-carousel-image-carousel-stories.75dd7557.iframe.bundle.js rename runtime~main.c37cde65.iframe.bundle.js => runtime~main.8a146d1e.iframe.bundle.js (98%) diff --git a/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc b/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc index 3cfbd9cee..280d23118 100644 --- a/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc +++ b/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc @@ -1 +1 @@ -{"key":"lastEvents","content":{"boot":{"body":{"eventType":"boot","eventId":"qKW87I79Xi3JuQztWbChm","sessionId":"IvqtGuBb3ikeqwnyQXhJd","payload":{"eventType":"build"},"context":{"inCI":true,"platform":"Linux","nodeVersion":"20.18.1","cliVersion":"8.4.4"}},"timestamp":1733765507958}}} \ No newline at end of file +{"key":"lastEvents","content":{"boot":{"body":{"eventType":"boot","eventId":"A8jXowjhrqlGngZdP7isn","sessionId":"8GK5Lso9_o9tHWOFOOWFE","payload":{"eventType":"build"},"context":{"inCI":true,"platform":"Linux","nodeVersion":"20.18.1","cliVersion":"8.4.4"}},"timestamp":1734003433433}}} \ No newline at end of file diff --git a/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 b/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 index cd4a46c93..50a255e8f 100644 --- a/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 +++ b/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 @@ -1 +1 @@ -{"key":"session","content":{"id":"IvqtGuBb3ikeqwnyQXhJd","lastUsed":1733765507934}} \ No newline at end of file +{"key":"session","content":{"id":"8GK5Lso9_o9tHWOFOOWFE","lastUsed":1734003433413}} \ No newline at end of file diff --git a/7857.ae96869c.iframe.bundle.js b/7857.96884d62.iframe.bundle.js similarity index 72% rename from 7857.ae96869c.iframe.bundle.js rename to 7857.96884d62.iframe.bundle.js index 176847679..55117560e 100644 --- a/7857.ae96869c.iframe.bundle.js +++ b/7857.96884d62.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[7857],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);let innerInputType;if("NUMBER"===config.inputKind&&validators.push("notInteger"),"NAME"===config.inputKind&&validators.push("hasSpecialCharacters"),"NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/organisms/image-carousel-card/image-carousel-card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ImageCarouselCardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_card_componentngResource=__webpack_require__("./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource"),image_carousel_card_componentngResource_default=__webpack_require__.n(image_carousel_card_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),image_carousel_component=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.ts");let ImageCarouselCardComponent=class ImageCarouselCardComponent{constructor(formlyService){this.formlyService=formlyService,this.canUpdate=!1,this.canCreate=!1,this.canDelete=!1,this.createImage=new core.EventEmitter,this.deleteImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.currentImageIndex=0,this.state="DISPLAY",this.userModel={},this.isLoading=!1,this.createFields=[this.formlyService.buildInputConfig({key:"name",label:"Image Title",required:!1,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"character_article",label:"Character Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"location_article",label:"Location Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"creature_article",label:"Creature Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"organization_article",label:"Organization Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"encounter_article",label:"Encounter Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"item_article",label:"Item Article",hide:!0,inputKind:"NUMBER",required:!1,placeholder:void 0}),this.formlyService.buildFileFieldConfig({label:"Image file",key:"image",fileButtonType:"DARK"})],this.updateFields=this.formlyService.toUpdateForm(this.createFields)}ngOnInit(){this.currentImage=this.images[this.currentImageIndex]}ngOnChanges(){this.currentImage=this.images[this.currentImageIndex]}changeState(event,newState){this.userModel=event??null,this.state=newState}onSlide(slideEvent){this.currentImageIndex=slideEvent.index,this.currentImage=this.images[this.currentImageIndex]}onCancel(){this.changeState(null,"DISPLAY")}onSubmit(event){switch(this.state){case"DELETE":this.deleteImage.emit(this.currentImage);break;case"UPDATE":case"UPDATE_OUTDATED":this.updateImage.emit(this.userModel);break;case"CREATE":this.createImage.emit(this.userModel);break;default:throw`ImageCarouselCard - Submitted form while in state '${this.state}', which is not possible.`}this.userModel={},this.changeState(null,"DISPLAY")}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={images:[{type:core.Input}],serverUrl:[{type:core.Input}],serverModel:[{type:core.Input}],canUpdate:[{type:core.Input}],canCreate:[{type:core.Input}],canDelete:[{type:core.Input}],createImage:[{type:core.Output}],deleteImage:[{type:core.Output}],updateImage:[{type:core.Output}]}}};ImageCarouselCardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel-card",template:'@switch (state) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\n
\n
\n \n Updating:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n \n
\n
\n\n\n
\n
\n \n Upload new image\n @if (isLoading) {\n \n }\n
\n\n \n
\n
\n\n\n
\n
\n \n Deleting:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n
\n \n Do you really want to delete this image?\n \n
\n \n \n
\n
\n
\n
\n',standalone:!0,imports:[image_carousel_component.H,spinner_component.t,icon_component.R,molecules.s2,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_card_componentngResource_default()]})],ImageCarouselCardComponent)},"./src/design/organisms/image-carousel/image-carousel.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>ImageCarouselComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_componentngResource=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource"),image_carousel_componentngResource_default=__webpack_require__.n(image_carousel_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let ImageCarouselComponent=class ImageCarouselComponent{constructor(){this.images=core.input.required(),this.serverUrl=core.input.required(),this.canDelete=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.currentSlideIndex=core.input.required(),this.deleteImage=new core.EventEmitter,this.createImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.slide=new core.EventEmitter,this.slideEnd=new core.EventEmitter}onSlide(event){const slideIndexStr=event.current.split("-").pop();if(null==slideIndexStr)throw`ImageCarousel - Image with id '${event.current}' does not match the expected pattern of 'imageIndex-'!`;const nextSlideIndex=parseInt(slideIndexStr);this.slide.emit({event,index:nextSlideIndex})}onSlideEnd(event){this.slide.emit({event,index:this.currentSlideIndex()})}onImageCreate(){this.canCreate()&&this.createImage.emit()}onImageUpdate(){if(!this.canUpdate())return;const image=this.images()[this.currentSlideIndex()];this.updateImage.emit(image)}onImageDelete(){if(!this.canDelete())return;const image=this.images()[this.currentSlideIndex()];this.deleteImage.emit(image)}static{this.propDecorators={images:[{type:core.Input,args:[{isSignal:!0,alias:"images",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],currentSlideIndex:[{type:core.Input,args:[{isSignal:!0,alias:"currentSlideIndex",required:!0,transform:void 0}]}],deleteImage:[{type:core.Output}],createImage:[{type:core.Output}],updateImage:[{type:core.Output}],slide:[{type:core.Output}],slideEnd:[{type:core.Output}]}}};ImageCarouselComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel",template:'@if (images() && images().length > 0) {\n \n @for (image of images(); track image.pk) {\n \n
\n \n
\n
\n }\n \n} @else {\n \n}\n\n\x3c!-- Image Edit/Delete/Create Buttons --\x3e\n
\n \x3c!-- Create Image Button --\x3e\n @if (canCreate()) {\n \n }\n\n \x3c!-- Update Image button --\x3e\n @if (images().length > 0 && canUpdate()) {\n \n }\n\n \x3c!-- Delete Image Button --\x3e\n @if (images().length > 1 && canDelete()) {\n \n }\n
\n\n\n \n \n
\n \n
\n

This article doesn\'t have an image yet

\n
\n
\n
\n \n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[ng_bootstrap.wA,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_componentngResource_default()]})],ImageCarouselComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__image-container {\n display: flex;\n justify-content: center;\n flex-direction: row;\n width: 100%;\n}\n.form-card__image {\n max-height: 20rem;\n max-width: 100%;\n object-fit: contain;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n.confirmation {\n display: flex;\n flex-direction: column;\n}\n.confirmation__question {\n text-align: center;\n}\n.confirmation__button-container {\n margin-top: var(--spacer-2);\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".image-container img {\n object-fit: contain;\n width: 100%;\n max-height: 10rem;\n}\n@media (min-width: 768px) {\n .image-container img {\n max-height: 18rem;\n }\n}\n\n.image-caption {\n position: absolute;\n background: var(--wiki-bg-transparent);\n width: 50%;\n text-align: center;\n bottom: 20%;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n}\n.image-caption p {\n margin: 0;\n}\n\n.edit-image-buttons {\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n transition: opacity 0.2s;\n margin-top: var(--spacer-2);\n}\n\n.defaultImage {\n position: relative;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[7857],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);let innerInputType;if("NUMBER"===config.inputKind&&validators.push("notInteger"),"NAME"===config.inputKind&&validators.push("hasSpecialCharacters"),"NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(config.key),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/organisms/image-carousel-card/image-carousel-card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ImageCarouselCardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_card_componentngResource=__webpack_require__("./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource"),image_carousel_card_componentngResource_default=__webpack_require__.n(image_carousel_card_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),image_carousel_component=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.ts");let ImageCarouselCardComponent=class ImageCarouselCardComponent{constructor(formlyService){this.formlyService=formlyService,this.canUpdate=!1,this.canCreate=!1,this.canDelete=!1,this.createImage=new core.EventEmitter,this.deleteImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.currentImageIndex=0,this.state="DISPLAY",this.userModel={},this.isLoading=!1,this.createFields=[this.formlyService.buildInputConfig({key:"name",label:"Image Title",required:!1,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"character_article",label:"Character Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"location_article",label:"Location Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"creature_article",label:"Creature Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"organization_article",label:"Organization Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"encounter_article",label:"Encounter Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"item_article",label:"Item Article",hide:!0,inputKind:"NUMBER",required:!1,placeholder:void 0}),this.formlyService.buildFileFieldConfig({label:"Image file",key:"image",fileButtonType:"DARK"})],this.updateFields=this.formlyService.toUpdateForm(this.createFields)}ngOnInit(){this.currentImage=this.images[this.currentImageIndex]}ngOnChanges(){this.currentImage=this.images[this.currentImageIndex]}changeState(event,newState){this.userModel=event??null,this.state=newState}onSlide(slideEvent){this.currentImageIndex=slideEvent.index,this.currentImage=this.images[this.currentImageIndex]}onCancel(){this.changeState(null,"DISPLAY")}onSubmit(event){switch(this.state){case"DELETE":this.deleteImage.emit(this.currentImage);break;case"UPDATE":case"UPDATE_OUTDATED":this.updateImage.emit(this.userModel);break;case"CREATE":this.createImage.emit(this.userModel);break;default:throw`ImageCarouselCard - Submitted form while in state '${this.state}', which is not possible.`}this.userModel={},this.changeState(null,"DISPLAY")}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={images:[{type:core.Input}],serverUrl:[{type:core.Input}],serverModel:[{type:core.Input}],canUpdate:[{type:core.Input}],canCreate:[{type:core.Input}],canDelete:[{type:core.Input}],createImage:[{type:core.Output}],deleteImage:[{type:core.Output}],updateImage:[{type:core.Output}]}}};ImageCarouselCardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel-card",template:'@switch (state) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\n
\n
\n \n Updating:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n \n
\n
\n\n\n
\n
\n \n Upload new image\n @if (isLoading) {\n \n }\n
\n\n \n
\n
\n\n\n
\n
\n \n Deleting:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n
\n \n Do you really want to delete this image?\n \n
\n \n \n
\n
\n
\n
\n',standalone:!0,imports:[image_carousel_component.H,spinner_component.t,icon_component.R,molecules.s2,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_card_componentngResource_default()]})],ImageCarouselCardComponent)},"./src/design/organisms/image-carousel/image-carousel.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>ImageCarouselComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_componentngResource=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource"),image_carousel_componentngResource_default=__webpack_require__.n(image_carousel_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let ImageCarouselComponent=class ImageCarouselComponent{constructor(){this.images=core.input.required(),this.serverUrl=core.input.required(),this.canDelete=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.currentSlideIndex=core.input.required(),this.deleteImage=new core.EventEmitter,this.createImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.slide=new core.EventEmitter,this.slideEnd=new core.EventEmitter}onSlide(event){const slideIndexStr=event.current.split("-").pop();if(null==slideIndexStr)throw`ImageCarousel - Image with id '${event.current}' does not match the expected pattern of 'imageIndex-'!`;const nextSlideIndex=parseInt(slideIndexStr);this.slide.emit({event,index:nextSlideIndex})}onSlideEnd(event){this.slide.emit({event,index:this.currentSlideIndex()})}onImageCreate(){this.canCreate()&&this.createImage.emit()}onImageUpdate(){if(!this.canUpdate())return;const image=this.images()[this.currentSlideIndex()];this.updateImage.emit(image)}onImageDelete(){if(!this.canDelete())return;const image=this.images()[this.currentSlideIndex()];this.deleteImage.emit(image)}static{this.propDecorators={images:[{type:core.Input,args:[{isSignal:!0,alias:"images",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],currentSlideIndex:[{type:core.Input,args:[{isSignal:!0,alias:"currentSlideIndex",required:!0,transform:void 0}]}],deleteImage:[{type:core.Output}],createImage:[{type:core.Output}],updateImage:[{type:core.Output}],slide:[{type:core.Output}],slideEnd:[{type:core.Output}]}}};ImageCarouselComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel",template:'@if (images() && images().length > 0) {\n \n @for (image of images(); track image.pk) {\n \n
\n \n
\n
\n }\n \n} @else {\n \n}\n\n\x3c!-- Image Edit/Delete/Create Buttons --\x3e\n
\n \x3c!-- Create Image Button --\x3e\n @if (canCreate()) {\n \n }\n\n \x3c!-- Update Image button --\x3e\n @if (images().length > 0 && canUpdate()) {\n \n }\n\n \x3c!-- Delete Image Button --\x3e\n @if (images().length > 1 && canDelete()) {\n \n }\n
\n\n\n \n \n
\n \n
\n

This article doesn\'t have an image yet

\n
\n
\n
\n \n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[ng_bootstrap.wA,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_componentngResource_default()]})],ImageCarouselComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__image-container {\n display: flex;\n justify-content: center;\n flex-direction: row;\n width: 100%;\n}\n.form-card__image {\n max-height: 20rem;\n max-width: 100%;\n object-fit: contain;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n.confirmation {\n display: flex;\n flex-direction: column;\n}\n.confirmation__question {\n text-align: center;\n}\n.confirmation__button-container {\n margin-top: var(--spacer-2);\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".image-container img {\n object-fit: contain;\n width: 100%;\n max-height: 10rem;\n}\n@media (min-width: 768px) {\n .image-container img {\n max-height: 18rem;\n }\n}\n\n.image-caption {\n position: absolute;\n background: var(--wiki-bg-transparent);\n width: 50%;\n text-align: center;\n bottom: 20%;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n}\n.image-caption p {\n margin: 0;\n}\n\n.edit-image-buttons {\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n transition: opacity 0.2s;\n margin-top: var(--spacer-2);\n}\n\n.defaultImage {\n position: relative;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-organisms-image-carousel-image-carousel-stories.2e5fdad9.iframe.bundle.js b/design-organisms-image-carousel-image-carousel-stories.2e5fdad9.iframe.bundle.js deleted file mode 100644 index 4bf4fbdc9..000000000 --- a/design-organisms-image-carousel-image-carousel-stories.2e5fdad9.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[1379],{"./src/design/atoms/_models/icon.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{bS:()=>toIconKind,eN:()=>ALL_REGULAR_ICONS,xy:()=>ALL_ICONS,zN:()=>ALL_SOLID_ICONS});const ALL_REGULAR_ICONS=["calendar","circle-user","clock","copy","envelope","hourglass","map","plus-square","user"],REGULAR_ICON_SET=new Set(ALL_REGULAR_ICONS),ALL_SOLID_ICONS=["anchor","arrow-down-long","arrow-left-long","arrow-left","arrow-right-long","arrow-right","arrow-up-long","bars","book-open","book","calendar-alt","check","chess-rook","chevron-down","chevron-left","chevron-right","chevron-up","circle-exclamation","clipboard","cog","comments","compass","copy","crown","cut","home","database","desktop","diamond","dice","down-long","download","dragon","dungeon","exclamation","expand","file-audio","file-import","file","gavel","globe-americas","hammer","hand-sparkles","hat-wizard","diagram-project","hotel","hourglass-half","info-circle","info","location-dot","lock","link","magic","male","minus","monument","moon","mountain","paw","pen","pencil","place-of-worship","plus","question-circle","redo-alt","refresh","right-from-bracket","search","sign-out-alt","sitemap","spinner","square-check","store","table","tag","th-list","times","tint","trash","tree","triangle-exclamation","umbrella-beach","university","up-long","upload","user-cog","user-plus","users-gear","volume-up","water","xmark"],SOLID_ICONS_SET=new Set(ALL_SOLID_ICONS),ALL_BRAND_ICONS=["fort-awesome"],BRAND_ICON_SET=new Set(ALL_BRAND_ICONS),ALL_ICONS=[...ALL_REGULAR_ICONS,...ALL_SOLID_ICONS,...ALL_BRAND_ICONS];function toIconKind(icon){const ico=icon;if(SOLID_ICONS_SET.has(ico))return"fa-solid";if(BRAND_ICON_SET.has(ico))return"fa-brands";if(REGULAR_ICON_SET.has(ico))return"fa-regular";throw new Error("Invalid icon: "+icon)}},"./src/design/atoms/button/button.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>ButtonComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var button_componentngResource=__webpack_require__("./src/design/atoms/button/button.component.scss?ngResource"),button_componentngResource_default=__webpack_require__.n(button_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts");let ButtonComponent=class ButtonComponent{constructor(){this.kind=core.input.required(),this.text=(0,core.input)(),this.icon=(0,core.input)(),this.size=(0,core.input)("MEDIUM"),this.type=(0,core.input)("button"),this.isLoading=(0,core.input)(!1),this.disabled=(0,core.input)(!1),this.sizeClass=(0,core.computed)((()=>{switch(this.size()){case"SMALL":return"btn-sm";case"MEDIUM":return"";case"LARGE":return"btn-lg"}})),this.kindClasses=(0,core.computed)((()=>{switch(this.kind()){case"PRIMARY":return"btn-primary";case"SECONDARY":return"btn-secondary";case"DARK":return"btn-dark";case"WARNING":return"btn-warning";case"DANGER":return"btn-danger";case"LIGHT":return"btn-light";case"INFO":return"btn-info";case"PRIMARY-OUTLINE":return"btn-outline-primary";case"SECONDARY-OUTLINE":return"btn-outline-secondary";case"DARK-OUTLINE":return"btn-outline-dark";case"WARNING-OUTLINE":return"btn-outline-warning";case"DANGER-OUTLINE":return"btn-outline-danger";case"LIGHT-OUTLINE":return"btn-outline-light";case"INFO-OUTLINE":return"btn-outline-info";case"NONE":return"btn-none"}})),this.btnClass=(0,core.computed)((()=>"NONE"!==this.kind()?"btn":"")),this.classes=(0,core.computed)((()=>`${this.btnClass()} ${this.sizeClass()} ${this.kindClasses()}`))}static{this.propDecorators={kind:[{type:core.Input,args:[{isSignal:!0,alias:"kind",required:!0,transform:void 0}]}],text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!1,transform:void 0}]}],icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!1,transform:void 0}]}],size:[{type:core.Input,args:[{isSignal:!0,alias:"size",required:!1,transform:void 0}]}],type:[{type:core.Input,args:[{isSignal:!0,alias:"type",required:!1,transform:void 0}]}],isLoading:[{type:core.Input,args:[{isSignal:!0,alias:"isLoading",required:!1,transform:void 0}]}],disabled:[{type:core.Input,args:[{isSignal:!0,alias:"disabled",required:!1,transform:void 0}]}]}}};ButtonComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"button[btn]",template:'@let iconVal = icon();\n@if (iconVal) {\n \n}\n\n {{ text() }}\n\n\n@if (isLoading()) {\n \n}\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[icon_component.R,spinner_component.t],host:{"[class]":"classes()","[type]":"type()","[disabled]":"isLoading() || disabled()"},styles:[button_componentngResource_default()]})],ButtonComponent)},"./src/design/atoms/icon/icon.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>IconComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var icon_componentngResource=__webpack_require__("./src/design/atoms/icon/icon.component.scss?ngResource"),icon_componentngResource_default=__webpack_require__.n(icon_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),icon=__webpack_require__("./src/design/atoms/_models/icon.ts");let IconComponent=class IconComponent{constructor(){this.icon=core.input.required(),this.iconType=(0,core.computed)((()=>(0,icon.bS)(this.icon())))}static{this.propDecorators={icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!0,transform:void 0}]}]}}};IconComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-icon",template:'
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[],standalone:!0,styles:[icon_componentngResource_default()]})],IconComponent)},"./src/design/atoms/spinner/spinner.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>SpinnerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var spinner_componentngResource=__webpack_require__("./src/design/atoms/spinner/spinner.component.scss?ngResource"),spinner_componentngResource_default=__webpack_require__.n(spinner_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let SpinnerComponent=class SpinnerComponent{constructor(){this.spinnerBorder=!0}static{this.propDecorators={spinnerBorder:[{type:core.HostBinding,args:["class.spinner-border"]}]}}};SpinnerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-spinner",template:"",changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[],standalone:!0,styles:[spinner_componentngResource_default()]})],SpinnerComponent)},"./src/design/organisms/image-carousel/image-carousel.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>ImageCarouselComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_componentngResource=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource"),image_carousel_componentngResource_default=__webpack_require__.n(image_carousel_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let ImageCarouselComponent=class ImageCarouselComponent{constructor(){this.images=core.input.required(),this.serverUrl=core.input.required(),this.canDelete=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.currentSlideIndex=core.input.required(),this.deleteImage=new core.EventEmitter,this.createImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.slide=new core.EventEmitter,this.slideEnd=new core.EventEmitter}onSlide(event){const slideIndexStr=event.current.split("-").pop();if(null==slideIndexStr)throw`ImageCarousel - Image with id '${event.current}' does not match the expected pattern of 'imageIndex-'!`;const nextSlideIndex=parseInt(slideIndexStr);this.slide.emit({event,index:nextSlideIndex})}onSlideEnd(event){this.slide.emit({event,index:this.currentSlideIndex()})}onImageCreate(){this.canCreate()&&this.createImage.emit()}onImageUpdate(){if(!this.canUpdate())return;const image=this.images()[this.currentSlideIndex()];this.updateImage.emit(image)}onImageDelete(){if(!this.canDelete())return;const image=this.images()[this.currentSlideIndex()];this.deleteImage.emit(image)}static{this.propDecorators={images:[{type:core.Input,args:[{isSignal:!0,alias:"images",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],currentSlideIndex:[{type:core.Input,args:[{isSignal:!0,alias:"currentSlideIndex",required:!0,transform:void 0}]}],deleteImage:[{type:core.Output}],createImage:[{type:core.Output}],updateImage:[{type:core.Output}],slide:[{type:core.Output}],slideEnd:[{type:core.Output}]}}};ImageCarouselComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel",template:'@if (images() && images().length > 0) {\n \n @for (image of images(); track image.pk) {\n \n
\n \n
\n
\n }\n \n} @else {\n \n}\n\n\x3c!-- Image Edit/Delete/Create Buttons --\x3e\n
\n \x3c!-- Create Image Button --\x3e\n @if (canCreate()) {\n \n }\n\n \x3c!-- Update Image button --\x3e\n @if (images().length > 0 && canUpdate()) {\n \n }\n\n \x3c!-- Delete Image Button --\x3e\n @if (images().length > 1 && canDelete()) {\n \n }\n
\n\n\n \n \n
\n \n
\n

This article doesn\'t have an image yet

\n
\n
\n
\n \n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[ng_bootstrap.wA,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_componentngResource_default()]})],ImageCarouselComponent)},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./node_modules/css-loader/dist/runtime/api.js":module=>{"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map((function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content})).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":module=>{"use strict";module.exports=function(i){return i[1]}},"./node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>combineLatest});var _Observable__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Observable.js"),_util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js"),_from__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),_util_identity__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/identity.js"),_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"),_util_args__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/args.js"),_util_createObject__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/createObject.js"),_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),_util_executeSchedule__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js");function combineLatest(){for(var args=[],_i=0;_i{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>concat});var mergeAll=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js");var util_args=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/args.js"),from=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/from.js");function concat(){for(var args=[],_i=0;_i{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>mapTo});var _map__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js");function mapTo(value){return(0,_map__WEBPACK_IMPORTED_MODULE_0__.T)((function(){return value}))}},"./node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>mergeAll});var _mergeMap__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),_util_identity__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/identity.js");function mergeAll(concurrent){return void 0===concurrent&&(concurrent=1/0),(0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.Z)(_util_identity__WEBPACK_IMPORTED_MODULE_1__.D,concurrent)}},"./node_modules/rxjs/dist/esm5/internal/operators/startWith.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>startWith});var _observable_concat__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/concat.js"),_util_args__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/args.js"),_util_lift__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/lift.js");function startWith(){for(var values=[],_i=0;_i{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>takeUntil});var _util_lift__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),_util_noop__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js");function takeUntil(notifier){return(0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.N)((function(source,subscriber){(0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__.Tg)(notifier).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__._)(subscriber,(function(){return subscriber.complete()}),_util_noop__WEBPACK_IMPORTED_MODULE_3__.l)),!subscriber.closed&&source.subscribe(subscriber)}))}},"./node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>argsArgArrayOrObject});var isArray=Array.isArray,getPrototypeOf=Object.getPrototypeOf,objectProto=Object.prototype,getKeys=Object.keys;function argsArgArrayOrObject(args){if(1===args.length){var first_1=args[0];if(isArray(first_1))return{args:first_1,keys:null};if(function isPOJO(obj){return obj&&"object"==typeof obj&&getPrototypeOf(obj)===objectProto}(first_1)){var keys=getKeys(first_1);return{args:keys.map((function(key){return first_1[key]})),keys}}}return{args,keys:null}}},"./node_modules/rxjs/dist/esm5/internal/util/createObject.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function createObject(keys,values){return keys.reduce((function(result,key,i){return result[key]=values[i],result}),{})}__webpack_require__.d(__webpack_exports__,{e:()=>createObject})},"./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>mapOneOrManyArgs});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_operators_map__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),isArray=Array.isArray;function mapOneOrManyArgs(fn){return(0,_operators_map__WEBPACK_IMPORTED_MODULE_1__.T)((function(args){return function callOrApply(fn,args){return isArray(args)?fn.apply(void 0,(0,tslib__WEBPACK_IMPORTED_MODULE_0__.fX)([],(0,tslib__WEBPACK_IMPORTED_MODULE_0__.zs)(args))):fn(args)}(fn,args)}))}},"./src/design/organisms/image-carousel/image-carousel.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,NoImages:()=>NoImages,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs");const dummyImages=[{pk:1,image:"/breeds/germanshepherd/IMG_20200801_005830_387.jpg",name:"Image 1",character_article:1,creature_article:void 0,encounter_article:void 0,item_article:void 0,location_article:void 0,organization_article:void 0,article_type:"Type A"},{pk:2,image:"/breeds/mastiff-tibetan/n02108551_5830.jpg",name:"Image 2",character_article:void 0,creature_article:3,encounter_article:void 0,item_article:void 0,location_article:void 0,organization_article:void 0,article_type:"Type B"},{pk:3,image:"/breeds/malinois/n02105162_1572.jpg",name:"Image 3",character_article:void 0,creature_article:void 0,encounter_article:5,item_article:void 0,location_article:void 0,organization_article:void 0,article_type:"Type C"},{pk:4,image:"/breeds/ridgeback-rhodesian/n02087394_1352.jpg",name:"Image 4",character_article:void 0,creature_article:void 0,encounter_article:void 0,item_article:7,location_article:void 0,organization_article:void 0,article_type:"Type D"}],__WEBPACK_DEFAULT_EXPORT__={title:"DesignSystem/Organisms/ImageCarouselComponent",component:__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.ts").H,args:{images:dummyImages,serverUrl:"https://images.dog.ceo",canCreate:!0,canUpdate:!0,canDelete:!0,currentSlideIndex:0}},Template=args=>({props:{...args,deleteImage:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("deleteImage"),createImage:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("createImage"),updateImage:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("updateImage"),slide:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("slide"),slideEnd:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("slideEnd")}}),Default=Template.bind({});Default.args={};const NoImages=Template.bind({});NoImages.args={images:[]};const __namedExportsOrder=["Default","NoImages"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n deleteImage: action('deleteImage'),\n createImage: action('createImage'),\n updateImage: action('updateImage'),\n slide: action('slide'),\n slideEnd: action('slideEnd')\n }\n})",...Default.parameters?.docs?.source}}},NoImages.parameters={...NoImages.parameters,docs:{...NoImages.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n deleteImage: action('deleteImage'),\n createImage: action('createImage'),\n updateImage: action('updateImage'),\n slide: action('slide'),\n slideEnd: action('slideEnd')\n }\n})",...NoImages.parameters?.docs?.source}}}},"./src/design/atoms/button/button.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacer-1);\n}\n:host :disabled {\n cursor: not-allowed;\n}\n\n.btn__text--large {\n font-weight: bold;\n}\n.btn__spinner {\n margin-left: var(--spacer-2);\n width: 20px;\n height: 20px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/icon/icon.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/spinner/spinner.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n --thickness: var(--bs-body-font-size);\n font-size: var(--thickness);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".image-container img {\n object-fit: contain;\n width: 100%;\n max-height: 10rem;\n}\n@media (min-width: 768px) {\n .image-container img {\n max-height: 18rem;\n }\n}\n\n.image-caption {\n position: absolute;\n background: var(--wiki-bg-transparent);\n width: 50%;\n text-align: center;\n bottom: 20%;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n}\n.image-caption p {\n margin: 0;\n}\n\n.edit-image-buttons {\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n transition: opacity 0.2s;\n margin-top: var(--spacer-2);\n}\n\n.defaultImage {\n position: relative;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-organisms-image-carousel-image-carousel-stories.75dd7557.iframe.bundle.js b/design-organisms-image-carousel-image-carousel-stories.75dd7557.iframe.bundle.js new file mode 100644 index 000000000..029ddd5a1 --- /dev/null +++ b/design-organisms-image-carousel-image-carousel-stories.75dd7557.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[1379],{"./src/design/atoms/_models/icon.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{bS:()=>toIconKind,eN:()=>ALL_REGULAR_ICONS,xy:()=>ALL_ICONS,zN:()=>ALL_SOLID_ICONS});const ALL_REGULAR_ICONS=["calendar","circle-user","clock","copy","envelope","hourglass","map","plus-square","user"],REGULAR_ICON_SET=new Set(ALL_REGULAR_ICONS),ALL_SOLID_ICONS=["anchor","arrow-down-long","arrow-left-long","arrow-left","arrow-right-long","arrow-right","arrow-up-long","bars","book-open","book","calendar-alt","check","chess-rook","chevron-down","chevron-left","chevron-right","chevron-up","circle-exclamation","clipboard","cog","comments","compass","copy","crown","cut","home","database","desktop","diamond","dice","down-long","download","dragon","dungeon","exclamation","expand","file-audio","file-import","file","gavel","globe-americas","hammer","hand-sparkles","hat-wizard","diagram-project","hotel","hourglass-half","info-circle","info","location-dot","lock","link","magic","male","minus","monument","moon","mountain","paw","pen","pencil","place-of-worship","plus","question-circle","redo-alt","refresh","right-from-bracket","search","sign-out-alt","sitemap","spinner","square-check","store","table","tag","th-list","times","tint","trash","tree","triangle-exclamation","umbrella-beach","university","up-long","upload","user-cog","user-plus","users-gear","volume-up","water","xmark"],SOLID_ICONS_SET=new Set(ALL_SOLID_ICONS),ALL_BRAND_ICONS=["fort-awesome"],BRAND_ICON_SET=new Set(ALL_BRAND_ICONS),ALL_ICONS=[...ALL_REGULAR_ICONS,...ALL_SOLID_ICONS,...ALL_BRAND_ICONS];function toIconKind(icon){const ico=icon;if(SOLID_ICONS_SET.has(ico))return"fa-solid";if(BRAND_ICON_SET.has(ico))return"fa-brands";if(REGULAR_ICON_SET.has(ico))return"fa-regular";throw new Error("Invalid icon: "+icon)}},"./src/design/atoms/button/button.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>ButtonComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var button_componentngResource=__webpack_require__("./src/design/atoms/button/button.component.scss?ngResource"),button_componentngResource_default=__webpack_require__.n(button_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts");let ButtonComponent=class ButtonComponent{constructor(){this.kind=core.input.required(),this.text=(0,core.input)(),this.icon=(0,core.input)(),this.size=(0,core.input)("MEDIUM"),this.type=(0,core.input)("button"),this.isLoading=(0,core.input)(!1),this.disabled=(0,core.input)(!1),this.sizeClass=(0,core.computed)((()=>{switch(this.size()){case"SMALL":return"btn-sm";case"MEDIUM":return"";case"LARGE":return"btn-lg"}})),this.kindClasses=(0,core.computed)((()=>{switch(this.kind()){case"PRIMARY":return"btn-primary";case"SECONDARY":return"btn-secondary";case"DARK":return"btn-dark";case"WARNING":return"btn-warning";case"DANGER":return"btn-danger";case"LIGHT":return"btn-light";case"INFO":return"btn-info";case"PRIMARY-OUTLINE":return"btn-outline-primary";case"SECONDARY-OUTLINE":return"btn-outline-secondary";case"DARK-OUTLINE":return"btn-outline-dark";case"WARNING-OUTLINE":return"btn-outline-warning";case"DANGER-OUTLINE":return"btn-outline-danger";case"LIGHT-OUTLINE":return"btn-outline-light";case"INFO-OUTLINE":return"btn-outline-info";case"NONE":return"btn-none"}})),this.btnClass=(0,core.computed)((()=>"NONE"!==this.kind()?"btn":"")),this.classes=(0,core.computed)((()=>`${this.btnClass()} ${this.sizeClass()} ${this.kindClasses()}`))}static{this.propDecorators={kind:[{type:core.Input,args:[{isSignal:!0,alias:"kind",required:!0,transform:void 0}]}],text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!1,transform:void 0}]}],icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!1,transform:void 0}]}],size:[{type:core.Input,args:[{isSignal:!0,alias:"size",required:!1,transform:void 0}]}],type:[{type:core.Input,args:[{isSignal:!0,alias:"type",required:!1,transform:void 0}]}],isLoading:[{type:core.Input,args:[{isSignal:!0,alias:"isLoading",required:!1,transform:void 0}]}],disabled:[{type:core.Input,args:[{isSignal:!0,alias:"disabled",required:!1,transform:void 0}]}]}}};ButtonComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"button[btn]",template:'@let iconVal = icon();\n@if (iconVal) {\n \n}\n\n {{ text() }}\n\n\n@if (isLoading()) {\n \n}\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[icon_component.R,spinner_component.t],host:{"[class]":"classes()","[type]":"type()","[disabled]":"isLoading() || disabled()"},styles:[button_componentngResource_default()]})],ButtonComponent)},"./src/design/atoms/icon/icon.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>IconComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var icon_componentngResource=__webpack_require__("./src/design/atoms/icon/icon.component.scss?ngResource"),icon_componentngResource_default=__webpack_require__.n(icon_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),icon=__webpack_require__("./src/design/atoms/_models/icon.ts");let IconComponent=class IconComponent{constructor(){this.icon=core.input.required(),this.iconType=(0,core.computed)((()=>(0,icon.bS)(this.icon())))}static{this.propDecorators={icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!0,transform:void 0}]}]}}};IconComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-icon",template:'
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[],standalone:!0,styles:[icon_componentngResource_default()]})],IconComponent)},"./src/design/atoms/spinner/spinner.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>SpinnerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var spinner_componentngResource=__webpack_require__("./src/design/atoms/spinner/spinner.component.scss?ngResource"),spinner_componentngResource_default=__webpack_require__.n(spinner_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let SpinnerComponent=class SpinnerComponent{constructor(){this.spinnerBorder=!0}static{this.propDecorators={spinnerBorder:[{type:core.HostBinding,args:["class.spinner-border"]}]}}};SpinnerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-spinner",template:"",changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[],standalone:!0,styles:[spinner_componentngResource_default()]})],SpinnerComponent)},"./src/design/organisms/image-carousel/image-carousel.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>ImageCarouselComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_componentngResource=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource"),image_carousel_componentngResource_default=__webpack_require__.n(image_carousel_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let ImageCarouselComponent=class ImageCarouselComponent{constructor(){this.images=core.input.required(),this.serverUrl=core.input.required(),this.canDelete=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.currentSlideIndex=core.input.required(),this.deleteImage=new core.EventEmitter,this.createImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.slide=new core.EventEmitter,this.slideEnd=new core.EventEmitter}onSlide(event){const slideIndexStr=event.current.split("-").pop();if(null==slideIndexStr)throw`ImageCarousel - Image with id '${event.current}' does not match the expected pattern of 'imageIndex-'!`;const nextSlideIndex=parseInt(slideIndexStr);this.slide.emit({event,index:nextSlideIndex})}onSlideEnd(event){this.slide.emit({event,index:this.currentSlideIndex()})}onImageCreate(){this.canCreate()&&this.createImage.emit()}onImageUpdate(){if(!this.canUpdate())return;const image=this.images()[this.currentSlideIndex()];this.updateImage.emit(image)}onImageDelete(){if(!this.canDelete())return;const image=this.images()[this.currentSlideIndex()];this.deleteImage.emit(image)}static{this.propDecorators={images:[{type:core.Input,args:[{isSignal:!0,alias:"images",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],currentSlideIndex:[{type:core.Input,args:[{isSignal:!0,alias:"currentSlideIndex",required:!0,transform:void 0}]}],deleteImage:[{type:core.Output}],createImage:[{type:core.Output}],updateImage:[{type:core.Output}],slide:[{type:core.Output}],slideEnd:[{type:core.Output}]}}};ImageCarouselComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel",template:'@if (images() && images().length > 0) {\n \n @for (image of images(); track image.pk) {\n \n
\n \n
\n
\n }\n \n} @else {\n \n}\n\n\x3c!-- Image Edit/Delete/Create Buttons --\x3e\n
\n \x3c!-- Create Image Button --\x3e\n @if (canCreate()) {\n \n }\n\n \x3c!-- Update Image button --\x3e\n @if (images().length > 0 && canUpdate()) {\n \n }\n\n \x3c!-- Delete Image Button --\x3e\n @if (images().length > 1 && canDelete()) {\n \n }\n
\n\n\n \n \n
\n \n
\n

This article doesn\'t have an image yet

\n
\n
\n
\n \n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[ng_bootstrap.wA,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_componentngResource_default()]})],ImageCarouselComponent)},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./node_modules/css-loader/dist/runtime/api.js":module=>{"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map((function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content})).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":module=>{"use strict";module.exports=function(i){return i[1]}},"./node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>combineLatest});var _Observable__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Observable.js"),_util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js"),_from__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/from.js"),_util_identity__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/identity.js"),_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"),_util_args__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/args.js"),_util_createObject__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/createObject.js"),_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),_util_executeSchedule__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js");function combineLatest(){for(var args=[],_i=0;_i{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>concat});var mergeAll=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js");var util_args=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/args.js"),from=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/from.js");function concat(){for(var args=[],_i=0;_i{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>mapTo});var _map__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js");function mapTo(value){return(0,_map__WEBPACK_IMPORTED_MODULE_0__.T)((function(){return value}))}},"./node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>mergeAll});var _mergeMap__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),_util_identity__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/identity.js");function mergeAll(concurrent){return void 0===concurrent&&(concurrent=1/0),(0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.Z)(_util_identity__WEBPACK_IMPORTED_MODULE_1__.D,concurrent)}},"./node_modules/rxjs/dist/esm5/internal/operators/startWith.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>startWith});var _observable_concat__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/concat.js"),_util_args__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/args.js"),_util_lift__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/lift.js");function startWith(){for(var values=[],_i=0;_i{"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>takeUntil});var _util_lift__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),_util_noop__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js");function takeUntil(notifier){return(0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.N)((function(source,subscriber){(0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__.Tg)(notifier).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__._)(subscriber,(function(){return subscriber.complete()}),_util_noop__WEBPACK_IMPORTED_MODULE_3__.l)),!subscriber.closed&&source.subscribe(subscriber)}))}},"./node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>argsArgArrayOrObject});var isArray=Array.isArray,getPrototypeOf=Object.getPrototypeOf,objectProto=Object.prototype,getKeys=Object.keys;function argsArgArrayOrObject(args){if(1===args.length){var first_1=args[0];if(isArray(first_1))return{args:first_1,keys:null};if(function isPOJO(obj){return obj&&"object"==typeof obj&&getPrototypeOf(obj)===objectProto}(first_1)){var keys=getKeys(first_1);return{args:keys.map((function(key){return first_1[key]})),keys}}}return{args,keys:null}}},"./node_modules/rxjs/dist/esm5/internal/util/createObject.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function createObject(keys,values){return keys.reduce((function(result,key,i){return result[key]=values[i],result}),{})}__webpack_require__.d(__webpack_exports__,{e:()=>createObject})},"./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>mapOneOrManyArgs});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_operators_map__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),isArray=Array.isArray;function mapOneOrManyArgs(fn){return(0,_operators_map__WEBPACK_IMPORTED_MODULE_1__.T)((function(args){return function callOrApply(fn,args){return isArray(args)?fn.apply(void 0,(0,tslib__WEBPACK_IMPORTED_MODULE_0__.fX)([],(0,tslib__WEBPACK_IMPORTED_MODULE_0__.zs)(args))):fn(args)}(fn,args)}))}},"./src/design/organisms/image-carousel/image-carousel.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,NoImages:()=>NoImages,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs");const dummyImages=[{pk:1,image:"/breeds/germanshepherd/IMG_20200801_005830_387.jpg",name:"Image 1",character_article:1,creature_article:void 0,encounter_article:void 0,item_article:void 0,location_article:void 0,organization_article:void 0,article_type:"Type A"},{pk:2,image:"/breeds/mastiff-tibetan/n02108551_5830.jpg",name:"Image 2",character_article:void 0,creature_article:3,encounter_article:void 0,item_article:void 0,location_article:void 0,organization_article:void 0,article_type:"Type B"},{pk:3,image:"/breeds/malinois/n02105162_1572.jpg",name:"Image 3",character_article:void 0,creature_article:void 0,encounter_article:5,item_article:void 0,location_article:void 0,organization_article:void 0,article_type:"Type C"},{pk:4,image:"/breeds/ridgeback-rhodesian/n02087394_1352.jpg",name:"Image 4",character_article:void 0,creature_article:void 0,encounter_article:void 0,item_article:7,location_article:void 0,organization_article:void 0,article_type:"Type D"}],__WEBPACK_DEFAULT_EXPORT__={title:"DesignSystem/Organisms/ImageCarouselComponent",component:__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.ts").H,args:{images:dummyImages,serverUrl:"https://images.dog.ceo",canCreate:!0,canUpdate:!0,canDelete:!0,currentSlideIndex:0}},Template=args=>({props:{...args,deleteImage:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("deleteImage"),createImage:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("createImage"),updateImage:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("updateImage"),slide:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("slide"),slideEnd:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__.XI)("slideEnd")}}),Default=Template.bind({});Default.args={};const NoImages=Template.bind({});NoImages.args={images:[]};const __namedExportsOrder=["Default","NoImages"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n deleteImage: action('deleteImage'),\n createImage: action('createImage'),\n updateImage: action('updateImage'),\n slide: action('slide'),\n slideEnd: action('slideEnd')\n }\n})",...Default.parameters?.docs?.source}}},NoImages.parameters={...NoImages.parameters,docs:{...NoImages.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n deleteImage: action('deleteImage'),\n createImage: action('createImage'),\n updateImage: action('updateImage'),\n slide: action('slide'),\n slideEnd: action('slideEnd')\n }\n})",...NoImages.parameters?.docs?.source}}}},"./src/design/atoms/button/button.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacer-1);\n}\n:host :disabled {\n cursor: not-allowed;\n}\n\n.btn__text--large {\n font-weight: bold;\n}\n.btn__spinner {\n margin-left: var(--spacer-2);\n width: 20px;\n height: 20px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/icon/icon.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/spinner/spinner.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n --thickness: var(--bs-body-font-size);\n font-size: var(--thickness);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".image-container img {\n object-fit: contain;\n width: 100%;\n max-height: 10rem;\n}\n@media (min-width: 768px) {\n .image-container img {\n max-height: 18rem;\n }\n}\n\n.image-caption {\n position: absolute;\n background: var(--wiki-bg-transparent);\n width: 50%;\n text-align: center;\n bottom: 20%;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n}\n.image-caption p {\n margin: 0;\n}\n\n.edit-image-buttons {\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n transition: opacity 0.2s;\n margin-top: var(--spacer-2);\n}\n\n.defaultImage {\n position: relative;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design/organisms/graph/graph.component.html b/design/organisms/graph/graph.component.html index 0d9262375..dfc5c5e25 100644 --- a/design/organisms/graph/graph.component.html +++ b/design/organisms/graph/graph.component.html @@ -7,11 +7,13 @@ [kind]="'SECONDARY'" [icon]="'plus'" [size]="'SMALL'" + aria-label="'zoom in to graph'" (click)="onZoomButtonClick(1)" > diff --git a/design/organisms/image-carousel/image-carousel.component.html b/design/organisms/image-carousel/image-carousel.component.html index 26b19c0be..a3fdc854b 100644 --- a/design/organisms/image-carousel/image-carousel.component.html +++ b/design/organisms/image-carousel/image-carousel.component.html @@ -28,6 +28,7 @@ btn title="Create Image" class="mx-2" + aria-label="'Create Image'" [kind]="'PRIMARY'" [size]="'SMALL'" [icon]="'plus-square'" @@ -39,6 +40,7 @@ @if (images().length > 0 && canUpdate()) {