From 3cd1851a79debf9c19feb1256df5a0f43a0ef2f8 Mon Sep 17 00:00:00 2001 From: cnouguier Date: Wed, 20 Mar 2024 10:17:33 +0100 Subject: [PATCH] feat: Add a Document activity (close #150) --- config/default.js | 17 +- public/sample.html | 23407 ----------------- public/sample.md | 157 - public/sample_en.html | 14 + public/sample_en.md | 7 + public/sample_fr.html | 15 + public/sample_fr.md | 10 + src/components/document/DocumentActivity.vue | 18 +- src/components/layout/WidgetStore.vue | 6 - yarn.lock | 6 +- 10 files changed, 69 insertions(+), 23588 deletions(-) delete mode 100644 public/sample.html delete mode 100644 public/sample.md create mode 100644 public/sample_en.html create mode 100644 public/sample_en.md create mode 100644 public/sample_fr.html create mode 100644 public/sample_fr.md delete mode 100644 src/components/layout/WidgetStore.vue diff --git a/config/default.js b/config/default.js index 023b11f6..97e091fe 100644 --- a/config/default.js +++ b/config/default.js @@ -123,7 +123,7 @@ const widgets = [ id: 'widget-4', label: 'Widget 4', content: { component: 'layout/Widget'} }, { - id: 'widget-Store', label: 'Store', content: { component: 'layout/WidgetStore'}, scrollable: true + id: 'widget-Store', label: 'Store', content: { component: 'KStore'}, scrollable: true } ] @@ -307,21 +307,18 @@ module.exports = { content: { html: [ { id: 'html', label: 'Html', color: 'primary', disabled: true }, - { id: 'md', label: 'Markdown', color: 'primary', route: { name: 'document-activity', params: { type: 'md' } } }, - { id: 'pdf', label: 'Pdf', color: 'primary', route: { name: 'document-activity', params: { type: 'pdf' } } } + { id: 'md', label: 'Markdown', color: 'primary', route: { name: 'document-activity', params: { type: 'md' } } } ], md: [ { id: 'html', label: 'Html', color: 'primary', route: { name: 'document-activity', params: { type: 'html' } } }, - { id: 'md', label: 'Markdown', color: 'primary', disabled: true }, - { id: 'pdf', label: 'Pdf', color: 'primary', route: { name: 'document-activity', params: { type: 'pdf' } } } - ], - pdf: [ - { id: 'html', label: 'Html', color: 'primary', route: { name: 'document-activity', params: { type: 'html' } } }, - { id: 'md', label: 'Markdown', color: 'primary', route: { name: 'document-activity', params: { type: 'md' } } }, - { id: 'pdf', label: 'Pdf', color: 'primary', disabled: true } + { id: 'md', label: 'Markdown', color: 'primary', disabled: true } ] }, mode: 'html' + }, + rightPane: { + content: [{ component: 'KStore' }], + visible: false } }, collectionActivity: { diff --git a/public/sample.html b/public/sample.html deleted file mode 100644 index 5f396e27..00000000 --- a/public/sample.html +++ /dev/null @@ -1,23407 +0,0 @@ - - -kApp

An h1 header

-

Paragraphs are separated by a blank line.

-

2nd paragraph. Italic, bold, and monospace. Itemized lists -look like:

-
    -
  • this one
  • -
  • that one
  • -
  • the other one
  • -
-

Note that --- not considering the asterisk --- the actual text -content starts at 4-columns in.

-
-

Block quotes are - written like so.

-

They can span multiple paragraphs, - if you like.

-
-

Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all -in chapters 12--14"). Three dots … will be converted to an ellipsis. -Unicode is supported. ☺

-

An h2 header

-

Here's a numbered list:

-
    -
  1. first item
  2. -
  3. second item
  4. -
  5. third item
  6. -
-

Note again how the actual text starts at 4 columns in (4 characters -from the left side). Here's a code sample:

-
# Let me re-iterate ...
-for i in 1 .. 10 { do-something(i) }
-
-

As you probably guessed, indented 4 spaces. By the way, instead of -indenting the block, you can use delimited blocks, if you like:

-
define foobar() {
-    print "Welcome to flavor country!";
-}
-
-

(which makes copying & pasting easier). You can optionally mark the -delimited block for Pandoc to syntax highlight it:

-
import time
-# Quick, count to ten!
-for i in range(10):
-    # (but not *too* quick)
-    time.sleep(0.5)
-    print i
-
-

An h3 header

-

Now a nested list:

-
    -
  1. First, get these ingredients:

    -
      -
    • carrots
    • -
    • celery
    • -
    • lentils
  2. -
  3. Boil some water.

  4. -
  5. Dump everything in the pot and follow -this algorithm:

    -
    find wooden spoon
    -uncover pot
    -stir
    -cover pot
    -balance wooden spoon precariously on pot handle
    -wait 10 minutes
    -goto first step (or shut off burner when done)
    -
    -

    Do not bump wooden spoon or it will fall.

  6. -
-

Notice again how text always lines up on 4-space indents (including -that last line which continues item 3 above).

-

Here's a link to a website, to a local -doc, and to a section heading in the current -doc. Here's a footnote [^1].

-

[^1]: Footnote text goes here.

-

Tables can look like this:

-

size material color ----- ------------ ------------ -9 leather brown -10 hemp canvas natural -11 glass transparent

-

Table: Shoes, their sizes, and what they're made of

-

(The above is the caption for the table.) Pandoc also supports -multi-line tables:

-

-------- ----------------------- -keyword text --------- ----------------------- -red Sunsets, apples, and - other red or reddish - things.

-

green Leaves, grass, frogs - and other things it's - not easy being. --------- -----------------------

-

A horizontal rule follows.

-
-

Here's a definition list:

-

apples - : Good for making applesauce. -oranges - : Citrus! -tomatoes - : There's no "e" in tomatoe.

-

Again, text is indented 4 spaces. (Put a blank line between each -term/definition pair to spread things out more.)

-

Here's a "line block":

-

| Line one -| Line too -| Line tree

-

and images can be specified like so:

-

example image

-

Inline math equations go in like so: $\omega = d\phi / dt$. Display -math should get its own line and be put in in double-dollarsigns:

-

$$I = \int \rho R^{2} dV$$

-

And note that you can backslash-escape any punctuation characters -which you wish to be displayed literally, ex.: `foo`, *bar*, etc.

\ No newline at end of file diff --git a/public/sample.md b/public/sample.md deleted file mode 100644 index 229e5f60..00000000 --- a/public/sample.md +++ /dev/null @@ -1,157 +0,0 @@ -An h1 header -============ - -Paragraphs are separated by a blank line. - -2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists -look like: - - * this one - * that one - * the other one - -Note that --- not considering the asterisk --- the actual text -content starts at 4-columns in. - -> Block quotes are -> written like so. -> -> They can span multiple paragraphs, -> if you like. - -Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all -in chapters 12--14"). Three dots ... will be converted to an ellipsis. -Unicode is supported. ☺ - - - -An h2 header ------------- - -Here's a numbered list: - - 1. first item - 2. second item - 3. third item - -Note again how the actual text starts at 4 columns in (4 characters -from the left side). Here's a code sample: - - # Let me re-iterate ... - for i in 1 .. 10 { do-something(i) } - -As you probably guessed, indented 4 spaces. By the way, instead of -indenting the block, you can use delimited blocks, if you like: - -~~~ -define foobar() { - print "Welcome to flavor country!"; -} -~~~ - -(which makes copying & pasting easier). You can optionally mark the -delimited block for Pandoc to syntax highlight it: - -~~~python -import time -# Quick, count to ten! -for i in range(10): - # (but not *too* quick) - time.sleep(0.5) - print i -~~~ - - - -### An h3 header ### - -Now a nested list: - - 1. First, get these ingredients: - - * carrots - * celery - * lentils - - 2. Boil some water. - - 3. Dump everything in the pot and follow - this algorithm: - - find wooden spoon - uncover pot - stir - cover pot - balance wooden spoon precariously on pot handle - wait 10 minutes - goto first step (or shut off burner when done) - - Do not bump wooden spoon or it will fall. - -Notice again how text always lines up on 4-space indents (including -that last line which continues item 3 above). - -Here's a link to [a website](http://foo.bar), to a [local -doc](local-doc.html), and to a [section heading in the current -doc](#an-h2-header). Here's a footnote [^1]. - -[^1]: Footnote text goes here. - -Tables can look like this: - -size material color ----- ------------ ------------ -9 leather brown -10 hemp canvas natural -11 glass transparent - -Table: Shoes, their sizes, and what they're made of - -(The above is the caption for the table.) Pandoc also supports -multi-line tables: - --------- ----------------------- -keyword text --------- ----------------------- -red Sunsets, apples, and - other red or reddish - things. - -green Leaves, grass, frogs - and other things it's - not easy being. --------- ----------------------- - -A horizontal rule follows. - -*** - -Here's a definition list: - -apples - : Good for making applesauce. -oranges - : Citrus! -tomatoes - : There's no "e" in tomatoe. - -Again, text is indented 4 spaces. (Put a blank line between each -term/definition pair to spread things out more.) - -Here's a "line block": - -| Line one -| Line too -| Line tree - -and images can be specified like so: - -![example image](kalisio.png "An exemplary image") - -Inline math equations go in like so: $\omega = d\phi / dt$. Display -math should get its own line and be put in in double-dollarsigns: - -$$I = \int \rho R^{2} dV$$ - -And note that you can backslash-escape any punctuation characters -which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc. \ No newline at end of file diff --git a/public/sample_en.html b/public/sample_en.html new file mode 100644 index 00000000..445cfc7e --- /dev/null +++ b/public/sample_en.html @@ -0,0 +1,14 @@ + + + + HTML content sample + + +

HTML content Sample

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + + + + \ No newline at end of file diff --git a/public/sample_en.md b/public/sample_en.md new file mode 100644 index 00000000..bf47ba64 --- /dev/null +++ b/public/sample_en.md @@ -0,0 +1,7 @@ +### Markdown content sample + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +--- + +[![Kalisio logo](kalisio.png)](http://kalisio.com) \ No newline at end of file diff --git a/public/sample_fr.html b/public/sample_fr.html new file mode 100644 index 00000000..8a1e6069 --- /dev/null +++ b/public/sample_fr.html @@ -0,0 +1,15 @@ + + + + Exemple de contenu HTML + + +

Example de contenu HTML

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+

+ + + + + \ No newline at end of file diff --git a/public/sample_fr.md b/public/sample_fr.md new file mode 100644 index 00000000..f4654710 --- /dev/null +++ b/public/sample_fr.md @@ -0,0 +1,10 @@ +### Exemple de contenu Markdown + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +--- + +[![Kalisio logo](kalisio.png)](http://kalisio.com) + + + diff --git a/src/components/document/DocumentActivity.vue b/src/components/document/DocumentActivity.vue index ad5b36d8..ffdb01cc 100644 --- a/src/components/document/DocumentActivity.vue +++ b/src/components/document/DocumentActivity.vue @@ -3,6 +3,7 @@ diff --git a/src/components/layout/WidgetStore.vue b/src/components/layout/WidgetStore.vue deleted file mode 100644 index dc65a445..00000000 --- a/src/components/layout/WidgetStore.vue +++ /dev/null @@ -1,6 +0,0 @@ - - - \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index e1c7ab5a..aa653479 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3974,7 +3974,7 @@ clone@^1.0.2: color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" @@ -5978,7 +5978,7 @@ idb@^7.0.1: ieee754@^1.1.13: version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: @@ -7940,7 +7940,7 @@ process-nextick-args@~2.0.0: prop-types@^15.8.1: version "15.8.1" - resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== dependencies: loose-envify "^1.4.0"