jqh 5 gadi atpakaļ
vecāks
revīzija
9e55ec1bd2
27 mainītis faili ar 1240 papildinājumiem un 662 dzēšanām
  1. 0 35
      resources/assets/dcat/dcat-bootstrap.js
  2. 18 5
      resources/assets/dcat/js/Dcat.js
  3. 476 0
      resources/assets/dcat/js/NProgress/NProgress.js
  4. 0 0
      resources/assets/dcat/js/NProgress/NProgress.min.js
  5. 0 0
      resources/assets/dcat/js/bootstrappers/Footer.js
  6. 13 6
      resources/assets/dcat/js/bootstrappers/Pjax.js
  7. 51 0
      resources/assets/dcat/js/dcat-bootstrap.js
  8. 0 0
      resources/assets/dcat/js/extensions/Ajax.js
  9. 148 0
      resources/assets/dcat/js/extensions/Debounce.js
  10. 0 0
      resources/assets/dcat/js/extensions/Dialog.js
  11. 10 0
      resources/assets/dcat/js/extensions/Grid.js
  12. 5 0
      resources/assets/dcat/js/extensions/RowSelector.js
  13. 81 0
      resources/assets/dcat/sass/dcat-bootstrap.scss
  14. 0 0
      resources/assets/plugins/jquery-pjax/jquery.pjax.js
  15. 0 0
      resources/assets/plugins/jquery-pjax/jquery.pjax.min.js
  16. 36 36
      resources/dist/css/plugins/loaders/animations/ball-grid-beat.css
  17. 36 36
      resources/dist/css/plugins/loaders/animations/ball-grid-pulse.css
  18. 16 16
      resources/dist/css/plugins/loaders/animations/line-scale-random.css
  19. 88 88
      resources/dist/css/plugins/loaders/loaders.css
  20. 2 436
      resources/dist/dcat/bootstrap.js
  21. 254 0
      resources/dist/dcat/js/bootstrap.js
  22. 0 0
      resources/dist/js/core/app-menu.js
  23. 0 0
      resources/dist/plugins/jquery-pjax/jquery.pjax.js
  24. 0 0
      resources/dist/plugins/jquery-pjax/jquery.pjax.min.js
  25. 3 2
      resources/views/layouts/vertical.blade.php
  26. 1 1
      src/Layout/Assets.php
  27. 2 1
      webpack.mix.js

+ 0 - 35
resources/assets/dcat/dcat-bootstrap.js

@@ -1,35 +0,0 @@
-
-import Dcat from './Dcat'
-
-import AjaxExtension from './extensions/Ajax'
-import DialogExtension from './extensions/Dialog'
-
-import Footer from './bootstrappers/Footer'
-import Pjax from './bootstrappers/Pjax'
-
-let $ = jQuery,
-    extend = function (Dcat) {
-        // 扩展Dcat对象
-        new AjaxExtension(Dcat);
-        new DialogExtension(Dcat);
-    },
-    on = function (Dcat) {
-        // 初始化
-        new Footer(Dcat);
-        new Pjax(Dcat);
-    },
-    boot = function (Dcat) {
-        extend(Dcat);
-        on(Dcat);
-
-        $(Dcat.boot);
-
-        return Dcat;
-    };
-
-(function () {
-    this.CreateDcat = function(config) {
-        return boot(new Dcat(config));
-    };
-}.call(window));
-

+ 18 - 5
resources/assets/dcat/dcat.js → resources/assets/dcat/js/Dcat.js

