Exemplo n.º 1
0
        internal JsParams ToParams()
        {
            JsParams ps = new JsParams();

            ps.AddNotNull("allowDuplicates", AllowDuplicates);
            ps.AddNotNull("caseSensitive", CaseSensitive);
            ps.AddNotNull("clearSelectionOnTyping", ClearSelectionOnTyping);
            ps.AddNotNull("closeDropdownOnItemSelect", CloseDropdownOnItemSelect);
            ps.AddNotNull("delimiter", Delimiter);
            ps.AddNotNull("freeInput", FreeInput);
            ps.AddNotNull("highlightDuplicate", HighlightDuplicate);
            ps.AddNotNull("highlightMatchesString", HighlightMatchesString);
            ps.AddNotNull("itemValue", ItemValue);
            ps.AddNotNull("itemText", ItemText);
            ps.AddNotNull("maxTags", MaxTags);
            ps.AddNotNull("maxChars", MaxChars);
            ps.AddNotNull("minChars", MinChars);
            ps.AddNotNull("noResultsLabel", NoResultsLabel);
            ps.AddNotNull("placeholder", Placeholder);
            ps.AddNotNull("removable", Removable);
            ps.AddNotNull("searchMinChars", SearchMinChars);
            ps.AddNotNull("searchOn", SearchOn);
            ps.AddNotNull("selectable", Selectable);
            ps.AddNotNull("source", Source);
            ps.AddNotNull("tagClass", TagClass);
            ps.AddNotNull("trim", Trim);
            return(ps);
        }
Exemplo n.º 2
0
        internal JsParams ToParams()
        {
            JsParams ps  = new JsParams();
            var      def = BulmaRazorOptions.DefaultOptions.ToastOptions;

            ps.AddNotNull("message", Message ?? def.Message);

            ps.AddNotNull("type", Color?.Value ?? def.Color?.Value);

            ps.AddNotNull("duration", Duration ?? def.Duration);

            ps.AddNotNull("position", Position ?? def.Position);

            ps.AddNotNull("dismissible", Dismissible ?? def.Dismissible);

            ps.AddNotNull("pauseOnHover", PauseOnHover ?? def.PauseOnHover);

            ps.AddNotNull("closeOnClick", CloseOnClick ?? def.CloseOnClick);

            ps.AddNotNull("opacity", Opacity ?? def.Opacity);

            ps.AddNotNull("animate", Animate ?? def.Animate);

            return(ps);
        }
