isite 2023.1.3 → 2023.1.5
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/apps/client-side/app.js +61 -1
- package/apps/client-side/site_files/css/WebShareEditor.css +1 -0
- package/apps/client-side/site_files/css/bootstrap5-addon.css +7 -3
- package/apps/client-side/site_files/css/dropdown.css +6 -0
- package/apps/client-side/site_files/css/font-cairo.css +15 -11
- package/apps/client-side/site_files/css/font-droid.css +21 -18
- package/apps/client-side/site_files/css/font-saudi.css +92 -0
- package/apps/client-side/site_files/css/form.css +99 -88
- package/apps/client-side/site_files/css/images.css +8 -8
- package/apps/client-side/site_files/css/layout.css +16 -3
- package/apps/client-side/site_files/css/modal.css +4 -0
- package/apps/client-side/site_files/css/print.css +88 -87
- package/apps/client-side/site_files/css/table.css +0 -4
- package/apps/client-side/site_files/css/tabs.css +0 -1
- package/apps/client-side/site_files/css/theme_paper.css +2 -1
- package/apps/client-side/site_files/css/treeview.css +4 -2
- package/apps/client-side/site_files/fonts/DINNextLTW05-Bold.woff2 +0 -0
- package/apps/client-side/site_files/fonts/DINNextLTW05-Regular.woff2 +0 -0
- package/apps/client-side/site_files/fonts/DINNextLTW23-Light.woff2 +0 -0
- package/apps/client-side/site_files/fonts/DINNextLTW23-Medium.woff2 +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd45Light_22520.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd55Roman_22526.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd75Bold_22539.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd85Heavy_22545.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd95Black_22551.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStdMd1.woff +0 -0
- package/apps/client-side/site_files/html/directive/i-content.html +4 -0
- package/apps/client-side/site_files/html/directive/i-date.html +4 -4
- package/apps/client-side/site_files/html/directive/i-datetime.html +5 -5
- package/apps/client-side/site_files/html/directive/i-list.html +3 -3
- package/apps/client-side/site_files/js/WebShareEditor.js +1 -0
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +98 -11
- package/apps/client-side/site_files/js/site.js +9 -1
- package/apps/client-side/site_files/js/xlsx.js +23 -0
- package/index.js +2 -2
- package/lib/email.js +18 -17
- package/lib/parser.js +1 -1
- package/lib/routing.js +3 -0
- package/lib/session.js +1 -0
- package/lib/words.js +24 -18
- package/object-options/index.js +1 -7
- package/object-options/lib/fn.js +42 -0
- package/package.json +1 -1
|
@@ -63,6 +63,81 @@ app.directive('iTextarea', function () {
|
|
|
63
63
|
template: `/*##client-side/directive/i-textarea.html*/`,
|
|
64
64
|
};
|
|
65
65
|
});
|
|
66
|
+
app.directive('iContent', function ($timeout, $interval) {
|
|
67
|
+
return {
|
|
68
|
+
restrict: 'E',
|
|
69
|
+
scope: {
|
|
70
|
+
v: '@',
|
|
71
|
+
label: '@',
|
|
72
|
+
id2: '@',
|
|
73
|
+
disabled: '@',
|
|
74
|
+
rows: '@',
|
|
75
|
+
ngModel: '=',
|
|
76
|
+
ngChange: '&',
|
|
77
|
+
},
|
|
78
|
+
link: function ($scope, element, attrs, ctrl) {
|
|
79
|
+
if (typeof attrs.disabled !== 'undefined') {
|
|
80
|
+
attrs.disabled = 'disabled';
|
|
81
|
+
} else {
|
|
82
|
+
attrs.disabled = '';
|
|
83
|
+
}
|
|
84
|
+
$scope.rows = $scope.rows || 10;
|
|
85
|
+
$scope.id2 = $scope.id2 || 'textarea_' + Math.random().toString().replace('0.', '');
|
|
86
|
+
$(element)
|
|
87
|
+
.find('textarea')
|
|
88
|
+
.focus(() => {
|
|
89
|
+
$('.popup').hide();
|
|
90
|
+
});
|
|
91
|
+
$timeout(() => {
|
|
92
|
+
window['content_' + attrs.id] = WebShareEditor.create($scope.id2, {
|
|
93
|
+
toolbarItem: [
|
|
94
|
+
['undo', 'redo'],
|
|
95
|
+
['font', 'fontSize', 'formatBlock'],
|
|
96
|
+
['bold', 'underline', 'italic', 'strike', 'subscript', 'superscript'],
|
|
97
|
+
['removeFormat'],
|
|
98
|
+
['fontColor', 'hiliteColor'],
|
|
99
|
+
['outdent', 'indent'],
|
|
100
|
+
['align', 'horizontalRule', 'list', 'table'],
|
|
101
|
+
['link', 'image', 'video'],
|
|
102
|
+
['preview', 'print'],
|
|
103
|
+
/* ['fullScreen', 'showBlocks', 'codeView'],
|
|
104
|
+
['save', 'template'],*/
|
|
105
|
+
],
|
|
106
|
+
width: '100%',
|
|
107
|
+
minHeight: '300px',
|
|
108
|
+
});
|
|
109
|
+
if ($scope.ngModel) {
|
|
110
|
+
window['content_' + attrs.id].setContents($scope.ngModel);
|
|
111
|
+
}
|
|
112
|
+
$interval(() => {
|
|
113
|
+
$scope.ngModel2 = window['content_' + attrs.id].getContents();
|
|
114
|
+
if ($scope.ngModel !== $scope.ngModel2) {
|
|
115
|
+
$scope.ngModel = $scope.ngModel2;
|
|
116
|
+
$scope.changed();
|
|
117
|
+
}
|
|
118
|
+
}, 1000);
|
|
119
|
+
}, 500);
|
|
120
|
+
|
|
121
|
+
$scope.changed = function () {
|
|
122
|
+
$timeout(() => {
|
|
123
|
+
if ($scope.ngChange) {
|
|
124
|
+
$scope.ngChange();
|
|
125
|
+
}
|
|
126
|
+
}, 100);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
$scope.$watch('ngModel', (ngModel) => {
|
|
130
|
+
if (ngModel && window['content_' + attrs.id]) {
|
|
131
|
+
if ($scope.ngModel !== $scope.ngModel2) {
|
|
132
|
+
$scope.ngModel = $scope.ngModel2;
|
|
133
|
+
window['content_' + attrs.id].setContents($scope.ngModel);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
template: `/*##client-side/directive/i-content.html*/`,
|
|
139
|
+
};
|
|
140
|
+
});
|
|
66
141
|
|
|
67
142
|
app.directive('iCheckbox', function ($timeout) {
|
|
68
143
|
return {
|
|
@@ -146,10 +221,10 @@ app.directive('iButton', function () {
|
|
|
146
221
|
} else if ($scope.type.like('unapprove')) {
|
|
147
222
|
$scope.fa = 'fas fa-eject';
|
|
148
223
|
$scope.class = 'btn-danger';
|
|
149
|
-
}
|
|
224
|
+
} else if ($scope.type.like('approve')) {
|
|
150
225
|
$scope.fa = 'fas fa-check-double';
|
|
151
226
|
$scope.class = 'btn-primary';
|
|
152
|
-
}else if ($scope.type.like('*view*') || $scope.type.like('*details*')) {
|
|
227
|
+
} else if ($scope.type.like('*view*') || $scope.type.like('*details*')) {
|
|
153
228
|
$scope.fa = 'fas fa-eye';
|
|
154
229
|
$scope.class = 'btn-info';
|
|
155
230
|
} else if ($scope.type.like('*delete*') || $scope.type.like('*remove*')) {
|
|
@@ -173,6 +248,12 @@ app.directive('iButton', function () {
|
|
|
173
248
|
} else if ($scope.type.like('*logout*') || $scope.type.like('*signout*')) {
|
|
174
249
|
$scope.fa = 'fas fa-sign-out-alt';
|
|
175
250
|
$scope.class = 'btn-light';
|
|
251
|
+
} else if ($scope.type.like('*push*')) {
|
|
252
|
+
$scope.fa = 'fas fa-long-arrow-alt-down';
|
|
253
|
+
$scope.class = 'btn-primary';
|
|
254
|
+
} else if ($scope.type.like('*cancel*')) {
|
|
255
|
+
$scope.fa = 'fas fa-minus-circle';
|
|
256
|
+
$scope.class = 'btn-danger';
|
|
176
257
|
}
|
|
177
258
|
if ($scope.type.like('*default*')) {
|
|
178
259
|
$scope.class = '';
|
|
@@ -215,6 +296,7 @@ app.directive('iList', [
|
|
|
215
296
|
ngGet: '&',
|
|
216
297
|
ngAdd: '&',
|
|
217
298
|
items: '=',
|
|
299
|
+
activeValue: '=',
|
|
218
300
|
},
|
|
219
301
|
link: function ($scope, element, attrs, ctrl) {
|
|
220
302
|
$scope.primary = $scope.primary || 'id';
|
|
@@ -238,7 +320,6 @@ app.directive('iList', [
|
|
|
238
320
|
$scope.fa_add = 'fa-plus';
|
|
239
321
|
}
|
|
240
322
|
|
|
241
|
-
|
|
242
323
|
if ($scope.ngSearch) {
|
|
243
324
|
$scope.showSearch = !0;
|
|
244
325
|
}
|
|
@@ -249,7 +330,9 @@ app.directive('iList', [
|
|
|
249
330
|
let input = $(element).find('input.dropdown-text');
|
|
250
331
|
$(element).hover(
|
|
251
332
|
() => {
|
|
252
|
-
|
|
333
|
+
if (attrs.disabled !== 'disabled') {
|
|
334
|
+
$scope.popupElement.css('display', 'block');
|
|
335
|
+
}
|
|
253
336
|
},
|
|
254
337
|
() => {
|
|
255
338
|
$scope.popupElement.css('display', 'none');
|
|
@@ -328,6 +411,8 @@ app.directive('iList', [
|
|
|
328
411
|
}
|
|
329
412
|
});
|
|
330
413
|
}
|
|
414
|
+
|
|
415
|
+
|
|
331
416
|
});
|
|
332
417
|
|
|
333
418
|
$scope.$watch('ngModel', (ngModel) => {
|
|
@@ -344,16 +429,15 @@ app.directive('iList', [
|
|
|
344
429
|
}
|
|
345
430
|
});
|
|
346
431
|
|
|
347
|
-
$scope.searchElement.on('input'
|
|
348
|
-
|
|
349
|
-
if (
|
|
432
|
+
$scope.searchElement.on('input', () => {
|
|
433
|
+
$timeout(() => {
|
|
434
|
+
if (attrs.ngGet) {
|
|
350
435
|
$scope.ngGet({ $search: $scope.searchElement.val() });
|
|
351
|
-
} else if (
|
|
352
|
-
$scope
|
|
436
|
+
} else if (attrs.ngSearch) {
|
|
437
|
+
$scope.$filter = $scope.searchElement.val();
|
|
353
438
|
}
|
|
354
439
|
}, 100);
|
|
355
|
-
})
|
|
356
|
-
|
|
440
|
+
});
|
|
357
441
|
|
|
358
442
|
$scope.updateModel = function (item) {
|
|
359
443
|
$scope.ngModel = $scope.getNgValue(item, $scope.ngValue);
|
|
@@ -510,6 +594,7 @@ app.directive('iDate', function () {
|
|
|
510
594
|
$scope.dayTitle = 'Day';
|
|
511
595
|
$scope.monthTitle = 'Month';
|
|
512
596
|
$scope.yearTitle = 'Year';
|
|
597
|
+
|
|
513
598
|
|
|
514
599
|
$scope.lang = site.session ? site.session.lang : 'en';
|
|
515
600
|
if ($scope.lang === 'ar') {
|
|
@@ -554,11 +639,13 @@ app.directive('iDate', function () {
|
|
|
554
639
|
$scope.model.selectedDay = $scope.days.find((d) => d.id == ngModel.getDate());
|
|
555
640
|
$scope.model.selectedMonth = $scope.monthes.find((m) => m.id == ngModel.getMonth());
|
|
556
641
|
$scope.model.selectedYear = $scope.years.find((y) => y.id == ngModel.getFullYear());
|
|
642
|
+
$scope.model.$selectedYear = 2023;
|
|
557
643
|
} else {
|
|
558
644
|
$scope.model = $scope.model || {};
|
|
559
645
|
$scope.model.selectedDay = null;
|
|
560
646
|
$scope.model.selectedMonth = null;
|
|
561
647
|
$scope.model.selectedYear = null;
|
|
648
|
+
$scope.model.activeYear = 2023;
|
|
562
649
|
}
|
|
563
650
|
});
|
|
564
651
|
|
|
@@ -1247,7 +1247,7 @@
|
|
|
1247
1247
|
console.error('qrcode need {selector , text}');
|
|
1248
1248
|
return;
|
|
1249
1249
|
}
|
|
1250
|
-
return JsBarcode(options.selector, options.
|
|
1250
|
+
return JsBarcode(options.selector, options.text, options.options);
|
|
1251
1251
|
};
|
|
1252
1252
|
site.qrcode = function (options) {
|
|
1253
1253
|
if (!options || !options.selector || !options.text) {
|
|
@@ -1272,5 +1272,13 @@
|
|
|
1272
1272
|
});
|
|
1273
1273
|
}
|
|
1274
1274
|
};
|
|
1275
|
+
|
|
1276
|
+
site.export = function (table, type = 'xlsx') {
|
|
1277
|
+
var data = typeof table === 'string' ? document.querySelector(table) : table;
|
|
1278
|
+
var excelFile = XLSX.utils.table_to_book(data, { sheet: 'sheet1' });
|
|
1279
|
+
XLSX.write(excelFile, { bookType: type, bookSST: true, type: 'base64' });
|
|
1280
|
+
XLSX.writeFile(excelFile, (data.id || data.tagName) + '.' + type);
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1275
1283
|
window.site = site;
|
|
1276
1284
|
})(window, document, 'undefined', jQuery);
|