@@ -3,13 +3,14 @@ let $ = jQuery,
     bootingCallbacks = [],
     formCallbacks = {
         before: [], success: [], error: []
+    },
+    defaultOptions = {
+        pjax_container_selector: '#pjax-container',
     };
 
 export default class Dcat {
     constructor(config) {
         this.withConfig(config);
-
-        this.pjaxContainer = config['pjax_container_selector'] || '#pjax-container'
     }
 
     booting(callback) {
@@ -41,9 +42,12 @@ export default class Dcat {
     }
 
     withConfig(config) {
-        this.config = config;
-        this.withLang(config['lang']);
-        this.withToken(config['token']);
+        this.config = $.extend(defaultOptions, config);
+        this.withLang(config.lang);
+        this.withToken(config.token);
+
+        delete config.lang;
+        delete config.token;
 
         return this
     }
@@ -78,4 +82,13 @@ export default class Dcat {
 
         return this
     }
+
+    reload(url) {
+        let container = this.config.pjax_container_selector;
+        let opt = {container: container};
+
+        url && (opt.url = url);
+
+        $.pjax.reload(opt);
+    }
 }

+ 476 - 0
resources/assets/dcat/js/NProgress/NProgress.js

@@ -0,0 +1,476 @@
+/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
+ * @license MIT */
+
+;(function(root, factory) {
+
+    if (typeof define === 'function' && define.amd) {
+        define(factory);
+    } else if (typeof exports === 'object') {
+        module.exports = factory();
+    } else {
+        root.NProgress = factory();
+    }
+
+})(this, function() {
+    var NProgress = {};
+
+    NProgress.version = '0.2.0';
+
+    var Settings = NProgress.settings = {
+        minimum: 0.08,
+        easing: 'ease',
+        positionUsing: '',
+        speed: 200,
+        trickle: true,
+        trickleRate: 0.02,
+        trickleSpeed: 800,
+        showSpinner: true,
+        barSelector: '[role="bar"]',
+        spinnerSelector: '[role="spinner"]',
+        parent: 'body',
+        template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
+    };
+
+    /**
+     * Updates configuration.
+     *
+     *     NProgress.configure({
+     *       minimum: 0.1
+     *     });
+     */
+    NProgress.configure = function(options) {
+        var key, value;
+        for (key in options) {
+            value = options[key];
+            if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
+        }
+
+        return this;
+    };
+
+    /**
+     * Last number.
+     */
+
+    NProgress.status = null;
+
+    /**
+     * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
+     *
+     *     NProgress.set(0.4);
+     *     NProgress.set(1.0);
+     */
+
+    NProgress.set = function(n) {
+        var started = NProgress.isStarted();
+
+        n = clamp(n, Settings.minimum, 1);
+        NProgress.status = (n === 1 ? null : n);
+
+        var progress = NProgress.render(!started),
+            bar      = progress.querySelector(Settings.barSelector),
+            speed    = Settings.speed,
+            ease     = Settings.easing;
+
+        progress.offsetWidth; /* Repaint */
+
+        queue(function(next) {
+            // Set positionUsing if it hasn't already been set
+            if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
+
+            // Add transition
+            css(bar, barPositionCSS(n, speed, ease));
+
+            if (n === 1) {
+                // Fade out
+                css(progress, {
+                    transition: 'none',
+                    opacity: 1
+                });
+                progress.offsetWidth; /* Repaint */
+
+                setTimeout(function() {
+                    css(progress, {
+                        transition: 'all ' + speed + 'ms linear',
+                        opacity: 0
+                    });
+                    setTimeout(function() {
+                        NProgress.remove();
+                        next();
+                    }, speed);
+                }, speed);
+            } else {
+                setTimeout(next, speed);
+            }
+        });
+
+        return this;
+    };
+
+    NProgress.isStarted = function() {
+        return typeof NProgress.status === 'number';
+    };
+
+    /**
+     * Shows the progress bar.
+     * This is the same as setting the status to 0%, except that it doesn't go backwards.
+     *
+     *     NProgress.start();
+     *
+     */
+    NProgress.start = function() {
+        if (!NProgress.status) NProgress.set(0);
+
+        var work = function() {
+            setTimeout(function() {
+                if (!NProgress.status) return;
+                NProgress.trickle();
+                work();
+            }, Settings.trickleSpeed);
+        };
+
+        if (Settings.trickle) work();
+
+        return this;
+    };
+
+    /**
+     * Hides the progress bar.
+     * This is the *sort of* the same as setting the status to 100%, with the
+     * difference being `done()` makes some placebo effect of some realistic motion.
+     *
+     *     NProgress.done();
+     *
+     * If `true` is passed, it will show the progress bar even if its hidden.
+     *
+     *     NProgress.done(true);
+     */
+
+    NProgress.done = function(force) {
+        if (!force && !NProgress.status) return this;
+
+        return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
+    };
+
+    /**
+     * Increments by a random amount.
+     */
+
+    NProgress.inc = function(amount) {
+        var n = NProgress.status;
+
+        if (!n) {
+            return NProgress.start();
+        } else {
+            if (typeof amount !== 'number') {
+                amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);
+            }
+
+            n = clamp(n + amount, 0, 0.994);
+            return NProgress.set(n);
+        }
+    };
+
+    NProgress.trickle = function() {
+        return NProgress.inc(Math.random() * Settings.trickleRate);
+    };
+
+    /**
+     * Waits for all supplied jQuery promises and
+     * increases the progress as the promises resolve.
+     *
+     * @param $promise jQUery Promise
+     */
+    (function() {
+        var initial = 0, current = 0;
+
+        NProgress.promise = function($promise) {
+            if (!$promise || $promise.state() === "resolved") {
+                return this;
+            }
+
+            if (current === 0) {
+                NProgress.start();
+            }
+
+            initial++;
+            current++;
+
+            $promise.always(function() {
+                current--;
+                if (current === 0) {
+                    initial = 0;
+                    NProgress.done();
+                } else {
+                    NProgress.set((initial - current) / initial);
+                }
+            });
+
+            return this;
+        };
+
+    })();
+
+    /**
+     * (Internal) renders the progress bar markup based on the `template`
+     * setting.
+     */
+
+    NProgress.render = function(fromStart) {
+        if (NProgress.isRendered()) return document.getElementById('nprogress');
+
+        addClass(document.documentElement, 'nprogress-busy');
+
+        var progress = document.createElement('div');
+        progress.id = 'nprogress';
+        progress.innerHTML = Settings.template;
+
+        var bar      = progress.querySelector(Settings.barSelector),
+            perc     = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
+            parent   = document.querySelector(Settings.parent),
+            spinner;
+
+        css(bar, {
+            transition: 'all 0 linear',
+            transform: 'translate3d(' + perc + '%,0,0)'
+        });
+
+        if (!Settings.showSpinner) {
+            spinner = progress.querySelector(Settings.spinnerSelector);
+            spinner && removeElement(spinner);
+        }
+
+        if (parent != document.body) {
+            addClass(parent, 'nprogress-custom-parent');
+        }
+
+        parent.appendChild(progress);
+        return progress;
+    };
+
+    /**
+     * Removes the element. Opposite of render().
+     */
+
+    NProgress.remove = function() {
+        removeClass(document.documentElement, 'nprogress-busy');
+        removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
+        var progress = document.getElementById('nprogress');
+        progress && removeElement(progress);
+    };
+
+    /**
+     * Checks if the progress bar is rendered.
+     */
+
+    NProgress.isRendered = function() {
+        return !!document.getElementById('nprogress');
+    };
+
+    /**
+     * Determine which positioning CSS rule to use.
+     */
+
+    NProgress.getPositioningCSS = function() {
+        // Sniff on document.body.style
+        var bodyStyle = document.body.style;
+
+        // Sniff prefixes
+        var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
+            ('MozTransform' in bodyStyle) ? 'Moz' :
+                ('msTransform' in bodyStyle) ? 'ms' :
+                    ('OTransform' in bodyStyle) ? 'O' : '';
+
+        if (vendorPrefix + 'Perspective' in bodyStyle) {
+            // Modern browsers with 3D support, e.g. Webkit, IE10
+            return 'translate3d';
+        } else if (vendorPrefix + 'Transform' in bodyStyle) {
+            // Browsers without 3D support, e.g. IE9
+            return 'translate';
+        } else {
+            // Browsers without translate() support, e.g. IE7-8
+            return 'margin';
+        }
+    };
+
+    /**
+     * Helpers
+     */
+
+    function clamp(n, min, max) {
+        if (n < min) return min;
+        if (n > max) return max;
+        return n;
+    }
+
+    /**
+     * (Internal) converts a percentage (`0..1`) to a bar translateX
+     * percentage (`-100%..0%`).
+     */
+
+    function toBarPerc(n) {
+        return (-1 + n) * 100;
+    }
+
+
+    /**
+     * (Internal) returns the correct CSS for changing the bar's
+     * position given an n percentage, and speed and ease from Settings
+     */
+
+    function barPositionCSS(n, speed, ease) {
+        var barCSS;
+
+        if (Settings.positionUsing === 'translate3d') {
+            barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
+        } else if (Settings.positionUsing === 'translate') {
+            barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };
+        } else {
+            barCSS = { 'margin-left': toBarPerc(n)+'%' };
+        }
+
+        barCSS.transition = 'all '+speed+'ms '+ease;
+
+        return barCSS;
+    }
+
+    /**
+     * (Internal) Queues a function to be executed.
+     */
+
+    var queue = (function() {
+        var pending = [];
+
+        function next() {
+            var fn = pending.shift();
+            if (fn) {
+                fn(next);
+            }
+        }
+
+        return function(fn) {
+            pending.push(fn);
+            if (pending.length == 1) next();
+        };
+    })();
+
+    /**
+     * (Internal) Applies css properties to an element, similar to the jQuery
+     * css method.
+     *
+     * While this helper does assist with vendor prefixed property names, it
+     * does not perform any manipulation of values prior to setting styles.
+     */
+
+    var css = (function() {
+        var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
+            cssProps    = {};
+
+        function camelCase(string) {
+            return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
+                return letter.toUpperCase();
+            });
+        }
+
+        function getVendorProp(name) {
+            var style = document.body.style;
+            if (name in style) return name;
+
+            var i = cssPrefixes.length,
+                capName = name.charAt(0).toUpperCase() + name.slice(1),
+                vendorName;
+            while (i--) {
+                vendorName = cssPrefixes[i] + capName;
+                if (vendorName in style) return vendorName;
+            }
+
+            return name;
+        }
+
+        function getStyleProp(name) {
+            name = camelCase(name);
+            return cssProps[name] || (cssProps[name] = getVendorProp(name));
+        }
+
+        function applyCss(element, prop, value) {
+            prop = getStyleProp(prop);
+            element.style[prop] = value;
+        }
+
+        return function(element, properties) {
+            var args = arguments,
+                prop,
+                value;
+
+            if (args.length == 2) {
+                for (prop in properties) {
+                    value = properties[prop];
+                    if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
+                }
+            } else {
+                applyCss(element, args[1], args[2]);
+            }
+        }
+    })();
+
+    /**
+     * (Internal) Determines if an element or space separated list of class names contains a class name.
+     */
+
+    function hasClass(element, name) {
+        var list = typeof element == 'string' ? element : classList(element);
+        return list.indexOf(' ' + name + ' ') >= 0;
+    }
+
+    /**
+     * (Internal) Adds a class to an element.
+     */
+
+    function addClass(element, name) {
+        var oldList = classList(element),
+            newList = oldList + name;
+
+        if (hasClass(oldList, name)) return;
+
+        // Trim the opening space.
+        element.className = newList.substring(1);
+    }
+
+    /**
+     * (Internal) Removes a class from an element.
+     */
+
+    function removeClass(element, name) {
+        var oldList = classList(element),
+            newList;
+
+        if (!hasClass(element, name)) return;
+
+        // Replace the class name.
+        newList = oldList.replace(' ' + name + ' ', ' ');
+
+        // Trim the opening and closing spaces.
+        element.className = newList.substring(1, newList.length - 1);
+    }
+
+    /**
+     * (Internal) Gets a space separated list of the class names on the element.
+     * The list is wrapped with a single space on each end to facilitate finding
+     * matches within the list.
+     */
+
+    function classList(element) {
+        return (' ' + (element.className || '') + ' ').replace(/\s+/gi, ' ');
+    }
+
+    /**
+     * (Internal) Removes an element from the DOM.
+     */
+
+    function removeElement(element) {
+        element && element.parentNode && element.parentNode.removeChild(element);
+    }
+
+    return NProgress;
+});
+

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
resources/assets/dcat/js/NProgress/NProgress.min.js


