Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into fix-undo-sto…
Browse files Browse the repository at this point in the history
…necrop
  • Loading branch information
Rohan Bansal committed Oct 2, 2024
2 parents 30c37d2 + 85e1ef8 commit 23262aa
Show file tree
Hide file tree
Showing 45 changed files with 337 additions and 90 deletions.
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# STONECROP
# Stonecrop

This repository contains all the packages used in the Sedum project. It is managed with [Rush](rushjs.io).
![Test Status](https://github.com/agritheory/stonecrop/actions/workflows/tests.yml/badge.svg) ![Lint Status](https://github.com/agritheory/stonecrop/actions/workflows/lint.yml/badge.svg)

## What is it?
This repository contains all the packages used in the Stonecrop project. It is managed with [Rush](https://rushjs.io).

### What is it?

These packages in combination create an application that creates a schema driven UI and system of event driven hooks (actual hooks, not the React kind which are not hooks at all). These are available in both the UI and as server middleware.

## Getting Started
### Getting Started

This project has the following system dependencies:

- [`pnpm`](https://pnpm.io/) (using yarn or npm will break packages)
- [`rush`](https://rushjs.io/)
- `nvm` and `node v20`: `nvm install 20 --lts && nvm use 20 --lts`
- Node v20 LTS ([installation instructions](https://nodejs.org/en/download/package-manager))

```bash
git clone stonecrop
Expand All @@ -24,9 +26,8 @@ cd stonecrop
rush update
rush rebuild

# Work on stonecrop, for example
cd stonecrop
rushx story:dev
# Work on aform, for example
cd aform

# sometimes, when changing branches or updating dependencies you may have issues
# this command removes and re-links all dependencies
Expand All @@ -38,3 +39,16 @@ rush change
# Stage changes and run linters
rushx lint
```

### Projects

- [`@stonecrop/aform`](./aform/CHANGELOG.md)
- [`@stonecrop/atable`](./atable/README.md)
- [`@stonecrop/beam`](./beam/README.md)
- [`@stonecrop/code_editor`](./code_editor/CHANGELOG.md)
- [`@stonecrop/desktop`](./desktop/README.md)
- [`@stonecrop/graphql_client`](./graphql_client/README.md)
- [`@stonecrop/node_editor`](./node_editor/README.md)
- [`@stonecrop/stonecrop`](./stonecrop/README.md)
- [`@stonecrop/themes`](./themes/README.md)
- [`@stonecrop/utilities`](./utilities/README.md)
12 changes: 12 additions & 0 deletions aform/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@stonecrop/aform",
"entries": [
{
"version": "0.2.36",
"tag": "@stonecrop/aform_v0.2.36",
"date": "Thu, 26 Sep 2024 18:48:59 GMT",
"comments": {}
},
{
"version": "0.2.35",
"tag": "@stonecrop/aform_v0.2.35",
"date": "Tue, 24 Sep 2024 10:51:20 GMT",
"comments": {}
},
{
"version": "0.2.34",
"tag": "@stonecrop/aform_v0.2.34",
Expand Down
12 changes: 11 additions & 1 deletion aform/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Change Log - @stonecrop/aform

This log was last generated on Wed, 18 Sep 2024 15:26:37 GMT and should not be manually modified.
This log was last generated on Thu, 26 Sep 2024 18:48:59 GMT and should not be manually modified.

## 0.2.36
Thu, 26 Sep 2024 18:48:59 GMT

_Version update only_

## 0.2.35
Tue, 24 Sep 2024 10:51:20 GMT

_Version update only_

## 0.2.34
Wed, 18 Sep 2024 15:26:37 GMT
Expand Down
2 changes: 1 addition & 1 deletion aform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stonecrop/aform",
"version": "0.2.34",
"version": "0.2.36",
"license": "MIT",
"type": "module",
"author": {
Expand Down
12 changes: 12 additions & 0 deletions atable/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@stonecrop/atable",
"entries": [
{
"version": "0.2.36",
"tag": "@stonecrop/atable_v0.2.36",
"date": "Thu, 26 Sep 2024 18:48:59 GMT",
"comments": {}
},
{
"version": "0.2.35",
"tag": "@stonecrop/atable_v0.2.35",
"date": "Tue, 24 Sep 2024 10:51:20 GMT",
"comments": {}
},
{
"version": "0.2.34",
"tag": "@stonecrop/atable_v0.2.34",
Expand Down
12 changes: 11 additions & 1 deletion atable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Change Log - @stonecrop/atable

This log was last generated on Wed, 18 Sep 2024 15:26:37 GMT and should not be manually modified.
This log was last generated on Thu, 26 Sep 2024 18:48:59 GMT and should not be manually modified.

## 0.2.36
Thu, 26 Sep 2024 18:48:59 GMT

_Version update only_

## 0.2.35
Tue, 24 Sep 2024 10:51:20 GMT

_Version update only_

## 0.2.34
Wed, 18 Sep 2024 15:26:37 GMT
Expand Down
2 changes: 1 addition & 1 deletion atable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stonecrop/atable",
"version": "0.2.34",
"version": "0.2.36",
"license": "MIT",
"type": "module",
"author": {
Expand Down
18 changes: 18 additions & 0 deletions beam/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
{
"name": "@stonecrop/beam",
"entries": [
{
"version": "0.2.36",
"tag": "@stonecrop/beam_v0.2.36",
"date": "Thu, 26 Sep 2024 18:48:59 GMT",
"comments": {}
},
{
"version": "0.2.35",
"tag": "@stonecrop/beam_v0.2.35",
"date": "Tue, 24 Sep 2024 10:51:20 GMT",
"comments": {
"patch": [
{
"comment": "fix ItemCount input behaviour"
}
]
}
},
{
"version": "0.2.34",
"tag": "@stonecrop/beam_v0.2.34",
Expand Down
14 changes: 13 additions & 1 deletion beam/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Change Log - @stonecrop/beam

This log was last generated on Wed, 18 Sep 2024 15:26:37 GMT and should not be manually modified.
This log was last generated on Thu, 26 Sep 2024 18:48:59 GMT and should not be manually modified.

## 0.2.36
Thu, 26 Sep 2024 18:48:59 GMT

_Version update only_

## 0.2.35
Tue, 24 Sep 2024 10:51:20 GMT

### Patches

- fix ItemCount input behaviour

## 0.2.34
Wed, 18 Sep 2024 15:26:37 GMT
Expand Down
2 changes: 1 addition & 1 deletion beam/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stonecrop/beam",
"version": "0.2.34",
"version": "0.2.36",
"license": "MIT",
"type": "module",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion beam/src/components/ActionFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script setup lang="ts">
const emit = defineEmits(['click'])
const emit = defineEmits<{ click: [] }>()
const handleFooterAction = () => {
emit('click')
Expand Down
4 changes: 1 addition & 3 deletions beam/src/components/BeamModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
</template>

<script setup lang="ts">
defineProps<{
showModal: boolean
}>()
defineProps<{ showModal: boolean }>()
</script>
5 changes: 4 additions & 1 deletion beam/src/components/BeamModalOutlet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
</template>

<script setup lang="ts">
// const emit = defineEmits(['confirmmodal', 'closemodal'])
/* const emit = */ defineEmits<{
confirmmodal: []
closemodal: []
}>()
// const confirmModal = () => {
// emit('confirmmodal')
Expand Down
14 changes: 2 additions & 12 deletions beam/src/components/ItemCheck.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
<template>
<label class="container">
<input type="checkbox" :checked="value" @input="handleInput" tabindex="-1" />
<input type="checkbox" v-model="value" tabindex="-1" />
<div class="checkmark" tabindex="0"></div>
</label>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const emit = defineEmits(['input'])
// TODO: make this v-model sensitive from parent
const { value } = defineProps<{ value?: boolean }>()
const checked = ref(value)
const handleInput = () => {
emit('input', checked.value)
}
const value = defineModel<boolean>({ default: false })
</script>

<style scoped>
Expand Down
22 changes: 6 additions & 16 deletions beam/src/components/ItemCount.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template>
<div class="beam__itemcount">
<span
:contenteditable="editable"
:class="{ alert: countColor === false }"
@input="handleInput"
@click="handleInput">
<span :contenteditable="editable" :class="{ alert: !isCountComplete }" @input="handleInput" @click="handleInput">
{{ count }}
</span>
<span>/{{ denominator }}</span>
Expand All @@ -13,31 +9,25 @@
</template>

<script setup lang="ts">
import { ref, computed } from 'vue'
import { computed } from 'vue'
const emit = defineEmits(['input'])
const count = defineModel<number>({ required: true })
const {
value = 0,
denominator,
uom = '',
editable = true,
} = defineProps<{
value?: number
denominator: number
uom?: string
editable?: boolean
}>()
const count = ref(value)
const isCountComplete = computed(() => count.value === denominator)
const handleInput = (event: InputEvent | MouseEvent) => {
event.preventDefault()
event.stopPropagation()
count.value = Number((event.target as HTMLElement).innerHTML.replace(/[^0-9]/g, ''))
emit('input', count.value)
const newValue = Number((event.target as HTMLElement).innerHTML) || 0
count.value = Math.min(newValue, denominator)
}
const countColor = computed(() => {
return count.value === denominator
})
</script>
12 changes: 6 additions & 6 deletions beam/src/components/ListItem.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<template>
<li tabindex="0" class="beam__listitem">
<div class="beam__listtext">
<label>{{ item.label }}</label>
<p>{{ item.description }}</p>
<label>{{ listItem.label }}</label>
<p>{{ listItem.description }}</p>
</div>

<ItemCount
v-if="item.count"
v-if="listItem.count"
v-model="listItem.count.count"
:denominator="item.count.of"
:uom="item.count.uom"
:denominator="listItem.count.of"
:uom="listItem.count.uom"
:editable="true" />
<ItemCheck v-if="item.hasOwnProperty('checked')" v-model="listItem.checked" />
<ItemCheck v-if="listItem.hasOwnProperty('checked')" v-model="listItem.checked" />
</li>
</template>

Expand Down
2 changes: 1 addition & 1 deletion beam/src/components/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defineProps<{
}[]
}>()
const emit = defineEmits(['scrollbottom'])
const emit = defineEmits<{ scrollbottom: [] }>()
onMounted(() => {
window.addEventListener('scroll', handleScroll)
Expand Down
2 changes: 1 addition & 1 deletion beam/src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</template>

<script setup lang="ts">
const emit = defineEmits(['click'])
const emit = defineEmits<{ click: [] }>()
const handlePrimaryAction = () => {
emit('click')
Expand Down
5 changes: 1 addition & 4 deletions beam/src/components/ScanInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
import onScan from 'onscan.js'
import { onMounted, onUnmounted } from 'vue'
const emit = defineEmits<{
scanInstance: [instance: onScan]
}>()
const emit = defineEmits<{ scanInstance: [instance: onScan] }>()
const props = defineProps<{
scanHandler: (barcode: string, qty: number) => void
}>()
Expand Down
12 changes: 12 additions & 0 deletions code_editor/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@stonecrop/code-editor",
"entries": [
{
"version": "0.2.36",
"tag": "@stonecrop/code-editor_v0.2.36",
"date": "Thu, 26 Sep 2024 18:48:59 GMT",
"comments": {}
},
{
"version": "0.2.35",
"tag": "@stonecrop/code-editor_v0.2.35",
"date": "Tue, 24 Sep 2024 10:51:20 GMT",
"comments": {}
},
{
"version": "0.2.34",
"tag": "@stonecrop/code-editor_v0.2.34",
Expand Down
12 changes: 11 additions & 1 deletion code_editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Change Log - @stonecrop/code-editor

This log was last generated on Wed, 18 Sep 2024 15:26:37 GMT and should not be manually modified.
This log was last generated on Thu, 26 Sep 2024 18:48:59 GMT and should not be manually modified.

## 0.2.36
Thu, 26 Sep 2024 18:48:59 GMT

_Version update only_

## 0.2.35
Tue, 24 Sep 2024 10:51:20 GMT

_Version update only_

## 0.2.34
Wed, 18 Sep 2024 15:26:37 GMT
Expand Down
Loading

0 comments on commit 23262aa

Please sign in to comment.