vue-laravel-crud 1.6.0 → 1.6.1

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.
@@ -1,4 +1,4 @@
1
- 'use strict';function _iterableToArrayLimit(r, l) {
1
+ 'use strict';require('vue');function _iterableToArrayLimit(r, l) {
2
2
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
3
3
  if (null != t) {
4
4
  var e,
@@ -12296,7 +12296,243 @@ vueInfiniteLoading.exports;
12296
12296
  } (vueInfiniteLoading, vueInfiniteLoading.exports));
12297
12297
 
12298
12298
  var vueInfiniteLoadingExports = vueInfiniteLoading.exports;
12299
- var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExports);var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}var css = "tr td[data-v-3e65ccf8]:last-child,\ntr td[data-v-3e65ccf8]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-3e65ccf8] {\n display: flex;\n align-items: center;\n width: 100%;\n justify-content: center;\n margin-top: 1rem; }\n\n.crud-header[data-v-3e65ccf8] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-3e65ccf8] .crud-title[data-v-3e65ccf8] {\n margin: 0; }\n .crud-header[data-v-3e65ccf8] .crud-search[data-v-3e65ccf8] {\n max-width: 15rem; }\n .crud-header[data-v-3e65ccf8] .crud-search[data-v-3e65ccf8] .btn[data-v-3e65ccf8] {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem; }\n .crud-header[data-v-3e65ccf8] .crud-search[data-v-3e65ccf8] .btn[data-v-3e65ccf8].open[data-v-3e65ccf8] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-3e65ccf8] .table-options[data-v-3e65ccf8] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-3e65ccf8] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-3e65ccf8] {\n table-layout: auto; }\n .table[data-v-3e65ccf8] tbody[data-v-3e65ccf8] td[data-v-3e65ccf8] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-3e65ccf8] tbody[data-v-3e65ccf8] td[data-v-3e65ccf8]::-webkit-scrollbar {\n display: none; } }\n";
12299
+ var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExports);/*!
12300
+ * vue-masonry-css v1.0.3
12301
+ * https://github.com/paulcollett/vue-masonry-css
12302
+ * Released under the MIT License.
12303
+ */
12304
+
12305
+ // the component name `<masonry />`
12306
+ // can be overridden with `Vue.use(Masonry, { name: 'the-masonry' });`
12307
+ var componentName = 'masonry';
12308
+
12309
+ var props = {
12310
+ tag: {
12311
+ type: [String],
12312
+ default: 'div'
12313
+ },
12314
+ cols: {
12315
+ type: [Object, Number, String],
12316
+ default: 2
12317
+ },
12318
+ gutter: {
12319
+ type: [Object, Number, String],
12320
+ default: 0
12321
+ },
12322
+ css: {
12323
+ type: [Boolean],
12324
+ default: true
12325
+ },
12326
+ columnTag: {
12327
+ type: [String],
12328
+ default: 'div'
12329
+ },
12330
+ columnClass: {
12331
+ type: [String, Array, Object],
12332
+ default: function () { return []; }
12333
+ },
12334
+ columnAttr: {
12335
+ type: [Object],
12336
+ default: function () { return ({}); }
12337
+ }
12338
+ };
12339
+
12340
+ // Get the resulting value from `:col=` prop
12341
+ // based on the window width
12342
+ var breakpointValue = function (mixed, windowWidth) {
12343
+ var valueAsNum = parseInt(mixed);
12344
+
12345
+ if(valueAsNum > -1) {
12346
+ return mixed;
12347
+ }else if(typeof mixed !== 'object') {
12348
+ return 0;
12349
+ }
12350
+
12351
+ var matchedBreakpoint = Infinity;
12352
+ var matchedValue = mixed.default || 0;
12353
+
12354
+ for(var k in mixed) {
12355
+ var breakpoint = parseInt(k);
12356
+ var breakpointValRaw = mixed[breakpoint];
12357
+ var breakpointVal = parseInt(breakpointValRaw);
12358
+
12359
+ if(isNaN(breakpoint) || isNaN(breakpointVal)) {
12360
+ continue;
12361
+ }
12362
+
12363
+ var isNewBreakpoint = windowWidth <= breakpoint && breakpoint < matchedBreakpoint;
12364
+
12365
+ if(isNewBreakpoint) {
12366
+ matchedBreakpoint = breakpoint;
12367
+ matchedValue = breakpointValRaw;
12368
+ }
12369
+ }
12370
+
12371
+ return matchedValue;
12372
+ };
12373
+
12374
+ var component$2 = {
12375
+ props: props,
12376
+
12377
+ data: function data() {
12378
+ return {
12379
+ displayColumns: 2,
12380
+ displayGutter: 0
12381
+ }
12382
+ },
12383
+
12384
+ mounted: function mounted() {
12385
+ var this$1$1 = this;
12386
+
12387
+ this.$nextTick(function () {
12388
+ this$1$1.reCalculate();
12389
+ });
12390
+
12391
+ // Bind resize handler to page
12392
+ if(window) {
12393
+ window.addEventListener('resize', this.reCalculate);
12394
+ }
12395
+ },
12396
+
12397
+ updated: function updated() {
12398
+ var this$1$1 = this;
12399
+
12400
+ this.$nextTick(function () {
12401
+ this$1$1.reCalculate();
12402
+ });
12403
+ },
12404
+
12405
+ beforeDestroy: function beforeDestroy() {
12406
+ if(window) {
12407
+ window.removeEventListener('resize', this.reCalculate);
12408
+ }
12409
+ },
12410
+
12411
+ methods: {
12412
+ // Recalculate how many columns to display based on window width
12413
+ // and the value of the passed `:cols=` prop
12414
+ reCalculate: function reCalculate() {
12415
+ var previousWindowWidth = this.windowWidth;
12416
+
12417
+ this.windowWidth = (window ? window.innerWidth : null) || Infinity;
12418
+
12419
+ // Window resize events get triggered on page height
12420
+ // change which when loading the page can result in multiple
12421
+ // needless calculations. We prevent this here.
12422
+ if(previousWindowWidth === this.windowWidth) {
12423
+ return;
12424
+ }
12425
+
12426
+ this._reCalculateColumnCount(this.windowWidth);
12427
+
12428
+ this._reCalculateGutterSize(this.windowWidth);
12429
+ },
12430
+
12431
+ _reCalculateGutterSize: function _reCalculateGutterSize(windowWidth) {
12432
+ this.displayGutter = breakpointValue(this.gutter, windowWidth);
12433
+ },
12434
+
12435
+ _reCalculateColumnCount: function _reCalculateColumnCount(windowWidth) {
12436
+ var newColumns = breakpointValue(this.cols, windowWidth);
12437
+
12438
+ // Make sure we can return a valid value
12439
+ newColumns = Math.max(1, Number(newColumns) || 0);
12440
+
12441
+ this.displayColumns = newColumns;
12442
+ },
12443
+
12444
+ _getChildItemsInColumnsArray: function _getChildItemsInColumnsArray() {
12445
+ var this$1$1 = this;
12446
+
12447
+ var columns = [];
12448
+ var childItems = this.$slots.default || [];
12449
+
12450
+ // This component does not work with a child <transition-group /> ..yet,
12451
+ // so for now we think it may be helpful to ignore until we can find a way for support
12452
+ if(childItems.length === 1 && childItems[0].componentOptions && childItems[0].componentOptions.tag == 'transition-group') {
12453
+ childItems = childItems[0].componentOptions.children;
12454
+ }
12455
+
12456
+ // Loop through child elements
12457
+ for (var i = 0, visibleItemI = 0; i < childItems.length; i++, visibleItemI++) {
12458
+ // skip Vue elements without tags, which includes
12459
+ // whitespace elements and also plain text
12460
+ if(!childItems[i].tag) {
12461
+ visibleItemI--;
12462
+
12463
+ continue;
12464
+ }
12465
+
12466
+ // Get the column index the child item will end up in
12467
+ var columnIndex = visibleItemI % this$1$1.displayColumns;
12468
+
12469
+ if(!columns[columnIndex]) {
12470
+ columns[columnIndex] = [];
12471
+ }
12472
+
12473
+ columns[columnIndex].push(childItems[i]);
12474
+ }
12475
+
12476
+ return columns;
12477
+ }
12478
+ },
12479
+
12480
+ render: function render(createElement) {
12481
+ var this$1$1 = this;
12482
+
12483
+ var columnsContainingChildren = this._getChildItemsInColumnsArray();
12484
+ var isGutterSizeUnitless = parseInt(this.displayGutter) === this.displayGutter * 1;
12485
+ var gutterSizeWithUnit = isGutterSizeUnitless ? ((this.displayGutter) + "px") : this.displayGutter;
12486
+
12487
+ var columnStyle = {
12488
+ boxSizing: 'border-box',
12489
+ backgroundClip: 'padding-box',
12490
+ width: ((100 / this.displayColumns) + "%"),
12491
+ border: '0 solid transparent',
12492
+ borderLeftWidth: gutterSizeWithUnit
12493
+ };
12494
+
12495
+ var columns = columnsContainingChildren.map(function (children, index) {
12496
+ /// Create column element and inject the children
12497
+ return createElement(this$1$1.columnTag, {
12498
+ key: index + '-' + columnsContainingChildren.length,
12499
+ style: this$1$1.css ? columnStyle : null,
12500
+ class: this$1$1.columnClass,
12501
+ attrs: this$1$1.columnAttr
12502
+ }, children); // specify child items here
12503
+ });
12504
+
12505
+ var containerStyle = {
12506
+ display: ['-webkit-box', '-ms-flexbox', 'flex'],
12507
+ marginLeft: ("-" + gutterSizeWithUnit)
12508
+ };
12509
+
12510
+ // Return wrapper with columns
12511
+ return createElement(
12512
+ this.tag, // tag name
12513
+ this.css ? { style: containerStyle } : null, // element options
12514
+ columns // column vue elements
12515
+ );
12516
+ }
12517
+ };
12518
+
12519
+ var Plugin = function () {};
12520
+
12521
+ Plugin.install = function (Vue, options) {
12522
+ if (Plugin.installed) {
12523
+ return;
12524
+ }
12525
+
12526
+ if(options && options.name) {
12527
+ Vue.component(options.name, component$2);
12528
+ } else {
12529
+ Vue.component(componentName, component$2);
12530
+ }
12531
+ };
12532
+
12533
+ if (typeof window !== 'undefined' && window.Vue) {
12534
+ window.Vue.use(Plugin);
12535
+ }var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}var css = "tr td[data-v-45e6bdb2]:last-child,\ntr td[data-v-45e6bdb2]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-45e6bdb2] {\n display: flex;\n align-items: center;\n width: 100%;\n justify-content: center;\n margin-top: 1rem; }\n\n.crud-header[data-v-45e6bdb2] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-45e6bdb2] .crud-title[data-v-45e6bdb2] {\n margin: 0; }\n .crud-header[data-v-45e6bdb2] .crud-search[data-v-45e6bdb2] {\n max-width: 15rem; }\n .crud-header[data-v-45e6bdb2] .crud-search[data-v-45e6bdb2] .btn[data-v-45e6bdb2] {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem; }\n .crud-header[data-v-45e6bdb2] .crud-search[data-v-45e6bdb2] .btn[data-v-45e6bdb2].open[data-v-45e6bdb2] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-45e6bdb2] .table-options[data-v-45e6bdb2] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-45e6bdb2] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-45e6bdb2] {\n table-layout: auto; }\n .table[data-v-45e6bdb2] tbody[data-v-45e6bdb2] td[data-v-45e6bdb2] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-45e6bdb2] tbody[data-v-45e6bdb2] td[data-v-45e6bdb2]::-webkit-scrollbar {\n display: none; } }\n";
12300
12536
  n(css, {});function normalizeComponent (
12301
12537
  scriptExports,
12302
12538
  render,
@@ -12392,7 +12628,8 @@ n(css, {});function normalizeComponent (
12392
12628
  name: "VueLaravelCrud",
12393
12629
  components: {
12394
12630
  draggable: draggable,
12395
- InfiniteLoading: InfiniteLoading
12631
+ InfiniteLoading: InfiniteLoading,
12632
+ VueMasonry: Plugin
12396
12633
  },
12397
12634
  data: function data() {
12398
12635
  return {
@@ -14623,7 +14860,7 @@ var _sfc_render = function render() {
14623
14860
  }) : _vm._e()], 2)], 1);