+ 0 - 0
resources/assets/dcat/bootstrappers/footer.js → resources/assets/dcat/js/bootstrappers/Footer.js


+ 13 - 6
resources/assets/dcat/bootstrappers/Pjax.js → resources/assets/dcat/js/bootstrappers/Pjax.js

@@ -3,21 +3,28 @@ let $d = $(document);
 
 export default class Pjax {
     constructor(Dcat) {
+        let _this = this;
+
         Dcat.booting(function () {
-            this.boot(Dcat)
+            _this.boot(Dcat)
         })
     }
 
     boot(Dcat) {
-        $d.pjax('a:not(a[target="_blank"])', '#pjax-container', { fragment: 'body' });
-        NP.configure({parent: Dcat.pjaxContainer});
+        let container = Dcat.config.pjax_container_selector;
+
+        $('a:not(a[target="_blank"])').click(function (event) {
+            $.pjax.click(event, container, { fragment: 'body' });
+        });
+
+        Dcat.NP.configure({parent: container});
 
         $d.on('pjax:timeout', function (event) {
             event.preventDefault();
         });
 
         $d.on('submit', 'form[pjax-container]', function (event) {
-            $.pjax.submit(event, '#pjax-container')
+            $.pjax.submit(event, container)
         });
 
         $d.on("pjax:popstate", function () {
@@ -36,7 +43,7 @@ export default class Pjax {
                     $submit_btn.button('loading')
                 }
             }
-            NP.start();
+            Dcat.NP.start();
         });
 
         $d.on('pjax:complete', function (xhr) {
@@ -46,7 +53,7 @@ export default class Pjax {
                     $submit_btn.button('reset')
                 }
             }
-            NP.done();
+            Dcat.NP.done();
         });
 
         // 新页面加载,重新初始化

+ 51 - 0
resources/assets/dcat/js/dcat-bootstrap.js

@@ -0,0 +1,51 @@
+
+import Dcat from './Dcat'
+
+import NProgress from './NProgress/NProgress.min'
+import AjaxExtension from './extensions/Ajax'
+import DialogExtension from './extensions/Dialog'
+import RowSelector from './extensions/RowSelector'
+import Grid from './extensions/Grid'
+import Debounce from './extensions/Debounce'
+
+import Footer from './bootstrappers/Footer'
+import Pjax from './bootstrappers/Pjax'
+
+let win = window,
+    $ = jQuery;
+
+win.NProgress = NProgress;
+
+// 扩展Dcat对象
+function extend (Dcat) {
+    new AjaxExtension(Dcat);
+    new DialogExtension(Dcat);
+    new Grid(Dcat);
+
+    Dcat.NP = NProgress;
+    Dcat.RowSelector = function (options) {
+        return new RowSelector(options)
+    };
+    Dcat.debounce = Debounce;
+}
+
+// 初始化事件监听
+function on(Dcat) {
+    new Footer(Dcat);
+    new Pjax(Dcat);
+}
+
+// 初始化
+function boot(Dcat) {
+    extend(Dcat);
+    on(Dcat);
+
+    $(Dcat.boot);
+
+    return Dcat;
+}
+
+win.CreateDcat = function(config) {
+    return boot(new Dcat(config));
+};
+

+ 0 - 0
resources/assets/dcat/extensions/Ajax.js → resources/assets/dcat/js/extensions/Ajax.js


+ 148 - 0
resources/assets/dcat/js/extensions/Debounce.js

@@ -0,0 +1,148 @@
+
+/* @see https://github.com/lodash/lodash/blob/master/debounce.js */
+/* @see https://www.lodashjs.com/docs/lodash.debounce */
+function debounce(func, wait, options) {
+    var lastArgs,
+        lastThis,
+        maxWait,
+        result,
+        timerId,
+        lastCallTime;
+
+    var lastInvokeTime = 0;
+    var leading = false;
+    var maxing = false;
+    var trailing = true;
+
+    if (typeof func !== 'function') {
+        throw new TypeError('Expected a function')
+    }
+    wait = +wait || 0;
+    if (isObject(options)) {
+        leading = !!options.leading;
+        maxing = 'maxWait' in options;
+        maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : wait;
+        trailing = 'trailing' in options ? !!options.trailing : trailing
+    }
+
+    function isObject(value) {
+        var type = typeof value;
+        return value != null && (type === 'object' || type === 'function')
+    }
+
+
+    function invokeFunc(time) {
+        var args = lastArgs;
+        var thisArg = lastThis;
+
+        lastArgs = lastThis = undefined;
+        lastInvokeTime = time;
+        result = func.apply(thisArg, args);
+        return result
+    }
+
+    function startTimer(pendingFunc, wait) {
+        return setTimeout(pendingFunc, wait)
+    }
+
+    function cancelTimer(id) {
+        clearTimeout(id)
+    }
+
+    function leadingEdge(time) {
+        // Reset any `maxWait` timer.
+        lastInvokeTime = time;
+        // Start the timer for the trailing edge.
+        timerId = startTimer(timerExpired, wait);
+        // Invoke the leading edge.
+        return leading ? invokeFunc(time) : result
+    }
+
+    function remainingWait(time) {
+        var timeSinceLastCall = time - lastCallTime;
+        var timeSinceLastInvoke = time - lastInvokeTime;
+        var timeWaiting = wait - timeSinceLastCall;
+
+        return maxing
+            ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)
+            : timeWaiting
+    }
+
+    function shouldInvoke(time) {
+        var timeSinceLastCall = time - lastCallTime;
+        var timeSinceLastInvoke = time - lastInvokeTime;
+
+        // Either this is the first call, activity has stopped and we're at the
+        // trailing edge, the system time has gone backwards and we're treating
+        // it as the trailing edge, or we've hit the `maxWait` limit.
+        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+            (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait))
+    }
+
+    function timerExpired() {
+        var time = Date.now();
+        if (shouldInvoke(time)) {
+            return trailingEdge(time)
+        }
+        // Restart the timer.
+        timerId = startTimer(timerExpired, remainingWait(time))
+    }
+
+    function trailingEdge(time) {
+        timerId = undefined;
+
+        // Only invoke if we have `lastArgs` which means `func` has been
+        // debounced at least once.
+        if (trailing && lastArgs) {
+            return invokeFunc(time)
+        }
+        lastArgs = lastThis = undefined;
+        return result
+    }
+
+    function cancel() {
+        if (timerId !== undefined) {
+            cancelTimer(timerId)
+        }
+        lastInvokeTime = 0;
+        lastArgs = lastCallTime = lastThis = timerId = undefined
+    }
+
+    function flush() {
+        return timerId === undefined ? result : trailingEdge(Date.now())
+    }
+
+    function pending() {
+        return timerId !== undefined
+    }
+
+    function debounced() {
+        var time = Date.now();
+        var isInvoking = shouldInvoke(time);
+
+        lastArgs = arguments;
+        lastThis = this;
+        lastCallTime = time;
+
+        if (isInvoking) {
+            if (timerId === undefined) {
+                return leadingEdge(lastCallTime)
+            }
+            if (maxing) {
+                // Handle invocations in a tight loop.
+                timerId = startTimer(timerExpired, wait);
+                return invokeFunc(lastCallTime)
+            }
+        }
+        if (timerId === undefined) {
+            timerId = startTimer(timerExpired, wait)
+        }
+        return result
+    }
+    debounced.cancel = cancel;
+    debounced.flush = flush;
+    debounced.pending = pending;
+    return debounced
+}
+
+export default debounce