Exemplo n.º 3
0
        internal JsParams ToParams()
        {
            JsParams ps  = new JsParams();
            var      def = BulmaRazorOptions.DefaultOptions.ColorPickerOptions;

            ps.AddNotNull("alpha", Alpha ?? def.Alpha);
            ps.AddNotNull("alphaChannel", AlphaChannel ?? def.AlphaChannel);
            ps.AddNotNull("alphaElement", AlphaElement ?? def.AlphaElement);
            ps.AddNotNull("backgroundColor", BackgroundColor ?? def.BackgroundColor);
            ps.AddNotNull("borderColor", BorderColor ?? def.BorderColor);
            ps.AddNotNull("borderRadius", BorderRadius ?? def.BorderRadius);
            ps.AddNotNull("borderWidth", BorderWidth ?? def.BorderWidth);
            ps.AddNotNull("buttonColor", ButtonColor ?? def.ButtonColor);
            ps.AddNotNull("buttonHeight", ButtonHeight ?? def.ButtonHeight);
            ps.AddNotNull("closeButton", CloseButton ?? def.CloseButton);
            ps.AddNotNull("closeText", CloseText ?? def.CloseText);
            ps.AddNotNull("controlBorderColor", ControlBorderColor ?? def.ControlBorderColor);
            ps.AddNotNull("controlBorderWidth", ControlBorderWidth ?? def.ControlBorderWidth);
            ps.AddNotNull("crossSize", CrossSize ?? def.CrossSize);
            ps.AddNotNull("forceStyle", ForceStyle ?? def.ForceStyle);
            ps.AddNotNull("format", Format ?? def.Format);
            ps.AddNotNull("hash", Hash ?? def.Hash);
            ps.AddNotNull("height", Height ?? def.Height);
            ps.AddNotNull("hideOnLeave", HideOnLeave ?? def.HideOnLeave);
            ps.AddNotNull("hideOnPaletteClick", HideOnPaletteClick ?? def.HideOnPaletteClick);
            ps.AddNotNull("mode", Mode ?? def.Mode);
            ps.AddNotNull("padding", Padding ?? def.Padding);
            ps.AddNotNull("palette", Palette ?? def.Palette);
            ps.AddNotNull("paletteCols", PaletteCols ?? def.PaletteCols);
            ps.AddNotNull("paletteHeight", PaletteHeight ?? def.PaletteHeight);
            ps.AddNotNull("paletteSetsAlpha", PaletteSetsAlpha ?? def.PaletteSetsAlpha);
            ps.AddNotNull("paletteSpacing", PaletteSpacing ?? def.PaletteSpacing);
            ps.AddNotNull("pointerBorderColor", PointerBorderColor ?? def.PointerBorderColor);
            ps.AddNotNull("pointerBorderWidth", PointerBorderWidth ?? def.PointerBorderWidth);
            ps.AddNotNull("pointerColor", PointerColor ?? def.PointerColor);
            ps.AddNotNull("pointerThickness", PointerThickness ?? def.PointerThickness);
            ps.AddNotNull("position", Position ?? def.Position);
            ps.AddNotNull("previewElement", PreviewElement ?? def.PreviewElement);
            ps.AddNotNull("previewPadding", PreviewPadding ?? def.PreviewPadding);
            ps.AddNotNull("previewPosition", PreviewPosition ?? def.PreviewPosition);
            ps.AddNotNull("previewSize", PreviewSize ?? def.PreviewSize);
            ps.AddNotNull("required", Required ?? def.Required);
            ps.AddNotNull("shadow", Shadow ?? def.Shadow);
            ps.AddNotNull("shadowBlur", ShadowBlur ?? def.ShadowBlur);
            ps.AddNotNull("shadowColor", ShadowColor ?? def.ShadowColor);
            ps.AddNotNull("showOnClick", ShowOnClick ?? def.ShowOnClick);
            ps.AddNotNull("sliderSize", SliderSize ?? def.SliderSize);
            ps.AddNotNull("smartPosition", SmartPosition ?? def.SmartPosition);
            ps.AddNotNull("uppercase", Uppercase ?? def.Uppercase);
            ps.AddNotNull("value", Value ?? def.Value);
            ps.AddNotNull("width", Width ?? def.Width);
            ps.AddNotNull("zIndex", ZIndex ?? def.ZIndex);

            return(ps);
        }
Exemplo n.º 4
0
        internal JsParams ToParams()
        {
            JsParams ps     = new JsParams();
            var      def    = BulmaRazorOptions.DefaultOptions.DatePickerOptions;
            var      format = Format ?? def.Format;

            if (format.HasValue())
            {
                //d, dd, m, mm, yy, yyyy, hh, ii.
                format = format.Replace("H", "h")
                         .Replace("m", "i")
                         .Replace("M", "m")
                         .Replace("\\", "");

                ps.AddNotNull("format", format);
            }

            ps.AddNotNull("language", Language ?? def.Language);
            ps.AddNotNull("weekStart", WeekStart ?? def.WeekStart);
            ps.AddNotNull("startView", StartView ?? def.StartView);
            ps.AddNotNull("minView", MinView ?? def.MinView);
            ps.AddNotNull("maxView", MaxView ?? def.MaxView);
            ps.AddNotNull("pickTime", PickTime ?? def.PickTime);
            ps.AddNotNull("initialDate", InitialDate ?? def.InitialDate);
            var startDate = StartDate ?? def.StartDate;

            if (startDate.HasValue)
            {
                ps.AddNotNull("startDate", startDate.Value.ToString("yyyy-MM-dd"));
            }

            var endDate = EndDate ?? def.EndDate;

            if (endDate.HasValue)
            {
                ps.AddNotNull("endDate", endDate.Value.ToString("yyyy-MM-dd"));
            }

            ps.AddNotNull("keyboardNavigation", KeyboardNavigation ?? def.KeyboardNavigation);
            ps.AddNotNull("daysOfWeekDisabled", DaysOfWeekDisabled ?? def.DaysOfWeekDisabled);
            var datesDisabled = DatesDisabled ?? def.DatesDisabled;

            if (datesDisabled != null && datesDisabled.Any())
            {
                ps.AddNotNull("datesDisabled", datesDisabled.Select(x => x.ToString("yyyy-MM-dd")));
            }
            ps.AddNotNull("closeButton", CloseButton);

            return(ps);
        }
