@simsustech/quasar-components 0.11.5 → 0.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @simsustech/quasar-components
2
2
 
3
+ ## 0.11.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 16ce5f9: feat(ResourcePage): replace fab by regular buttons
8
+
3
9
  ## 0.11.5
4
10
 
5
11
  ### Patch Changes
@@ -5,7 +5,9 @@ const lang$1 = {
5
5
  submit: "Submit",
6
6
  next: "Next",
7
7
  back: "Back",
8
- send: "Send"
8
+ send: "Send",
9
+ add: "Add",
10
+ edit: "Edit"
9
11
  };
10
12
  const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11
13
  __proto__: null,
@@ -14,7 +16,7 @@ const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
14
16
  const lang = ref(lang$1);
15
17
  const locales = /* @__PURE__ */ Object.assign({
16
18
  "./en-US.ts": () => Promise.resolve().then(() => enUS),
17
- "./nl.ts": () => import("./nl-CLymTRkb.js")
19
+ "./nl.ts": () => import("./nl-X50pmfG-.js")
18
20
  });
19
21
  const useLang = () => {
20
22
  return lang;
@@ -1,6 +1,6 @@
1
1
  import { useQuasar, QForm, QInput, QStep, QStepperNavigation, QStepper, QIcon, QBtn, QSlider, QItemSection, QItem, QList, QMenu, QTable, QTh, QTr, QSelect, QTd, QItemLabel } from "quasar";
2
2
  import { ref, defineComponent, watch, computed, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, toRef, createCommentVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, toRefs, createElementVNode } from "vue";
3
- import { _ as _sfc_main$d } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-D133pxTB.js";
3
+ import { _ as _sfc_main$d } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-BAoq0ukq.js";
4
4
  const lang$1 = {
5
5
  isoName: "en-US",
6
6
  myAccount: "Account",
package/dist/general.js CHANGED
@@ -1,9 +1,9 @@
1
- import { l as loadLang, u as useLang, _ as _sfc_main$5 } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-D133pxTB.js";
2
- import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QBtn, QToolbarTitle, QToolbar, QHeader, QPage, QPageContainer, QLayout, QPageSticky, QSelect, QItemSection, QItemLabel, QItem, QList } from "quasar";
3
- import { defineComponent, watch, ref, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, normalizeClass, createCommentVNode, toRefs, useAttrs, computed, mergeProps, createElementBlock, resolveDynamicComponent, createTextVNode, toDisplayString } from "vue";
1
+ import { l as loadLang, u as useLang, _ as _sfc_main$5 } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-BAoq0ukq.js";
2
+ import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QBtn, QToolbarTitle, QToolbar, QHeader, QPage, QPageContainer, QLayout, QSpace, QPageSticky, QSelect, QItemSection, QItemLabel, QItem, QList } from "quasar";
3
+ import { defineComponent, watch, ref, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, normalizeClass, createCommentVNode, toRefs, createElementBlock, useAttrs, computed, mergeProps, resolveDynamicComponent, createTextVNode, toDisplayString } from "vue";
4
4
  import { f as flags, u as useLang$1 } from "./index-DnmJt2wP.js";
5
5
  const _hoisted_1$2 = { class: "text-h6" };
6
- const _hoisted_2 = { class: "text-subtitle2" };
6
+ const _hoisted_2$1 = { class: "text-subtitle2" };
7
7
  const __default__$2 = {
8
8
  name: "QStyledCard"
9
9
  };
@@ -45,7 +45,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
45
45
  createElementVNode("div", _hoisted_1$2, [
46
46
  renderSlot(_ctx.$slots, "title", {}, void 0, true)
47
47
  ]),
48
- createElementVNode("div", _hoisted_2, [
48
+ createElementVNode("div", _hoisted_2$1, [
49
49
  renderSlot(_ctx.$slots, "subtitle", {}, void 0, true)
50
50
  ])
51
51
  ]),
@@ -200,14 +200,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
200
200
  }
201
201
  });
202
202
  const _hoisted_1$1 = { style: { "margin-top": "80px" } };
203
+ const _hoisted_2 = { key: 0 };
204
+ const _hoisted_3 = { key: 1 };
203
205
  const __default__ = {
204
206
  name: "ResourcePage"
205
207
  };
206
208
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
207
209
  ...__default__,
208
210
  props: {
209
- type: {},
210
- disabled: { type: Boolean }
211
+ type: { default: void 0 },
212
+ disabled: { type: Boolean, default: false },
213
+ topBarFab: { type: Boolean, default: false },
214
+ topBarShrink: { type: Boolean, default: true }
211
215
  },
212
216
  emits: ["create", "update"],