+ 0 - 0
resources/assets/dcat/extensions/Dialog.js → resources/assets/dcat/js/extensions/Dialog.js


+ 10 - 0
resources/assets/dcat/js/extensions/Grid.js

@@ -0,0 +1,10 @@
+
+export default class Grid {
+    constructor(Dcat) {
+        Dcat.grid = this
+    }
+
+    addSelector(selector, name) {
+
+    }
+}

+ 5 - 0
resources/assets/dcat/js/extensions/RowSelector.js

@@ -0,0 +1,5 @@
+
+export default class RowSelector {
+    constructor() {
+    }
+}

+ 81 - 0
resources/assets/dcat/sass/dcat-bootstrap.scss

@@ -0,0 +1,81 @@
+
+
+/*nprogress*/
+#nprogress {
+  pointer-events: none
+}
+
+#nprogress .bar {
+  background:#007ee5;
+  background: var(--blue);
+  position: fixed;
+  z-index: 1031;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 2px
+}
+
+#nprogress .peg {
+  display: block;
+  position: absolute;
+  right: 0;
+  width: 100px;
+  height: 100%;
+  box-shadow: 0 0 10px #007ee5, 0 0 5px #007ee5;
+  box-shadow: 0 0 10px var(--blue), 0 0 5px var(--blue);
+  opacity: 1;
+  -webkit-transform: rotate(3deg) translate(0, -4px);
+  -ms-transform: rotate(3deg) translate(0, -4px);
+  transform: rotate(3deg) translate(0, -4px)
+}
+
+#nprogress .spinner {
+  display: block;
+  position: fixed;
+  z-index: 1031;
+  top: 15px;
+  right: 15px
+}
+
+#nprogress .spinner-icon {
+  width: 18px;
+  height: 18px;
+  box-sizing: border-box;
+  border: solid 2px transparent;
+  border-top-color:#007ee5;
+  border-top-color: var(--blue);
+  border-left-color:#007ee5;
+  border-left-color: var(--blue);
+  border-radius: 50%;
+  -webkit-animation: nprogress-spinner .4s linear infinite;
+  animation: nprogress-spinner .4s linear infinite
+}
+
+.nprogress-custom-parent {
+  overflow: hidden;
+  position: relative
+}
+
+.nprogress-custom-parent #nprogress .bar, .nprogress-custom-parent #nprogress .spinner {
+  position: absolute
+}
+
+@-webkit-keyframes nprogress-spinner {
+  0% {
+    -webkit-transform: rotate(0)
+  }
+  100% {
+    -webkit-transform: rotate(360deg)
+  }
+}
+
+@keyframes nprogress-spinner {
+  0% {
+    transform: rotate(0)
+  }
+  100% {
+    transform: rotate(360deg)
+  }
+}
+/*nprogress*/

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
resources/assets/plugins/jquery-pjax/jquery.pjax.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
resources/assets/plugins/jquery-pjax/jquery.pjax.min.js


+ 36 - 36
resources/dist/css/plugins/loaders/animations/ball-grid-beat.css