Exemplo n.º 5
0
        internal JsParams ToParams()
        {
            JsParams ps  = new JsParams();
            var      def = BulmaRazorOptions.DefaultOptions.WangEditorOptions;

            ps.AddNotNull("height", Height ?? def.Height);
            ps.AddNotNull("zIndex", ZIndex ?? def.ZIndex);
            ps.AddNotNull("placeholder", Placeholder ?? def.Placeholder);
            ps.AddNotNull("focus", Focus ?? def.Focus);
            ps.AddNotNull("menus", Menus ?? def.Menus);
            ps.AddNotNull("excludeMenus", ExcludeMenus ?? def.ExcludeMenus);
            ps.AddNotNull("colors", Colors ?? def.Colors);
            ps.AddNotNull("lineHeights", LineHeights ?? def.LineHeights);
            ps.AddNotNull("fontNames", FontNames ?? def.FontNames);
            ps.AddNotNull("showFullScreen", ShowFullScreen ?? def.ShowFullScreen);
            ps.AddNotNull(" ShowMenuTooltips", ShowMenuTooltips ?? def.ShowMenuTooltips);
            ps.AddNotNull("menuTooltipPosition", MenuTooltipPosition ?? def.MenuTooltipPosition);
            ps.AddNotNull("onchangeTimeout", OnchangeTimeout ?? def.OnchangeTimeout);
            ps.AddNotNull("pasteFilterStyle", PasteFilterStyle ?? def.PasteFilterStyle);
            ps.AddNotNull("pasteIgnoreImg", PasteIgnoreImg ?? def.PasteIgnoreImg);
            ps.AddNotNull("uploadImgShowBase64", UploadImgShowBase64 ?? def.UploadImgShowBase64);
            ps.AddNotNull("uploadImgServer", UploadImgServer ?? def.UploadImgServer);
            ps.AddNotNull("uploadImgMaxSize", UploadImgMaxSize ?? def.UploadImgMaxSize);
            ps.AddNotNull("uploadImgAccept", UploadImgAccept ?? def.UploadImgAccept);
            ps.AddNotNull("uploadImgMaxLength", UploadImgMaxLength ?? def.UploadImgMaxLength);
            ps.AddNotNull("uploadImgParams", UploadImgParams ?? def.UploadImgParams);
            ps.AddNotNull("uploadImgParamsWithUrl", UploadImgParamsWithUrl ?? def.UploadImgParamsWithUrl);
            ps.AddNotNull("uploadFileName", UploadFileName ?? def.UploadFileName);
            ps.AddNotNull("uploadImgHeaders", UploadImgHeaders ?? def.UploadImgHeaders);
            ps.AddNotNull("withCredentials", WithCredentials ?? def.WithCredentials);
            ps.AddNotNull("uploadImgTimeout", UploadImgTimeout ?? def.UploadImgTimeout);
            ps.AddNotNull("showLinkImg", ShowLinkImg ?? def.ShowLinkImg);
            ps.AddNotNull("showLinkImgAlt", ShowLinkImgAlt ?? def.ShowLinkImgAlt);
            ps.AddNotNull("showLinkImgHref", ShowLinkImgHref ?? def.ShowLinkImgHref);
            ps.AddNotNull("uploadVideoServer", UploadVideoServer ?? def.UploadVideoServer);
            ps.AddNotNull("uploadVideoMaxSize", UploadVideoMaxSize ?? def.UploadVideoMaxSize);
            ps.AddNotNull("uploadVideoAccept", UploadVideoAccept ?? def.UploadVideoAccept);
            ps.AddNotNull("uploadVideoParams", UploadVideoParams ?? def.UploadVideoParams);
            ps.AddNotNull("uploadVideoParamsWithUrl", UploadVideoParamsWithUrl ?? def.UploadVideoParamsWithUrl);
            ps.AddNotNull("uploadVideoName", UploadVideoName ?? def.UploadVideoName);
            ps.AddNotNull("uploadVideoHeaders", UploadVideoHeaders ?? def.UploadVideoHeaders);
            ps.AddNotNull("withVideoCredentials", WithVideoCredentials ?? def.WithVideoCredentials);
            ps.AddNotNull("uploadVideoTimeout", UploadVideoTimeout ?? def.UploadVideoTimeout);
            ps.AddNotNull("showLinkVideo", ShowLinkVideo ?? def.ShowLinkVideo);
            return(ps);
        }
