@mythpe/quasar-ui-qui 0.3.66 → 0.3.68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.3.66",
3
+ "version": "0.3.68",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -38,6 +38,7 @@ type Props = {
38
38
  excel?: boolean;
39
39
  exportUrl?: MDatatableProps['exportUrl'];
40
40
  hideSearch?: boolean;
41
+ hideTitle?: boolean;
41
42
  searchDebounce?: MDatatableProps['searchDebounce'];
42
43
  withIndex?: MDatatableProps['withIndex'];
43
44
  withStore?: MDatatableProps['withStore'];
@@ -115,6 +116,7 @@ const props = withDefaults(defineProps<Props>(), {
115
116
  excel: undefined,
116
117
  exportUrl: undefined,
117
118
  hideSearch: !1,
119
+ hideTitle: undefined,
118
120
  searchDebounce: 600,
119
121
  withIndex: undefined,
120
122
  withStore: undefined,
@@ -738,7 +740,10 @@ defineExpose({
738
740
  v-bind="topSlotProps"
739
741
  />
740
742
  <!--Title and Search-->
741
- <MRow col>
743
+ <MRow
744
+ :class="{hidden: !hasAddBtn && !getTableTitle && hideTitle && hideSearch}"
745
+ col
746
+ >
742
747
  <!--Default Title Slot-->
743
748
  <slot
744
749
  :dt="datatableItemsScope"
@@ -747,7 +752,10 @@ defineExpose({
747
752
  :item="dialogItem"
748
753
  name="title"
749
754
  >
750
- <MCol col="12">
755
+ <MCol
756
+ v-if="!hideTitle"
757
+ col="12"
758
+ >
751
759
  <q-card flat>
752
760
  <q-card-section>
753
761
  <MRow
@@ -1501,126 +1509,129 @@ defineExpose({
1501
1509
  v-model="formDialogModel"
1502
1510
  v-bind="pluginOptions.dt?.formDialogProps"
1503
1511
  >
1504
- <div class="m-form__container full-height no-wrap">
1505
- <form
1506
- class="m-form column full-height justify-between no-wrap"
1507
- @submit="defaultSubmitItem"
1508
- >
1509
- <q-card class="m-dialog-card">
1510
- <q-card-section ref="formTitle">
1511
- <q-toolbar :class="['m-container__fluid', {'q-pa-none': isSmall}]">
1512
+ <q-card class="q-dialog-plugin">
1513
+ <div class="m-form__container full-height no-wrap">
1514
+ <form
1515
+ class="m-form column full-height justify-between no-wrap"
1516
+ @submit="defaultSubmitItem"
1517
+ >
1518
+ <q-card class="m-dialog-card">
1519
+ <q-card-section ref="formTitle">
1520
+ <q-toolbar :class="['m-container__fluid', {'q-pa-none': isSmall}]">
1521
+ <slot
1522
+ :dt="datatableItemsScope"
1523
+ :form="useFormContext"
1524
+ :index="dialogItemIndex"
1525
+ :item="dialogItem"
1526
+ name="form-title-left"
1527
+ />
1528
+ <slot
1529
+ :dt="datatableItemsScope"
1530
+ :form="useFormContext"
1531
+ :index="dialogItemIndex"
1532
+ :item="dialogItem"
1533
+ name="form-title"
1534
+ >
1535
+ <q-toolbar-title>
1536
+ <template v-if="loading && !dialogItem">
1537
+ <q-skeleton width="200px" />
1538
+ </template>
1539
+ <template v-else>
1540
+ {{ getFormTitle }}
1541
+ </template>
1542
+ </q-toolbar-title>
1543
+ <q-btn
1544
+ flat
1545
+ icon="close"
1546
+ padding="3px"
1547
+ text-color="body"
1548
+ @click="closeFormDialog"
1549
+ >
1550
+ <q-tooltip class="m-dt-btn-tooltip">
1551
+ {{ __('myth.titles.close') }}
1552
+ </q-tooltip>
1553
+ </q-btn>
1554
+ </slot>
1555
+ <slot
1556
+ :dt="datatableItemsScope"
1557
+ :form="useFormContext"
1558
+ :index="dialogItemIndex"
1559
+ :item="dialogItem"
1560
+ name="form-title-right"
1561
+ />
1562
+ </q-toolbar>
1563
+ </q-card-section>
1564
+ <q-separator />
1565
+ <q-card-section
1566
+ ref="formDialogCartSection"
1567
+ :style="`height: ${($q.screen.height || 100) - 3 - (($refs.formActions as any)?.$el?.offsetHeight || 60) - (($refs.formTitle as any)?.$el?.offsetHeight || 80)}px`"
1568
+ class="scroll m-datatable__dialog-form-container"
1569
+ >
1570
+ <MContainer
1571
+ v-if="loading && !dialogItem"
1572
+ :fluid="!1"
1573
+ >
1574
+ <MRow
1575
+ v-if="loading"
1576
+ col
1577
+ >
1578
+ <template
1579
+ v-for="ai in 15"
1580
+ :key="`form-skeleton-${ai}`"
1581
+ >
1582
+ <MCol
1583
+ col="12"
1584
+ md="6"
1585
+ >
1586
+ <q-skeleton type="QInput" />
1587
+ </MCol>
1588
+ </template>
1589
+ </MRow>
1590
+ </MContainer>
1512
1591
  <slot
1592
+ v-else
1513
1593
  :dt="datatableItemsScope"
1514
1594
  :form="useFormContext"
1515
1595
  :index="dialogItemIndex"
1516
1596
  :item="dialogItem"
1517
- name="form-title-left"
1597
+ name="form"
1518
1598
  />
1599
+ </q-card-section>
1600
+ <q-separator />
1601
+ <q-card-actions
1602
+ ref="formActions"
1603
+ align="between"
1604
+ class="m-datatable-form-actions print-hide m-container__fluid"
1605
+ >
1519
1606
  <slot
1520
1607
  :dt="datatableItemsScope"
1521
1608
  :form="useFormContext"
1522
1609
  :index="dialogItemIndex"
1523
1610
  :item="dialogItem"
1524
- name="form-title"
1611
+ name="form-actions"
1525
1612
  >
1526
- <q-toolbar-title>
1527
- <template v-if="loading && !dialogItem">
1528
- <q-skeleton width="200px" />
1529
- </template>
1530
- <template v-else>
1531
- <q-btn
1532
- fab-mini
1533
- flat
1534
- icon="close"
1535
- @click="closeFormDialog"
1536
- >
1537
- <q-tooltip class="m-dt-btn-tooltip">
1538
- {{ __('myth.titles.close') }}
1539
- </q-tooltip>
1540
- </q-btn>
1541
- {{ getFormTitle }}
1542
- </template>
1543
- </q-toolbar-title>
1613
+ <MBtn
1614
+ :class="{'full-width': $q.screen.xs}"
1615
+ :label="__(`myth.titles.${isUpdateMode ? 'save' : 'store'}`)"
1616
+ :loading="loading"
1617
+ type="submit"
1618
+ v-bind="pluginOptions.dt?.dialogButtonsProps"
1619
+ />
1544
1620
  </slot>
1545
- <slot
1546
- :dt="datatableItemsScope"
1547
- :form="useFormContext"
1548
- :index="dialogItemIndex"
1549
- :item="dialogItem"
1550
- name="form-title-right"
1551
- />
1552
- </q-toolbar>
1553
- </q-card-section>
1554
- <q-separator />
1555
- <q-card-section
1556
- ref="formDialogCartSection"
1557
- :style="`height: ${($q.screen.height || 100) - 3 - (($refs.formActions as any)?.$el?.offsetHeight || 60) - (($refs.formTitle as any)?.$el?.offsetHeight || 80)}px`"
1558
- class="scroll m-datatable__dialog-form-container"
1559
- >
1560
- <MContainer
1561
- v-if="loading && !dialogItem"
1562
- :fluid="!1"
1563
- >
1564
- <MRow
1565
- v-if="loading"
1566
- col
1567
- >
1568
- <template
1569
- v-for="ai in 15"
1570
- :key="`form-skeleton-${ai}`"
1571
- >
1572
- <MCol
1573
- col="12"
1574
- md="6"
1575
- >
1576
- <q-skeleton type="QInput" />
1577
- </MCol>
1578
- </template>
1579
- </MRow>
1580
- </MContainer>
1581
- <slot
1582
- v-else
1583
- :dt="datatableItemsScope"
1584
- :form="useFormContext"
1585
- :index="dialogItemIndex"
1586
- :item="dialogItem"
1587
- name="form"
1588
- />
1589
- </q-card-section>
1590
- <q-separator />
1591
- <q-card-actions
1592
- ref="formActions"
1593
- align="between"
1594
- class="m-datatable-form-actions print-hide m-container__fluid"
1595
- >
1596
- <slot
1597
- :dt="datatableItemsScope"
1598
- :form="useFormContext"
1599
- :index="dialogItemIndex"
1600
- :item="dialogItem"
1601
- name="form-actions"
1602
- >
1603
1621
  <MBtn
1604
- :class="{'full-width': $q.screen.xs}"
1605
- :label="__(`myth.titles.${isUpdateMode ? 'save' : 'store'}`)"
1606
- :loading="loading"
1607
- type="submit"
1622
+ v-if="$q.screen.gt.sm"
1623
+ :disable="loading"
1624
+ label="myth.titles.close"
1625
+ outline
1626
+ text-color="body"
1608
1627
  v-bind="pluginOptions.dt?.dialogButtonsProps"
1628
+ @click="closeFormDialog"
1609
1629
  />
1610
- </slot>
1611
- <MBtn
1612
- v-if="$q.screen.gt.sm"
1613
- :disable="loading"
1614
- color="secondary"
1615
- label="myth.titles.close"
1616
- text-color="white"
1617
- v-bind="pluginOptions.dt?.dialogButtonsProps"
1618
- @click="closeFormDialog"
1619
- />
1620
- </q-card-actions>
1621
- </q-card>
1622
- </form>
1623
- </div>
1630
+ </q-card-actions>
1631
+ </q-card>
1632
+ </form>
1633
+ </div>
1634
+ </q-card>
1624
1635
  </MDialog>
1625
1636
 
1626
1637
  <!-- Show Dialog -->
@@ -45,8 +45,8 @@ defineOptions({
45
45
 
46
46
  <template>
47
47
  <q-dialog
48
- :transition-hide="$q.screen.lt.md ? slideHide : (slideProp ? slideHide : 'slide-down')"
49
- :transition-show="$q.screen.lt.md ? slideShow : (slideProp ? slideShow : 'slide-up')"
48
+ :transition-hide="$q.screen.lt.md ? slideHide : (slideProp ? slideHide : 'fade')"
49
+ :transition-show="$q.screen.lt.md ? slideShow : (slideProp ? slideShow : 'fade')"
50
50
  allow-focus-outside
51
51
  maximized
52
52
  no-backdrop-dismiss
@@ -235,6 +235,7 @@ export type MDatatableProps<I extends GenericFormValues = GenericFormValues> = O
235
235
  excel?: boolean;
236
236
  exportUrl?: MDtExportOptions | boolean;
237
237
  hideSearch?: boolean;
238
+ hideTitle?: boolean;
238
239
  searchDebounce?: string | number;
239
240
  withIndex?: string | string[];
240
241
  withStore?: string | string[];