@@ -27,66 +27,66 @@
 }
 
 .ball-grid-beat > div:nth-child(1) {
-  -webkit-animation-delay: 0.68s;
-          animation-delay: 0.68s;
-  -webkit-animation-duration: 1.58s;
-          animation-duration: 1.58s;
+  -webkit-animation-delay: -0.19s;
+          animation-delay: -0.19s;
+  -webkit-animation-duration: 1.43s;
+          animation-duration: 1.43s;
 }
 
 .ball-grid-beat > div:nth-child(2) {
-  -webkit-animation-delay: 0.26s;
-          animation-delay: 0.26s;
-  -webkit-animation-duration: 1.55s;
-          animation-duration: 1.55s;
+  -webkit-animation-delay: 0.28s;
+          animation-delay: 0.28s;
+  -webkit-animation-duration: 0.71s;
+          animation-duration: 0.71s;
 }
 
 .ball-grid-beat > div:nth-child(3) {
-  -webkit-animation-delay: 0.53s;
-          animation-delay: 0.53s;
-  -webkit-animation-duration: 1.3s;
-          animation-duration: 1.3s;
+  -webkit-animation-delay: -0.05s;
+          animation-delay: -0.05s;
+  -webkit-animation-duration: 0.91s;
+          animation-duration: 0.91s;
 }
 
 .ball-grid-beat > div:nth-child(4) {
-  -webkit-animation-delay: -0.09s;
-          animation-delay: -0.09s;
-  -webkit-animation-duration: 0.61s;
-          animation-duration: 0.61s;
+  -webkit-animation-delay: 0.44s;
+          animation-delay: 0.44s;
+  -webkit-animation-duration: 1.05s;
+          animation-duration: 1.05s;
 }
 
 .ball-grid-beat > div:nth-child(5) {
-  -webkit-animation-delay: 0.72s;
-          animation-delay: 0.72s;
-  -webkit-animation-duration: 1.29s;
-          animation-duration: 1.29s;
+  -webkit-animation-delay: 0.56s;
+          animation-delay: 0.56s;
+  -webkit-animation-duration: 0.81s;
+          animation-duration: 0.81s;
 }
 
 .ball-grid-beat > div:nth-child(6) {
-  -webkit-animation-delay: -0.06s;
-          animation-delay: -0.06s;
-  -webkit-animation-duration: 1.3s;
-          animation-duration: 1.3s;
+  -webkit-animation-delay: -0.11s;
+          animation-delay: -0.11s;
+  -webkit-animation-duration: 1s;
+          animation-duration: 1s;
 }
 
 .ball-grid-beat > div:nth-child(7) {
-  -webkit-animation-delay: 0.33s;
-          animation-delay: 0.33s;
-  -webkit-animation-duration: 1s;
-          animation-duration: 1s;
+  -webkit-animation-delay: 0.03s;
+          animation-delay: 0.03s;
+  -webkit-animation-duration: 1.25s;
+          animation-duration: 1.25s;
 }
 
 .ball-grid-beat > div:nth-child(8) {
-  -webkit-animation-delay: 0.78s;
-          animation-delay: 0.78s;
-  -webkit-animation-duration: 0.65s;
-          animation-duration: 0.65s;
+  -webkit-animation-delay: 0.18s;
+          animation-delay: 0.18s;
+  -webkit-animation-duration: 0.89s;
+          animation-duration: 0.89s;
 }
 
 .ball-grid-beat > div:nth-child(9) {
-  -webkit-animation-delay: 0.22s;
-          animation-delay: 0.22s;
-  -webkit-animation-duration: 1.52s;
-          animation-duration: 1.52s;
+  -webkit-animation-delay: 0.32s;
+          animation-delay: 0.32s;
+  -webkit-animation-duration: 1.17s;
+          animation-duration: 1.17s;
 }
 
 .ball-grid-beat > div {

+ 36 - 36
resources/dist/css/plugins/loaders/animations/ball-grid-pulse.css

@@ -39,66 +39,66 @@
 }
 
 .ball-grid-pulse > div:nth-child(1) {
-  -webkit-animation-delay: -0.18s;
-          animation-delay: -0.18s;
-  -webkit-animation-duration: 1.36s;
-          animation-duration: 1.36s;
+  -webkit-animation-delay: -0.15s;
+          animation-delay: -0.15s;
+  -webkit-animation-duration: 0.71s;
+          animation-duration: 0.71s;
 }
 
 .ball-grid-pulse > div:nth-child(2) {
-  -webkit-animation-delay: 0.66s;
-          animation-delay: 0.66s;
-  -webkit-animation-duration: 0.85s;
-          animation-duration: 0.85s;
+  -webkit-animation-delay: 0.24s;
+          animation-delay: 0.24s;
+  -webkit-animation-duration: 1.48s;
+          animation-duration: 1.48s;
 }
 
 .ball-grid-pulse > div:nth-child(3) {
-  -webkit-animation-delay: 0.76s;
-          animation-delay: 0.76s;
-  -webkit-animation-duration: 1.5s;
-          animation-duration: 1.5s;
+  -webkit-animation-delay: -0.18s;
+          animation-delay: -0.18s;
+  -webkit-animation-duration: 1.17s;
+          animation-duration: 1.17s;
 }
 
 .ball-grid-pulse > div:nth-child(4) {
-  -webkit-animation-delay: 0.05s;
-          animation-delay: 0.05s;
-  -webkit-animation-duration: 0.97s;
-          animation-duration: 0.97s;
+  -webkit-animation-delay: -0.19s;
+          animation-delay: -0.19s;
+  -webkit-animation-duration: 1.25s;
+          animation-duration: 1.25s;
 }
 
 .ball-grid-pulse > div:nth-child(5) {
-  -webkit-animation-delay: 0.04s;
-          animation-delay: 0.04s;
-  -webkit-animation-duration: 0.71s;
-          animation-duration: 0.71s;
+  -webkit-animation-delay: 0.41s;
+          animation-delay: 0.41s;
+  -webkit-animation-duration: 0.81s;
+          animation-duration: 0.81s;
 }
 
 .ball-grid-pulse > div:nth-child(6) {
-  -webkit-animation-delay: 0.78s;
-          animation-delay: 0.78s;
-  -webkit-animation-duration: 0.71s;
-          animation-duration: 0.71s;
+  -webkit-animation-delay: -0.17s;
+          animation-delay: -0.17s;
+  -webkit-animation-duration: 1.08s;
+          animation-duration: 1.08s;
 }
 
 .ball-grid-pulse > div:nth-child(7) {
-  -webkit-animation-delay: -0.09s;
-          animation-delay: -0.09s;
-  -webkit-animation-duration: 1.34s;
-          animation-duration: 1.34s;
+  -webkit-animation-delay: 0.54s;
+          animation-delay: 0.54s;
+  -webkit-animation-duration: 1.1s;
+          animation-duration: 1.1s;
 }
 
 .ball-grid-pulse > div:nth-child(8) {
-  -webkit-animation-delay: 0.46s;
-          animation-delay: 0.46s;
-  -webkit-animation-duration: 1.2s;
-          animation-duration: 1.2s;
+  -webkit-animation-delay: -0.05s;
+          animation-delay: -0.05s;
+  -webkit-animation-duration: 0.91s;
+          animation-duration: 0.91s;
 }
 
 .ball-grid-pulse > div:nth-child(9) {
-  -webkit-animation-delay: 0.5s;
-          animation-delay: 0.5s;
-  -webkit-animation-duration: 0.98s;
-          animation-duration: 0.98s;
+  -webkit-animation-delay: 0.64s;
+          animation-delay: 0.64s;
+  -webkit-animation-duration: 0.78s;
+          animation-duration: 0.78s;
 }
 
 .ball-grid-pulse > div {

+ 16 - 16
resources/dist/css/plugins/loaders/animations/line-scale-random.css

@@ -31,31 +31,31 @@
 }
 
 .line-scale-party > div:nth-child(1) {
-  -webkit-animation-delay: 0.79s;
-          animation-delay: 0.79s;
-  -webkit-animation-duration: 1.3s;
-          animation-duration: 1.3s;
+  -webkit-animation-delay: 0.77s;
+          animation-delay: 0.77s;
+  -webkit-animation-duration: 0.4s;
+          animation-duration: 0.4s;
 }
 
 .line-scale-party > div:nth-child(2) {
-  -webkit-animation-delay: 0.44s;
-          animation-delay: 0.44s;
-  -webkit-animation-duration: 0.35s;
-          animation-duration: 0.35s;
+  -webkit-animation-delay: 0.37s;
+          animation-delay: 0.37s;
+  -webkit-animation-duration: 1.19s;
+          animation-duration: 1.19s;
 }
 
 .line-scale-party > div:nth-child(3) {
-  -webkit-animation-delay: -0.1s;
-          animation-delay: -0.1s;
-  -webkit-animation-duration: 0.85s;
-          animation-duration: 0.85s;
+  -webkit-animation-delay: 0.68s;
+          animation-delay: 0.68s;
+  -webkit-animation-duration: 0.51s;
+          animation-duration: 0.51s;
 }
 
 .line-scale-party > div:nth-child(4) {
-  -webkit-animation-delay: -0.02s;
-          animation-delay: -0.02s;
-  -webkit-animation-duration: 0.78s;
-          animation-duration: 0.78s;
+  -webkit-animation-delay: 0.31s;
+          animation-delay: 0.31s;
+  -webkit-animation-duration: 0.97s;
+          animation-duration: 0.97s;
 }
 
 .line-scale-party > div {

+ 88 - 88
resources/dist/css/plugins/loaders/loaders.css

@@ -1454,66 +1454,66 @@
 }
 
 .ball-grid-beat > div:nth-child(1) {
-  -webkit-animation-delay: 0.1s;
-          animation-delay: 0.1s;
-  -webkit-animation-duration: 1.29s;
-          animation-duration: 1.29s;
+  -webkit-animation-delay: -0.05s;
+          animation-delay: -0.05s;
+  -webkit-animation-duration: 1s;
+          animation-duration: 1s;
 }
 
 .ball-grid-beat > div:nth-child(2) {
-  -webkit-animation-delay: 0.16s;
-          animation-delay: 0.16s;
-  -webkit-animation-duration: 1.48s;
-          animation-duration: 1.48s;
+  -webkit-animation-delay: 0.55s;
+          animation-delay: 0.55s;
+  -webkit-animation-duration: 1.22s;
+          animation-duration: 1.22s;
 }
 
 .ball-grid-beat > div:nth-child(3) {
-  -webkit-animation-delay: 0.66s;
-          animation-delay: 0.66s;
-  -webkit-animation-duration: 1.28s;
-          animation-duration: 1.28s;
+  -webkit-animation-delay: 0.18s;
+          animation-delay: 0.18s;
+  -webkit-animation-duration: 0.86s;
+          animation-duration: 0.86s;
 }
 
 .ball-grid-beat > div:nth-child(4) {
-  -webkit-animation-delay: -0.16s;
-          animation-delay: -0.16s;
-  -webkit-animation-duration: 1.5s;
-          animation-duration: 1.5s;
+  -webkit-animation-delay: 0.75s;
+          animation-delay: 0.75s;
+  -webkit-animation-duration: 1.32s;
+          animation-duration: 1.32s;
 }
 
 .ball-grid-beat > div:nth-child(5) {
-  -webkit-animation-delay: 0.5s;
-          animation-delay: 0.5s;
-  -webkit-animation-duration: 1.49s;
-          animation-duration: 1.49s;
+  -webkit-animation-delay: -0.16s;
+          animation-delay: -0.16s;
+  -webkit-animation-duration: 1.37s;
+          animation-duration: 1.37s;
 }
 
 .ball-grid-beat > div:nth-child(6) {
-  -webkit-animation-delay: 0.5s;
-          animation-delay: 0.5s;
-  -webkit-animation-duration: 1.15s;
-          animation-duration: 1.15s;
+  -webkit-animation-delay: 0.77s;
+          animation-delay: 0.77s;
+  -webkit-animation-duration: 0.99s;
+          animation-duration: 0.99s;
 }
 
 .ball-grid-beat > div:nth-child(7) {
-  -webkit-animation-delay: 0.64s;
-          animation-delay: 0.64s;
-  -webkit-animation-duration: 1s;
-          animation-duration: 1s;
+  -webkit-animation-delay: 0.62s;
+          animation-delay: 0.62s;
+  -webkit-animation-duration: 0.8s;
+          animation-duration: 0.8s;
 }
 
 .ball-grid-beat > div:nth-child(8) {
-  -webkit-animation-delay: 0.33s;
-          animation-delay: 0.33s;
-  -webkit-animation-duration: 1.57s;
-          animation-duration: 1.57s;
+  -webkit-animation-delay: 0.43s;
+          animation-delay: 0.43s;
+  -webkit-animation-duration: 0.93s;
+          animation-duration: 0.93s;
 }
 
 .ball-grid-beat > div:nth-child(9) {
-  -webkit-animation-delay: 0.54s;
-          animation-delay: 0.54s;
-  -webkit-animation-duration: 0.61s;
-          animation-duration: 0.61s;
+  -webkit-animation-delay: 0.49s;
+          animation-delay: 0.49s;
+  -webkit-animation-duration: 1.53s;
+          animation-duration: 1.53s;
 }
 
 .ball-grid-beat > div {
@@ -1575,66 +1575,66 @@
 }
 
 .ball-grid-pulse > div:nth-child(1) {
-  -webkit-animation-delay: 0.78s;
-          animation-delay: 0.78s;
-  -webkit-animation-duration: 1.24s;
-          animation-duration: 1.24s;
+  -webkit-animation-delay: 0.46s;
+          animation-delay: 0.46s;
+  -webkit-animation-duration: 0.77s;
+          animation-duration: 0.77s;
 }
 
 .ball-grid-pulse > div:nth-child(2) {
-  -webkit-animation-delay: 0.39s;
-          animation-delay: 0.39s;
-  -webkit-animation-duration: 1.22s;
-          animation-duration: 1.22s;
+  -webkit-animation-delay: 0.69s;
+          animation-delay: 0.69s;
+  -webkit-animation-duration: 1.48s;
+          animation-duration: 1.48s;
 }
 
 .ball-grid-pulse > div:nth-child(3) {
-  -webkit-animation-delay: 0.39s;
-          animation-delay: 0.39s;
-  -webkit-animation-duration: 1.28s;
-          animation-duration: 1.28s;
+  -webkit-animation-delay: 0.71s;
+          animation-delay: 0.71s;
+  -webkit-animation-duration: 1.57s;
+          animation-duration: 1.57s;
 }
 
 .ball-grid-pulse > div:nth-child(4) {
-  -webkit-animation-delay: 0.5s;
-          animation-delay: 0.5s;
-  -webkit-animation-duration: 1.46s;
-          animation-duration: 1.46s;
+  -webkit-animation-delay: -0.08s;
+          animation-delay: -0.08s;
+  -webkit-animation-duration: 1.1s;
+          animation-duration: 1.1s;
 }
 
 .ball-grid-pulse > div:nth-child(5) {
-  -webkit-animation-delay: 0.75s;
-          animation-delay: 0.75s;
-  -webkit-animation-duration: 0.93s;
-          animation-duration: 0.93s;
+  -webkit-animation-delay: -0.13s;
+          animation-delay: -0.13s;
+  -webkit-animation-duration: 0.71s;
+          animation-duration: 0.71s;
 }
 
 .ball-grid-pulse > div:nth-child(6) {
-  -webkit-animation-delay: 0.36s;
-          animation-delay: 0.36s;
-  -webkit-animation-duration: 1.26s;
-          animation-duration: 1.26s;
+  -webkit-animation-delay: 0.6s;
+          animation-delay: 0.6s;
+  -webkit-animation-duration: 0.81s;
+          animation-duration: 0.81s;
 }
 
 .ball-grid-pulse > div:nth-child(7) {
-  -webkit-animation-delay: 0.7s;
-          animation-delay: 0.7s;
-  -webkit-animation-duration: 0.98s;
-          animation-duration: 0.98s;
+  -webkit-animation-delay: 0.45s;
+          animation-delay: 0.45s;
+  -webkit-animation-duration: 1.14s;
+          animation-duration: 1.14s;
 }
 
 .ball-grid-pulse > div:nth-child(8) {
-  -webkit-animation-delay: -0.01s;
-          animation-delay: -0.01s;
-  -webkit-animation-duration: 0.92s;
-          animation-duration: 0.92s;
+  -webkit-animation-delay: 0.33s;
+          animation-delay: 0.33s;
+  -webkit-animation-duration: 1.49s;
+          animation-duration: 1.49s;
 }
 
 .ball-grid-pulse > div:nth-child(9) {
-  -webkit-animation-delay: 0.2s;
-          animation-delay: 0.2s;
-  -webkit-animation-duration: 1.22s;
-          animation-duration: 1.22s;
+  -webkit-animation-delay: 0.43s;
+          animation-delay: 0.43s;
+  -webkit-animation-duration: 1.18s;
+          animation-duration: 1.18s;
 }
 
 .ball-grid-pulse > div {
@@ -2181,31 +2181,31 @@
 }
 
 .line-scale-party > div:nth-child(1) {
-  -webkit-animation-delay: 0.18s;
-          animation-delay: 0.18s;
-  -webkit-animation-duration: 1.19s;
-          animation-duration: 1.19s;
+  -webkit-animation-delay: -0.06s;
+          animation-delay: -0.06s;
+  -webkit-animation-duration: 1.07s;
+          animation-duration: 1.07s;
 }
 
 .line-scale-party > div:nth-child(2) {
-  -webkit-animation-delay: 0.29s;
-          animation-delay: 0.29s;
-  -webkit-animation-duration: 0.89s;
-          animation-duration: 0.89s;
+  -webkit-animation-delay: -0.15s;
+          animation-delay: -0.15s;
+  -webkit-animation-duration: 0.42s;
+          animation-duration: 0.42s;
 }
 
 .line-scale-party > div:nth-child(3) {
-  -webkit-animation-delay: 0.07s;
-          animation-delay: 0.07s;
-  -webkit-animation-duration: 0.73s;
-          animation-duration: 0.73s;
+  -webkit-animation-delay: 0.22s;
+          animation-delay: 0.22s;
+  -webkit-animation-duration: 0.65s;
+          animation-duration: 0.65s;
 }
 
 .line-scale-party > div:nth-child(4) {
-  -webkit-animation-delay: -0.12s;
-          animation-delay: -0.12s;
-  -webkit-animation-duration: 1.29s;
-          animation-duration: 1.29s;
+  -webkit-animation-delay: -0.16s;
+          animation-delay: -0.16s;
+  -webkit-animation-duration: 0.83s;
+          animation-duration: 0.83s;
 }
 
 .line-scale-party > div {

+ 2 - 436
resources/dist/dcat/bootstrap.js

@@ -86,448 +86,14 @@
 /************************************************************************/
 /******/ ({
 
-/***/ "./resources/assets/dcat/Dcat.js":
-/*!***************************************!*\
-  !*** ./resources/assets/dcat/Dcat.js ***!
-  \***************************************/
-/*! exports provided: default */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Dcat; });
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-var $ = jQuery,
-    _pjaxResponded = false,
-    bootingCallbacks = [],
-    formCallbacks = {
-  before: [],
-  success: [],
-  error: []
-};
-
-var Dcat = /*#__PURE__*/function () {
-  function Dcat(config) {
-    _classCallCheck(this, Dcat);
-
-    this.withConfig(config);
-    this.pjaxContainer = config['pjax_container_selector'] || '#pjax-container';
-  }
-
-  _createClass(Dcat, [{
-    key: "booting",
-    value: function booting(callback) {
-      bootingCallbacks.push(callback);
-      return this;
-    }
-  }, {
-    key: "boot",
-    value: function boot() {
-      var _this = this;
-
-      bootingCallbacks.forEach(function (callback) {
-        return callback(_this);
-      });
-      bootingCallbacks = [];
-    }
-  }, {
-    key: "ready",
-    value: function ready(callback, _window) {
-      if (!_window || _window === window) {
-        if (!_pjaxResponded) {
-          return $(callback);
-        }
-
-        return $(document).one('pjax:loaded', callback);
-      }
-
-      var proxy = function proxy(e) {
-        _window.$(_window.$(this.pjaxContainer)).one('pjax:loaded', proxy);
-
-        callback(e);
-      };
-
-      _window.Dcat.ready(proxy);
-    }
-  }, {
-    key: "withConfig",
-    value: function withConfig(config) {
-      this.config = config;
-      this.withLang(config['lang']);
-      this.withToken(config['token']);
-      return this;
-    }
-  }, {
-    key: "withToken",
-    value: function withToken(token) {
-      token && (this.token = token);
-      return this;
-    }
-  }, {
-    key: "withLang",
-    value: function withLang(lang) {
-      lang && (this.lang = lang);
-      return this;
-    }
-  }, {
-    key: "pjaxResponded",
-    value: function pjaxResponded() {
-      _pjaxResponded = true;
-      return this;
-    }
-  }, {
-    key: "submiting",
-    value: function submiting(callback) {
-      typeof callback == 'function' && formCallbacks.before.push(callback);
-      return this;
-    }
-  }, {
-    key: "submitted",
-    value: function submitted(success, error) {
-      typeof success == 'function' && formCallbacks.success.push(success);
-      typeof error == 'function' && formCallbacks.error.push(error);
-      return this;
-    }
-  }]);
-
-  return Dcat;
-}();
-
-
-
-/***/ }),
-
-/***/ "./resources/assets/dcat/bootstrappers/Footer.js":
-/*!*******************************************************!*\
-  !*** ./resources/assets/dcat/bootstrappers/Footer.js ***!
-  \*******************************************************/
-/*! exports provided: default */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Footer; });
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-var Footer = /*#__PURE__*/function () {
-  function Footer(Dcat) {
-    _classCallCheck(this, Footer);
-
-    Dcat.booting(this.bootScrollTop);
-  }
-
-  _createClass(Footer, [{
-    key: "bootScrollTop",
-    value: function bootScrollTop() {
-      $(window).scroll(function () {
-        if ($(this).scrollTop() > 400) {
-          $('.scroll-top').fadeIn();
-        } else {
-          $('.scroll-top').fadeOut();
-        }
-      }); //Click event to scroll to top
-
-      $('.scroll-top').click(function () {
-        $('html, body').animate({
-          scrollTop: 0
-        }, 1000);
-      });
-    }
-  }]);
-
-  return Footer;
-}();
-
-
-
-/***/ }),
-
-/***/ "./resources/assets/dcat/bootstrappers/Pjax.js":
-/*!*****************************************************!*\
-  !*** ./resources/assets/dcat/bootstrappers/Pjax.js ***!
-  \*****************************************************/
-/*! exports provided: default */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Pjax; });
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-var $d = $(document);
-
-var Pjax = /*#__PURE__*/function () {
-  function Pjax(Dcat) {
-    _classCallCheck(this, Pjax);
-
-    Dcat.booting(function () {
-      this.boot(Dcat);
-    });
-  }
-
-  _createClass(Pjax, [{
-    key: "boot",
-    value: function boot(Dcat) {
-      $d.pjax('a:not(a[target="_blank"])', '#pjax-container', {
-        fragment: 'body'
-      });
-      NP.configure({
-        parent: Dcat.pjaxContainer
-      });
-      $d.on('pjax:timeout', function (event) {
-        event.preventDefault();
-      });
-      $d.on('submit', 'form[pjax-container]', function (event) {
-        $.pjax.submit(event, '#pjax-container');
-      });
-      $d.on("pjax:popstate", function () {
-        $d.one("pjax:end", function (event) {
-          $(event.target).find("script[data-exec-on-popstate]").each(function () {
-            $.globalEval(this.text || this.textContent || this.innerHTML || '');
-          });
-        });
-      });
-      $d.on('pjax:send', function (xhr) {
-        if (xhr.relatedTarget && xhr.relatedTarget.tagName && xhr.relatedTarget.tagName.toLowerCase() === 'form') {
-          var $submit_btn = $('form[pjax-container] :submit');
-
-          if ($submit_btn) {
-            $submit_btn.button('loading');
-          }
-        }
-
-        NP.start();
-      });
-      $d.on('pjax:complete', function (xhr) {
-        if (xhr.relatedTarget && xhr.relatedTarget.tagName && xhr.relatedTarget.tagName.toLowerCase() === 'form') {
-          var $submit_btn = $('form[pjax-container] :submit');
-
-          if ($submit_btn) {
-            $submit_btn.button('reset');
-          }
-        }
-
-        NP.done();
-      }); // 新页面加载,重新初始化
-
-      $d.on('pjax:loaded', Dcat.boot);
-    }
-  }]);
-
-  return Pjax;
-}();
-
-
-
-/***/ }),
-
 /***/ "./resources/assets/dcat/dcat-bootstrap.js":
 /*!*************************************************!*\
   !*** ./resources/assets/dcat/dcat-bootstrap.js ***!
   \*************************************************/
 /*! no exports provided */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _Dcat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Dcat */ "./resources/assets/dcat/Dcat.js");
