quasar-ui-danx 0.4.55 → 0.4.56

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": "quasar-ui-danx",
3
- "version": "0.4.55",
3
+ "version": "0.4.56",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@ interface ActionFormProps {
21
21
  form: Form;
22
22
  noLabel?: boolean;
23
23
  showName?: boolean;
24
- disable?: boolean;
24
+ disabled?: boolean;
25
25
  readonly?: boolean;
26
26
  clearable?: boolean;
27
27
  fieldClass?: string;
@@ -38,7 +38,7 @@ const renderedFormProps = {
38
38
  form: props.form,
39
39
  noLabel: props.noLabel,
40
40
  showName: props.showName,
41
- disable: props.disable,
41
+ disabled: props.disabled,
42
42
  readonly: props.readonly,
43
43
  clearable: props.clearable,
44
44
  fieldClass: props.fieldClass,
@@ -2,7 +2,7 @@
2
2
  <QToggle
3
3
  :data-testid="'boolean-field-' + (name || label)"
4
4
  :model-value="modelValue || (toggleIndeterminate ? modelValue : false)"
5
- :disable="disable || readonly"
5
+ :disable="disabled || readonly"
6
6
  :toggle-indeterminate="toggleIndeterminate"
7
7
  :indeterminate-value="undefined"
8
8
  @update:model-value="$emit('update:model-value', $event)"
@@ -40,7 +40,7 @@ defineProps({
40
40
  },
41
41
  showName: Boolean,
42
42
  toggleIndeterminate: Boolean,
43
- disable: Boolean,
43
+ disabled: Boolean,
44
44
  readonly: Boolean
45
45
  });
46
46
  </script>
@@ -11,7 +11,7 @@
11
11
  />
12
12
 
13
13
  <input
14
- v-if="!disable && !readonly"
14
+ v-if="!disabled && !readonly"
15
15
  ref="file"
16
16
  class="hidden"
17
17
  type="file"
@@ -29,11 +29,11 @@
29
29
  :file="file"
30
30
  :related-files="file.transcodes || uploadedFiles"
31
31
  downloadable
32
- :removable="!readonly && !disable"
32
+ :removable="!readonly && !disabled"
33
33
  @remove="onRemove(file)"
34
34
  />
35
35
  <div
36
- v-if="!disable && !readonly"
36
+ v-if="!disabled && !readonly"
37
37
  class="dx-add-remove-files m-2 flex flex-col flex-nowrap items-center overflow-hidden cursor-pointer"
38
38
  :class="filePreviewClass"
39
39
  :style="styleSize"
@@ -85,7 +85,7 @@ const props = withDefaults(defineProps<{
85
85
  field?: FormField;
86
86
  label?: string;
87
87
  showName?: boolean;
88
- disable?: boolean;
88
+ disabled?: boolean;
89
89
  readonly?: boolean;
90
90
  width?: number | string;
91
91
  height?: number | string;
@@ -14,7 +14,7 @@
14
14
  <ShowHideButton
15
15
  v-if="showEdit"
16
16
  v-model="editing"
17
- :disable="!canEdit"
17
+ :disabled="!canEdit"
18
18
  :label="editText"
19
19
  :class="editClass"
20
20
  :show-icon="EditIcon"
@@ -3,7 +3,7 @@
3
3
  <ShowHideButton
4
4
  v-if="selectable"
5
5
  v-model="isSelecting"
6
- :disable="disable"
6
+ :disabled="disabled"
7
7
  :label="selectText"
8
8
  :saving="loading"
9
9
  :class="selectClass"
@@ -79,9 +79,11 @@
79
79
  :label="editText"
80
80
  :class="editClass"
81
81
  :size="size"
82
+ :disabled="editDisabled"
82
83
  class="opacity-0 group-hover:opacity-100 transition-all"
83
84
  :show-icon="EditIcon"
84
85
  :hide-icon="DoneEditingIcon"
86
+ :tooltip="editDisabled ? 'You are not allowed to edit' : ''"
85
87
  />
86
88
 
87
89
  <QBtn
@@ -132,7 +134,8 @@ withDefaults(defineProps<{
132
134
  deletable?: boolean;
133
135
  nameEditable?: boolean;
134
136
  clearable?: boolean;
135
- disable?: boolean;
137
+ disabled?: boolean;
138
+ editDisabled?: boolean;
136
139
  size?: ActionButtonProps["size"];
137
140
  }>(), {
138
141
  selectText: "",
@@ -13,7 +13,7 @@
13
13
  class="text-sm font-semibold"
14
14
  />
15
15
  <div
16
- v-if="!disable && !readonly"
16
+ v-if="!disabled && !readonly"
17
17
  class="text-sm mt-2"
18
18
  >
19
19
  <a
@@ -39,7 +39,7 @@
39
39
  :class="{'border border-dashed border-blue-600': !uploadedFile, 'mx-auto': !readonly}"
40
40
  :file="uploadedFile || undefined"
41
41
  downloadable
42
- @click="!disable && $refs.file.click()"
42
+ @click="!disabled && $refs.file.click()"
43
43
  />
44
44
  <div
45
45
  v-else-if="readonly"
@@ -63,7 +63,7 @@ const props = defineProps<{
63
63
  label?: string;
64
64
  name?: string;
65
65
  showName?: boolean;
66
- disable?: boolean;
66
+ disabled?: boolean;
67
67
  readonly?: boolean;
68
68
  }>();
69
69
  const { onComplete, onDrop, onFileSelected, uploadedFile, clearUploadedFile } = useSingleFileUpload();
@@ -15,7 +15,7 @@
15
15
  v-else
16
16
  class="mt-2"
17
17
  :api-key="danxOptions.tinyMceApiKey"
18
- :disabled="disable"
18
+ :disabled="disabled"
19
19
  :model-value="modelValue"
20
20
  @update:model-value="$emit('update:model-value', $event)"
21
21
  />
@@ -39,7 +39,7 @@ defineProps({
39
39
  },
40
40
  noLabel: Boolean,
41
41
  showName: Boolean,
42
- disable: Boolean,
42
+ disabled: Boolean,
43
43
  readonly: Boolean
44
44
  });
45
45
  </script>
@@ -27,7 +27,7 @@
27
27
  {{ name || "1" }}
28
28
  </div>
29
29
  <div
30
- v-if="!disable && !readonly && canModifyVariations"
30
+ v-if="!disabled && !readonly && canModifyVariations"
31
31
  class="flex flex-nowrap items-center mr-2"
32
32
  >
33
33
  <a
@@ -86,7 +86,8 @@
86
86
  :no-label="noLabel"
87
87
  :show-name="showName"
88
88
  :clearable="field.clearable || clearable"
89
- :disable="disable"
89
+ :disabled="disabled"
90
+ :disable="disabled"
90
91
  :readonly="readonly"
91
92
  @update:model-value="onInput(field.name, $event)"
92
93
  />
@@ -206,7 +207,8 @@ function getVnodeProps(field) {
206
207
  label: field.label,
207
208
  clearable: field.clearable || props.clearable,
208
209
  readonly: props.readonly,
209
- disable: props.disable,
210
+ disabled: props.disabled,
211
+ disable: props.disabled,
210
212
  showName: props.showName,
211
213
  noLabel: props.noLabel
212
214
  };
@@ -225,7 +227,7 @@ const currentVariation = ref(variationNames.value[0] || "");
225
227
  const newVariationName = ref("");
226
228
  const variationToEdit = ref<boolean | string>(false);
227
229
  const variationToDelete = ref("");
228
- const canAddVariation = computed(() => props.canModifyVariations && !props.readonly && !props.disable && variationNames.value.length < (props.form.variations || 0));
230
+ const canAddVariation = computed(() => props.canModifyVariations && !props.readonly && !props.disabled && variationNames.value.length < (props.form.variations || 0));
229
231
 
230
232
  function getFieldResponse(name: string, variation?: string) {
231
233
  if (!fieldResponses.value) return undefined;
@@ -23,7 +23,7 @@
23
23
  :label="doneText"
24
24
  class="dx-dialog-button dx-dialog-button-done"
25
25
  :class="doneClass"
26
- :disable="disable"
26
+ :disable="disabled"
27
27
  @click="onClose"
28
28
  >
29
29
  <slot name="done-text" />
@@ -40,7 +40,7 @@ import DialogLayout from "./DialogLayout";
40
40
  const emit = defineEmits(["update:model-value", "close"]);
41
41
  defineProps({
42
42
  ...DialogLayout.props,
43
- disable: Boolean,
43
+ disabled: Boolean,
44
44
  doneClass: {
45
45
  type: [String, Object],
46
46
  default: ""
@@ -27,7 +27,7 @@ const props = defineProps<{
27
27
  form: Form;
28
28
  noLabel?: boolean;
29
29
  showName?: boolean;
30
- disable?: boolean;
30
+ disabled?: boolean;
31
31
  readonly?: boolean;
32
32
  clearable?: boolean;
33
33
  fieldClass?: string;
@@ -41,7 +41,7 @@ const renderedFormProps = {
41
41
  form: props.form,
42
42
  noLabel: props.noLabel,
43
43
  showName: props.showName,
44
- disable: props.disable,
44
+ disabled: props.disabled,
45
45
  readonly: props.readonly,
46
46
  clearable: props.clearable,
47
47
  fieldClass: props.fieldClass,
@@ -44,7 +44,7 @@ export interface RenderedFormProps {
44
44
  form: Form;
45
45
  noLabel?: boolean;
46
46
  showName?: boolean;
47
- disable?: boolean;
47
+ disabled?: boolean;
48
48
  readonly?: boolean;
49
49
  saving?: boolean;
50
50
  clearable?: boolean;