213
217
  setup(__props, { emit: __emit }) {
@@ -226,6 +230,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
226
230
  return (_ctx, _cache) => {
227
231
  const _component_q_btn = QBtn;
228
232
  const _component_q_toolbar_title = QToolbarTitle;
233
+ const _component_q_space = QSpace;
229
234
  const _component_q_toolbar = QToolbar;
230
235
  const _component_q_page_sticky = QPageSticky;
231
236
  const _component_q_page = QPage;
@@ -243,36 +248,57 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
243
248
  class: normalizeClass(["shadow-2", { "bg-dark": unref($q).dark.isActive, "bg-white": !unref($q).dark.isActive }])
244
249
  }, {
245
250
  default: withCtx(() => [
246
- renderSlot(_ctx.$slots, "fab"),
247
- unref(type) === "create" ? (openBlock(), createBlock(_component_q_btn, {
248
- key: 0,
249
- disable: unref(disabled),
250
- flat: "",
251
- style: { "margin-bottom": "-50px", "z-index": "5" },
252
- round: "",
253
- size: "lg",
254
- dense: "",
255
- icon: "add",
256
- class: "q-mr-sm bg-primary text-white",
257
- onClick: create
258
- }, null, 8, ["disable"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
259
- key: 1,
260
- disable: unref(disabled),
261
- flat: "",
262
- style: { "margin-bottom": "-50px", "z-index": "5" },
263
- round: "",
264
- size: "lg",
265
- dense: "",
266
- icon: "edit",
267
- class: "q-mr-sm bg-primary text-white",
268
- onClick: update
269
- }, null, 8, ["disable"])) : createCommentVNode("", true),
270
- createVNode(_component_q_toolbar_title, null, {
251
+ _ctx.topBarFab ? (openBlock(), createElementBlock("div", _hoisted_2, [
252
+ renderSlot(_ctx.$slots, "fab"),
253
+ unref(type) === "create" ? (openBlock(), createBlock(_component_q_btn, {
254
+ key: 0,
255
+ disable: unref(disabled),
256
+ flat: "",
257
+ style: { "margin-bottom": "-50px", "z-index": "5" },
258
+ round: "",
259
+ size: "lg",
260
+ dense: "",
261
+ icon: "add",
262
+ class: "q-mr-sm bg-primary text-white",
263
+ onClick: create
264
+ }, null, 8, ["disable"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
265
+ key: 1,
266
+ disable: unref(disabled),
267
+ flat: "",
268
+ style: { "margin-bottom": "-50px", "z-index": "5" },
269
+ round: "",
270
+ size: "lg",
271
+ dense: "",
272
+ icon: "edit",
273
+ class: "q-mr-sm bg-primary text-white",
274
+ onClick: update
275
+ }, null, 8, ["disable"])) : createCommentVNode("", true)
276
+ ])) : createCommentVNode("", true),
277
+ createVNode(_component_q_toolbar_title, { shrink: _ctx.topBarShrink }, {
271
278
  default: withCtx(() => [
272
279
  renderSlot(_ctx.$slots, "header")
273
280
  ]),
274
281
  _: 3
275
- }),
282
+ }, 8, ["shrink"]),
283
+ !_ctx.topBarFab ? (openBlock(), createElementBlock("div", _hoisted_3, [
284
+ renderSlot(_ctx.$slots, "top-bar-buttons"),
285
+ unref(type) === "create" ? (openBlock(), createBlock(_component_q_btn, {
286
+ key: 0,
287
+ disable: unref(disabled),
288
+ label: unref(lang).add,
289
+ icon: "add",
290
+ outline: "",
291
+ onClick: create
292
+ }, null, 8, ["disable", "label"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
293
+ key: 1,
294
+ disable: unref(disabled),
295
+ label: unref(lang).edit,
296
+ icon: "edit",
297
+ outline: "",
298
+ onClick: update
299
+ }, null, 8, ["disable", "label"])) : createCommentVNode("", true)
300
+ ])) : createCommentVNode("", true),
301
+ createVNode(_component_q_space, { horizontal: "" }),
276
302
  renderSlot(_ctx.$slots, "header-side")
277
303
  ]),
278
304
  _: 3
@@ -3,7 +3,9 @@ const lang = {
3
3
  submit: "Opslaan",
4
4
  next: "Volgende",
5
5
  back: "Vorige",
6
- send: "Versturen"
6
+ send: "Versturen",
7
+ add: "Toevoegen",
8
+ edit: "Aanpassen"
7
9
  };
8
10
  export {
9
11
  lang as default
@@ -1,6 +1,8 @@
1
1
  export interface Props {
2
2
  type?: 'create' | 'update';
3
3
  disabled?: boolean;
4
+ topBarFab?: boolean;
5
+ topBarShrink?: boolean;
4
6
  }
5
7
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
8
  update: (args_0: {
@@ -20,10 +22,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<Pr
20
22
  data?: unknown;
21
23
  done: (success?: boolean) => void;
22
24
  }) => any) | undefined;
23
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
25
+ }>, {
26
+ type: "create" | "update";
27
+ disabled: boolean;
28
+ topBarFab: boolean;
29
+ topBarShrink: boolean;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
24
31
  default?(_: {}): any;
25
32
  fab?(_: {}): any;
26
33
  header?(_: {}): any;
34
+ "top-bar-buttons"?(_: {}): any;
27
35
  "header-side"?(_: {}): any;
28
36
  }>;
29
37
  export default _default;
@@ -4,6 +4,8 @@ export interface Language {
4
4
  next: string;
5
5
  back: string;
6
6
  send: string;
7
+ add: string;
8
+ edit: string;
7
9
  }
8
10
  import type { Ref } from 'vue';
9
11
  export declare const lang: Ref<{
@@ -12,12 +14,16 @@ export declare const lang: Ref<{
12
14
  next: string;
13
15
  back: string;
14
16
  send: string;
17
+ add: string;
18
+ edit: string;
15
19
  }, Language | {
16
20
  isoName: string;
17
21
  submit: string;
18
22
  next: string;
19
23
  back: string;
20
24
  send: string;
25
+ add: string;
26
+ edit: string;
21
27
  }>;
22
28
  export declare const defineLang: (lang: Language) => Language;
23
29
  export declare const useLang: () => Ref<Language>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simsustech/quasar-components",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "author": "Stefan van Herwijnen",
5
5
  "description": "High level components for Quasar Framework",
6
6
  "license": "MIT",
@@ -8,34 +8,56 @@
8
8
  class="shadow-2"
9
9
  :class="{ 'bg-dark': $q.dark.isActive, 'bg-white': !$q.dark.isActive }"
10
10
  >
11
- <slot name="fab" />
12
- <q-btn
13
- v-if="type === 'create'"
14
- :disable="disabled"
15
- flat
16
- style="margin-bottom: -50px; z-index: 5"
17
- round
18
- size="lg"
19
- dense
20
- icon="add"
21
- class="q-mr-sm bg-primary text-white"
22
- @click="create"
23
- />
24
- <q-btn
25
- v-else-if="type === 'update'"
26
- :disable="disabled"
27
- flat
28
- style="margin-bottom: -50px; z-index: 5"
29
- round
30
- size="lg"
31
- dense
32
- icon="edit"
33
- class="q-mr-sm bg-primary text-white"
34
- @click="update"
35
- />
36
- <q-toolbar-title>
11
+ <div v-if="topBarFab">
12
+ <slot name="fab" />
13
+ <q-btn
14
+ v-if="type === 'create'"
15
+ :disable="disabled"
16
+ flat
17
+ style="margin-bottom: -50px; z-index: 5"
18
+ round
19
+ size="lg"
20
+ dense
21
+ icon="add"
22
+ class="q-mr-sm bg-primary text-white"
23
+ @click="create"
24
+ />
25
+ <q-btn
26
+ v-else-if="type === 'update'"
27
+ :disable="disabled"
28
+ flat
29
+ style="margin-bottom: -50px; z-index: 5"
30
+ round
31
+ size="lg"
32
+ dense
33
+ icon="edit"
34
+ class="q-mr-sm bg-primary text-white"
35
+ @click="update"
36
+ />
37
+ </div>
38
+ <q-toolbar-title :shrink="topBarShrink">
37
39
  <slot name="header" />
38
40
  </q-toolbar-title>
41
+ <div v-if="!topBarFab">
42
+ <slot name="top-bar-buttons" />
43
+ <q-btn
44
+ v-if="type === 'create'"
45
+ :disable="disabled"
46
+ :label="lang.add"
47
+ icon="add"
48
+ outline
49
+ @click="create"
50
+ />
51
+ <q-btn
52
+ v-else-if="type === 'update'"
53
+ :disable="disabled"
54
+ :label="lang.edit"
55
+ icon="edit"
56
+ outline
57
+ @click="update"
58
+ />
59
+ </div>
60
+ <q-space horizontal />
39
61
  <slot name="header-side" />
40
62
  </q-toolbar>
41
63
  </q-page-sticky>
@@ -56,8 +78,15 @@ import { useLang, loadLang } from './lang'
56
78
  export interface Props {
57
79
  type?: 'create' | 'update'
58
80
  disabled?: boolean
81
+ topBarFab?: boolean
82
+ topBarShrink?: boolean
59
83
  }
60
- const props = defineProps<Props>()
84
+ const props = withDefaults(defineProps<Props>(), {
85
+ type: undefined,
86
+ disabled: false,
87
+ topBarFab: false,
88
+ topBarShrink: true
89
+ })
61
90
 
62
91
  const emit = defineEmits<{
63
92
  (
@@ -5,7 +5,9 @@ const lang: Language = {
5
5
  submit: 'Submit',
6
6
  next: 'Next',
7
7
  back: 'Back',
8
- send: 'Send'
8
+ send: 'Send',
9
+ add: 'Add',
10
+ edit: 'Edit'
9
11
  }
10
12
 
11
13
  export default lang
@@ -4,6 +4,8 @@ export interface Language {
4
4
  next: string
5
5
  back: string
6
6
  send: string
7
+ add: string
8
+ edit: string
7
9
  }
8
10
 
9
11
  import type { Ref } from 'vue'
@@ -5,7 +5,9 @@ const lang: Language = {
5
5
  submit: 'Opslaan',
6
6
  next: 'Volgende',
7
7
  back: 'Vorige',
8
- send: 'Versturen'
8
+ send: 'Versturen',
9
+ add: 'Toevoegen',
10
+ edit: 'Aanpassen'
9
11
  }
10
12
 
11
13
  export default lang