-/* harmony import */ var _extensions_Ajax__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./extensions/Ajax */ "./resources/assets/dcat/extensions/Ajax.js");
-/* harmony import */ var _extensions_Dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./extensions/Dialog */ "./resources/assets/dcat/extensions/Dialog.js");
-/* harmony import */ var _bootstrappers_Footer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bootstrappers/Footer */ "./resources/assets/dcat/bootstrappers/Footer.js");
-/* harmony import */ var _bootstrappers_Pjax__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bootstrappers/Pjax */ "./resources/assets/dcat/bootstrappers/Pjax.js");
-
-
-
-
-
-
-var $ = jQuery,
-    extend = function extend(Dcat) {
-  // 扩展Dcat对象
-  new _extensions_Ajax__WEBPACK_IMPORTED_MODULE_1__["default"](Dcat);
-  new _extensions_Dialog__WEBPACK_IMPORTED_MODULE_2__["default"](Dcat);
-},
-    on = function on(Dcat) {
-  // 初始化
-  new _bootstrappers_Footer__WEBPACK_IMPORTED_MODULE_3__["default"](Dcat);
-  new _bootstrappers_Pjax__WEBPACK_IMPORTED_MODULE_4__["default"](Dcat);
-},
-    boot = function boot(Dcat) {
-  extend(Dcat);
-  on(Dcat);
-  $(Dcat.boot);
-  return Dcat;
-};
-
-(function () {
-  this.CreateDcat = function (config) {
-    return boot(new _Dcat__WEBPACK_IMPORTED_MODULE_0__["default"](config));
-  };
-}).call(window);
-
-/***/ }),
-
-/***/ "./resources/assets/dcat/extensions/Ajax.js":
-/*!**************************************************!*\
-  !*** ./resources/assets/dcat/extensions/Ajax.js ***!
-  \**************************************************/
-/*! exports provided: default */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Ajax; });
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-var Ajax = /*#__PURE__*/function () {
-  function Ajax(Dcat) {
-    _classCallCheck(this, Ajax);
-
-    this.Dcat = Dcat;
-    this.extend(Dcat);
-  }
-
-  _createClass(Ajax, [{
-    key: "extend",
-    value: function extend(Dcat) {
-      Dcat.handleAjaxError = this.handleAjaxError;
-    }
-  }, {
-    key: "handleAjaxError",
-    value: function handleAjaxError(xhr, text, msg) {
-      var Dcat = this.Dcat;
-      Dcat.NP.done();
-      Dcat.loading(false); // 关闭所有loading效果
-
-      var json = xhr.responseJSON || {},
-          _msg = json.message;
-
-      switch (xhr.status) {
-        case 500:
-          return Dcat.error(_msg || Dcat.lang['500'] || 'Server internal error.');
-
-        case 403:
-          return Dcat.error(_msg || Dcat.lang['403'] || 'Permission deny!');
-
-        case 401:
-          if (json.login) {
-            return location.href = json.login;
-          }
-
-          return Dcat.error(Dcat.lang['401'] || 'Unauthorized.');
-
-        case 419:
-          return Dcat.error(Dcat.lang['419'] || 'Sorry, your page has expired.');
-
-        case 422:
-          if (json.errors) {
-            try {
-              var err = [],
-                  i;
-
-              for (i in json.errors) {
-                err.push(json.errors[i].join('<br/>'));
-              }
-
-              Dcat.error(err.join('<br/>'));
-            } catch (e) {}
-
-            return;
-          }
-
-      }
-
-      Dcat.error(_msg || xhr.status + ' ' + msg);
-    }
-  }]);
-
-  return Ajax;
-}();
-
-
-
-/***/ }),
-
-/***/ "./resources/assets/dcat/extensions/Dialog.js":
-/*!****************************************************!*\
-  !*** ./resources/assets/dcat/extensions/Dialog.js ***!
-  \****************************************************/
-/*! exports provided: default */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Dialog; });
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-var Dialog = /*#__PURE__*/function () {
-  function Dialog(Dcat) {
-    _classCallCheck(this, Dialog);
-
-    this.extend(Dcat);
-  }
-
-  _createClass(Dialog, [{
-    key: "extend",
-    value: function extend(Dcat) {
-      var _this = this;
-
-      Dcat.success = _this.success;
-      Dcat.error = _this.error;
-      Dcat.info = _this.info;
-      Dcat.warning = _this.warning;
-      Dcat.confirm = _this.confirm;
-    }
-  }, {
-    key: "success",
-    value: function success(message, title, options) {
-      toastr.success(message, title, options);
-    }
-  }, {
-    key: "error",
-    value: function error(message, title, options) {
-      toastr.error(message, title, options);
-    }
-  }, {
-    key: "info",
-    value: function info(message, title, options) {
-      toastr.info(message, title, options);
-    }
-  }, {
-    key: "warning",
-    value: function warning(message, title, options) {
-      toastr.warning(message, title, options);
-    }
-  }, {
-    key: "confirm",
-    value: function confirm(message, title, success, error, options) {}
-  }]);
-
-  return Dialog;
-}();
-
+/***/ (function(module, exports) {
 
+throw new Error("Module build failed (from ./node_modules/babel-loader/lib/index.js):\nError: ENOENT: no such file or directory, open 'F:\\p\\dcat-admin-github\\dcat-admin\\resources\\assets\\dcat\\dcat-bootstrap.js'");
 
 /***/ }),
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 254 - 0
resources/dist/dcat/js/bootstrap.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
resources/dist/js/core/app-menu.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
resources/dist/plugins/jquery-pjax/jquery.pjax.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
resources/dist/plugins/jquery-pjax/jquery.pjax.min.js


