@amirjalili1374/ui-kit 1.4.16 → 1.4.18

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/dist/ui-kit.es.js CHANGED
@@ -17082,6 +17082,12 @@ const _hoisted_24 = {
17082
17082
  };
17083
17083
  const _hoisted_25 = { class: "d-flex justify-space-between align-center pa-4" };
17084
17084
  const _hoisted_26 = { class: "text-subtitle-2" };
17085
+ const _hoisted_27 = { class: "filter-dialog-container" };
17086
+ const _hoisted_28 = { class: "filter-dialog-content" };
17087
+ const _hoisted_29 = {
17088
+ key: 0,
17089
+ class: "filter-dialog-actions"
17090
+ };
17085
17091
  const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
17086
17092
  ...{ inheritAttrs: false },
17087
17093
  __name: "CustomDataTable",
@@ -19183,146 +19189,134 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
19183
19189
  "max-width": "800"
19184
19190
  }, {
19185
19191
  default: withCtx(() => [
19186
- createVNode(VCard, null, {
19187
- default: withCtx(() => [
19188
- createVNode(VCardTitle, null, {
19189
- default: withCtx(() => [..._cache[53] || (_cache[53] = [
19190
- createTextVNode("فیلتر", -1)
19191
- ])]),
19192
- _: 1
19193
- }),
19194
- createVNode(VCardText, null, {
19192
+ createElementVNode("div", _hoisted_27, [
19193
+ _cache[55] || (_cache[55] = createElementVNode("div", { class: "filter-dialog-header" }, [
19194
+ createElementVNode("h3", { class: "filter-dialog-title" }, "فیلتر")
19195
+ ], -1)),
19196
+ createElementVNode("div", _hoisted_28, [
19197
+ props.filterComponent ? (openBlock(), createBlock(resolveDynamicComponent(props.filterComponent), {
19198
+ key: 0,
19199
+ "model-value": filterModel.value,
19200
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => filterModel.value = $event),
19201
+ onApply: handleFilterApply
19202
+ }, null, 40, ["model-value"])) : (openBlock(), createBlock(VContainer, { key: 1 }, {
19195
19203
  default: withCtx(() => [
19196
- props.filterComponent ? (openBlock(), createBlock(resolveDynamicComponent(props.filterComponent), {
19197
- key: 0,
19198
- "model-value": filterModel.value,
19199
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => filterModel.value = $event),
19200
- onApply: handleFilterApply
19201
- }, null, 40, ["model-value"])) : (openBlock(), createBlock(VContainer, { key: 1 }, {
19204
+ createVNode(VRow, null, {
19202
19205
  default: withCtx(() => [
19203
- createVNode(VRow, null, {
19204
- default: withCtx(() => [
19205
- (openBlock(true), createElementBlock(Fragment, null, renderList(formHeaders.value, (header) => {
19206
- return openBlock(), createBlock(VCol, {
19207
- key: resolveHeaderKey(header),
19208
- cols: header.cols ? typeof header.cols === "number" ? header.cols : Number(header.cols) : 4,
19209
- md: header.cols ? typeof header.cols === "number" ? header.cols : Number(header.cols) : 4
19210
- }, {
19211
- default: withCtx(() => [
19212
- !header.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
19213
- hasFilterOperators(header) ? (openBlock(), createBlock(VSelect, {
19214
- key: 0,
19215
- modelValue: filterOperatorModel.value[resolveHeaderKey(header)],
19216
- "onUpdate:modelValue": ($event) => filterOperatorModel.value[resolveHeaderKey(header)] = $event,
19217
- items: getHeaderFilterOperators(header),
19218
- "item-title": "label",
19219
- "item-value": "value",
19220
- density: "compact",
19221
- variant: "underlined",
19222
- "hide-details": "",
19223
- class: "mb-1"
19224
- }, null, 8, ["modelValue", "onUpdate:modelValue", "items"])) : createCommentVNode("", true),
19225
- isDateHeader(header) ? (openBlock(), createBlock(ShamsiDatePicker, {
19226
- key: 1,
19227
- modelValue: filterModel.value[resolveHeaderKey(header)],
19228
- "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19229
- label: resolveHeaderTitle(header),
19230
- disabled: isHeaderDisabled(header)
19231
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"])) : hasAutocomplete(header) ? (openBlock(), createBlock(VAutocomplete, {
19232
- key: 2,
19233
- modelValue: filterModel.value[resolveHeaderKey(header)],
19234
- "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19235
- label: resolveHeaderTitle(header),
19236
- items: resolveAutocompleteItems(header, filterModel.value.value),
19237
- "item-title": resolveAutocompleteItemTitle(header),
19238
- "item-value": resolveAutocompleteItemValue(header),
19239
- "return-object": resolveAutocompleteReturnObject(header),
19240
- multiple: resolveAutocompleteMultiple(header),
19241
- chips: resolveAutocompleteMultiple(header),
19242
- "closable-chips": resolveAutocompleteMultiple(header),
19243
- disabled: isHeaderDisabled(header),
19244
- clearable: "",
19245
- variant: "outlined"
19246
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "items", "item-title", "item-value", "return-object", "multiple", "chips", "closable-chips", "disabled"])) : isMoneyHeader(header) ? (openBlock(), createBlock(_sfc_main$i, {
19247
- key: 3,
19248
- modelValue: filterModel.value[resolveHeaderKey(header)],
19249
- "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19250
- label: resolveHeaderTitle(header),
19251
- disabled: isHeaderDisabled(header)
19252
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"])) : isTextareaHeader(header) ? (openBlock(), createBlock(VTextarea, {
19253
- key: 4,
19254
- modelValue: filterModel.value[resolveHeaderKey(header)],
19255
- "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19256
- label: resolveHeaderTitle(header),
19257
- variant: "outlined",
19258
- disabled: isHeaderDisabled(header),
19259
- dir: header.dir,
19260
- "auto-grow": "",
19261
- rows: "3"
19262
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "dir"])) : isToggleHeader(header) ? (openBlock(), createBlock(ToggleSwitch, {
19263
- key: 5,
19264
- modelValue: filterModel.value[resolveHeaderKey(header)],
19265
- "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19266
- label: resolveHeaderTitle(header),
19267
- type: "boolean",
19268
- activeColor: "#3bd32a",
19269
- inactiveColor: "#d32a2a",
19270
- options: [
19271
- { value: "true", label: "فعال", icon: unref(IconCheck) },
19272
- { value: "false", label: "غیر فعال", icon: unref(IconSquareX) }
19273
- ]
19274
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options"])) : (openBlock(), createBlock(VTextField, {
19275
- key: 6,
19276
- modelValue: filterModel.value[resolveHeaderKey(header)],
19277
- "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19278
- label: resolveHeaderTitle(header),
19279
- variant: "outlined",
19280
- disabled: isHeaderDisabled(header),
19281
- type: getFieldInputType(header),
19282
- dir: header.dir
19283
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "type", "dir"]))
19284
- ], 64)) : createCommentVNode("", true)
19285
- ]),
19286
- _: 2
19287
- }, 1032, ["cols", "md"]);
19288
- }), 128))
19289
- ]),
19290
- _: 1
19291
- })
19206
+ (openBlock(true), createElementBlock(Fragment, null, renderList(formHeaders.value, (header) => {
19207
+ return openBlock(), createBlock(VCol, {
19208
+ key: resolveHeaderKey(header),
19209
+ cols: header.cols ? typeof header.cols === "number" ? header.cols : Number(header.cols) : 4,
19210
+ md: header.cols ? typeof header.cols === "number" ? header.cols : Number(header.cols) : 4
19211
+ }, {
19212
+ default: withCtx(() => [
19213
+ !header.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
19214
+ hasFilterOperators(header) ? (openBlock(), createBlock(VSelect, {
19215
+ key: 0,
19216
+ modelValue: filterOperatorModel.value[resolveHeaderKey(header)],
19217
+ "onUpdate:modelValue": ($event) => filterOperatorModel.value[resolveHeaderKey(header)] = $event,
19218
+ items: getHeaderFilterOperators(header),
19219
+ "item-title": "label",
19220
+ "item-value": "value",
19221
+ density: "compact",
19222
+ variant: "underlined",
19223
+ "hide-details": "",
19224
+ class: "mb-1"
19225
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "items"])) : createCommentVNode("", true),
19226
+ isDateHeader(header) ? (openBlock(), createBlock(ShamsiDatePicker, {
19227
+ key: 1,
19228
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19229
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19230
+ label: resolveHeaderTitle(header),
19231
+ disabled: isHeaderDisabled(header)
19232
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"])) : hasAutocomplete(header) ? (openBlock(), createBlock(VAutocomplete, {
19233
+ key: 2,
19234
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19235
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19236
+ label: resolveHeaderTitle(header),
19237
+ items: resolveAutocompleteItems(header, filterModel.value.value),
19238
+ "item-title": resolveAutocompleteItemTitle(header),
19239
+ "item-value": resolveAutocompleteItemValue(header),
19240
+ "return-object": resolveAutocompleteReturnObject(header),
19241
+ multiple: resolveAutocompleteMultiple(header),
19242
+ chips: resolveAutocompleteMultiple(header),
19243
+ "closable-chips": resolveAutocompleteMultiple(header),
19244
+ disabled: isHeaderDisabled(header),
19245
+ clearable: "",
19246
+ variant: "outlined"
19247
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "items", "item-title", "item-value", "return-object", "multiple", "chips", "closable-chips", "disabled"])) : isMoneyHeader(header) ? (openBlock(), createBlock(_sfc_main$i, {
19248
+ key: 3,
19249
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19250
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19251
+ label: resolveHeaderTitle(header),
19252
+ disabled: isHeaderDisabled(header)
19253
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"])) : isTextareaHeader(header) ? (openBlock(), createBlock(VTextarea, {
19254
+ key: 4,
19255
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19256
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19257
+ label: resolveHeaderTitle(header),
19258
+ variant: "outlined",
19259
+ disabled: isHeaderDisabled(header),
19260
+ dir: header.dir,
19261
+ "auto-grow": "",
19262
+ rows: "3"
19263
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "dir"])) : isToggleHeader(header) ? (openBlock(), createBlock(ToggleSwitch, {
19264
+ key: 5,
19265
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19266
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19267
+ label: resolveHeaderTitle(header),
19268
+ type: "boolean",
19269
+ activeColor: "#3bd32a",
19270
+ inactiveColor: "#d32a2a",
19271
+ options: [
19272
+ { value: "true", label: "فعال", icon: unref(IconCheck) },
19273
+ { value: "false", label: "غیر فعال", icon: unref(IconSquareX) }
19274
+ ]
19275
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options"])) : (openBlock(), createBlock(VTextField, {
19276
+ key: 6,
19277
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19278
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19279
+ label: resolveHeaderTitle(header),
19280
+ variant: "outlined",
19281
+ disabled: isHeaderDisabled(header),
19282
+ type: getFieldInputType(header),
19283
+ dir: header.dir
19284
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "type", "dir"]))
19285
+ ], 64)) : createCommentVNode("", true)
19286
+ ]),
19287
+ _: 2
19288
+ }, 1032, ["cols", "md"]);
19289
+ }), 128))
19292
19290
  ]),
19293
19291
  _: 1
19294
- }))
19295
- ]),
19296
- _: 1
19297
- }),
19298
- !props.filterComponent ? (openBlock(), createBlock(VCardActions, { key: 0 }, {
19299
- default: withCtx(() => [
19300
- createVNode(VSpacer),
19301
- createVNode(VBtn, {
19302
- color: "grey",
19303
- variant: "tonal",
19304
- onClick: resetFilter
19305
- }, {
19306
- default: withCtx(() => [..._cache[54] || (_cache[54] = [
19307
- createTextVNode("حذف فیلترها", -1)
19308
- ])]),
19309
- _: 1
19310
- }),
19311
- createVNode(VBtn, {
19312
- color: "primary",
19313
- onClick: applyFilter
19314
- }, {
19315
- default: withCtx(() => [..._cache[55] || (_cache[55] = [
19316
- createTextVNode("اعمال فیلتر", -1)
19317
- ])]),
19318
- _: 1
19319
19292
  })
19320
19293
  ]),
19321
19294
  _: 1
19322
- })) : createCommentVNode("", true)
19295
+ }))
19323
19296
  ]),
19324
- _: 1
19325
- })
19297
+ !props.filterComponent ? (openBlock(), createElementBlock("div", _hoisted_29, [
19298
+ createVNode(VSpacer),
19299
+ createVNode(VBtn, {
19300
+ color: "grey",
19301
+ variant: "tonal",
19302
+ onClick: resetFilter
19303
+ }, {
19304
+ default: withCtx(() => [..._cache[53] || (_cache[53] = [
19305
+ createTextVNode("حذف فیلترها", -1)
19306
+ ])]),
19307
+ _: 1
19308
+ }),
19309
+ createVNode(VBtn, {
19310
+ color: "primary",
19311
+ onClick: applyFilter
19312
+ }, {
19313
+ default: withCtx(() => [..._cache[54] || (_cache[54] = [
19314
+ createTextVNode("اعمال فیلتر", -1)
19315
+ ])]),
19316
+ _: 1
19317
+ })
19318
+ ])) : createCommentVNode("", true)
19319
+ ])
19326
19320
  ]),
19327
19321
  _: 1
19328
19322
  }, 8, ["modelValue"]),