@amirjalili1374/ui-kit 1.4.18 → 1.4.19

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,12 +17082,6 @@ 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
- };
17091
17085
  const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
17092
17086
  ...{ inheritAttrs: false },
17093
17087
  __name: "CustomDataTable",
@@ -19189,134 +19183,148 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
19189
19183
  "max-width": "800"
19190
19184
  }, {
19191
19185
  default: withCtx(() => [
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 }, {
19186
+ createVNode(VCard, { class: "filter-dialog-card" }, {
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, {
19203
19195
  default: withCtx(() => [
19204
- createVNode(VRow, null, {
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 }, {
19205
19202
  default: withCtx(() => [
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))
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
+ "menu-props": { attach: true, zIndex: 3e3 }
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
+ "menu-props": { attach: true, zIndex: 3e3 }
19248
+ }, 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, {
19249
+ key: 3,
19250
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19251
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19252
+ label: resolveHeaderTitle(header),
19253
+ disabled: isHeaderDisabled(header)
19254
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"])) : isTextareaHeader(header) ? (openBlock(), createBlock(VTextarea, {
19255
+ key: 4,
19256
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19257
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19258
+ label: resolveHeaderTitle(header),
19259
+ variant: "outlined",
19260
+ disabled: isHeaderDisabled(header),
19261
+ dir: header.dir,
19262
+ "auto-grow": "",
19263
+ rows: "3"
19264
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "dir"])) : isToggleHeader(header) ? (openBlock(), createBlock(ToggleSwitch, {
19265
+ key: 5,
19266
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19267
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19268
+ label: resolveHeaderTitle(header),
19269
+ type: "boolean",
19270
+ activeColor: "#3bd32a",
19271
+ inactiveColor: "#d32a2a",
19272
+ options: [
19273
+ { value: "true", label: "فعال", icon: unref(IconCheck) },
19274
+ { value: "false", label: "غیر فعال", icon: unref(IconSquareX) }
19275
+ ]
19276
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options"])) : (openBlock(), createBlock(VTextField, {
19277
+ key: 6,
19278
+ modelValue: filterModel.value[resolveHeaderKey(header)],
19279
+ "onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
19280
+ label: resolveHeaderTitle(header),
19281
+ variant: "outlined",
19282
+ disabled: isHeaderDisabled(header),
19283
+ type: getFieldInputType(header),
19284
+ dir: header.dir
19285
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "type", "dir"]))
19286
+ ], 64)) : createCommentVNode("", true)
19287
+ ]),
19288
+ _: 2
19289
+ }, 1032, ["cols", "md"]);
19290
+ }), 128))
19291
+ ]),
19292
+ _: 1
19293
+ })
19290
19294
  ]),
19291
19295
  _: 1
19292
- })
19296
+ }))
19293
19297
  ]),
19294
19298
  _: 1
19295
- }))
19296
- ]),
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
19299
  }),
19309
- createVNode(VBtn, {
19310
- color: "primary",
19311
- onClick: applyFilter
19312
- }, {
19313
- default: withCtx(() => [..._cache[54] || (_cache[54] = [
19314
- createTextVNode("اعمال فیلتر", -1)
19315
- ])]),
19300
+ !props.filterComponent ? (openBlock(), createBlock(VCardActions, { key: 0 }, {
19301
+ default: withCtx(() => [
19302
+ createVNode(VSpacer),
19303
+ createVNode(VBtn, {
19304
+ color: "grey",
19305
+ variant: "tonal",
19306
+ onClick: resetFilter
19307
+ }, {
19308
+ default: withCtx(() => [..._cache[54] || (_cache[54] = [
19309
+ createTextVNode("حذف فیلترها", -1)
19310
+ ])]),
19311
+ _: 1
19312
+ }),
19313
+ createVNode(VBtn, {
19314
+ color: "primary",
19315
+ onClick: applyFilter
19316
+ }, {
19317
+ default: withCtx(() => [..._cache[55] || (_cache[55] = [
19318
+ createTextVNode("اعمال فیلتر", -1)
19319
+ ])]),
19320
+ _: 1
19321
+ })
19322
+ ]),
19316
19323
  _: 1
19317
- })
19318
- ])) : createCommentVNode("", true)
19319
- ])
19324
+ })) : createCommentVNode("", true)
19325
+ ]),
19326
+ _: 1
19327
+ })
19320
19328
  ]),
19321
19329
  _: 1
19322
19330
  }, 8, ["modelValue"]),