14624
14861
  };
14625
14862
  var _sfc_staticRenderFns = [];
14626
- var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "3e65ccf8", null, null);
14863
+ var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "45e6bdb2", null, null);
14627
14864
  var component$1 = __component__.exports;// Import vue component
14628
14865
 
14629
14866
  // Default export is installable instance of component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-laravel-crud",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/clonixdev/vue-laravel-crud",
6
6
  "main": "dist/vue-laravel-crud.ssr.js",
@@ -23,6 +23,7 @@
23
23
  "axios": "^1.3.5",
24
24
  "bootstrap-vue": "^2.21.2",
25
25
  "moment": "^2.29.1",
26
+ "sass-loader": "^14.1.1",
26
27
  "vue-infinite-loading": "^2.4.5",
27
28
  "vue-masonry-css": "^1.0.3",
28
29
  "vuedraggable": "^2.24.3"
@@ -2,12 +2,17 @@
2
2
  import draggable from "vuedraggable";
3
3
  import moment from "moment";
4
4
  import InfiniteLoading from 'vue-infinite-loading';
5
+ import Vue from 'vue'
6
+ import VueMasonry from 'vue-masonry-css'
7
+
8
+
5
9
 
6
10
  export default /*#__PURE__*/ {
7
11
  name: "VueLaravelCrud",
8
12
  components: {
9
13
  draggable,
10
- InfiniteLoading
14
+ InfiniteLoading,
15
+ VueMasonry
11
16
  },
12
17
  data() {
13
18
  return {