+ 3 - 2
resources/views/layouts/vertical.blade.php

@@ -7,11 +7,12 @@
     <script>
         var Dcat = CreateDcat({!! Dcat\Admin\Admin::jsVariables() !!});
 
-
-
+        console.log(123, Dcat)
+        // Dcat.NP.start()
         $(function () {
 
         });
+
     </script>
 
     @include('admin::partials.sidebar')

+ 1 - 1
src/Layout/Assets.php

@@ -29,7 +29,7 @@ class Assets
      */
     protected $headerJs = [
         'vendors' => 'dcat-admin/vendors/js/vendors.min.js',
-        'dcat'    => 'dcat-admin/dcat/bootstrap.js',
+        'dcat'    => 'dcat-admin/dcat/js/bootstrap.js',
     ];
 
     /**

+ 2 - 1
webpack.mix.js

@@ -64,7 +64,8 @@ mix.copyDirectory('resources/assets/plugins', 'resources/dist/plugins');
 
 mix.js('resources/assets/js/core/app-menu.js', 'resources/dist/js/core')
     .js('resources/assets/js/core/app.js', 'resources/dist/js/core')
-    .js('resources/assets/dcat/dcat-bootstrap.js', 'resources/dist/dcat/bootstrap.js')
+    .js('resources/assets/dcat/js/dcat-bootstrap.js', 'resources/dist/dcat/js/bootstrap.js')
+    .sass('resources/assets/dcat/sass/dcat-bootstrap.scss', 'resources/dist/dcat/css/bootstrap.css')
     .sass('resources/assets/sass/bootstrap.scss', 'resources/dist/css')
     .sass('resources/assets/sass/bootstrap-extended.scss', 'resources/dist/css')
     .sass('resources/assets/sass/colors.scss', 'resources/dist/css')

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels