Skip to content

Commit

Permalink
minor Gps and TOC improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
iJungleboy committed Apr 25, 2024
1 parent a6bf42f commit 81781d6
Show file tree
Hide file tree
Showing 34 changed files with 787 additions and 579 deletions.
4 changes: 2 additions & 2 deletions 2sxc Docs Generator/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"metadata": [
{
// use a blank SRC while developing typescript or the theme, to save time
"src": [],
"x-src": [],

// The source-code to document
"x-src": [
"src": [
{
"src": "../..",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion 2sxc Docs Generator/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# 2sxc and EAV Docs

`For version 17.06.03 LTS`
`For version 17.07 LTS`

This is the technical documentation for EAV and 2sxc. If you're new to 2sxc, start with [2sxc.org](https://2sxc.org/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ uid: Basics.Data.Fields.Boolean-Tristate
---
# Field Input-Type **boolean-tristate**

Use this field type for configuring simple true/false UI elements, storing [boolean/boolean data](xref:Basics.Data.Fields.Boolean). It's an extension of the basic [boolean field type](xref:Basics.Data.Fields.Boolean).
Use this field type for configuring simple true/false UI elements,
storing [boolean/boolean data](xref:Basics.Data.Fields.Boolean).
It's an extension of the basic [boolean field type](xref:Basics.Data.Fields.Boolean).

## Features
## Features

1. provide a basic on/off input field (toggle switch)
1. can also be switched to `null` (not set)
Expand Down
8 changes: 5 additions & 3 deletions 2sxc Docs Generator/pages/basics/data/fields/custom-gps.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ uid: Basics.Data.Fields.CustomGps
---
# Field Input-Type **custom-gps**

Use this field type for selecting positions on a map, storing [custom JSON data](xref:Basics.Data.Fields.Custom).
Use this field type for selecting positions on a map, storing [custom JSON data](xref:Basics.Data.Fields.Custom).


## Features
## Features

1. Auto-find the location based on address data already added to the form
1. Pin can be moved manually
Expand All @@ -17,4 +17,6 @@ Use this field type for selecting positions on a map, storing [custom JSON data]

## History

1. Introduced in 2sxc 2.0
1. Introduced in 2sxc 2.0 - originally with a virtual field which placed the numbers into 2 number fields
1. Modified behavior to use a JSON field instead ca. 2sxc 7
1. Improved Razor with `ITypedItem` to have a `.Gps(...)` method 2sxc 17
10 changes: 6 additions & 4 deletions 2sxc Docs Generator/pages/basics/data/fields/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This explains **Custom Fields**. For an overview check out [](xref:Basics.Data.I
---


Custom data is a basic [data type](xref:Basics.Data.Fields.Index). It's used to store JSON for special use cases.
Custom data is a basic [data type](xref:Basics.Data.Fields.Index). It's used to store JSON for special use cases.


## Sub-Types
Expand All @@ -24,16 +24,18 @@ Custom data is a basic [data type](xref:Basics.Data.Fields.Index). It's used to
Since 2sxc 10 there is a special `AsDynamic` which you can use to work with JSON data in Razor templates.


---
---

## Technical Information

### Storage in the SQL Database in the EAV-Model
This is converted to a string when stored as a string in the DB, and converted back to a boolean when the data is loaded.

This is converted to a string when stored as a string in the DB, and converted back to a boolean when the data is loaded.

### Storage in the SQL Database in the JSON-Model

This is simply stored as a string value in json, so kind of JSON in JSON.

## History

1. Introduced in EAV 1.0 2sxc 1.0
1. Introduced in EAV 1.0 2sxc 1.0
107 changes: 54 additions & 53 deletions 2sxc Docs Generator/pages/basics/data/fields/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,86 +3,87 @@
topicUid: Basics.Data.Fields.GeneralSettings

# Boolean
- name: " "
- name: "Boolean Fields"
topicUid: Basics.Data.Fields.Boolean
- name: Boolean Default
topicUid: Basics.Data.Fields.Boolean-Default
- name: Boolean Tristate
topicUid: Basics.Data.Fields.Boolean-Tristate
items:
- name: Boolean Default
topicUid: Basics.Data.Fields.Boolean-Default
- name: Boolean Tristate
topicUid: Basics.Data.Fields.Boolean-Tristate

# Boolean
- name: " "
# DateTime
- name: "Date/Time Fields"
topicUid: Basics.Data.Fields.DateTime
- name: DateTime Default
topicUid: Basics.Data.Fields.DateTime-Default
items:
- name: DateTime Default
topicUid: Basics.Data.Fields.DateTime-Default

# Custom
- name: " "
- name: "Custom Fields"
- name: "Custom Fields / GPS"
topicUid: Basics.Data.Fields.Custom
- name: Custom GPS
topicUid: Basics.Data.Fields.CustomGps
items:
- name: Custom GPS
topicUid: Basics.Data.Fields.CustomGps

# Empty
- name: " "
- name: "Empty Fields (Groups)"
topicUid: Basics.Data.Fields.Empty
- name: Empty Default (new Group)
topicUid: Basics.Data.Fields.Empty-Default
- name: Empty End (close a Group)
topicUid: Basics.Data.Fields.Empty-End
- name: Empty Message
topicUid: Basics.Data.Fields.Empty-Message
items:
- name: Empty Default (new Group)
topicUid: Basics.Data.Fields.Empty-Default
- name: Empty End (close a Group)
topicUid: Basics.Data.Fields.Empty-End
- name: Empty Message
topicUid: Basics.Data.Fields.Empty-Message

# Entity
- name: " "
- name: "Entity Fields (Relationships)"
topicUid: Basics.Data.Fields.Entity
- name: Entity Default
topicUid: Basics.Data.Fields.Entity-Default
- name: Entity from Query
topicUid: Basics.Data.Fields.Entity-Query
items:
- name: Entity Default
topicUid: Basics.Data.Fields.Entity-Default
- name: Entity from Query
topicUid: Basics.Data.Fields.Entity-Query

# Hyperlink
- name: " "
- name: "Hyperlink Fields (Files)"
- name: "Hyperlink Fields / Files"
topicUid: Basics.Data.Fields.Hyperlink
- name: Hyperlink Default (single item)
topicUid: Basics.Data.Fields.Hyperlink-Default
- name: Hyperlink Library (file lists)
topicUid: Basics.Data.Fields.Hyperlink-Library
items:
- name: Hyperlink Default (single item)
topicUid: Basics.Data.Fields.Hyperlink-Default
- name: Hyperlink Library (file lists)
topicUid: Basics.Data.Fields.Hyperlink-Library

# Number
- name: " "
- name: "Number Fields"
topicUid: Basics.Data.Fields.Number
- name: Number Default
topicUid: Basics.Data.Fields.Number-Default
- name: Number Dropdown
topicUid: Basics.Data.Fields.Number-Dropdown
items:
- name: Number Default
topicUid: Basics.Data.Fields.Number-Default
- name: Number Dropdown
topicUid: Basics.Data.Fields.Number-Dropdown

# String
- name: " "
- name: "String / Text Fields"
# - name: " "
- name: "String / Text / WYSIWYG Fields"
topicUid: Basics.Data.Fields.String
- name: String Default
topicUid: Basics.Data.Fields.String-Default
- name: String Dropdown
topicUid: Basics.Data.Fields.String-Dropdown
- name: String Dropdown Query
topicUid: Basics.Data.Fields.String-Dropdown-Query
- name: String WYSIWYG ✨
topicUid: Basics.Data.Fields.String-Wysiwyg
- name: String WYSIWYG Rich ✨
topicUid: Basics.Data.Fields.String-Wysiwyg-Rich
- name: String Font Icon Picker
topicUid: Basics.Data.Fields.String-Font-Icon-Picker
- name: String Url Path
topicUid: Basics.Data.Fields.String-Url-Path
items:
- name: String Default
topicUid: Basics.Data.Fields.String-Default
- name: String Dropdown
topicUid: Basics.Data.Fields.String-Dropdown
- name: String Dropdown Query
topicUid: Basics.Data.Fields.String-Dropdown-Query
- name: String WYSIWYG ✨
topicUid: Basics.Data.Fields.String-Wysiwyg
- name: String WYSIWYG Rich ✨
topicUid: Basics.Data.Fields.String-Wysiwyg-Rich
- name: String Font Icon Picker
topicUid: Basics.Data.Fields.String-Font-Icon-Picker
- name: String Url Path
topicUid: Basics.Data.Fields.String-Url-Path

# Ephemeral
- name: " "
# - name: " "
- name: "Ephemeral Fields (Temporary)"
topicUid: Basics.Data.Fields.Ephemeral
4 changes: 2 additions & 2 deletions 2sxc Docs Generator/pages/basics/data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
- name: Entity Relationships
topicUid: Basics.Data.Relationships.Index

- name: Multilanguage & i18n
- name: Multi-Language & i18n
topicUid: Basics.Data.MultiLanguage.Index

- name: "Metadata"
topicHref: metadata.md
href: metadata.md

- name: " "

Expand Down
7 changes: 1 addition & 6 deletions 2sxc Docs Generator/pages/basics/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
href: content/toc.yml

# A bit more advanced / CMS
- name: " "
- name: "Deeper Dive"

- name: Principles and Values
Expand All @@ -34,7 +33,6 @@


# Stack
- name: " "
- name: "Stack Layers / Parts"

- name: Browser
Expand All @@ -56,7 +54,6 @@
topicUid: Basics.Query.LookUp.Index

# Edit / CMS
- name: " "
- name: "Editing and CMS"

- name: Edit UX
Expand All @@ -75,20 +72,18 @@
topicUid: Basics.Polymorphism.Index

# Productivity
- name: " "
- name: "Productivity"

- name: Notes 📝
topicUid: Basics.Notes

# Topics
- name: " "
- name: "Other Topics"

- name: Mobile Apps & PWAs
topicUid: Basics.MobileApps.Index

# Internal stuff
- name: " "

- name: Licenses & Features
topicUid: Basics.LnF.Index
Expand Down
2 changes: 1 addition & 1 deletion 2sxc Docs Generator/pages/guides/app-development/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
- name: WYSIWYG Guide
topicUid: Guides.Wysiwyg.Index
- name: Common Problems
topicUid: Guides.CommonProblems.Index
topicUid: Guides.AppDevelopment.CommonProblems.Index
href: common-problems/toc.yml
20 changes: 13 additions & 7 deletions docs/api/dot-net/Custom.Data.CustomItem.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h1 id="Custom_Data_CustomItem" data-uid="Custom.Data.CustomItem" class="text-br
<div class="markdown conceptual"></div>

<div class="codewrapper">
<pre><code class="lang-csharp hljs">[WorkInProgressApi(&quot;Still WIP v17.02&quot;)]
<pre><code class="lang-csharp hljs">[PublicApi]
public class CustomItem : ITypedItem, ITyped, IEquatable&lt;ITypedItem&gt;</code></pre>
</div>

Expand Down Expand Up @@ -157,7 +157,10 @@ <h1 id="Custom_Data_CustomItem" data-uid="Custom.Data.CustomItem" class="text-br


<h2 id="Custom_Data_CustomItem_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>It's not abstract, even if the most common case is to inherit, as there are cases where you want to use it directly.</p>
<div class="markdown level0 remarks"><ul>
<li>Released in v17.06</li>
<li>It's not abstract, even if the most common case is to inherit, as there are cases where you want to use it directly.</li>
</ul>
</div>


Expand Down Expand Up @@ -1472,7 +1475,7 @@ <h3 id="Custom_Data_CustomItem_Gps_System_String_ToSic_Lib_Coding_NoParamOrder_S
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Custom.Data/CustomItem.cs/#L275"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>Get the GPS coordinates of a GPS field.</p>
<div class="markdown level1 summary"><p>Get the GPS coordinates of a GPS field as a typed object.</p>
</div>
<div class="markdown level1 conceptual"></div>

Expand All @@ -1483,11 +1486,14 @@ <h3 id="Custom_Data_CustomItem_Gps_System_String_ToSic_Lib_Coding_NoParamOrder_S
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>name</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dd><p>Name of a field</p>
</dd>
<dt><code>protector</code> <a class="xref" href="ToSic.Lib.Coding.NoParamOrder.html">NoParamOrder</a></dt>
<dd></dd>
<dd><p>see <a class="xref" href="../../net-code/conventions/named-parameters.html">Convention: Named Parameters</a></p>
</dd>
<dt><code>required</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>?</dt>
<dd></dd>
<dd><p>throw error if <code>name</code> doesn't exist, see <a class="xref" href="../../net-code/conventions/property-required/index.html">Convention: Property Required Name Checks</a></p>
</dd>
</dl>

<h4 class="section">Returns</h4>
Expand Down Expand Up @@ -1600,7 +1606,7 @@ <h5>Note</h5>
<div class="markdown level1 conceptual"></div>

<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IResponsiveImage Img(string name, NoParamOrder noParamOrder, object settings, object factor, object width, string imgAlt, string imgAltFallback, string imgClass, object imgAttributes, object toolbar, object recipe)</code></pre>
<pre><code class="lang-csharp hljs">public IResponsiveImage Img(string name, NoParamOrder noParamOrder = default, object settings = null, object factor = null, object width = null, string imgAlt = null, string imgAltFallback = null, string imgClass = null, object imgAttributes = null, object toolbar = null, object recipe = null)</code></pre>
</div>

<h4 class="section">Parameters</h4>
Expand Down
Loading

0 comments on commit 81781d6

Please sign in to comment.