Exemplo n.º 6
0
        internal JsParams ToParams()
        {
            JsParams ps  = new JsParams();
            var      def = BulmaRazorOptions.DefaultOptions.CarouselOptions;

            ps.AddNotNull("initialSlide", InitialSlide ?? def.InitialSlide);
            ps.AddNotNull("slidesToScroll", SlidesToScroll ?? def.SlidesToScroll);
            ps.AddNotNull("slidesToShow", SlidesToShow ?? def.SlidesToShow);
            ps.AddNotNull("navigation", Navigation ?? def.Navigation);
            ps.AddNotNull("navigationKeys", NavigationKeys ?? def.NavigationKeys);
            ps.AddNotNull("navigationSwipe", NavigationSwipe ?? def.NavigationSwipe);
            ps.AddNotNull("pagination", Pagination ?? def.Pagination);
            ps.AddNotNull("loop", Loop ?? def.Loop);
            ps.AddNotNull("infinite", Infinite ?? def.Infinite);
            ps.AddNotNull("effect", Effect ?? def.Effect);
            ps.AddNotNull("duration", Duration ?? def.Duration);
            ps.AddNotNull("timing", Timing ?? def.Timing);
            ps.AddNotNull("autoplay", Autoplay ?? def.Autoplay);
            ps.AddNotNull("autoplaySpeed", AutoplaySpeed ?? def.AutoplaySpeed);
            ps.AddNotNull("pauseOnHover", PauseOnHover ?? def.PauseOnHover);
            return(ps);
        }
Exemplo n.º 7
0
        internal JsParams ToParams()
        {
            JsParams ps  = new JsParams();
            var      def = BulmaRazorOptions.DefaultOptions.TuiEditorOptions;

            ps.AddNotNull("elid", elid);
            ps.AddNotNull("viewer", Viewer);
            ps.AddNotNull("height", Height ?? def.Height);
            ps.AddNotNull("minHeight", MinHeight ?? def.MinHeight);
            ps.AddNotNull("initialValue", InitialValue ?? def.InitialValue);
            ps.AddNotNull("previewStyle", PreviewStyle ?? def.PreviewStyle);
            ps.AddNotNull("previewHighlight", PreviewHighlight ?? def.PreviewHighlight);
            ps.AddNotNull("initialEditType", InitialEditType ?? def.InitialEditType);
            ps.AddNotNull("language", Language ?? def.Language);
            ps.AddNotNull("useCommandShortcut", UseCommandShortcut ?? def.UseCommandShortcut);
            ps.AddNotNull("useDefaultHTMLSanitizer", UseDefaultHTMLSanitizer ?? def.UseDefaultHTMLSanitizer);
            ps.AddNotNull("usageStatistics", UsageStatistics ?? def.UsageStatistics);
            ps.AddNotNull("toolbarItems", ToolbarItems ?? def.ToolbarItems);
            ps.AddNotNull("hideModeSwitch", HideModeSwitch ?? def.HideModeSwitch);
            ps.AddNotNull("placeholder", Placeholder ?? def.Placeholder);
            ps.AddNotNull("frontMatter", FrontMatter ?? def.FrontMatter);

            return(ps);
        }