Skip to content

Commit

Permalink
Fix modules, webpack 5, live/hot reloading.
Browse files Browse the repository at this point in the history
  • Loading branch information
haringsrob committed Jan 16, 2023
1 parent 0118fe0 commit 6f65542
Show file tree
Hide file tree
Showing 130 changed files with 15,424 additions and 22,111 deletions.
2 changes: 1 addition & 1 deletion config/twill.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
'dev_mode' => env('TWILL_DEV_MODE', false),
'dev_mode_url' => env('TWILL_DEV_MODE_URL', 'http://localhost:8080'),
'public_directory' => env('TWILL_ASSETS_DIR', 'assets/twill'),
'manifest_file' => 'twill-manifest.json',
'manifest_file' => 'assets/twill/twill-manifest.json',
'vendor_path' => 'vendor/area17/twill',
'custom_components_resource_path' => 'assets/js/components',
'vendor_components_resource_path' => 'assets/vendor/js/components',
Expand Down
3 changes: 2 additions & 1 deletion frontend/js/components/Browser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@

<script>
import { mapState } from 'vuex'
import { BROWSER } from '@/store/mutations'
import FormDataAsObj from '@/utils/formDataAsObj.js'
import a17Filter from './Filter.vue'
import a17ItemList from './ItemList.vue'
import FormDataAsObj from '@/utils/formDataAsObj.js'
export default {
name: 'A17Browser',
Expand Down
9 changes: 5 additions & 4 deletions frontend/js/components/BrowserField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@
</template>

<script>
import { mapState, mapGetters } from 'vuex'
import draggable from 'vuedraggable'
import { mapGetters,mapState } from 'vuex'
import draggableMixin from '@/mixins/draggable'
import { BROWSER } from '@/store/mutations'
import Browseritem from './BrowserItem.vue'
import draggableMixin from '@/mixins/draggable'
import draggable from 'vuedraggable'
export default {
name: 'A17BrowserField',
Expand Down Expand Up @@ -157,7 +158,7 @@
deleteItem: function (index) {
this.$store.commit(BROWSER.DESTROY_ITEM, {
name: this.name,
index: index
index
})
},
openBrowser: function () {
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
.button--ghost {
height: $height_small_btn;
line-height: $height_small_btn - 2px;
border-radius: $height_small_btn / 2;
border-radius: calc($height_small_btn / 2);
background-color: transparent;
border: 1px solid $color__border--hover;
color: $color__text--light;
Expand Down
3 changes: 2 additions & 1 deletion frontend/js/components/CheckboxAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
</template>

<script>
import a17Accordion from './Accordion.vue'
import VisibilityMixin from '@/mixins/toggleVisibility'
import { LANGUAGE } from '@/store/mutations'
import a17Accordion from './Accordion.vue'
export default {
name: 'A17Checkboxaccordion',
components: {
Expand Down
3 changes: 2 additions & 1 deletion frontend/js/components/CheckboxGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

<script>
import isEqual from 'lodash/isEqual'
import InputframeMixin from '@/mixins/inputFrame'
import CheckboxMixin from '@/mixins/checkboxes'
import FormStoreMixin from '@/mixins/formStore'
import InputframeMixin from '@/mixins/inputFrame'
export default {
name: 'A17CheckboxGroup',
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/components/ColorField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
</template>

<script>
import InputMixin from '@/mixins/input'
import ColorPicker from '@/components/ColorPicker'
import FormStoreMixin from '@/mixins/formStore'
import InputMixin from '@/mixins/input'
import InputframeMixin from '@/mixins/inputFrame'
import ColorPicker from '@/components/ColorPicker'
export default {
name: 'a17ColorField',
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/components/ColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

<script>
// Hightly inspired by https://github.com/xiaokaike/vue-color
import tinyColor from 'tinycolor2'
import throttle from 'lodash/throttle'
import tinyColor from 'tinycolor2'
export default {
name: 'a17ColorPicker',
Expand Down Expand Up @@ -156,7 +156,7 @@
if (this.currentColorHue !== h) {
this.throttle(this.onChange, {
h: h,
h,
s: this.currentColor.toHsl().s,
l: this.currentColor.toHsl().l,
a: this.currentColor.toHsl().a,
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/components/ConnectorField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</template>

<script>
import isEqual from 'lodash/isEqual'
import clone from 'lodash/clone'
import { mapState, mapGetters } from 'vuex'
import isEqual from 'lodash/isEqual'
import { mapGetters,mapState } from 'vuex'
export default {
name: 'A17ConnectorField',
Expand Down
9 changes: 5 additions & 4 deletions frontend/js/components/Cropper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
</template>

<script>
import { mapState } from 'vuex'
import 'cropperjs/dist/cropper.min.css'
import a17VueFilters from '@/utils/filters.js'
import CropperJs from 'cropperjs'
import 'cropperjs/dist/cropper.min.css'
import { mapState } from 'vuex'
import cropperMixin from '@/mixins/cropper'
import { cropConversion } from '@/utils/cropper'
import a17VueFilters from '@/utils/filters.js'
export default {
name: 'a17Cropper',
Expand Down Expand Up @@ -259,7 +260,7 @@
color: $color__link;
cursor: pointer;
margin: 0 20px;
border-radius: $height_li / 2;
border-radius: calc($height_li / 2);
&.s--active {
color: $color__text;
Expand Down
14 changes: 8 additions & 6 deletions frontend/js/components/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
</template>

<script>
import randKeyMixin from '@/mixins/randKey'
import FormStoreMixin from '@/mixins/formStore'
import InputframeMixin from '@/mixins/inputFrame'
import { locales, getCurrentLocale, isCurrentLocale24HrFormatted } from '@/utils/locale'
import FlatPickr from 'flatpickr'
import 'flatpickr/dist/flatpickr.css'
import parse from 'date-fns/parse'
import FlatPickr from 'flatpickr'
import FormStoreMixin from '@/mixins/formStore'
import InputframeMixin from '@/mixins/inputFrame'
import randKeyMixin from '@/mixins/randKey'
import { getCurrentLocale, isCurrentLocale24HrFormatted,locales } from '@/utils/locale'
export default {
name: 'A17DatePicker',
Expand Down Expand Up @@ -236,7 +238,7 @@
overflow:hidden;
color: $color__background;
background:$color__icons;
border-radius:#{$button-reset__width / 2};
border-radius:#{calc($button-reset__width / 2)};
margin-top:13px;
margin-right:13px;
line-height:$button-reset__width;
Expand Down
7 changes: 3 additions & 4 deletions frontend/js/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@
</template>

<script>
import { mapState, mapGetters } from 'vuex'
import { mapGetters,mapState } from 'vuex'
import A17EditorSidebar from '@/components/editor/EditorSidebar.vue'
import A17EditorPreview from '@/components/editor/EditorPreview.vue'
import A17BlocksList from '@/components/blocks/BlocksList'
import A17EditorPreview from '@/components/editor/EditorPreview.vue'
import A17EditorSidebar from '@/components/editor/EditorSidebar.vue'
import htmlClasses from '@/utils/htmlClasses'
export default {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

<script>
import debounce from 'lodash/debounce'
import FormDataAsObj from '@/utils/formDataAsObj.js'
export default {
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/components/HiddenField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</template>

<script>
import randKeyMixin from '@/mixins/randKey'
import InputMixin from '@/mixins/input'
import FormStoreMixin from '@/mixins/formStore'
import InputMixin from '@/mixins/input'
import randKeyMixin from '@/mixins/randKey'
export default {
name: 'A17HiddenField',
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/ItemList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
</template>

<script>
import a17VueFilters from '@/utils/filters.js'
import A17Avatar from '@/components/Avatar.vue'
import mediaItemsMixin from '@/mixins/mediaLibrary/mediaItems'
import a17VueFilters from '@/utils/filters.js'
export default {
name: 'A17Itemlist',
Expand Down
8 changes: 5 additions & 3 deletions frontend/js/components/LangManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
</template>

<script>
import a17LangSwitcher from './LangSwitcher.vue'
import VisibilityMixin from '@/mixins/toggleVisibility'
import { mapGetters,mapState } from 'vuex'
import LocaleMixin from '@/mixins/locale'
import { mapState, mapGetters } from 'vuex'
import VisibilityMixin from '@/mixins/toggleVisibility'
import { LANGUAGE } from '@/store/mutations'
import a17LangSwitcher from './LangSwitcher.vue'
export default {
name: 'A17LangManager',
mixins: [VisibilityMixin, LocaleMixin],
Expand Down
3 changes: 2 additions & 1 deletion frontend/js/components/LangSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
</template>

<script>
import LocaleMixin from '@/mixins/locale'
import { mapGetters } from 'vuex'
import LocaleMixin from '@/mixins/locale'
import { LANGUAGE } from '@/store/mutations'
export default {
Expand Down
6 changes: 3 additions & 3 deletions frontend/js/components/LocaleField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
</template>

<script>
import cloneDeep from 'lodash/cloneDeep'
import { mapState } from 'vuex'
import { LANGUAGE } from '@/store/mutations'
import cloneDeep from 'lodash/cloneDeep'
import { LANGUAGE } from '@/store/mutations'
export default {
name: 'A17Locale',
Expand Down Expand Up @@ -125,7 +125,7 @@
updateValue: function (locale, newValue) {
if (locale) {
this.$emit('change', {
locale: locale,
locale,
value: newValue
})
} else {
Expand Down
7 changes: 4 additions & 3 deletions frontend/js/components/LocationField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
</template>

<script>
import isEqual from 'lodash/isEqual'
import debounce from 'lodash/debounce'
import InputMixin from '@/mixins/input'
import isEqual from 'lodash/isEqual'
import FormStoreMixin from '@/mixins/formStore'
import InputMixin from '@/mixins/input'
import InputframeMixin from '@/mixins/inputFrame'
import LocaleMixin from '@/mixins/locale'
import { loadScript } from '@/utils/loader'
Expand Down Expand Up @@ -320,7 +321,7 @@
// reverse geocoding
geocoder.geocode({
location: location
location
}, function (results, status) {
if (status === 'OK') {
if (results[1]) {
Expand Down
10 changes: 4 additions & 6 deletions frontend/js/components/MediaField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,16 @@
</template>

<script>
import smartCrop from 'smartcrop'
import { mapState } from 'vuex'
import { MEDIA_LIBRARY } from '@/store/mutations'
import a17Cropper from '@/components/Cropper.vue'
import a17MediaMetadata from '@/components/MediaMetadata.vue'
import mediaLibrayMixin from '@/mixins/mediaLibrary/mediaLibrary.js'
import mediaFieldMixin from '@/mixins/mediaField.js'
import a17VueFilters from '@/utils/filters.js'
import mediaLibrayMixin from '@/mixins/mediaLibrary/mediaLibrary.js'
import { MEDIA_LIBRARY } from '@/store/mutations'
import { cropConversion } from '@/utils/cropper'
import smartCrop from 'smartcrop'
import a17VueFilters from '@/utils/filters.js'
const IS_SAFARI = navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/MediaFieldTranslated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
</template>

<script>
import localeMixin from '@/mixins/locale'
import inputframeMixin from '@/mixins/inputFrame'
import localeMixin from '@/mixins/locale'
import mediaFieldMixin from '@/mixins/mediaField.js'
export default {
Expand Down
3 changes: 2 additions & 1 deletion frontend/js/components/MediaMetadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

<script>
import { mapState } from 'vuex'
import { FORM } from '@/store/mutations'
export default {
Expand Down Expand Up @@ -139,7 +140,7 @@
if (!newDatas.locale) {
const value = newDatas
newDatas = {
value: value
value
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<script>
import { mapState } from 'vuex'
import htmlClasses from '@/utils/htmlClasses'
const html = document.documentElement
Expand Down
7 changes: 4 additions & 3 deletions frontend/js/components/MultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@

<script>
import isEqual from 'lodash/isEqual'
import randKeyMixin from '@/mixins/randKey'
import FormStoreMixin from '@/mixins/formStore'
import InputframeMixin from '@/mixins/inputFrame'
import AttributesMixin from '@/mixins/addAttributes'
import CheckboxMixin from '@/mixins/checkboxes'
import FormStoreMixin from '@/mixins/formStore'
import InputframeMixin from '@/mixins/inputFrame'
import randKeyMixin from '@/mixins/randKey'
export default {
name: 'A17Multiselect',
Expand Down
3 changes: 2 additions & 1 deletion frontend/js/components/Overlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<script>
import { mapState } from 'vuex'
import htmlClasses from '@/utils/htmlClasses'
const html = document.documentElement
Expand Down Expand Up @@ -211,7 +212,7 @@
background:transparent;
height:$height__header;
color:$color__text--light;
padding:#{($height__header - 16px) / 2 } 20px;
padding:#{calc(($height__header - 16px) / 2)} 20px;
text-align:left;
&:hover,
Expand Down
Loading

0 comments on commit 6f65542

Please sign in to comment.